/* Global styles */
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

/* Custom listing text blocks */
.intro-text,
.page-description {
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 12px;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

@media (min-width: 768px) {
    .intro-text,
    .page-description {
        margin-bottom: -0.5rem;
    }
}

/* Utility Classes */
.hover-shadow {
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  border: 1px solid #dee2e6;
}

.hover-shadow:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  border-color: #0d6efd;
}

/* Site Header */
.site-header {
  background: var(--header-grad);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 1030;
}

.site-header .nav-link {
  color: #fff;
  opacity: .9;
  transition: opacity var(--dur-fast) var(--ease);
}

.site-header .nav-link:hover,
.site-header .nav-link:focus {
  opacity: 1;
  color: #fff;
}

.site-header__logo {
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

.site-header__cta {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  border-radius: var(--radius);
  transition: all var(--dur-fast) var(--ease);
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  height: calc(1.5em + 0.75rem + 2px);
}

.site-header__cta:hover,
.site-header__cta:focus {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
  transform: translateY(-1px);
}

/* Mobile Menu Styles */
@media (max-width: 991.98px) {
  /* Menu items - button-like appearance */
  .mobile-menu-item {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.875rem 1rem !important;
    margin: 0.25rem 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    font-weight: 500;
    transition: all 0.2s ease;
  }
  
  .mobile-menu-item:hover,
  .mobile-menu-item:focus {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(4px);
  }
  
  /* Bug report section - separate at bottom */
  .mobile-bug-section {
    width: 100%;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
  }
  
  .mobile-bug-button {
    width: 100%;
    padding: 0.875rem 1rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    font-weight: 400;
    opacity: 0.8;
    transition: all 0.2s ease;
  }
  
  .mobile-bug-button:hover,
  .mobile-bug-button:focus {
    background: rgba(255, 255, 255, 0.1);
    opacity: 1;
  }
  
  /* Navbar collapse */
  .navbar-collapse {
    padding-top: 1rem;
  }
  
  .navbar-nav {
    width: 100%;
  }
}

/* Site Footer */
.site-footer {
  background: var(--gray-50);
}

.site-footer h5 {
  color: var(--color-black);
  margin-bottom: 1rem;
}

.site-footer a {
  color: var(--gray-700);
  transition: color var(--dur-fast) var(--ease);
}

.site-footer a:hover {
  color: var(--color-blue);
  text-decoration: none;
}

.site-footer ul li {
  margin-bottom: 0.5rem;
}

/* Hero Section */
.hero {
  background: var(--gray-50);
}

.hero__title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-black);
  margin-bottom: 1rem;
}

.hero__subtitle {
  font-size: 1.25rem;
  color: var(--gray-700);
  margin-bottom: 2rem;
}

.hero__form {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--elev-1);
}

.hero__field {
  border-radius: var(--radius);
  border: 1px solid #dee2e6;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  font-size: 1rem;
}

.hero__field option {
  padding: 0.5rem;
}

/* Force dropdowns to open downward */
.form-select {
  background-position: right 0.75rem center;
}

.form-select:focus {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Prevent dropdown from opening upward - force downward direction */
select.form-select {
  direction: ltr;
}

/* Additional CSS to force dropdown direction */
.hero__field,
.form-select {
  /* Force dropdown to render below the element */
  position: relative;
  z-index: 1;
}

.hero__field:focus,
.form-select:focus {
  /* Ensure dropdown appears below when focused */
  z-index: 2;
}

/* Override any potential upward positioning */
select option {
  direction: ltr;
}

.hero__field:focus {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.hero__submit {
  background: linear-gradient(135deg, var(--color-blue), #0056b3);
  border: none;
  color: var(--color-white);
  border-radius: var(--radius);
  font-weight: 600;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  height: calc(1.5em + 0.75rem + 2px);
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.hero__submit:hover,
.hero__submit:focus {
  transform: translateY(-2px);
  box-shadow: var(--elev-1);
  background: linear-gradient(135deg, var(--color-blue), #0056b3);
  color: var(--color-white);
}

.hero__image {
  background: linear-gradient(135deg, var(--color-blue), var(--color-red));
  border-radius: var(--radius-lg);
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-size: 3rem;
  opacity: 0.8;
}

/* Job Picks Section */
.job-picks {
  background: var(--color-white);
}

.job-picks__title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-black);
  margin-bottom: 2rem;
}

/* Popular Countries Section */
.popular-countries {
  background: var(--color-white);
}

.popular-countries__header {
  text-align: left;
}

.popular-countries__title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-black);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.popular-countries__subtitle {
  color: var(--gray-700);
}

.popular-countries__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

/* Mobile-first: Single column layout */
@media (min-width: 576px) {
  .popular-countries__list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .popular-countries__list {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 992px) {
  .popular-countries__list {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
  }
}

.popular-countries__item {
  display: flex;
  flex-direction: column;
  position: relative;
}

.popular-countries__details {
  width: 100%;
}

.popular-countries__details[open] .popular-countries__arrow {
  transform: rotate(180deg);
}

.popular-countries__summary {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  transition: all var(--dur-fast) var(--ease);
  border-radius: var(--radius);
  min-height: 70px;
  cursor: pointer;
  list-style: none;
  outline: none;
}

.popular-countries__summary::-webkit-details-marker {
  display: none;
}

.popular-countries__summary:hover {
  background: rgba(13, 110, 253, 0.05);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.popular-countries__summary:hover .popular-countries__icon {
  border: 2px solid transparent;
  background: linear-gradient(var(--color-white), var(--color-white)) padding-box,
              var(--brand-grad) border-box;
}

.popular-countries__icon {
  width: 45px;
  height: 45px;
  border: 2px solid #dee2e6;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  flex-shrink: 0;
  overflow: hidden;
}

.popular-countries__flag {
  width: 28px;
  height: 21px;
  object-fit: cover;
  border-radius: 2px;
  border: 1px solid transparent;
  transition: border-color 0.2s ease;
  background: #f8f9fa; /* Light background for better visibility */
}

.popular-countries__summary:hover .popular-countries__flag {
  border-color: linear-gradient(90deg, #0d6efd, #6610f2); /* --brand-grad fallback */
  border-color: var(--brand-grad);
}

.popular-countries__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 24px;
  flex: 1;
}

.popular-countries__name {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-black);
  line-height: 1.4;
  transition: color var(--dur-fast) var(--ease);
}

.popular-countries__summary:hover .popular-countries__name {
  color: var(--color-blue);
}

.popular-countries__count {
  font-size: 0.875rem;
  color: var(--gray-600);
  font-weight: 500;
  margin-left: 1rem;
  flex-shrink: 0;
}

.popular-countries__arrow {
  margin-left: 0.5rem;
  transition: transform var(--dur-fast) var(--ease);
  color: var(--gray-600);
  font-size: 0.875rem;
}

/* Profession dropdown panel */
.popular-countries__professions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-white);
  border: 1px solid #dee2e6;
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10;
  padding: 1rem;
  margin-top: 0.25rem;
  max-height: 300px;
  overflow-y: auto;
}

.popular-countries__country-link {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  background: rgba(13, 110, 253, 0.05);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--color-black);
  font-weight: 600;
  transition: all var(--dur-fast) var(--ease);
  border: 1px solid transparent;
}

.popular-countries__country-link:hover {
  background: rgba(13, 110, 253, 0.1);
  border-color: var(--color-blue);
  color: var(--color-blue);
  text-decoration: none;
}

.popular-countries__country-flag {
  width: 20px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
  margin-right: 0.75rem;
  flex-shrink: 0;
  border: 1px solid transparent;
  transition: border-color 0.2s ease;
  background: #f8f9fa; /* Light background for better visibility */
}

.popular-countries__country-link:hover .popular-countries__country-flag {
  border-color: linear-gradient(90deg, #0d6efd, #6610f2); /* --brand-grad fallback */
  border-color: var(--brand-grad);
}

.popular-countries__profession-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
      list-style: none;
    padding-left: 0px;
}

.popular-countries__profession-list a {
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  color: var(--color-black);
  border-radius: calc(var(--radius) - 2px);
  transition: all var(--dur-fast) var(--ease);
  font-size: 0.9rem;
  border: 1px solid transparent;
}

.popular-countries__profession-list a:hover {
  background: rgba(13, 110, 253, 0.05);
  color: var(--color-blue);
  text-decoration: none;
  border-color: rgba(13, 110, 253, 0.2);
}

.popular-countries__more {
  display: inline-flex;
  align-items: center;
  transition: all var(--dur-fast) var(--ease);
}

.popular-countries__more i {
  vertical-align: middle;
  line-height: 1;
}

/* Hidden section for show more functionality */
.popular-countries__hidden {
  display: contents;
}

@media (min-width: 992px) {
  .popular-countries__hidden {
    display: none;
  }
  
  .popular-countries__hidden.show {
    display: contents;
  }
  
  /* Desktop hidden items - new unified approach */
  .popular-countries__item--desktop-hidden {
    display: none;
  }
  
  .popular-countries__item--desktop-hidden.popular-countries__item--show {
    display: flex;
  }
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .popular-countries__list {
    gap: 1rem;
  }
  
  .popular-countries__icon {
    width: 40px;
    height: 40px;
  }
  
  .popular-countries__flag {
    width: 24px;
    height: 18px;
  }
  
  .popular-countries__professions {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    margin-top: 0.5rem;
    margin-left: 0;
    margin-right: 0;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    background: var(--gray-50);
  }
}

@media (max-width: 767.98px) {
  .popular-countries__title {
    font-size: 1.5rem;
  }
  
  .popular-countries__list {
    gap: 0.75rem;
  }
  
  .popular-countries__summary {
    min-height: 60px;
  }
  
  .popular-countries__item--mobile-hidden,
  .popular-countries__item--desktop-hidden {
    display: none;
  }
  
  .popular-countries__name {
    font-size: 0.9rem;
  }
  
  .popular-countries__count {
    font-size: 0.8rem;
  }
  
  .popular-countries__professions {
    padding: 0.75rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: 1px solid #dee2e6;
    box-shadow: none;
    background: var(--gray-50);
  }
  
  .popular-countries__country-link {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
  }
  
  .popular-countries__profession-list a {
    padding: 0.4rem 0.5rem;
    font-size: 0.85rem;
  }
  
  /* Convert button to simple link on mobile */
  .popular-countries__more {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    min-height: auto !important;
    min-width: auto !important;
    color: var(--gray-700) !important;
    font-size: 0.875rem !important;
    font-weight: normal !important;
    text-decoration: underline !important;
    text-underline-offset: 2px;
    transition: color var(--dur-fast) var(--ease);
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1 !important;
  }
  
  .popular-countries__more i {
    vertical-align: baseline !important;
    line-height: 1 !important;
    font-size: 0.875rem !important;
    margin-left: 0.25rem !important;
  }
  
  .popular-countries__more:hover,
  .popular-countries__more:focus {
    color: var(--color-blue) !important;
    text-decoration: underline !important;
    background: none !important;
    border: none !important;
    transform: none !important;
    box-shadow: none !important;
  }

  .job-tags {
    padding-top: 15px;
}
}

/* Popular Cities Section */
.popular-cities {
  background: var(--color-white);
}

.popular-cities__header {
  text-align: left;
}

.popular-cities__title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-black);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.popular-cities__subtitle {
  color: var(--gray-700);
  font-size: 1rem;
  margin: 0;
  font-weight: 400;
}

.popular-cities__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

/* Mobile-first: Single column layout */
@media (min-width: 576px) {
  .popular-cities__list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .popular-cities__list {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 992px) {
  .popular-cities__list {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
  }
}

.popular-cities__item {
  display: flex;
  flex-direction: column;
  position: relative;
}

.popular-cities__details {
  width: 100%;
}

.popular-cities__details[open] .popular-cities__arrow {
  transform: rotate(180deg);
}

.popular-cities__summary {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  transition: all var(--dur-fast) var(--ease);
  border-radius: var(--radius);
  min-height: 70px;
  cursor: pointer;
  list-style: none;
  outline: none;
  position: relative;
  z-index: 1;
  background: var(--gray-50);
  border: 1px solid #dee2e6;
}

.popular-cities__summary::-webkit-details-marker {
  display: none;
}

.popular-cities__summary:hover {
  background: rgba(13, 110, 253, 0.05);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.popular-cities__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 24px;
  flex: 1;
}

.popular-cities__name {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-black);
  line-height: 1.4;
  transition: color var(--dur-fast) var(--ease);
}

.popular-cities__summary:hover .popular-cities__name {
  color: var(--color-blue);
}

.popular-cities__count {
  font-size: 0.875rem;
  color: var(--gray-600);
  font-weight: 500;
  margin-left: 1rem;
  flex-shrink: 0;
}

.popular-cities__arrow {
  margin-left: 0.5rem;
  transition: transform var(--dur-fast) var(--ease);
  color: var(--gray-600);
  font-size: 0.875rem;
}

/* Profession dropdown panel */
.popular-cities__professions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-white);
  border: 1px solid #dee2e6;
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10;
  padding: 1rem;
  margin-top: 0.25rem;
  max-height: 300px;
  overflow-y: auto;
  display: none;
}

/* Show professions when details are open */
.popular-cities__details[open] .popular-cities__professions {
  display: block;
}

.popular-cities__city-link {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  background: rgba(13, 110, 253, 0.05);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--color-black);
  font-weight: 600;
  transition: all var(--dur-fast) var(--ease);
  border: 1px solid transparent;
}

.popular-cities__city-link:hover {
  background: rgba(13, 110, 253, 0.1);
  border-color: var(--color-blue);
  color: var(--color-blue);
  text-decoration: none;
}

.popular-cities__profession-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.popular-cities__profession-list a {
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  color: var(--color-black);
  border-radius: calc(var(--radius) - 2px);
  transition: all var(--dur-fast) var(--ease);
  font-size: 0.9rem;
  border: 1px solid transparent;
}

.popular-cities__profession-list a:hover {
  background: rgba(13, 110, 253, 0.05);
  color: var(--color-blue);
  text-decoration: none;
  border-color: rgba(13, 110, 253, 0.2);
}

.popular-cities__profession-count {
  color: var(--gray-600);
  font-size: 0.85rem;
  margin-left: 0.25rem;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .popular-cities__list {
    gap: 1rem;
  }
  
  .popular-cities__professions {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    margin-top: 0.5rem;
    margin-left: 0;
    margin-right: 0;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    background: var(--gray-50);
  }
}

@media (max-width: 767.98px) {
  .popular-cities__title {
    font-size: 1.5rem;
  }
  
  .popular-cities__list {
    gap: 0.75rem;
  }
  
  .popular-cities__summary {
    min-height: 60px;
  }
  
  .popular-cities__name {
    font-size: 0.9rem;
  }
  
  .popular-cities__count {
    font-size: 0.8rem;
  }
  
  .popular-cities__professions {
    padding: 0.75rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: 1px solid #dee2e6;
    box-shadow: none;
    background: var(--gray-50);
  }
  
  .popular-cities__city-link {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
  }
  
  .popular-cities__profession-list a {
    padding: 0.4rem 0.5rem;
    font-size: 0.85rem;
  }
}

/* Popular Categories Section */
.popular-categories {
  background: var(--color-white);
}

.popular-categories__header {
  text-align: left;
}

.popular-categories__title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-black);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.popular-categories__subtitle {
  color: var(--gray-700);
  font-size: 1rem;
  margin: 0;
  font-weight: 400;
}

.popular-categories__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

/* Mobile-first: Single column layout */
@media (min-width: 576px) {
  .popular-categories__list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .popular-categories__list {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 992px) {
  .popular-categories__list {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
  }
}

.popular-categories__item {
  display: flex;
  flex-direction: column;
  position: relative;
}

.popular-categories__details {
  width: 100%;
}

.popular-categories__details[open] .popular-categories__arrow {
  transform: rotate(180deg);
}

.popular-categories__summary {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  transition: all var(--dur-fast) var(--ease);
  border-radius: var(--radius);
  min-height: 70px;
  cursor: pointer;
  list-style: none;
  outline: none;
  position: relative; /* Ensure proper positioning context */
  z-index: 1; /* Make sure summary is above other elements */
}

.popular-categories__summary::-webkit-details-marker {
  display: none;
}

.popular-categories__summary:hover {
  background: rgba(13, 110, 253, 0.05);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.popular-categories__summary:hover .popular-categories__icon {
  border: 2px solid transparent;
  background: linear-gradient(var(--color-white), var(--color-white)) padding-box,
              var(--brand-grad) border-box;
}

.popular-categories__icon {
  width: 45px;
  height: 45px;
  border: 2px solid #dee2e6;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  flex-shrink: 0;
  overflow: hidden;
}

.popular-categories__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 24px;
  flex: 1;
}

.popular-categories__name {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-black);
  line-height: 1.4;
  transition: color var(--dur-fast) var(--ease);
}

.popular-categories__summary:hover .popular-categories__name {
  color: var(--color-blue);
}

.popular-categories__count {
  font-size: 0.875rem;
  color: var(--gray-600);
  font-weight: 500;
  margin-left: 1rem;
  flex-shrink: 0;
}

.popular-categories__arrow {
  margin-left: 0.5rem;
  transition: transform var(--dur-fast) var(--ease);
  color: var(--gray-600);
  font-size: 0.875rem;
}

/* Profession dropdown panel */
.popular-categories__professions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-white);
  border: 1px solid #dee2e6;
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10;
  padding: 1rem;
  margin-top: 0.25rem;
  max-height: 300px;
  overflow-y: auto;
  display: none; /* Hidden by default */
}

/* Show professions when details are open */
.popular-categories__details[open] .popular-categories__professions {
  display: block;
}

.popular-categories__category-link {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  background: rgba(13, 110, 253, 0.05);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--color-black);
  font-weight: 600;
  transition: all var(--dur-fast) var(--ease);
  border: 1px solid transparent;
}

.popular-categories__category-link:hover {
  background: rgba(13, 110, 253, 0.1);
  border-color: var(--color-blue);
  color: var(--color-blue);
  text-decoration: none;
}

.popular-categories__profession-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.popular-categories__profession-list a {
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  color: var(--color-black);
  border-radius: calc(var(--radius) - 2px);
  transition: all var(--dur-fast) var(--ease);
  font-size: 0.9rem;
  border: 1px solid transparent;
}

.popular-categories__profession-list a:hover {
  background: rgba(13, 110, 253, 0.05);
  color: var(--color-blue);
  text-decoration: none;
  border-color: rgba(13, 110, 253, 0.2);
}

.popular-categories__profession-count {
  color: var(--gray-600);
  font-size: 0.85rem;
  margin-left: 0.25rem;
}

.popular-categories__more {
  display: inline-flex;
  align-items: center;
  transition: all var(--dur-fast) var(--ease);
}

.popular-categories__more i {
  vertical-align: middle;
  line-height: 1;
}

/* Hidden section for show more functionality */
.popular-categories__hidden {
  display: contents;
}

@media (min-width: 992px) {
  .popular-categories__hidden {
    display: none;
  }
  
  .popular-categories__hidden.show {
    display: contents;
  }
  
  /* Desktop hidden items - new unified approach */
  .popular-categories__item--desktop-hidden {
    display: none;
  }
  
  .popular-categories__item--desktop-hidden.popular-categories__item--show {
    display: flex;
  }
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .popular-categories__list {
    gap: 1rem;
  }
  
  .popular-categories__icon {
    width: 40px;
    height: 40px;
  }
  
  .popular-categories__professions {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    margin-top: 0.5rem;
    margin-left: 0;
    margin-right: 0;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    background: var(--gray-50);
  }
}

@media (max-width: 767.98px) {
  .popular-categories__title {
    font-size: 1.5rem;
  }
  
  .popular-categories__list {
    gap: 0rem;
  }
  
  .popular-categories__summary {
    min-height: 60px;
  }
  
  .popular-categories__item--mobile-hidden,
  .popular-categories__item--desktop-hidden {
    display: none;
  }
  
  .popular-categories__name {
    font-size: 0.9rem;
  }
  
  .popular-categories__count {
    font-size: 0.8rem;
  }
  
  .popular-categories__professions {
    padding: 0.75rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: 1px solid #dee2e6;
    box-shadow: none;
    background: var(--gray-50);
  }
  
  .popular-categories__category-link {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
  }
  
  .popular-categories__profession-list a {
    padding: 0.4rem 0.5rem;
    font-size: 0.85rem;
  }
  
  /* Convert button to simple link on mobile */
  .popular-categories__more {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    min-height: auto !important;
    min-width: auto !important;
    color: var(--gray-700) !important;
    font-size: 0.875rem !important;
    font-weight: normal !important;
    text-decoration: underline !important;
    text-underline-offset: 2px;
    transition: color var(--dur-fast) var(--ease);
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1 !important;
  }
  
  .popular-categories__more i {
    vertical-align: baseline !important;
    line-height: 1 !important;
    font-size: 0.875rem !important;
    margin-left: 0.25rem !important;
  }
  
  .popular-categories__more:hover,
  .popular-categories__more:focus {
    color: var(--color-blue) !important;
    text-decoration: underline !important;
    background: none !important;
    border: none !important;
    transform: none !important;
    box-shadow: none !important;
  }
}

.job-picks__title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-black);
  margin-bottom: 2rem;
}

/* Ensure icon alignment in header button */
.job-picks .btn {
  display: inline-flex;
  align-items: center;
}

.job-picks .btn i {
  vertical-align: middle;
  line-height: 1;
}

.job-card {
  background: var(--color-white);
  border: 2px solid #dee2e6;
  border-radius: var(--radius);
  padding: 1rem;
  height: 100%;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: all var(--dur-fast) var(--ease);
  outline: none !important;
  box-shadow: none !important;
}

.job-card:hover {
  border: 2px solid transparent;
  background: linear-gradient(var(--color-white), var(--color-white)) padding-box,
              var(--brand-grad) border-box;
  border-radius: var(--radius);
}

.job-card:hover,
.job-card:focus {
  transform: translateY(-1px);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--elev-1);
}

.job-card:focus {
  outline: none !important;
  box-shadow: var(--elev-1) !important;
  border: 2px solid transparent;
  background: linear-gradient(var(--color-white), var(--color-white)) padding-box,
              var(--brand-grad) border-box;
  border-radius: var(--radius);
}

/* Gradient title on hover */
.job-card:hover .job-card__title,
.job-card:focus .job-card__title {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.job-card--grid {
  display: flex;
  flex-direction: column;
  height: auto; /* Allow height to adapt to content */
  min-height: 340px; /* Maintain minimum height for consistency */
  justify-content: space-between;
  overflow: hidden;
}

/* Job card title with adaptive height and two-line truncation */
.job-card__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-black);
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  min-height: 0rem; /* Minimum height for one line */
}

.job-card__meta {
  font-size: 0.875rem;
  color: var(--gray-700);
  margin-bottom: 1rem;
  height: 3rem; /* Fixed height for meta area */
  overflow: hidden;
  line-height: 1.4;
}

/* Add specific styling for company name truncation */
.job-card__meta-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Country flag in job card location line */
.job-card__flag {
  display: inline-block;
  vertical-align: -2px;
  margin-right: 0.35rem;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
  background: #f1f3f5;
  flex-shrink: 0;
}

.job-card__flag--mini {
  vertical-align: -1px;
  margin-right: 0.3rem;
}

.job-card__salary {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-blue);
  margin-bottom: 1rem;
  min-height: 1.5rem; /* Минимальная высота вместо фиксированной */
}

.job-card__salary-primary {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-blue);
  line-height: 1.3;
}

.job-card__salary-secondary {
  font-size: 0.8125rem; /* Чуть меньше основной */
  font-weight: 500;
  color: var(--gray-600);
  margin-top: 0.15rem;
  line-height: 1.2;
}

/* Job Card Description */
.job-card__description {
  font-size: 0.875rem;
  color: var(--gray-700);
  margin-bottom: 1rem;
  line-height: 1.4;
  height: auto;
  min-height: 2.8rem; /* Height for approximately 2 lines of text */
  overflow: hidden;
}

/* Job Card Footer */
.job-card__footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.5rem;
}

.job-card__footer .badge {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
}

/* Job Card Header - Urgent Vacancy */
.job-card__header {
  background: linear-gradient(135deg, #ff416c, #ff4b2b);
  color: white;
  padding: 0.5rem;
  border-radius: var(--radius) var(--radius) 0 0;
  font-weight: 600;
  font-size: 0.875rem;
  text-align: center;
  margin: -1rem -1rem 1rem -1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* Job Card Premium Badge */
.job-card__premium-badge {
  background: linear-gradient(135deg, #ff416c, #ff4b2b);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
}

.job-card__badges {
  margin-top: auto;
  height: 2rem; /* Fixed height for badges area */
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  overflow: hidden;
}

.job-card__badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius);
  margin-right: 0.5rem;
  margin-bottom: 0.25rem;
}

.job-card__badge--hot {
  background: rgba(229, 57, 53, 0.1);
  color: var(--color-red);
}

.job-card__badge--remote {
  background: rgba(13, 110, 253, 0.1);
  color: var(--color-blue);
}

.job-card__badge--entry {
  background: rgba(40, 167, 69, 0.1);
  color: #28a745;
}

/* ==========================================================================
   Mini Job Card (compact reusable component)
   Компактная карточка вакансии для блока «Больше рекомендуемых вакансий»
   ========================================================================== */

.job-card-mini {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border: 1px solid #e9ecef;
  border-radius: var(--radius);
  padding: 0.875rem 1rem;
  height: 100%;
  min-height: 130px;
  min-width: 0; /* grid-элемент не растягивает колонку длинным nowrap-контентом */
  text-decoration: none;
  color: inherit;
  transition: all var(--dur-fast) var(--ease);
}

.job-card-mini:hover,
.job-card-mini:focus {
  text-decoration: none;
  color: inherit;
  border-color: transparent;
  background: linear-gradient(var(--color-white), var(--color-white)) padding-box,
              var(--brand-grad) border-box;
  transform: translateY(-1px);
  box-shadow: var(--elev-1);
}

.job-card-mini:hover .job-card-mini__title,
.job-card-mini:focus .job-card-mini__title {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.job-card-mini__title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-black);
  margin-bottom: 0.375rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.job-card-mini__salary {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-blue);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.job-card-mini__location {
  font-size: 0.8125rem;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.job-card-mini__footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  min-width: 0;
}

.job-card-mini__company {
  flex: 0 1 auto;
  min-width: 0; /* разрешаем сжатие: ellipsis по фактической ширине карточки */
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--gray-700);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.job-card-mini__premium {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.625rem;
  font-weight: 600;
  color: #b8860b;
  background: rgba(255, 193, 7, 0.12);
  border: 1px solid rgba(255, 193, 7, 0.35);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  white-space: nowrap;
}

.job-card-mini__premium i {
  font-size: 0.5rem;
  color: #f5a623;
}

.job-card-mini__date {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.625rem;
  color: #adb5bd;
  white-space: nowrap;
}

/* ==========================================================================
   Recommended Jobs Block («Больше рекомендуемых вакансий»)
   ========================================================================== */

.picks-recommended {
  background: var(--gray-50);
}

.picks-recommended__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-black);
  margin-bottom: 1.25rem;
}

.picks-recommended__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 576px) {
  .picks-recommended__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .picks-recommended__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .picks-recommended__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Мобильные: скрываем карточки сверх первых 4 до нажатия «Показать ещё» */
@media (max-width: 767.98px) {
  .picks-recommended__grid:not(.is-expanded) .picks-recommended__extra {
    display: none;
  }
}

.picks-recommended__more-wrap {
  text-align: center;
  margin-top: 1rem;
}

.picks-recommended__more-btn {
  width: 100%;
  max-width: 320px;
}

.picks-recommended__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

@media (min-width: 768px) {
  .picks-recommended__actions {
    flex-direction: row;
    justify-content: center;
    gap: 1.5rem;
  }
}

.picks-recommended__employer-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}

.picks-recommended__employer-link:hover,
.picks-recommended__employer-link:focus {
  color: var(--color-blue);
  text-decoration: underline;
}

/* Job Tags */
.job-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.job-tag {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  background-color: #f8f9fa;
  color: #495057;
  border: 1px solid #dee2e6;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all var(--dur-fast) var(--ease);
}

.job-tag:hover,
.job-tag:focus {
  background-color: var(--color-blue);
  color: white;
  border-color: var(--color-blue);
  text-decoration: none;
}

.job-tag__count {
  font-size: 0.75rem;
  opacity: 0.75;
}

/* Job Filters */
.job-filters {
  background-color: #f8f9fa;
  border-radius: var(--radius);
  padding: 1rem;
}

@media (max-width: 767.98px) {
  .job-filters {
    padding: 1rem 0.5rem;
  }
  
  .job-filters .container {
    padding: 0 0.5rem;
  }
}

.job-filters__form {
  margin-bottom: 0;
}

.job-filters__form .d-flex {
  flex-wrap: wrap;
}

.job-filters__form .flex-shrink-0 {
  flex-shrink: 0;
}

/* Ensure proper alignment of form elements */
.job-filters .me-2 {
  margin-right: 0.5rem !important;
}

.job-filters .mt-4 {
  margin-top: 1rem !important;
}

.job-filters .mb-2 {
  margin-bottom: 0.5rem !important;
}

/* Compact form elements */
.form-check-input {
  width: 1rem;
  height: 1rem;
  margin-top: 0.25rem;
}

.form-check-label {
  font-size: 0.875rem;
  margin-left: 0.25rem;
}

/* Compact checkbox alignment */
.job-filters .form-check {
  min-height: 1.5rem;
  margin-bottom: 0;
  display: flex;
  align-items: center;
}

.job-filters .form-check-input {
  margin-top: 0;
  margin-right: 0.25rem;
}

.job-filters .form-check-label {
  margin-bottom: 0;
  padding-top: 0.125rem;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

/* Compact filter layout */
@media (min-width: 576px) {
  .job-filters .row.g-2 {
    --bs-gutter-x: 0.25rem;
    --bs-gutter-y: 0.25rem;
  }
  
  .job-filters .form-label {
    font-size: 0.75rem;
    margin-bottom: 0;
  }
  
  .job-filters .form-select-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    min-height: calc(1.5em + 0.5rem + 2px);
  }
  
  .job-filters .form-check .form-check-input {
    margin-top: 0;
  }
  
  .job-filters .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
  }
  
  /* Compact button alignment */
  .job-filters .mt-2 {
    margin-top: 0.5rem !important;
  }
  
  /* Additional compact styles */
  .job-filters .mt-3 {
    margin-top: 0.25rem !important;
  }
  
  .job-filters .ms-1 {
    margin-left: 0.25rem !important;
  }
  
  /* Ensure proper alignment on larger screens */
  @media (min-width: 768px) {
    .job-filters .col-md-auto {
      flex: 0 0 auto;
      width: auto;
      max-width: none;
    }
    
    /* Set fixed widths for form selects to ensure consistent alignment */
    .job-filters .form-select {
      width: auto;
      min-width: 120px;
    }
  }
}

@media (max-width: 575.98px) {
  .job-filters .form-label {
    font-size: 0.875rem;
  }
  
  .job-filters .form-select {
    font-size: 0.875rem;
  }
  
  .job-filters .form-check-label {
    font-size: 0.875rem;
  }
}

/* Filter buttons alignment */
.job-filters .ms-auto {
  margin-left: auto !important;
}

@media (max-width: 767.98px) {
  .job-filters .ms-auto {
    margin-left: 0 !important;
    width: 100%;
    text-align: center !important;
  }
  
  .job-filters .text-center.text-md-end {
    text-align: center !important;
  }
  
  .job-filters .btn {
    display: inline-block;
  }
  
  /* Stack filter dropdowns vertically on mobile */
  .job-filters .filters-row {
    flex-direction: column;
  }
  
  .job-filters .flex-shrink-0 {
    flex-shrink: 1 !important;
    width: 100% !important;
  }
  
  .job-filters .me-3 {
    margin-right: 0 !important;
    margin-bottom: 1rem;
  }
  
  .job-filters__form .me-3 {
    margin-right: 0 !important;
    margin-bottom: 1rem;
  }
  
  .job-filters__form .mb-3 {
    margin-bottom: 1rem !important;
    width: 100% !important;
  }
  
  /* Make custom dropdowns full-width on mobile */
  .job-filters .custom-dropdown {
    width: 100% !important;
    min-width: auto !important;
  }
  
  /* Ensure dropdown toggle takes full width */
  .job-filters .custom-dropdown-toggle {
    width: 100%;
  }
  
  /* Center action buttons container on mobile */
  .job-filters .filter-group.ms-md-auto {
    margin-left: 0 !important;
    width: 100%;
  }
  
  /* Keep action buttons side-by-side, centered on mobile */
  .job-filters .filter-group.ms-md-auto .d-flex {
    flex-direction: row !important;
    justify-content: center;
  }
  
  /* Make buttons evenly split container width (50% each) on mobile */
  .job-filters .filter-group.ms-md-auto .btn {
    flex: 1;
    max-width: 50%;
  }
  
  /* Legacy support for old button containers */
  .job-filters .mb-3.ms-auto {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-left: 0 !important;
  }
  
  .job-filters .mb-3.ms-auto .btn {
    flex: 1;
    max-width: 50%;
  }
  
  .job-filters .mb-3.ms-auto .btn.me-1 {
    margin-right: 0.5rem !important;
  }
}

/* Custom dropdown with checkboxes */
.custom-dropdown {
  position: relative;
  display: inline-block;
  width: 100%;
}

.custom-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #212529;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  text-align: left;
  width: 100%;
  cursor: pointer;
  min-height: calc(1.5em + 0.75rem + 2px);
}

.custom-dropdown-toggle:hover {
  border-color: #b3d7ff;
}

.custom-dropdown-toggle:focus {
  border-color: #86b7fe;
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.custom-dropdown-toggle::after {
  display: inline-block;
  margin-left: 0.255em;
  vertical-align: 0.255em;
  content: "";
  border-top: 0.3em solid;
  border-right: 0.3em solid transparent;
  border-bottom: 0;
  border-left: 0.3em solid transparent;
  transition: transform 0.2s ease;
}

.custom-dropdown.open .custom-dropdown-toggle::after {
  transform: rotate(180deg);
}

.custom-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  display: none;
  min-width: 100%;
  padding: 0.5rem 0;
  margin: 0.125rem 0 0;
  font-size: 1rem;
  color: #212529;
  text-align: left;
  list-style: none;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 0.375rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175);
  max-height: 200px;
  overflow-y: auto;
}

.custom-dropdown.open .custom-dropdown-menu {
  display: block;
}

.custom-dropdown-item {
  display: block;
  width: 100%;
  padding: 0.25rem 1rem;
  clear: both;
  font-weight: 400;
  color: #212529;
  text-align: inherit;
  text-decoration: none;
  white-space: nowrap;
  background-color: transparent;
  border: 0;
}

.custom-dropdown-item:hover,
.custom-dropdown-item:focus {
  color: #1e2125;
  background-color: #e9ecef;
}

.custom-dropdown-item .form-check {
  margin-bottom: 0;
  display: flex;
  align-items: center;
  padding: 0.25rem 0;
}

.custom-dropdown-item .form-check-input {
  margin-top: 0;
  margin-right: 0.5rem;
  margin-left: 1px;
}

.custom-dropdown-item .form-check-label {
  margin-bottom: 0;
  flex-grow: 1;
}

.custom-dropdown-selection {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-dropdown-selection.empty {
  color: #6c757d;
}

/* Compact version for filters */
.job-filters .custom-dropdown {
  width: auto;
  min-width: 150px;
}

.job-filters .custom-dropdown-toggle {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  min-height: calc(1.5em + 0.5rem + 2px);
}

.job-filters .custom-dropdown-menu {
  min-width: 200px;
}

@media (max-width: 767.98px) {
  .job-filters .custom-dropdown {
    width: 100%;
    min-width: auto;
  }
  
  .job-filters .custom-dropdown-menu {
    min-width: 100%;
  }
}

/* Links Hub */
.links-hub {
  background: var(--color-white);
}



/* FAQ */
.faq {
  background: var(--gray-50);
}

.faq__title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-black);
  margin-bottom: 2rem;
}

.faq .accordion-button {
  font-weight: 600;
  transition: background-color var(--dur-fast) var(--ease);
  border-radius: var(--radius);
}

.faq .accordion-button:not(.collapsed) {
  background-color: rgba(13, 110, 253, 0.1);
  color: var(--color-blue);
}

.faq .accordion-item {
  border: 1px solid #dee2e6;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.faq .accordion-body {
  color: var(--gray-700);
  line-height: 1.6;
}

/* Site Footer */
.site-footer {
  background: var(--gray-900);
  color: var(--color-white);
  
}

.site-footer__menu {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.site-footer__menu a {
  color: var(--color-white);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity var(--dur-fast) var(--ease);
}

.site-footer__menu a:hover,
.site-footer__menu a:focus {
  opacity: 1;
  color: var(--color-white);
  text-decoration: none;
}

.site-footer__copy {
  font-size: 0.875rem;
  opacity: 0.7;
  margin: 0;
}

/* Focus styles */
*:focus {
  outline: 2px solid var(--color-blue);
  outline-offset: 2px;
}

/* Universal Section Spacing */
.section-spacing {
  /* padding-top: 0rem !important; */
  padding-bottom: 2rem !important;
}

@media (min-width: 768px) {
  .section-spacing {
    padding: 1.5rem 0;
  }
}

/* Touch targets */
@media (max-width: 767.98px) {
  .btn,
  .nav-link,
  .accordion-button {
    min-height: 30px;
    min-width: 44px;
  }
}

/* Responsive typography */
@media (max-width: 767.98px) {
  .hero__title {
    font-size: 2rem;
  }
  
  .job-picks__title,
  .faq__title {
    font-size: 1.5rem;
  }
}

@media (min-width: 1200px) {
  .hero__title {
    font-size: 2.5rem;
  }
}

/* Custom dropdown with flags */
.custom-country-dropdown {
  position: relative;
  width: 100%;
}

.custom-country-dropdown.open .custom-dropdown-arrow {
  transform: rotate(180deg);
}

.custom-dropdown-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.375rem 0.75rem;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  background-color: #fff;
  cursor: pointer;
  min-height: calc(1.5em + 0.75rem + 2px);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.custom-dropdown-selected:hover {
  border-color: #b3d7ff;
}

.custom-dropdown-selected:focus {
  border-color: #80bdff;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.custom-dropdown-text {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.custom-dropdown-arrow {
  transition: transform 0.2s ease;
  color: #6c757d;
}

.custom-dropdown-selected:hover .custom-dropdown-arrow {
  color: #495057;
}

.custom-dropdown-flag {
  width: 20px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
}

.custom-dropdown-flag-placeholder {
  width: 20px;
  height: 15px;
  background-color: #e9ecef;
  border-radius: 2px;
}

.custom-dropdown-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  display: none;
  max-height: 400px;
  overflow-y: auto;
  background-color: #fff;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175);
  margin-top: 0.125rem;
}

.custom-dropdown-options.show {
  display: block;
}

.custom-dropdown-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  cursor: pointer;
  transition: background-color 0.15s ease-in-out;
}

.custom-dropdown-option:hover {
  background-color: #f8f9fa;
}

.custom-dropdown-option:first-child {
  border-top-left-radius: calc(0.375rem - 1px);
  border-top-right-radius: calc(0.375rem - 1px);
}

.custom-dropdown-option:last-child {
  border-bottom-left-radius: calc(0.375rem - 1px);
  border-bottom-right-radius: calc(0.375rem - 1px);
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
  .custom-dropdown-flag {
    width: 18px;
    height: 13px;
  }
  
  .custom-dropdown-flag-placeholder {
    width: 18px;
    height: 13px;
  }
}

/* Dropdown search (перенесено из inline-стилей hero.php) */
.custom-dropdown-search {
  padding: 0.5rem;
  border-bottom: 1px solid #e9ecef;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}

.custom-dropdown-search-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.custom-dropdown-search-input:focus {
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.custom-dropdown-no-results {
  padding: 0.75rem 1rem;
  text-align: center;
  color: #6c757d;
  font-size: 0.875rem;
  font-style: italic;
}

.custom-dropdown-option--selected {
  background-color: #e7f1ff;
}

/* Vacancy Page Styles */
.vacancy-header {
  background: var(--color-white);
}

.vacancy-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--elev-1);
  overflow: hidden;
  margin-bottom: 2rem;
}

.vacancy-card__header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.vacancy-card__title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-black);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.badge-premium {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #000;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  display: inline-block;
}

.badge-regular {
  background: var(--gray-200);
  color: var(--gray-700);
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  display: inline-block;
}

/* Cabinet: premium-tier tag highlight (positions 6–10) */
.tag-item {
  border: 2px solid transparent;
  border-radius: 0.375rem;
}
.tag-premium {
  border-color: #FFD700;
  position: relative;
}
.tag-premium::after {
  content: '\2605';
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  color: #FFA500;
  font-size: 0.85rem;
  line-height: 1;
}

.vacancy-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.vacancy-card__company {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 200px;
}

.vacancy-card__company-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: var(--radius);
  background: var(--gray-100);
}

.vacancy-card__company-name {
  font-weight: 600;
  color: var(--color-black);
  display: block;
}

.vacancy-card__company-description {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin: 0;
}

.vacancy-card__location,
.vacancy-card__salary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gray-700);
  font-size: 0.95rem;
}

.vacancy-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.vacancy-card__tag {
  background: var(--color-blue-light);
  color: var(--color-blue);
  font-size: 0.8125rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  font-weight: 500;
}

.vacancy-card__body {
  padding: 1.5rem;
}

.vacancy-card__section {
  margin-bottom: 2rem;
}

.vacancy-card__section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-black);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.vacancy-card__description {
  color: var(--gray-800);
  line-height: 1.6;
  white-space: pre-wrap;
}

.vacancy-card__details {
  list-style: none;
  padding: 0;
  margin: 0;
}

.vacancy-card__details li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  justify-content: space-between;
}

.vacancy-card__details li:last-child {
  border-bottom: none;
}

.vacancy-sidebar {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--elev-1);
  padding: 1.5rem;
  position: sticky;
  top: 6rem;
}

.vacancy-sidebar__section {
  margin-bottom: 2rem;
}

.vacancy-sidebar__section:last-child {
  margin-bottom: 0;
}

.vacancy-sidebar__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-black);
  margin-bottom: 1rem;
}

.contact-info {
  background: var(--gray-50);
  padding: 1rem;
  border-radius: var(--radius);
}

/* Responsive adjustments for vacancy page */
@media (max-width: 991.98px) {
  .vacancy-card__title {
    font-size: 1.5rem;
  }
  
  .vacancy-card__meta {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .vacancy-card__company {
    min-width: auto;
  }
  
  .vacancy-sidebar {
    position: static;
    margin-top: 2rem;
  }
}

@media (max-width: 767.98px) {
  .vacancy-card__header,
  .vacancy-card__body {
    padding: 1rem;
  }
  
  .vacancy-card__title {
    font-size: 1.375rem;
  }
  
  .vacancy-sidebar {
    padding: 1rem;
  }
  
  .breadcrumb {
    font-size: 0.875rem;
  }
}

/* Job Titles Section */
.job-titles .job-card {
  padding: 0.75rem 1rem;
  min-height: auto;
  border: 1px solid #dee2e6;
  border-radius: var(--radius);
  transition: all var(--dur-fast) var(--ease);
  text-decoration: none;
  color: var(--color-black);
  display: block;
  margin-bottom: 0.5rem;
}

.job-titles .job-card:hover {
  border-color: var(--color-blue);
  background-color: rgba(13, 110, 253, 0.05);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.job-titles .job-card__title {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0;
  color: var(--color-black);
}

.job-titles .badge {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
}

/* Latest Job Titles Section */
.latest-job-titles .job-card {
  padding: 0.75rem 1rem;
  min-height: auto;
  border: 1px solid #dee2e6;
  border-radius: var(--radius);
  transition: all var(--dur-fast) var(--ease);
  text-decoration: none;
  color: var(--color-black);
  display: block;
  margin-bottom: 0.5rem;
}

.latest-job-titles .job-card:hover {
  border-color: var(--color-blue);
  background-color: rgba(13, 110, 253, 0.05);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.latest-job-titles .job-card__title {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0;
  color: var(--color-black);
}

.latest-job-titles .badge {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
}

/* Country Card Styles */
.country-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--color-white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  transition: all var(--dur-fast) var(--ease);
  height: 100%;
  box-shadow: var(--elev-0);
}

.country-card:hover,
.country-card:focus {
  border-color: var(--color-blue);
  box-shadow: var(--elev-1);
  transform: translateY(-2px);
}

.country-card__flag {
  padding: 1.5rem 1rem 1rem;
  text-align: center;
  border-bottom: 1px solid var(--gray-200);
}

.country-card__flag .flag-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.country-card__flag-img {
  width: 48px;
  height: 36px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #dee2e6;
  margin-bottom: 1rem;
  display: inline-block;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.country-card__name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-black);
  margin: 0;
}

.country-card__stats {
  padding: 1rem;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.country-card__count {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-blue);
}

.country-card__label {
  color: var(--gray-600);
  font-size: 0.875rem;
}

/* Countries List Header */
.countries-list-header .breadcrumb {
  margin-bottom: 1rem;
}

.countries-list-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-black);
  margin-bottom: 0.5rem;
}

.countries-list-header .lead {
  color: var(--gray-700);
  font-size: 1.25rem;
}

/* Countries Grid */
.countries-grid {
  background: var(--color-white);
}

.form-text {
  color: rgb(70 70 70);
}


.modal-content {
    background-color: #ededed;
}
.pb-0{
  padding-bottom: 0px !important;
}

/* Blog Filters */
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.blog-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-700);
  background: var(--gray-50);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all var(--dur-fast) var(--ease);
  white-space: nowrap;
  min-width: 80px;
}

.blog-filter-btn:hover {
  background: #e9ecef;
  border-color: rgba(0,0,0,.12);
  color: var(--gray-900);
}

.blog-filter-btn--active {
  background: var(--color-brand);
  border-color: var(--color-brand);
  color: #fff;
}

.blog-filter-btn--active:hover {
  background: #9a1d2e;
  border-color: #9a1d2e;
  color: #fff;
}

/* ==========================================================================
   Company full description (rich text from cabinet «Полное описание»)
   Полное описание компании на странице /companies/{slug}-{id}
   ========================================================================== */

.company-description {
  max-width: 820px;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--gray-700);
}

.company-description > :last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   Company social link buttons (reusable component)
   Кнопки соцсетей компании — блок «Профили Компаний в соц. сетях»
   ========================================================================== */

.company-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.company-social-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 11px;

  color: #374151;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;

  background: #fff;
  border: 1px solid #dce1e8;
  border-radius: 9px;
  text-decoration: none;

  transition:
    background-color .15s ease,
    border-color .15s ease,
    color .15s ease,
    box-shadow .15s ease,
    transform .15s ease;
}

.company-social-link img {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.company-social-link:hover {
  color: #1769e0;
  background: #f5f8ff;
  border-color: #9bbcff;
  box-shadow: 0 3px 10px rgba(23, 105, 224, .10);
  transform: translateY(-1px);
}

.company-social-link:focus-visible {
  outline: 3px solid rgba(23, 105, 224, .22);
  outline-offset: 2px;
}

/* ==========================================================================
   Universal info badge (reusable component)
   Универсальный информационный бейдж: единое закругление, рамка, размер.
   Базовый стиль совпадает с .vacancy-hero__badge; цвет задаётся модификатором.
   ========================================================================== */

.info-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--gray-700);
  background: var(--gray-50);
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  text-decoration: none;
}

.info-badge img {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.info-badge i {
  font-size: 1em;
}

/* Color variants */
.info-badge--blue {
  color: #0b5ed7;
  background: #e7f1ff;
  border-color: rgba(13, 110, 253, .25);
}

.info-badge--orange {
  color: #b45309;
  background: #fff4e6;
  border-color: rgba(217, 119, 6, .25);
}

.info-badge--purple {
  color: #7e22ce;
  background: #f3e8ff;
  border-color: rgba(147, 51, 234, .25);
}

.info-badge--green {
  color: #15803d;
  background: #dcfce7;
  border-color: rgba(22, 163, 74, .25);
}

/* ============================================
   Telegram-подписка «Не нашли нужную вакансию?»
   (страница вакансии + списки вакансий стран ЕС)
   ============================================ */
.vacancy-tg-promo {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #eef7ff 0%, #f6fbff 100%);
  border: 1px solid #cfe6fb;
  border-radius: var(--radius);
}

.vacancy-tg-promo__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff;
  overflow: hidden;
}

.vacancy-tg-promo__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.vacancy-tg-promo__body {
  flex: 1;
  min-width: 0;
}

.vacancy-tg-promo__title {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-900);
}

.vacancy-tg-promo__text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--gray-700);
}

.vacancy-tg-promo__btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.15rem;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  color: #fff;
  background: #2aabee;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}

.vacancy-tg-promo__btn:hover,
.vacancy-tg-promo__btn:focus {
  background: #1d96d8;
  color: #fff;
  transform: translateY(-1px);
}

.vacancy-tg-promo__channel {
  font-weight: 400;
  opacity: 0.9;
}

@media (max-width: 767.98px) {
  .vacancy-tg-promo {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
  }

  .vacancy-tg-promo__btn {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================
   Hero search: комбобокс «направление + специальность»
   (данные — серверный кэш 30 минут, счётчики только реальных вакансий)
   ============================================ */

.rg-search-card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, .9fr) minmax(220px, .72fr);
  gap: 16px;
  align-items: end;
  padding: 28px;
  background: var(--color-white);
  border: 1px solid #dfe4ec;
  border-radius: var(--radius-lg);
  box-shadow: var(--elev-1);
}

.rg-field {
  min-width: 0;
  position: relative; /* для абсолютного пояснения страны — раскладка не смещается */
}

.rg-label {
  display: block;
  margin-bottom: 9px;
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-900, #182033);
}

.rg-combobox { position: relative; }

.rg-combobox__trigger,
.rg-submit {
  width: 100%;
  min-height: 60px;
  border-radius: 12px;
  font-size: 1rem;
}

.rg-combobox__trigger {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 18px;
  gap: 12px;
  align-items: center;
  padding: 10px 16px;
  text-align: left;
  color: #182033;
  border: 1px solid #cfd6e1;
  background: #fff;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.rg-combobox__trigger:hover { border-color: #9db8eb; }

.rg-combobox__trigger:focus-visible,
.rg-combobox.is-open .rg-combobox__trigger {
  outline: 0;
  border-color: var(--color-blue);
  box-shadow: 0 0 0 4px rgba(13, 110, 253, .15);
}

.rg-combobox__icon {
  font-size: 22px;
  color: var(--color-blue);
}

.rg-combobox__value { min-width: 0; }

.rg-combobox__primary,
.rg-combobox__secondary {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rg-combobox__primary { font-weight: 700; }

.rg-combobox__secondary {
  margin-top: 2px;
  color: var(--gray-600, #6b7280);
  font-size: 14px;
}

.rg-combobox__chevron { transition: transform .2s ease; }
.rg-combobox.is-open .rg-combobox__chevron { transform: rotate(180deg); }

/* Поле страны в карточке hero: выравнивание по общему стилю */
#hero-search-form .custom-dropdown-selected {
  min-height: 60px;
  border-radius: 12px;
  border: 1px solid #cfd6e1;
  background: #fff;
}

#hero-search-form .custom-country-dropdown.is-disabled .custom-dropdown-selected {
  opacity: .72;
  cursor: not-allowed;
  background: #f6f8fb;
}

.rg-help {
  position: absolute;
  top: calc(100% + 5px);
  left: 2px;
  right: 2px;
  margin: 0;
  color: var(--gray-600, #6b7280);
  font-size: 12px;
  line-height: 1.35;
}

.rg-help[hidden] { display: none; }

.rg-submit {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--color-blue), #1769e0);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(13, 110, 253, .22);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.rg-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 13px 28px rgba(13, 110, 253, .28);
  color: #fff;
}

.rg-submit:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(13, 110, 253, .15), 0 13px 28px rgba(13, 110, 253, .28);
}

/* Выпадающее меню комбобокса */
.rg-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 10px);
  left: 0;
  width: min(720px, calc(100vw - 48px));
  overflow: hidden;
  border: 1px solid #dfe4ec;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(24, 32, 51, .12);
}

.rg-menu[hidden] { display: none; }

/* Крестик закрытия — только в полноэкранном мобильном режиме */
.rg-menu__close {
  display: none;
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: #f4f7fb;
  color: #40506a;
  font-size: 18px;
  cursor: pointer;
}

.rg-menu__close:hover { background: #eef2f7; }

.rg-menu__body {
  display: grid;
  grid-template-columns: minmax(260px, .95fr) minmax(300px, 1.05fr);
  height: 480px;
  min-height: 390px;
  max-height: 60vh;
  overflow: hidden;
}

.rg-menu__categories,
.rg-menu__jobs {
  padding: 8px 14px 14px;
  min-width: 0;
  overflow-y: auto; /* независимая прокрутка каждой панели */
}

.rg-menu__categories { border-right: 1px solid #dfe4ec; }

.rg-menu__title {
  position: sticky; /* прилипает к верху своей панели при прокрутке */
  top: 0;
  z-index: 1;
  margin: 0 6px 8px;
  padding: 8px 0 6px;
  background: #fff;
  color: var(--gray-600, #6b7280);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.rg-menu__hint {
  padding: 10px;
  color: var(--gray-600, #6b7280);
  font-size: 14px;
}

.rg-option {
  width: 100%;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #182033;
  text-align: left;
  cursor: pointer;
  font-size: .95rem;
}

.rg-option:hover,
.rg-option:focus-visible { outline: 0; background: #f4f7fb; }

.rg-option.is-selected {
  color: var(--color-blue);
  background: var(--soft-blue, #eef5ff);
  font-weight: 700;
}

.rg-option__icon { color: #4d596b; font-size: 18px; }
.rg-option.is-selected .rg-option__icon { color: var(--color-blue); }

.rg-option__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rg-option__count {
  color: var(--gray-600, #6b7280);
  font-variant-numeric: tabular-nums;
}

.rg-option.is-selected .rg-option__count { color: var(--color-blue); }

.rg-job-option {
  grid-template-columns: 18px minmax(0, 1fr) auto;
  padding-block: 5px;
}

.rg-radio {
  width: 16px;
  height: 16px;
  border: 1.5px solid #b9c2d0;
  border-radius: 50%;
  position: relative;
}

.rg-job-option.is-selected .rg-radio { border-color: var(--color-blue); }

.rg-job-option.is-selected .rg-radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--color-blue);
}

.rg-more {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  color: #40506a;
  background: #f7f9fc;
  cursor: pointer;
  font-weight: 700;
}

.rg-more:hover { background: #eef2f7; }

.rg-extra[hidden] { display: none; }

.rg-menu__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-top: 1px solid #dfe4ec;
  background: #fbfcfe;
}

.rg-menu__note {
  color: var(--gray-600, #6b7280);
  font-size: 12px;
  line-height: 1.35;
}

.rg-menu__cta {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--color-blue);
  font-weight: 700;
  cursor: pointer;
}

.rg-menu__cta:hover { background: var(--color-blue-dark, #0b5ed7); }

.rg-menu__cta:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(13, 110, 253, .15);
}

.rg-menu__cta[hidden] { display: none; }

@media (max-width: 900px) {
  .rg-search-card { grid-template-columns: 1fr 1fr; }
  .rg-submit { grid-column: 1 / -1; }
  .rg-menu { width: min(720px, calc(100vw - 40px)); }
}

@media (max-width: 680px) {
  .rg-search-card { grid-template-columns: 1fr; padding: 16px; }
  .rg-submit { grid-column: auto; }

  /* Пояснение страны в потоке — колонки идут друг под другом */
  .rg-help { position: static; margin: 7px 2px 0; }

  /* Меню комбобокса на весь экран на мобильных (с крестиком закрытия) */
  .rg-menu {
    position: fixed;
    inset: 0;
    z-index: 1050; /* выше прилипающего хедера (1030) */
    width: 100%;
    height: 100%;
    max-height: none;
    border: 0;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .rg-menu__close { display: flex; }

  .rg-menu__body {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    max-height: none;
    overflow: auto;
  }

  /* Мобильный режим: единая прокрутка шторки, без прилипания и независимых панелей */
  .rg-menu__categories,
  .rg-menu__jobs { overflow: visible; }
  .rg-menu__title { position: static; padding-top: 0; }

  .rg-menu__categories { padding-right: 56px; }

  .rg-menu__body { grid-template-columns: 1fr; }
  .rg-menu__categories { border-right: 0; border-bottom: 1px solid #dfe4ec; }

  /* Аккордеон: специальности раскрываются прямо под выбранной категорией,
     правая панель со списком специальностей не нужна */
  .rg-menu__jobs { display: none; }

  .rg-jobs-inline {
    margin: 2px 0 8px;
    padding: 6px 4px 6px 10px;
    border-left: 2px solid #dfe4ec;
  }

  .rg-menu__footer { flex-shrink: 0; flex-direction: column; align-items: stretch; }
  .rg-menu__cta { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .rg-combobox__chevron,
  .rg-combobox__trigger,
  .rg-submit {
    transition: none;
  }
}

