/* =====================================================
   НАРКОЛОГИЧЕСКАЯ КЛИНИКА «ВОЗРОЖДЕНИЕ» — ОСНОВНЫЕ СТИЛИ
   Современный медицинский дизайн
   ===================================================== */

:root {
  --primary: #0d6e6e;
  --primary-dark: #0a5555;
  --primary-light: #e6f3f3;
  --accent: #1a5f7a;
  --secondary: #2c3e50;
  --text: #2d3436;
  --text-light: #636e72;
  --bg: #ffffff;
  --bg-alt: #f8f9fa;
  --bg-soft: #f0f7f7;
  --border: #dee2e6;
  --success: #198754;
  --warning: #ffc107;
  --danger: #dc3545;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: all 0.3s ease;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

a:hover {
  color: var(--primary-dark);
}

ul, ol {
  list-style: none;
}

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--secondary);
}

h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 1.25rem; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.4rem); margin-bottom: 0.75rem; }

p { margin-bottom: 1rem; }

.text-center { text-align: center; }
.text-muted { color: var(--text-light); }

/* ========== LAYOUT ========== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 60px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-soft {
  background: var(--bg-soft);
}

/* ========== HEADER ========== */
.header {
  background: var(--bg);
  box-shadow: 0 2px 15px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-top {
  background: var(--primary);
  color: #fff;
  font-size: 0.875rem;
  padding: 8px 0;
}

.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.header-top a {
  color: #fff;
  opacity: 0.95;
}

.header-top a:hover {
  opacity: 1;
}

.header-main {
  padding: 15px 0;
}

.header-main .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--secondary);
  white-space: nowrap;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-list {
  display: flex;
  gap: 4px;
  align-items: center;
}

.nav-list > li {
  position: relative;
}

.nav-list a {
  display: block;
  padding: 10px 14px;
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
}

.nav-list a:hover,
.nav-list a.active {
  background: var(--primary-light);
  color: var(--primary);
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  min-width: 240px;
  box-shadow: var(--shadow-hover);
  border-radius: var(--radius);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  z-index: 100;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  padding: 10px 20px;
  font-size: 0.9rem;
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn-white {
  background: #fff;
  color: var(--primary);
}

.btn-white:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.05rem;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
}

/* Mobile menu */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--secondary);
  transition: var(--transition);
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  z-index: 2000;
  padding: 20px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.mobile-nav.open {
  transform: translateX(0);
}

.mobile-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.mobile-nav-close {
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--text);
}

.mobile-nav-list a {
  display: block;
  padding: 14px 0;
  font-size: 1.1rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.mobile-nav-list .sub {
  padding-left: 20px;
  font-size: 0.95rem;
  color: var(--text-light);
}

/* ========== BREADCRUMBS ========== */
.breadcrumbs {
  padding: 16px 0;
  font-size: 0.875rem;
  background: var(--bg-alt);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.breadcrumbs li:not(:last-child)::after {
  content: "›";
  margin-left: 6px;
  color: var(--text-light);
}

.breadcrumbs a {
  color: var(--text-light);
}

.breadcrumbs a:hover {
  color: var(--primary);
}

.breadcrumbs span {
  color: var(--text);
  font-weight: 500;
}

/* ========== HERO ========== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-content h1 {
  color: #fff;
  margin-bottom: 16px;
}

.hero-content .lead {
  font-size: 1.2rem;
  opacity: 0.95;
  margin-bottom: 28px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 30px;
}

.hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.hero-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

.hero-feature svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.hero-image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-hover);
}

.hero-image img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  object-position: center 34%;
}

/* ========== CARDS ========== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

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

.card-img {
  height: 180px;
  overflow: hidden;
  background: var(--bg-soft);
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-body h3 {
  margin-bottom: 10px;
}

.card-body p {
  color: var(--text-light);
  font-size: 0.95rem;
  flex: 1;
}

.card-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin: 12px 0;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

/* ========== ADVANTAGES ========== */
.advantages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.advantage-item {
  text-align: center;
  padding: 30px 20px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.advantage-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--primary);
}

/* ========== CONTENT BLOCKS ========== */
.content-block {
  max-width: 800px;
}

.content-block h2 {
  margin-top: 2rem;
}

.content-block h2:first-child {
  margin-top: 0;
}

.content-block ul, .content-block ol {
  margin: 1rem 0 1.5rem 1.5rem;
}

.content-block ul li, .content-block ol li {
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 8px;
}

.content-block ul li::before {
  content: "•";
  color: var(--primary);
  font-weight: bold;
  position: absolute;
  left: -12px;
}

.content-block ol {
  list-style: decimal;
}

/* ========== PRICE BLOCK ========== */
.price-block {
  background: var(--bg-soft);
  border: 2px solid var(--primary-light);
  border-radius: var(--radius);
  padding: 30px;
  text-align: center;
  margin: 30px 0;
}

.price-block .price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin: 10px 0;
}

.price-block .note {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* ========== FAQ ========== */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 18px 20px;
  background: #fff;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  color: var(--secondary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.faq-question::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--primary);
  flex-shrink: 0;
}

.faq-item.open .faq-question::after {
  content: "−";
}

.faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
  padding: 0 20px 18px;
  max-height: 500px;
}

/* ========== CTA ========== */
.cta-block {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
  padding: 50px 0;
  text-align: center;
  border-radius: var(--radius);
  margin: 40px 0;
}

.cta-block h2 {
  color: #fff;
  margin-bottom: 12px;
}

.cta-block p {
  opacity: 0.95;
  margin-bottom: 24px;
  font-size: 1.1rem;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

/* ========== FORM ========== */
.form-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
  max-width: 480px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 110, 110, 0.15);
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.form-note {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 12px;
}

/* ========== TABLE ========== */
.price-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.price-table th,
.price-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.price-table th {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

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

.price-table tr:hover td {
  background: var(--bg-soft);
}

.price-table .price-col {
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

/* ========== DOCTOR CARDS ========== */
.doctors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.doctor-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-align: center;
}

.doctor-photo {
  height: 220px;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--primary);
}

.doctor-info {
  padding: 20px;
}

.doctor-info h3 {
  margin-bottom: 4px;
}

.doctor-role {
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 10px;
}

/* ========== REVIEWS ========== */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.review-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.review-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--primary);
}

.review-stars {
  color: #f5a623;
  margin-bottom: 10px;
}

.review-text {
  font-size: 0.95rem;
  color: var(--text-light);
  font-style: italic;
}

.review-note {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

/* ========== FOOTER ========== */
.footer {
  background: var(--secondary);
  color: #adb5bd;
  padding: 50px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer h4 {
  color: #fff;
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.footer a {
  color: #adb5bd;
  display: block;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.footer a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 0.875rem;
}

.footer-disclaimer {
  font-size: 0.8rem;
  opacity: 0.7;
  max-width: 600px;
  margin-top: 15px;
}

/* ========== RELATED ========== */
.related-services {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.related-item {
  background: var(--bg-soft);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--primary);
  transition: var(--transition);
}

.related-item:hover {
  background: var(--primary-light);
}

.related-item a {
  font-weight: 600;
  color: var(--secondary);
}

/* ========== BLOG ========== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.blog-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}

.blog-card:hover {
  box-shadow: var(--shadow-hover);
}

.blog-card-img {
  height: 200px;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 3rem;
}

.blog-card-body {
  padding: 24px;
}

.blog-meta {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
}

.article-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.article-content h3 {
  margin-top: 1.5rem;
}

.article-content p {
  margin-bottom: 1.2rem;
}

.article-content ul, .article-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
}

.article-content li {
  margin-bottom: 0.6rem;
}

/* ========== 404 ========== */
.error-page {
  text-align: center;
  padding: 100px 20px;
}

.error-page h1 {
  font-size: 6rem;
  color: var(--primary);
  margin-bottom: 10px;
}

/* ========== MAP PLACEHOLDER ========== */
.map-placeholder {
  background: var(--bg-soft);
  border-radius: var(--radius);
  height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  border: 2px dashed var(--border);
  font-size: 1.1rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
  .hero .container {
    grid-template-columns: 1fr;
  }
  
  .hero-image {
    order: -1;
  }
  
  .hero-image img {
    height: 260px;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .nav {
    display: none;
  }
  
  .burger {
    display: flex;
  }
  
  .header-cta .btn-outline {
    display: none;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 40px 0;
  }
  
  .hero {
    padding: 50px 0;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .price-table {
    font-size: 0.9rem;
  }
  
  .price-table th,
  .price-table td {
    padding: 12px 14px;
  }
  
  .header-top {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
  }
  
  .btn-lg {
    width: 100%;
  }
  
  .card-actions {
    flex-direction: column;
  }
  
  .card-actions .btn {
    width: 100%;
  }
}

/* Utility */
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ===== Requested layout/navigation updates ===== */
.header-main .container {
  max-width: 1420px;
}

.nav-list {
  flex-wrap: nowrap;
}

.nav-list a {
  white-space: nowrap;
  padding-left: 9px;
  padding-right: 9px;
  font-size: 0.9rem;
}

.section-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.section-heading-row h2 { margin-bottom: 4px; }
.section-heading-row p { margin-bottom: 0; }

@media (min-width: 993px) {
  .advantages--five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
  }
  .advantages--five .advantage-item {
    padding: 24px 14px;
  }
  .advantages--five .advantage-item h3 {
    font-size: 1.03rem;
  }
  .advantages--five .advantage-item p {
    font-size: 0.88rem;
    margin-bottom: 0;
  }
}

@media (max-width: 1360px) and (min-width: 1181px) {
  .header-cta .btn-primary { display: none; }
}

@media (max-width: 1180px) {
  .nav { display: none; }
  .burger { display: flex; }
  .header-cta .btn-outline { display: none; }
}

/* ===== Doctors ===== */
.doctor-photo {
  height: 180px;
  padding: 0;
  overflow: hidden;
}
.doctor-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.doctor-badge {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.doctors-grid--home {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.doctors-grid--full {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.demo-notice {
  margin: 0 0 28px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  color: var(--text-light);
}

/* ===== Licenses ===== */
.license-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}
.license-gallery--single {
  grid-template-columns: minmax(280px, 620px);
  justify-content: center;
}
.license-card {
  display: block;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}
.license-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.license-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}
.license-gallery--home .license-card img {
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
}
.license-note {
  max-width: 900px;
  margin-bottom: 28px;
  color: var(--text-light);
}
.license-note code {
  font-size: 0.9em;
  background: var(--bg-soft);
  padding: 2px 5px;
  border-radius: 4px;
}

@media (max-width: 900px) {
  .doctors-grid--home,
  .doctors-grid--full,
  .license-gallery:not(.license-gallery--single) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-heading-row { align-items: flex-start; }
}

@media (max-width: 600px) {
  .doctors-grid--home,
  .doctors-grid--full,
  .license-gallery:not(.license-gallery--single) { grid-template-columns: 1fr; }
  .section-heading-row { flex-direction: column; }
}


/* V10: doctor portraits */
.doctor-photo { background: #edf6f6; }
.doctor-photo img { display:block; width:100%; height:100%; object-fit:cover; object-position:center 20%; font-size:0; }
.hero-image { background:#edf6f6; overflow:hidden; }
.hero-image img { display:block; width:100%; height:100%; object-fit:cover; object-position:center 18%; font-size:0; }

/* ===== V13 FULL MOBILE/TABLET RESPONSIVE FIX ===== */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

body,
.header,
.header-top,
.header-main,
main,
section,
.footer {
  max-width: 100%;
}

.container,
.header-main .container,
.header-top .container,
.hero .container,
.footer-grid,
.cards-grid,
.doctors-grid,
.reviews-grid,
.blog-grid,
.related-services,
.advantages,
.section-heading-row,
.form-card,
.content-block,
.article-content {
  min-width: 0;
}

.cards-grid > *,
.doctors-grid > *,
.reviews-grid > *,
.blog-grid > *,
.related-services > *,
.advantages > *,
.footer-grid > *,
.hero .container > *,
.section-heading-row > * {
  min-width: 0;
}

img,
svg,
video,
iframe,
embed,
object {
  max-width: 100%;
}

p,
li,
.content-block,
.article-content,
.footer,
.breadcrumbs,
.card-body,
.doctor-info {
  overflow-wrap: anywhere;
  word-break: normal;
}

.price-table {
  table-layout: fixed;
}

.price-table th,
.price-table td {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Off-canvas navigation must not create a second horizontal viewport. */
@media (max-width: 1180px) {
  .mobile-nav {
    display: block;
    width: 100%;
    max-width: 100vw;
    transform: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease;
  }

  .mobile-nav.open {
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .header-main .container {
    gap: 10px;
  }

  .header-main .logo {
    min-width: 0;
    white-space: normal;
    line-height: 1.15;
  }

  .header-main .logo [data-config="clinicName"] {
    display: block;
    min-width: 0;
    max-width: 260px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .header-cta {
    flex: 0 0 auto;
    gap: 4px;
  }

  .header-cta .btn-primary,
  .header-cta .btn-outline {
    display: none;
  }

  .burger {
    flex: 0 0 auto;
  }
}

@media (max-width: 900px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .section-heading-row {
    flex-wrap: wrap;
  }

  .hero-features {
    gap: 12px 16px;
  }

  .cta-block {
    margin-left: 0;
    margin-right: 0;
    padding-left: 18px;
    padding-right: 18px;
  }
}

@media (max-width: 700px) {
  .cards-grid,
  .doctors-grid,
  .reviews-grid,
  .blog-grid,
  .related-services,
  .advantages,
  .footer-grid,
  .license-gallery:not(.license-gallery--single) {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .form-card {
    width: 100%;
    max-width: 100%;
    padding: 22px 16px;
  }

  .price-table {
    font-size: 0.86rem;
  }

  .price-table th,
  .price-table td {
    padding: 10px 8px;
  }

  .price-table .price-col {
    white-space: normal;
  }

  .price-showcase {
    width: 100%;
    max-width: 100% !important;
    border-radius: 12px !important;
  }

  .price-showcase > div {
    grid-template-columns: minmax(0, 64%) minmax(0, 36%) !important;
  }

  .price-showcase > div > div {
    min-width: 0;
    padding: 12px 9px !important;
    font-size: 13px !important;
    overflow-wrap: anywhere;
  }

  .price-showcase > div > div:first-child {
    padding-left: 12px !important;
  }

  .map-placeholder,
  .map-placeholder iframe {
    width: 100% !important;
    max-width: 100% !important;
  }
}

@media (max-width: 600px) {
  .container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .header-main {
    padding: 10px 0;
  }

  .header-main .container {
    gap: 8px;
  }

  .logo {
    gap: 8px;
    font-size: 0.95rem;
  }

  .logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 1.05rem;
  }

  .header-main .logo [data-config="clinicName"] {
    max-width: 205px;
    font-size: 0.88rem;
    line-height: 1.12;
  }

  .header-top {
    padding: 6px 0;
    font-size: 0.74rem;
  }

  .header-top .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .header-top .container > div {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
  }

  .header-top .container > div > span[style] {
    display: none;
  }

  .mobile-nav {
    padding: 16px 14px 28px;
  }

  .mobile-nav-header {
    margin-bottom: 18px;
  }

  .mobile-nav-list a {
    padding: 12px 0;
    font-size: 1rem;
  }

  .hero {
    padding: 34px 0;
  }

  .hero .container {
    gap: 24px;
  }

  .hero-image img {
    height: 235px;
  }

  .hero-content h1 {
    font-size: clamp(1.65rem, 8vw, 2rem);
  }

  .hero-content .lead {
    font-size: 1rem;
    margin-bottom: 20px;
  }

  .hero-buttons,
  .cta-buttons,
  .card-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-buttons .btn,
  .cta-buttons .btn,
  .card-actions .btn {
    width: 100%;
    max-width: 100%;
    white-space: normal;
  }

  .hero-features {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .section {
    padding: 34px 0;
  }

  .section-heading-row {
    gap: 12px;
    margin-bottom: 18px;
  }

  .card-body,
  .doctor-info,
  .review-card,
  .blog-card-body {
    padding: 18px;
  }

  .price-block {
    padding: 22px 14px;
  }

  .faq-question {
    padding: 15px 14px;
  }

  .faq-answer,
  .faq-item.open .faq-answer {
    padding-left: 14px;
    padding-right: 14px;
  }

  .footer {
    padding-top: 36px;
  }

  .footer-grid {
    gap: 24px;
    margin-bottom: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .breadcrumbs {
    padding: 11px 0;
    font-size: 0.8rem;
  }
}

@media (max-width: 380px) {
  .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .header-main .logo [data-config="clinicName"] {
    max-width: 165px;
    font-size: 0.8rem;
  }

  .burger {
    padding: 6px;
  }

  .btn {
    padding-left: 14px;
    padding-right: 14px;
  }

  .price-showcase > div {
    grid-template-columns: minmax(0, 62%) minmax(0, 38%) !important;
  }

  .price-showcase > div > div {
    font-size: 12px !important;
    padding: 10px 7px !important;
  }
}

