/*
Theme Name: Медикс Профи
Theme URI: https://mediksprofi.ru/
Version: 1.0.0
Text Domain: mediksprofi
*/

:root {
  --midnight: #0F172A;
  --accent: #1b60ab;
  --accent-soft: #e8f0f8;
  --text: #334155;
  --text-dark: #0F172A;
  --bg-clay: #F8FAFC;
  --white: #FFFFFF;
  --shadow-lux: 0 25px 50px -12px rgba(15, 23, 42, 0.08);
  --radius-lg: 32px;
  --radius-md: 18px;
  --transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* 1. Base Styles */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text);
  background: var(--bg-clay);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  color: var(--midnight);
  line-height: 1.2;
}

h1 {
  font-size: clamp(40px, 6vw, 76px);
  letter-spacing: -0.04em;
}

h2 {
  font-size: clamp(28px, 3.5vw, 42px);
  letter-spacing: -0.02em;
  font-weight: 700;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

.container {
  width: min(calc(100% - 40px), 1280px);
  margin: 0 auto;
}

/* 2. Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: var(--transition);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 2.5 Top Bar */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 32px;
  padding: 12px 15px 0;
  font-size: 13px;
  color: var(--text);
}

.top-bar-location {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-bar-widget {
  height: 50px;
  display: flex;
  align-items: center;
}

.top-bar-item {
  display: flex;
  flex-direction: column;
  line-height: 1.4;
}

.top-bar-item.top-bar-bvi {
  flex-direction: row;
}

.top-bar-title {
  font-weight: 700;
  color: var(--midnight);
}

.top-bar-desc {
  opacity: 0.7;
}

.top-bar-phone {
  margin-left: auto;
}

.top-bar-phone a {
  font-size: 18px;
  font-weight: 800;
  color: var(--midnight);
}

.top-bar-phone a:hover {
  color: var(--accent);
}

.top-bar-bvi a,
.top-bar-bvi button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--white);
  color: var(--midnight);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

.top-bar-bvi a:hover,
.top-bar-bvi button:hover {
  background: var(--accent);
  color: var(--white);
  transform: translateY(-2px);
}

@media (max-width: 992px) {
  .top-bar.d-desktop {
    display: none;
  }
}

/* 3. Navigation */
.nav-header {
  position: sticky;
  top: 10px;
  z-index: 999;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  padding: 12px 0;
  border: 1px solid rgba(15, 23, 42, 0.05);
  border-radius: var(--radius-lg);
  margin: 20px auto;
  width: min(calc(100% - 40px), 1280px);
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
}

.nav-header .container {
  width: 100%;
  padding: 0 24px;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 110;
}

.logo {
  font-weight: 800;
  font-size: 22px;
  color: var(--midnight);
  letter-spacing: -0.02em;
  position: relative;
  z-index: 110;
}

.logo span {
  color: var(--accent);
}

.logo-img {
  height: clamp(28px, 4vw, 38px);
  width: auto;
  display: block;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 22px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 120;
  position: relative;
}

.menu-toggle span {
  width: 100%;
  height: 3px;
  background: var(--midnight);
  border-radius: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.menu-toggle.active span:first-child {
  transform: translateY(8.5px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

.nav-links {
  display: flex;
  gap: 32px;
  font-weight: 500;
  font-size: 15px;
}

.nav-links a:hover {
  color: var(--accent);
}

/* Dropdown */
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-item>a {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-item .chevron {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.nav-item:hover .chevron {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(15, 23, 42, 0.05);
  padding: 8px;
  list-style: none;
  margin: 0;
  min-width: 240px;
  max-height: 70vh;
  overflow-y: auto;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 200;
}

.dropdown-menu::-webkit-scrollbar {
  width: 4px;
}

.dropdown-menu::-webkit-scrollbar-track {
  background: transparent;
}

.dropdown-menu::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.1);
  border-radius: 10px;
}

.dropdown-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, 0.2);
}

@media (min-width: 993px) {
  .nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }

  .nav-header .search-toggle {
    display: none;
  }
}

.dropdown-menu li a {
  display: block;
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  border-radius: 10px;
  transition: var(--transition);
}

.dropdown-menu li a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

/* 4. Hero & Pathfinder */
.hero {
  padding: 100px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero-content {
  width: 100%;
}

.hero h1 {
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.05;
  color: var(--text-dark);
  margin: 0 0 24px;
  letter-spacing: -0.04em;
}

.hero p {
  font-size: 20px;
  color: var(--text);
  max-width: 600px;
  margin-bottom: 40px;
}

.pathfinder {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lux);
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
  margin-top: 60px;
  border: 1px solid rgba(15, 23, 42, 0.03);
}

.path-sidebar h3 {
  font-size: 24px;
  margin: 0 0 20px;
  color: var(--text-dark);
}

.path-btn {
  display: flex;
  width: 100%;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-clay);
  border: none;
  font-family: inherit;
  font-weight: 600;
  margin-bottom: 12px;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.path-btn:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.path-btn.active {
  background: var(--midnight);
  color: var(--white);
}

.path-content {
  min-height: 300px;
  display: flex;
  align-items: center;
}

.path-result {
  display: none;
  width: 100%;
  animation: fadeIn 0.5s ease;
}

.path-result.active {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(10px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 5. Cards & UI */
.section {
  padding: 80px 0;
}

main .section:first-child {
  padding-top: 40px;
}

.section-head {
  margin-bottom: 48px;
}

.section-head h2 {
  color: var(--text-dark);
  margin-bottom: 16px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.med-card {
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius-lg);
  transition: var(--transition);
  border: 1px solid rgba(15, 23, 42, 0.02);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.med-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lux);
}

.med-card-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 24px;
  border-radius: 16px;
  background: var(--surface-light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.med-card-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.med-card:hover .med-card-icon {
  transform: rotate(-5deg);
}

.med-card h3 {
  font-size: 24px;
  margin: 0 0 16px;
  color: var(--text-dark);
}

@media (min-width: 993px) {
  .doctor-card h3 {
    min-height: 64px;
    display: flex;
    align-items: flex-end;
  }
}

.med-card p {
  margin-bottom: 24px;
  flex-grow: 1;
}

.service-sublist {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
  flex-grow: 1;
}

.service-sublist li {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 10px;
  position: relative;
  padding-left: 20px;
  line-height: 1.5;
  transition: var(--transition);
  list-style: none;
}

.service-sublist li::before {
  content: "•";
  color: var(--accent);
  position: absolute;
  left: 0;
  font-weight: 800;
}

.content-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
  flex-grow: 1;
}

.content-list li {
  color: var(--text-light);
  margin-bottom: 10px;
  position: relative;
  padding-left: 20px;
  line-height: 1.5;
  transition: var(--transition);
  list-style: none;
}

.content-list li::before {
  content: "•";
  color: var(--accent);
  position: absolute;
  left: 0;
  font-weight: 800;
}

.service-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-8px);
}

.card-footer-action {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(15, 23, 42, 0.05);
}

.btn-more {
  display: inline-block;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
}

.btn-more:hover {
  color: var(--accent-hover);
  padding-left: 5px;
}

.card-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.card-link:hover h3 {
  color: var(--accent);
}

/* Full width map section */
.section-full-map {
  padding: 0;
  position: relative;
  overflow: hidden;
  background: var(--white);
}

.map-full {
  width: 100%;
  height: 590px;
  background: #eee;
}

.map-contacts-overlay {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 40px), 1200px);
  pointer-events: none;
  display: flex;
  justify-content: flex-end;
}

.contacts-card {
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lux);
  width: 450px;
  pointer-events: auto;
  border: 1px solid rgba(15, 23, 42, 0.05);
}

.contacts-card-title {
  margin-top: 0;
  margin-bottom: 24px;
  font-size: 24px;
  line-height: 1.2;
  font-weight: bold;
  color: var(--text-dark);
}

.contact-item {
  margin-bottom: 24px;
  display: flex;
  gap: 16px;
}

.contact-item:last-child {
  margin-bottom: 0;
}

.contact-icon {
  color: var(--accent);
  font-size: 20px;
  flex-shrink: 0;
}

.contact-info-title {
  margin: 0 0 4px;
  font-size: 16px;
  line-height: 1.2;
  font-weight: bold;
  color: var(--text-dark);
}

.contact-info p {
  margin: 0;
  font-size: 14px;
  color: var(--text);
  line-height: 1.4;
}

@media (max-width: 768px) {
  .map-contacts-overlay {
    position: static;
    transform: none;
    width: 100%;
    margin-top: -20px;
  }

  .contacts-card {
    width: 100%;
    border-radius: 0;
  }

  .map-full {
    height: 400px;
  }
}

.btn-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  background: var(--accent);
  color: var(--white);
  font-weight: 700;
  border-radius: 999px;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.btn-accent:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(27, 96, 171, 0.2);
}

.doctor-organic {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 80px 30px 45% 55% / 40px 100px 55% 45%;
  background: var(--bg-clay);
  overflow: hidden;
  margin-bottom: 24px;
}

.doctor-organic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Doctor Experience Badge */
.doctor-experience {
  font-weight: 600;
  color: var(--midnight);
  padding-top: 8px;
  margin-bottom: 0;
}

/* About Section Layout */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.about-content {
  display: flex;
  flex-direction: column;
}

@media (max-width: 768px) {
  .about-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .about-image img {
    max-height: 300px;
  }
}

/* News Vertical & Horizontal Cards */
.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.news-card-v {
  display: flex !important;
  flex-direction: row;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.news-card-v:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 40px rgba(27, 96, 171, 0.12);
}

.news-card-accent {
  width: 6px;
  min-height: 100%;
  background: linear-gradient(180deg, var(--accent), #7dd3fc);
  flex-shrink: 0;
}

.news-card-v.has-image {
  flex-direction: row;
}

.news-card-v.has-image .news-card-image {
  width: 32%;
  height: 100%;
  min-height: 220px;
  flex-shrink: 0;
}

/* For front-page column cards */
.promo-card.has-image {
  flex-direction: column !important;
}

.promo-card.has-image .news-card-image {
  width: 100%;
  height: 220px;
}

.news-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.news-card-v:hover .news-card-image img {
  transform: scale(1.06);
}

/* FAQ Accordion */
.faq-section {
  max-width: 100%;
}

.faq-item {
  border: 1px solid rgba(15, 23, 42, 0.05) !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.01);
  transition: var(--transition) !important;
}

.faq-item:hover {
  border-color: rgba(27, 96, 171, 0.2) !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04) !important;
}

.faq-trigger {
  transition: var(--transition) !important;
}

.faq-trigger:hover {
  color: var(--accent) !important;
}

.faq-trigger:hover .faq-icon {
  background: var(--accent) !important;
  color: white !important;
  transform: translateY(-2px);
}

.faq-content p:last-child {
  margin-bottom: 0;
}

/* Admin Styles */
.med-searchable-select {
  padding: 8px !important;
  border-radius: 4px;
  border-color: #ccd0d4;
}

.news-card-body {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.news-card-date {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.news-card-body h3 {
  font-size: 18px;
  margin: 0;
  line-height: 1.3;
  color: var(--midnight);
}

.news-card-body p {
  font-size: 14px;
  color: var(--text);
  margin: 0;
  line-height: 1.5;
  opacity: 0.8;
}

.news-card-link {
  font-size: 14px;
  color: var(--accent);
  font-weight: 700;
  margin-top: auto;
}

.news-card-v:hover .news-card-link {
  color: var(--accent);
  padding-left: 5px;
}

.news-card-v:hover h3 {
  color: var(--accent);
}

/* Pagination Styling */
.med-pagination {
  margin-top: 60px;
}

.med-pagination .nav-links {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.med-pagination .page-numbers {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--white);
  font-weight: 700;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.med-pagination a.page-numbers:hover {
  background: var(--accent);
  color: var(--white);
  transform: translateY(-2px);
}

.med-pagination .page-numbers.current {
  background: var(--midnight);
  color: var(--white);
}

@media (max-width: 900px) {
  .news-card-v.has-image {
    flex-direction: column;
  }

  .news-card-v.has-image .news-card-image {
    width: 100%;
    height: 180px;
  }
}

@media (max-width: 768px) {
  .news-grid {
    grid-template-columns: 1fr;
  }
}

/* See All Specialists Card */
.see-all-card {
  background: var(--accent) !important;
  color: var(--white) !important;
  justify-content: center;
  align-items: center;
  text-align: center;
  border: none !important;
}

.see-all-icon {
  font-size: 48px;
  margin-bottom: 20px;
  transition: var(--transition);
}

.see-all-card:hover .see-all-icon {
  transform: translateX(10px);
}

.see-all-card h3 {
  color: var(--white) !important;
  margin-bottom: 8px !important;
}

.see-all-card p {
  opacity: 0.8;
  margin-bottom: 0 !important;
}

.docdoc-widget {
  display: block;
  transform: scale(0.863);
  padding-top: 4px;
}

/* License Section */
.license-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.license-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lux);
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid rgba(15, 23, 42, 0.05);
}

.license-item:hover {
  transform: scale(1.02);
  box-shadow: 0 15px 30px rgba(15, 23, 42, 0.1);
}

.license-item img {
  width: 100%;
  height: auto;
  display: block;
}

.download-license {
  margin-top: 40px;
}

/* Gallery Section */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.gallery-item {
  aspect-ratio: 16/10;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lux);
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid rgba(15, 23, 42, 0.05);
}

.gallery-item:hover {
  transform: scale(1.03) translateY(-5px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
  z-index: 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.full-gallery {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* Advantages Section (New layout) */
.section-advantages {
  min-height: auto;
  display: flex;
  align-items: center;
  position: relative;
  padding: 60px 0;
  color: var(--white);
}

.b-main-advantages {
  width: min(calc(100% - 40px), 1280px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  background: var(--midnight);
  border-radius: var(--radius-lg);
  padding: 60px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.b-main-advantages__left {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.b-main-advantages__title {
  font-size: 36px;
  font-weight: 800;
  margin: 0;
  color: var(--white);
}

.b-main-advantages__content {
  position: relative;
  width: 380px;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.b-main-advantages__images {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 250px;
  height: 250px;
  border-radius: 50%;
  overflow: hidden;
  z-index: 2;
}

.b-main-advantages__image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease, transform 1.2s ease;
  transform: scale(1.1);
}

.b-main-advantages__image--active {
  opacity: 1;
  transform: scale(1);
}

.b-main-advantages__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.circle-indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.dots--active {
  fill: var(--accent) !important;
  r: 0.8;
  filter: drop-shadow(0 0 2px var(--accent));
}

.b-main-advantages__right {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 500px;
}

.b-main-advantages__slider-container {
  height: 270px;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
}

.b-main-advantages__slider {
  display: flex;
  flex-direction: column;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.b-main-advantages__item {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 90px;
  opacity: 0.2;
  transition: all 0.6s ease;
}

.b-main-advantages__item.active {
  opacity: 1;
}

.b-main-advantages__icon {
  width: 70px;
  height: 70px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.6s ease;
}

.b-main-advantages__name {
  font-size: 16px;
  font-weight: 600;
  color: var(--white);
  line-height: 1.4;
}

.b-main-advantages__nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.advantage-counter {
  font-size: 18px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
}

.advantage-counter .curr {
  color: var(--white);
}

.l-button-nav {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.l-button-nav:hover {
  background: var(--white);
  color: var(--midnight);
  border-color: var(--white);
}

@media (max-width: 992px) {
  .b-main-advantages {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
    padding: 40px 20px;
  }

  .b-main-advantages__title {
    font-size: 28px;
  }

  .b-main-advantages__content {
    width: 280px;
    height: 280px;
    margin: 0 auto;
  }

  .b-main-advantages__images {
    width: 180px;
    height: 180px;
  }

  .b-main-advantages__right {
    margin: 0 auto;
    align-items: center;
  }

  .b-main-advantages__item {
    flex-direction: column;
    text-align: center;
    height: auto;
    padding: 16px 0;
    gap: 12px;
    display: none;
  }

  .b-main-advantages__item.active {
    display: flex;
  }

  .b-main-advantages__slider-container {
    height: auto;
    mask-image: none;
    -webkit-mask-image: none;
  }
}

.news-card {
  padding: 32px;
}

.news-date {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
  display: block;
}

.map-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lux);
  margin-top: 40px;
}

/* 6. Footer */
.site-footer {
  background: var(--midnight);
  color: var(--white);
  padding: 80px 0;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 80px;
}

.footer-brand h2 {
  color: var(--accent);
  margin-bottom: 20px;
}

.footer-links .footer-heading {
  margin-bottom: 24px;
  color: var(--white);
  opacity: 0.5;
  font-size: 14px;
  text-transform: uppercase;
  font-weight: bold;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 12px;
  opacity: 0.8;
}

.footer-links li:hover {
  opacity: 1;
  color: var(--accent);
}

/* Footer specific contact styles */
.footer-contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-contact-list li {
  margin-bottom: 8px;
  opacity: 1 !important;
  /* Reset default li hover */
  color: inherit !important;
}

.footer-phone-link {
  opacity: 0.8;
  transition: var(--transition);
  display: inline-block;
}

.footer-phone-link:hover {
  opacity: 1;
  color: var(--accent) !important;
}

.footer-address-item {
  margin-top: 12px;
  opacity: 0.8;
  line-height: 1.6;
  color: var(--white) !important;
}

.footer-bottom {
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
}

.footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-legal a,
.footer-developer a span:not(:hover) {
  color: var(--white);
  opacity: 0.5;
  transition: var(--transition);
}

.footer-legal a:hover,
.footer-developer a:hover {
  opacity: 1;
  color: var(--accent);
}

.footer-developer a svg {
  opacity: 1 !important;
}

.footer-developer a:hover svg {
  opacity: 0.6 !important;
}

@media (max-width: 768px) {
  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
  }
}

.mobile-menu-contacts,
.nav-phone-icon {
  display: none;
}

/* Responsive */
@media (max-width: 992px) {
  .nav-header {
    padding: 15px 0;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 100vw;
    height: 100%;
    height: 100dvh;
    background: var(--white);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 100px 20px 30px;
    overflow-y: auto;
    overscroll-behavior: none;
    gap: 25px;
    font-size: 20px;
    transition: 0.5s ease-in-out;
    z-index: 100;
    opacity: 0;
  }

  .nav-links.active {
    right: -1px;
    top: -1px;
    width: calc(100% + 2px);
    height: calc(100dvh + 2px);
    opacity: 1;
  }

  .mobile-menu-contacts {
    margin-top: auto;
    width: 100%;
    padding-top: 20px;
    border-top: 1px solid rgba(15, 23, 42, 0.1);
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .mobile-contact-phones {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
  }

  .mobile-contact-phones a {
    font-size: 18px;
    font-weight: 700;
    color: var(--midnight);
  }

  .mobile-contact-phones .mobile-email {
    font-size: 16px;
    font-weight: 500;
    color: var(--accent);
  }

  .mobile-address-block {
    text-align: center;
    font-size: 14px;
    color: var(--text);
  }

  .mobile-address-title {
    font-weight: 600;
    color: var(--midnight);
    margin-bottom: 4px;
  }

  .mobile-address-hours {
    opacity: 0.8;
    line-height: 1.4;
  }

  .nav-phone-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent-soft);
    margin-right: 12px;
    color: var(--accent);
  }

  /* Mobile Dropdown Accordeon */
  .nav-item.has-dropdown {
    flex-direction: column;
    text-align: center;
    width: 100%;
  }

  .nav-item.has-dropdown>a {
    justify-content: center;
    padding-bottom: 5px;
  }

  .nav-item.has-dropdown .dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border: none;
    background: rgba(15, 23, 42, 0.03);
    border-radius: 15px;
    margin-top: 10px;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
    display: block;
    min-width: 90%;
  }

  .nav-item.has-dropdown.mobile-open .dropdown-menu {
    max-height: 600px;
    padding: 10px;
    overflow-y: auto;
  }

  .nav-item.has-dropdown .chevron {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    padding: 10px;
    /* increase hit area */
    margin: -10px;
    /* offset padding so it stays aligned visually */
    box-sizing: content-box;
  }

  .nav-item.has-dropdown.mobile-open .chevron {
    transform: rotate(180deg);
  }

  .dropdown-menu li a {
    font-size: 16px;
    padding: 12px;
    white-space: normal;
    /* allow text to wrap on mobile */
    line-height: 1.4;
  }

  .nav-cta {
    display: flex;
    align-items: center;
  }

  .nav-cta .btn-accent {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .hero {
    padding: 60px 0 40px;
    text-align: center;
  }

  .hero-content {
    margin: 0 auto;
  }

  .hero h1 {
    font-size: 36px;
    line-height: 1.1;
  }

  .hero p {
    font-size: 16px;
    margin: 0 auto 30px;
  }

  .hero-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .hero-actions .btn-accent {
    margin: 0 !important;
    width: 100%;
  }

  .pathfinder {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .map-contacts-overlay {
    position: static;
    transform: none;
    width: 100%;
  }

  .contacts-card {
    width: 100%;
    border-radius: 0;
  }

  .map-full {
    height: 400px !important;
  }
}

/* 7. Hero Slider */
.hero-slider {
  position: relative;
  overflow: hidden;
  background: var(--surface-light);
  padding: 0;
  margin-top: 40px;
}

@media (max-width: 992px) {
  .hero-slider {
    margin-top: 0;
  }
}

.hero-slider-container {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-top: 20px;
  padding-bottom: 70px;
  /* space for dots */
}

.hero-slider-logo {
  position: absolute;
  top: 40px;
  left: 20px;
  z-index: 10;
}

.hero-slider-logo img {
  height: 70px;
  width: auto;
}

.hero-slider-track {
  flex-grow: 1;
  position: relative;
  display: grid;
  cursor: grab;
  user-select: none;
}

.slide {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  z-index: 1;
  pointer-events: none;
}

.slide.slide-active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
  pointer-events: auto;
}

.slide-inner {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  gap: 60px;
}

.slide-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 160px;
}

.slide-right {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
}

.slide-right img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lux);
}

.slide-text h1,
.slide-text .slide-heading {
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1.1;
  color: var(--text-dark);
  margin: 0 0 24px;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.slide-text p:not(.slide-heading) {
  font-size: 20px;
  color: var(--text);
  max-width: 600px;
  margin-bottom: 32px;
  line-height: 1.5;
}

/* Animations based on state */

/* Default (.slide format for coming in) */
.slide .slide-text {
  transform: translateY(50px);
  opacity: 0;
  transition: transform 0.6s ease, opacity 0.6s ease;
}

.slide .slide-right {
  transform: translateX(100px);
  opacity: 0;
  transition: transform 0.6s ease, opacity 0.6s ease;
}

/* Active slide */
.slide.slide-active .slide-text {
  transform: translateY(0);
  opacity: 1;
  /* Delay elements coming in */
  transition: transform 0.6s ease 0.3s, opacity 0.6s ease 0.3s;
}

.slide.slide-active .slide-right {
  transform: translateX(0);
  opacity: 1;
  transition: transform 0.6s ease 0.3s, opacity 0.6s ease 0.3s;
}

/* Outgoing slide */
.slide.slide-out {
  opacity: 1;
  visibility: visible;
  z-index: 1;
  pointer-events: none;
}

.slide.slide-out .slide-text {
  transform: translateY(50px);
  opacity: 0;
}

.slide.slide-out .slide-right {
  transform: translateX(-100px);
  opacity: 0;
}

/* Pagination Dots */
.slider-dots {
  position: absolute;
  bottom: 25px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 16px;
  z-index: 10;
}

.slider-dots .dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #cbd5e1;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: var(--transition);
}

.slider-dots .dot.active {
  background: var(--accent);
  transform: scale(1.3);
}

@media (max-width: 992px) {
  .d-desktop {
    display: none !important;
  }

  .hero-slider-container {
    padding-top: 0;
    min-height: auto;
  }

  .slide-inner {
    flex-direction: column;
    gap: 30px;
    padding-top: 30px;
    padding-bottom: 30px;
  }

  .slide-left {
    order: 2;
    padding-top: 0;
    text-align: center;
  }

  .slide-text p {
    margin: 0 auto 32px;
  }

  .hero-addresses {
    justify-content: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .slide-right {
    order: 1;
    max-height: 400px;
    padding: 0;
  }

}

@media (max-width: 470px) {
  .slide-inner {
    padding-top: 20px;
    padding-bottom: 20px;
    gap: 20px;
  }

  .slide-text h1,
  .slide-text .slide-heading {
    font-size: 28px;
    margin-bottom: 14px;
  }

  .slide-text p:not(.slide-heading) {
    font-size: 15px;
    margin-bottom: 20px;
  }

  .slide-right {
    max-height: 220px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .hero-actions .btn-accent,
  .hero-actions .btn-outline {
    width: 100%;
    text-align: center;
  }

  .slider-dots {
    bottom: 12px;
    gap: 10px;
  }

  .slider-dots .dot {
    width: 12px;
    height: 12px;
  }
}

/* Contact Form Section */
.section-contact {
  padding: 80px 0;
  background: var(--light-bg);
}

.contact-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  min-height: 500px;
}

.contact-box__left {
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-box__title {
  font-size: 40px;
  font-weight: 800;
  color: var(--midnight);
  margin-top: 0;
  margin-bottom: 30px;
}

.med-form .form-group {
  margin-bottom: 24px;
}

.med-form label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--slate);
  margin-bottom: 8px;
}

.med-form input {
  width: 100%;
  padding: 16px 20px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-md);
  font-size: 16px;
  color: var(--midnight);
  transition: all 0.3s ease;
  background: #f8fafc;
}

.med-form input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(0, 164, 190, 0.1);
}

.form-agreement {
  font-size: 13px;
  color: var(--slate);
  line-height: 1.5;
  margin: 24px 0;
}

.form-agreement a {
  color: var(--accent);
  text-decoration: underline;
}

.contact-box__right {
  position: relative;
  height: 100%;
}

.contact-box__right img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.med-form input.error {
  border-color: red;
  background: #fffafa;
}

@media (max-width: 768px) {
  .hide-mobile {
    display: none;
  }
}

@media (max-width: 992px) {
  .contact-box {
    grid-template-columns: 1fr;
  }

  .contact-box__right {
    display: none;
  }

  .contact-box__left {
    padding: 40px 20px;
  }

  .contact-box__title {
    font-size: 32px;
    text-align: center;
  }
}

/* 6. Sidebar & Components Enhancements */
.pro-link-sidebar:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  transform: translateY(-2px);
}

.pro-link-sidebar img {
  transition: transform 0.3s ease;
}

.pro-link-sidebar:hover img {
  transform: scale(1.1) rotate(5deg);
  filter: none !important;
}

.sidebar .med-card {
  margin-top: 36px;
}

.single-content .med-card {
  height: unset;
}

@media (max-width: 992px) {
  .sidebar .med-card {
    border-radius: 0 !important;
    margin: 20px -20px 0;
    width: calc(100% + 40px);
  }
}

.pro-badge-under-photo:hover {
  color: var(--accent) !important;
  transform: translateY(-2px);
  opacity: 0.8;
}

.section-heading-sm {
  font-size: 24px !important;
  font-weight: 700 !important;
  margin-bottom: 24px;
  color: var(--text-dark);
  display: block;
}

/* 10. Doctor Detail Enhancements */
.doctor-addresses {
  font-size: 18px;
  margin-bottom: 32px;
}

.doctor-addresses-title {
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--midnight);
  letter-spacing: 0.05em;
}

.doctor-address-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.doctor-address-item:last-child {
  margin-bottom: 0;
}

.doctor-address-item svg {
  color: var(--accent);
  flex-shrink: 0;
}

/* 20. Price Tables */
.med-price-table {
  margin: 0;
  background: var(--white);
  border-radius: 16px;
}

.price-row-item:hover td {
  background: var(--accent-soft);
}

.price-row-header td {
  background: #fdfdfd;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (max-width: 600px) {
  .med-price-table thead {
    display: none;
  }

  .price-row-item {
    display: flex;
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid #eee !important;
  }

  .price-row-item td {
    display: block;
    padding: 4px 0 !important;
    text-align: left !important;
    width: 100% !important;
    border: none !important;
  }

  .price-row-item td:nth-child(2) {
    font-size: 12px;
    order: 3;
  }

  .price-row-item td:nth-child(3) {
    order: 2;
    font-size: 18px;
    margin-top: 5px;
  }
}

.prices-anchor-nav {
  /* position: sticky;
    top: 100px;
    z-index: 90; */
  padding: 10px 0;
  background: var(--bg-clay);
}

.breadcrumbs .sep {
  margin: 0 10px;
  display: inline-block;
  opacity: 0.4;
}

/* 11. Contacts Page Integration */
.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
}

@media (max-width: 768px) {
  .about-content .med-card p[style*="font-size: 22px"] {
    font-size: 18px !important;
  }
}

/* Symptoms List Styling */
.symptoms-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0 0;
}

.symptoms-list li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 16px;
  font-size: 17px;
  color: var(--text);
  line-height: 1.6;
}

.symptoms-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--accent-soft);
}


.symptoms-list li:last-child {
  margin-bottom: 0;
}


/* Custom Med List Styling */
.med-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.med-list li {
  position: relative;
  margin-bottom: 12px;
  font-size: 17px;
  color: var(--text);
  line-height: 1.6;
}

.med-list li a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.med-list li a:hover {
  opacity: 0.8;
}

/* FAQ & Accordions - Global Native Style */
.faq-accordion {
  margin-top: 32px;
}

.faq-item {
  margin-bottom: 16px !important;
  padding: 0 !important;
  overflow: hidden !important;
  height: auto !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  background: var(--white) !important;
  border-radius: 16px !important;
  transition: var(--transition) !important;
  display: block !important;
  /* override med-card flex */
}

.faq-item:hover {
  border-color: var(--accent) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04) !important;
}

.faq-trigger {
  width: 100% !important;
  text-align: left !important;
  padding: 24px 32px !important;
  background: none !important;
  border: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  cursor: pointer !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  color: var(--midnight) !important;
  transition: var(--transition) !important;
}

.faq-icon {
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1) !important;
  background: var(--accent-soft) !important;
  width: 32px !important;
  height: 32px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  color: var(--accent) !important;
  font-size: 12px !important;
  flex-shrink: 0 !important;
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.23, 1, 0.32, 1) !important;
  background: #fdfdfd !important;
  border-top: 1px solid rgba(0, 0, 0, 0.03) !important;
}

.faq-inner {
  padding: 8px 32px 40px !important;
  font-size: 16px !important;
  line-height: 1.8 !important;
  color: var(--text) !important;
}

.faq-inner h4 {
  margin: 24px 0 8px !important;
  color: var(--midnight) !important;
  font-size: 18px !important;
}


/* Requisites Table */
.requisites-table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.requisites-table tr {
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.requisites-table tr:last-child {
  border-bottom: none;
}

.requisites-table td {
  padding: 20px 28px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  vertical-align: top;
}

.requisites-table td:first-child {
  font-weight: 700;
  color: var(--midnight);
  width: 32%;
  background: #f8fafc;
  border-right: 1px solid rgba(15, 23, 42, 0.05);
}

@media (max-width: 768px) {
  .requisites-table tr {
    display: flex;
    flex-direction: column;
  }

  .requisites-table td:first-child {
    width: 100%;
    background: #f1f5f9;
    border-right: none;
    padding: 12px 20px;
  }

  .requisites-table td {
    padding: 12px 20px;
  }
}

.download-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--accent-soft);
  padding: 24px 32px;
  border-radius: var(--radius-lg);
  margin-top: 40px;
  border: 1px dashed var(--accent);
}

.download-text h4 {
  margin: 0 0 4px 0;
  color: var(--midnight);
}

.download-text p {
  margin: 0;
  font-size: 14px;
  opacity: 0.8;
}


/* 13. Search Functionality */
.search-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-clay);
  border: none;
  color: var(--midnight);
  cursor: pointer;
  transition: var(--transition);
  margin-right: 12px;
}

.search-toggle:hover {
  background: var(--accent);
  color: var(--white);
  transform: translateY(-2px);
}

.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.search-overlay-close {
  position: absolute;
  top: 40px;
  right: 40px;
}

#search-close {
  background: transparent;
  border: none;
  color: var(--white);
  cursor: pointer;
  opacity: 0.7;
  transition: var(--transition);
}

#search-close:hover {
  opacity: 1;
  transform: rotate(90deg);
}

.search-overlay-content {
  text-align: center;
  max-width: 800px;
  width: 100%;
  padding: 0 24px;
}

.search-overlay-content .search-header {
  color: var(--white);
  font-size: clamp(32px, 5vw, 56px);
  margin-bottom: 40px;
  font-weight: bold;
}

.search-overlay .search-input-wrapper {
  position: relative;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  padding-bottom: 12px;
}

.search-overlay .search-field {
  width: 100%;
  background: transparent;
  border: none;
  font-size: clamp(24px, 4vw, 40px);
  color: var(--white);
  outline: none;
  padding: 0;
}

.search-overlay .search-field::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.search-overlay .search-submit {
  background: transparent;
  border: none;
  color: var(--white);
  cursor: pointer;
}

.search-hint {
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 16px;
}

/* Search Results Page */
.search-results-section {
  padding-top: 60px;
}

.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 40px;
}

.search-result-item {
  position: relative;
  padding: 32px;
  border-radius: var(--radius-md);
  background: var(--white);
  border: 1px solid rgba(15, 23, 42, 0.05);
  transition: var(--transition);
}

.stretched-link::after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  content: "";
}

.search-result-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lux);
}

.search-result-type {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.search-result-title {
  font-size: 24px;
  margin-bottom: 12px;
}

.search-result-title a:hover {
  color: var(--accent);
}

.search-result-excerpt {
  color: var(--text);
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.no-results-box {
  padding: 60px 24px;
  text-align: center;
  background: var(--white);
  border-radius: var(--radius-lg);
  margin-top: 40px;
}

.no-results-searchform {
  max-width: 500px;
  margin: 40px auto 0;
}

.no-results-searchform .search-input-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg-clay);
  padding: 4px 16px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  overflow: hidden;
}

.no-results-searchform .search-field {
  flex-grow: 1;
  width: 100%;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 12px 8px;
  outline: none;
  font-size: 16px;
}

.no-results-searchform .search-submit {
  background: transparent;
  border: none;
  color: var(--accent);
  cursor: pointer;
}

/* Pagination */
.pagination {
  margin-top: 60px;
  display: flex;
  justify-content: center;
  gap: 12px;
}

.pagination .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid rgba(15, 23, 42, 0.05);
  font-weight: 600;
  transition: var(--transition);
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.pagination .page-numbers.prev,
.pagination .page-numbers.next {
  width: auto;
  padding: 0 16px;
  border-radius: 22px;
}

@media (max-width: 768px) {
  .search-toggle {
    margin-right: 0;
  }

  .nav-header .container {
    padding: 0 16px;
  }

  .nav-inner {
    gap: 12px;
  }

  .nav-cta {
    gap: 8px;
  }

  .nav-phone-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-soft);
    border-radius: 50%;
    margin-right: 0;
  }
}

.top-bar-phone {
  text-wrap: nowrap;
}

/* 14. BVI (Accessibility Mode) */
.bvi-panel {
  display: none;
  background: #eee;
  border-bottom: 2px solid #ccc;
  padding: 8px 0;
  position: relative;
  top: 0;
  z-index: 10000;
  color: #000;
  font-family: Arial, sans-serif !important;
}

.bvi-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
  justify-content: center;
}

.bvi-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bvi-label {
  font-weight: bold;
  font-size: 14px;
}

.bvi-btn {
  background: #fff;
  border: 2px solid #000;
  color: #000;
  padding: 5px 15px;
  cursor: pointer;
  font-weight: bold;
  transition: none !important;
}

.bvi-btn.active {
  background: #000;
  color: #fff;
}

.bvi-btn-text {
  background: transparent;
  border: none;
  text-decoration: underline;
  cursor: pointer;
  font-weight: bold;
  padding: 5px;
  color: #000;
}

/* BVI Active State Resets */
body.bvi-active * {
  transition: none !important;
  animation: none !important;
  text-shadow: none !important;
  box-shadow: none !important;
}

body.bvi-active .modal-container {
  height: 75vh;
}

body.bvi-active .nav-header {
  position: relative !important;
  z-index: 2000 !important;
  margin: 20px auto !important;
}

/* Font Sizes */
body.bvi-font-s {
  font-size: 16px !important;
}

body.bvi-font-m {
  font-size: 20px !important;
}

body.bvi-font-l {
  font-size: 24px !important;
}

body.bvi-active h1 {
  font-size: 2em !important;
}

body.bvi-active h2 {
  font-size: 1.8em !important;
}

body.bvi-active h3 {
  font-size: 1.6em !important;
}

/* Themes */
/* White on Black */
body.bvi-theme-black {
  background: #000 !important;
  color: #fff !important;
}

body.bvi-theme-black * {
  background-color: #000 !important;
  color: #fff !important;
  border-color: #fff !important;
}

body.bvi-theme-black a {
  text-decoration: underline !important;
}

/* Blue on LightBlue */
body.bvi-theme-blue {
  background: #9dd1ff !important;
  color: #063462 !important;
}

body.bvi-theme-blue * {
  background-color: #9dd1ff !important;
  color: #063462 !important;
  border-color: #063462 !important;
}

/* Images Control */
body.bvi-images-off img,
body.bvi-images-off video,
body.bvi-images-off .hero-slider {
  display: none !important;
}

body.bvi-active .med-card:hover {
  transform: none !important;
}

@media (max-width: 768px) {
  .bvi-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* BVI specific fixes */
body.bvi-active .dropdown-menu {
  top: 100% !important;
  z-index: 999999 !important;
  border: 2px solid #000 !important;
}

body.bvi-active .nav-item.has-dropdown {
  position: relative !important;
}

body.bvi-theme-white * {
  background-color: #fff !important;
  color: #000 !important;
  border-color: #000 !important;
}

body.bvi-active .map-contacts-overlay {
  background: none !important;
}

body.bvi-active .contacts-card {
  border: 4px solid #000 !important;
}

body.bvi-active .bvi-btn-close {
  background: #000 !important;
  color: #fff !important;
  border-radius: 4px;
}

body.bvi-active .footer-brand a.logo img {
  filter: unset !important;
}