
/* --- CORE CONFIGURATION & THEMING --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body { font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--text-dark); -webkit-text-size-adjust: 100%; }
button, input, textarea, select { font-family: inherit; }
:root {
    --primary-gold: #d4af37;
    --dark-gold: #b8901c;
    --pastel-yellow: #fefce8;
    --pure-white: #ffffff;
    --warm-white: #fafaf9;
    --text-dark: #292524;
    --text-muted: #78716c;
}
html {
    scroll-behavior: smooth;
}

/* Normal system mouse pointer is used site-wide (no custom cursor). */
html, body { overflow-x: hidden; }
img { max-width: 100%; height: auto; }
a, button, .faq-question { cursor: pointer; }

/* --- SKIP LINK FOR ACCESSIBILITY --- */
.skip-link {
    position: absolute;
    top: -60px;
    left: 10px;
    background: var(--text-dark);
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    z-index: 10000;
    transition: top 0.2s ease;
}
.skip-link:focus { top: 10px; }

/* --- STICKY FLOATING QUICK ACTIONS (LEFT & RIGHT) --- */
.floating-action-container {
    position: fixed;
    bottom: 30px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 999;
    pointer-events: none;
}
.float-btn {
    pointer-events: auto;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    color: white;
    font-size: 1.6rem;
}
.float-btn:hover {
    transform: scale(1.1) translateY(-5px);
}
.float-call {
    background-color: var(--primary-gold);
    border: 2px solid var(--pure-white);
}
.float-whatsapp {
    background-color: #25d366;
    border: 2px solid var(--pure-white);
}

/* --- LIVE SCROLLING DYNAMIC TOOTH COMPANION --- */
.scrolling-tooth-widget {
    position: fixed;
    bottom: 110px;
    right: 35px;
    width: 55px;
    height: 55px;
    z-index: 998;
    pointer-events: none;
    transition: transform 0.15s ease-out;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.15));
}

/* --- ON-SCROLL ANIMATION STATES --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}
.reveal.active { opacity: 1; transform: translateY(0); }
.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}
.reveal-left.active { opacity: 1; transform: translateX(0); }
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }

/* --- HEADER NAVBAR: SINGLE-ROW ALIGNED SYSTEM (DESKTOP + MOBILE) --- */
header {
    background-color: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 15px rgba(0,0,0,0.02);
}
.navbar {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 12px 20px;
}

/* Logo */
.logo-area {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-decoration: none;
    height: 80px;
    width: auto;
    flex-shrink: 0;
}
.logo-graphic {
    height: 100%;
    max-height: 80px;
    width: auto;
    display: block;
    object-fit: contain;
}

/* Menu wrapper: holds links + CTA, aligned in one row on desktop */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 34px;
}
.nav-links {
    display: flex;
    list-style: none;
    gap: 28px;
    align-items: center;
}

/* --- DROPDOWN MENU STYLING UNDER SPECIALITIES --- */
.nav-links li.dropdown {
    position: relative;
}
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--pure-white);
    min-width: 220px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border-radius: 12px;
    padding: 10px 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(212, 175, 55, 0.15);
    z-index: 105;
}
.nav-links li.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown-menu li {
    width: 100%;
}
.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    font-size: 0.9rem;
    color: var(--text-dark);
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}
.dropdown-menu a::after, .dropdown-menu a::before {
    display: none !important;
}
.dropdown-menu a:hover {
    background: var(--pastel-yellow);
    color: var(--dark-gold);
}

/* --- FANCY ORTHODONTIC WIRE & DIAMOND LINK ANIMATIONS --- */
.nav-links li {
    position: relative;
}
.nav-links > li > a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.4px;
    padding: 6px 4px;
    position: relative;
    transition: color 0.3s ease;
}
.nav-links > li > a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-gold), var(--dark-gold));
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 4px;
}
.nav-links > li > a::before {
    content: '✦';
    position: absolute;
    top: -6px;
    right: -10px;
    font-size: 0.75rem;
    color: var(--primary-gold);
    opacity: 0;
    transform: scale(0) rotate(-45deg);
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-shadow: 0 0 4px rgba(212, 175, 55, 0.6);
}
.nav-links > li:hover > a {
    color: var(--dark-gold);
}
.nav-links > li:hover > a::after {
    width: 100%;
}
.nav-links > li:hover > a::before {
    opacity: 1;
    transform: scale(1.1) rotate(45deg);
}

.header-cta {
    background: var(--text-dark);
    color: white;
    padding: 10px 22px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
}
.header-cta:hover { background: var(--primary-gold); }

/* Hamburger toggle - hidden on desktop */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    background: none;
    border: none;
    padding: 0;
    flex-shrink: 0;
    z-index: 101;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* Mobile slide-in menu overlay - inert on desktop */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(41, 37, 36, 0.45);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* --- HERO AREA --- */
.hero {
    max-width: 1200px;
    margin: 40px auto 60px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}
.hero-content { flex: 1.1; }
.hero-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: 20px;
}
.hero-content h1 span { color: var(--primary-gold); }
.hero-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 30px;
}
.hero-image { flex: 0.9; width: 100%; }
.hero-image img {
    max-width: 100%;
    width: 100%;
    height: auto;
    border-radius: 24px;
    border: 6px solid white;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
    object-fit: cover;
}

/* --- GENERAL BLOCK LAYOUTS --- */
.content-block-section {
    max-width: 1200px;
    margin: 80px auto;
    padding: 0 20px;
}
.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.text-heavy h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--text-dark);
}
.text-heavy p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 1rem;
}

/* --- SERVICES SPECIALITIES SECTION --- */
.services {
    background-color: var(--pure-white);
    padding: 80px 20px;
}
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px;
}
.section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 15px;
}
.services-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
}
@media (min-width: 993px) {
    .services-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 601px) and (max-width: 992px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .services-grid { grid-template-columns: 1fr; }
}
.service-card {
    background: var(--pastel-yellow);
    padding: 35px 25px;
    border-radius: 16px;
    transition: all 0.4s ease;
    border: 1px solid rgba(212, 175, 55, 0.1);
}
.service-card:hover {
    transform: translateY(-8px);
    background: var(--pure-white);
    box-shadow: 0 15px 35px rgba(212, 175, 55, 0.12);
    border-color: var(--primary-gold);
}
.card-icon {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 15px;
}
.service-card h3 { margin-bottom: 10px; font-size: 1.25rem; }
.service-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; }

/* --- ADVANCED TECH --- */
.tech-section {
    background-color: var(--warm-white);
    padding: 80px 20px;
}
.tech-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.tech-card {
    background: var(--pure-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
    border: 1px solid #f1f1f0;
}
.tech-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}
.tech-card-body {
    padding: 25px;
}
.tech-card-body h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-dark);
}
.tech-card-body p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* --- CLINICAL PORTFOLIO GALLERY SECTION --- */
.gallery-section {
    background-color: var(--pure-white);
    padding: 80px 20px;
}
.gallery-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}
.gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03);
    border: 4px solid var(--warm-white);
    aspect-ratio: 4 / 3;
    width: 100%;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}
.gallery-item:hover img {
    transform: scale(1.08);
}

/* --- PATIENT TESTIMONIALS --- */
.testimonials {
    background-color: var(--pastel-yellow);
    padding: 80px 20px;
}
.testimonial-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}
.testimonial-card {
    background: var(--pure-white);
    padding: 35px;
    border-radius: 24px;
    box-shadow: 0 15px 35px rgba(212, 175, 55, 0.05);
    position: relative;
}
.testimonial-card::before {
    content: "“";
    font-family: 'Playfair Display', serif;
    font-size: 5rem;
    color: rgba(214, 175, 55, 0.2);
    position: absolute;
    top: 10px;
    left: 20px;
    line-height: 1;
}
.testimonial-card p {
    font-size: 0.95rem;
    color: var(--text-dark);
    line-height: 1.7;
    margin-bottom: 20px;
    font-style: italic;
    position: relative;
    z-index: 1;
}
.client-info {
    display: flex;
    align-items: center;
    gap: 15px;
}
.client-favicon {
    width: 45px;
    height: 45px;
    background-color: var(--pastel-yellow);
    border: 2px solid var(--primary-gold);
    border-radius: 50%;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.client-info h4 {
    font-size: 1rem;
    color: var(--text-dark);
}
.client-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: block;
}

/* --- FAQ SECTION DESIGN PROFILE --- */
.faq-section {
    background-color: var(--pure-white);
    padding: 80px 20px;
}
.faq-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.faq-item {
    border: 1px solid #e7e5e4;
    border-radius: 12px;
    overflow: hidden;
    background: var(--warm-white);
    display: block; 
    width: 100%;
}
.faq-question {
    padding: 20px;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    width: 100%;
    background: none;
    border: none;
    text-align: left;
}
.faq-question:hover {
    background: rgba(214, 175, 55, 0.05);
}
.faq-question::after {
    content: "+";
    font-size: 1.4rem;
    color: var(--primary-gold);
    font-weight: 700;
    transition: transform 0.3s ease;
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1); 
    background: var(--pure-white);
}
.faq-answer p {
    padding: 20px;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    border-top: 1px solid #e7e5e4;
}

/* --- EMERGENCY CARE BANNER --- */
.emergency-banner {
    background: linear-gradient(135deg, var(--text-dark) 0%, #1c1917 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
    border-top: 4px solid var(--primary-gold);
}
.emergency-wrap {
    max-width: 800px;
    margin: 0 auto;
}
.emergency-wrap h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.3rem;
    color: var(--primary-gold);
    margin-bottom: 15px;
}
.emergency-wrap p {
    color: #d6d3d1;
    margin-bottom: 30px;
    font-size: 1.05rem;
    line-height: 1.6;
}
.emergency-banner-btn {
    background: var(--primary-gold); 
    padding: 16px 36px; 
    font-size: 1rem; 
    display: inline-block;
    white-space: normal; 
    word-wrap: break-word;
    max-width: 100%;
    line-height: 1.3;
}

/* --- MAPS LOCATION LINK --- */
.map-section { padding: 80px 20px; background: var(--warm-white); }
.map-container {
    max-width: 1200px;
    margin: 0 auto 20px;
    height: 450px;
    border-radius: 24px;
    overflow: hidden;
    border: 8px solid white;
    box-shadow: 0 15px 40px rgba(0,0,0,0.05);
}
.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}
.map-directions-link {
    display: block;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}
.map-directions-link a {
    color: var(--dark-gold);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid var(--primary-gold);
    padding-bottom: 2px;
}

/* --- FOOTER --- */
footer { background: var(--text-dark); color: #e7e5e4; padding: 60px 25px 30px; }
.footer-wrap {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    border-bottom: 1px solid #44403c;
    padding-bottom: 40px;
    margin-bottom: 30px;
}
.footer-column { max-width: 320px; width: 100%; }
.footer-column h3 { font-family: 'Playfair Display', serif; color: var(--primary-gold); margin-bottom: 15px; }
.footer-column h4 { margin-bottom: 15px; color: white; }
.footer-column p { font-size: 0.9rem; color: #a8a29e; line-height: 1.6; margin-bottom: 8px; }
.footer-column a { color: #a8a29e; text-decoration: none; }
.footer-column a:hover { color: var(--primary-gold); }
.footer-bottom { max-width: 1200px; margin: 0 auto; text-align: center; }
.footer-bottom p { font-size: 0.85rem; color: #78716c; }

/* --- WHY US: DOCTOR PROFILE CARDS --- */
.why-us-section {
    background-color: var(--warm-white);
    padding: 80px 20px;
}
.doctors-grid {
    max-width: 700px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 240px));
    gap: 30px;
    justify-content: center;
}
.doctor-card {
    background: var(--pure-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.04);
    border: 1px solid #f1f1f0;
    text-align: center;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.doctor-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 45px rgba(212, 175, 55, 0.15);
}
.doctor-photo-wrap {
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--pastel-yellow);
}
.doctor-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}
.doctor-card-body { padding: 25px 20px 30px; }
.doctor-card-body h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: 6px;
}
.doctor-card-body .doctor-role {
    color: var(--dark-gold);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 12px;
    display: block;
}
.doctor-card-body p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* --- GALLERY IMAGE LIGHTBOX --- */
.gallery-item {
    cursor: pointer;
}
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 18, 17, 0.92);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 30px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.lightbox-overlay.open {
    display: flex;
    opacity: 1;
}
.lightbox-overlay img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    object-fit: contain;
}
.lightbox-close {
    position: absolute;
    top: 24px;
    right: 30px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--pure-white);
    color: var(--text-dark);
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* --- MOBILE LAYOUT OPTIMIZATIONS & RESPONSIVENESS --- */
@media (max-width: 992px) {
    .hero, .grid-2-col { 
        flex-direction: column-reverse; 
        display: flex;
        text-align: center; 
        gap: 40px; 
    }
    .navbar {
        padding: 12px 15px;
    }
    .logo-area {
        height: 62px;
    }
    .logo-graphic {
        max-height: 62px;
    }

    /* Hamburger appears, inline menu becomes a slide-in panel */
    .nav-toggle { display: flex; }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(320px, 85vw);
        height: 100vh;
        background: var(--pure-white);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 34px;
        padding: 100px 30px 40px;
        box-shadow: -10px 0 40px rgba(0,0,0,0.12);
        transition: right 0.35s cubic-bezier(0.4,0,0.2,1);
        overflow-y: auto;
    }
    .nav-menu.open { right: 0; }

    .nav-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 22px;
        width: 100%;
    }
    .nav-links a::after, .nav-links a::before {
        display: none !important;
    }
    .nav-links a {
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--text-dark);
    }

    /* Mobile dropdown adjustments */
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 15px;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: transparent;
    }
    .dropdown-menu a {
        font-size: 1rem;
        padding: 6px 0;
        color: var(--text-muted);
    }

    .header-cta {
        width: 100%;
        text-align: center;
        padding: 13px 24px;
        font-weight: 600;
    }
    .nav-overlay { display: block; }
    .nav-overlay.open { opacity: 1; pointer-events: auto; }

    .hero-content h1 { font-size: 2.4rem; }
    .text-heavy h2 { font-size: 2.1rem; }
    .floating-action-container { padding: 0 15px; bottom: 20px; }
    .float-btn { width: 55px; height: 55px; font-size: 1.4rem; }
    .scrolling-tooth-widget { bottom: 95px; right: 20px; width: 45px; height: 45px; }

    .content-block-section { margin: 50px auto; }
    .services, .tech-section, .gallery-section, .testimonials, .faq-section, .map-section { padding: 50px 15px; }
    .map-container { height: 350px; }

    .footer-wrap { 
        flex-direction: column; 
        text-align: center; 
        gap: 30px; 
    }
    .footer-column { max-width: 100%; }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 12px 15px;
    }
    .hero-content h1 { font-size: 2rem; }
    .text-heavy h2 { font-size: 1.8rem; }
    .section-header h2 { font-size: 1.8rem; }
    .emergency-wrap h2 { font-size: 1.7rem; }
    .emergency-banner-btn { width: 100%; font-size: 0.95rem; padding: 14px 20px; }
    .gallery-grid { grid-template-columns: 1fr; gap: 14px; }
}

/* --- PHONE-ONLY CENTERED LOGO --- */
@media (max-width: 600px) {
    .navbar { position: relative; }
    .logo-area {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }
    .nav-toggle { margin-left: auto; }
}


/* =====================================================
   ADDITIONS: keyboard-accessible dropdowns, blog, SEO sections,
   better responsive navigation and reduced-motion support
   ===================================================== */
.nav-links li.dropdown:focus-within .dropdown-menu {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown-menu { max-height: 70vh; overflow-y: auto; }
.dropdown-menu a { text-decoration: none; }
.dropdown-menu a.menu-all { font-weight: 600; color: var(--dark-gold); border-bottom: 1px solid #f1f1f0; margin-bottom: 4px; }
.nav-links > li > a.current { color: var(--dark-gold); }
:focus-visible { outline: 3px solid var(--primary-gold); outline-offset: 3px; border-radius: 4px; }
.skip-link:focus-visible { outline-offset: 0; }

main { display: block; }
section[id], div[id] { scroll-margin-top: 90px; }

/* "At a glance" fact card (also helps search engines & AI assistants) */
.glance-card {
    background: var(--pure-white); border: 1px solid #f1f1f0; border-radius: 24px;
    padding: 36px; box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}
.glance-card h2 { font-family: 'Playfair Display', serif; font-size: 2rem; margin-bottom: 8px; }
.glance-card > p { color: var(--text-muted); line-height: 1.7; margin-bottom: 22px; }
.glance-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px 30px; list-style: none; }
.glance-list li { font-size: 0.95rem; line-height: 1.55; color: var(--text-dark); }
.glance-list strong { display: block; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1px; color: var(--dark-gold); margin-bottom: 2px; }
.glance-list a { color: var(--text-dark); }

/* Keyword topic links */
.topic-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.topic-card { background: var(--pure-white); border: 1px solid #f1f1f0; border-radius: 18px; padding: 28px 24px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.02); }
.topic-card h3 { font-family: 'Playfair Display', serif; font-size: 1.25rem; line-height: 1.3; }
.topic-card p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.65; }
.topic-card a.more { margin-top: auto; color: var(--dark-gold); font-weight: 600; text-decoration: none; font-size: 0.92rem; }
.topic-card a.more:hover { text-decoration: underline; }
.services.alt { background: var(--warm-white); }

/* --- BLOG --- */
.blog-hero { background: linear-gradient(180deg, var(--pastel-yellow), var(--warm-white)); padding: 56px 20px 40px; text-align: center; }
.blog-hero h1 { font-family: 'Playfair Display', serif; font-size: 2.8rem; line-height: 1.2; max-width: 900px; margin: 0 auto 14px; }
.blog-hero p { max-width: 760px; margin: 0 auto; color: var(--text-muted); line-height: 1.7; }
.blog-grid { max-width: 1200px; margin: 0 auto; padding: 20px 20px 70px; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; }
.blog-card { background: var(--pure-white); border-radius: 20px; overflow: hidden; border: 1px solid #f1f1f0; box-shadow: 0 10px 30px rgba(0,0,0,0.03); display: flex; flex-direction: column; transition: transform .3s ease, box-shadow .3s ease; }
.blog-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(212,175,55,0.15); }
.blog-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.blog-card-body { padding: 22px 22px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.blog-tag { font-size: 0.72rem; letter-spacing: 1px; text-transform: uppercase; color: var(--dark-gold); font-weight: 600; }
.blog-card h2, .blog-card h3 { font-family: 'Playfair Display', serif; font-size: 1.3rem; line-height: 1.35; }
.blog-card h2 a, .blog-card h3 a { color: var(--text-dark); text-decoration: none; }
.blog-card h2 a:hover, .blog-card h3 a:hover { color: var(--dark-gold); }
.blog-card p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.65; }
.blog-card .read-more { margin-top: auto; color: var(--dark-gold); font-weight: 600; text-decoration: none; font-size: 0.92rem; }
.blog-teaser { padding: 80px 20px; background: var(--warm-white); }
.blog-teaser .blog-grid { padding: 0; }
.teaser-more { text-align: center; margin-top: 34px; }
.teaser-more a { display: inline-block; }

.breadcrumb { max-width: 820px; margin: 28px auto 0; padding: 0 20px; font-size: 0.85rem; color: var(--text-muted); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: #a8a29e; }
.breadcrumb a { color: var(--dark-gold); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.article { max-width: 820px; margin: 0 auto; padding: 20px 20px 70px; }
.article h1 { font-family: 'Playfair Display', serif; font-size: 2.6rem; line-height: 1.22; margin: 10px 0 14px; }
.article-meta { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 24px; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.article-hero { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 20px; margin-bottom: 26px; display: block; border: 6px solid #fff; box-shadow: 0 15px 35px rgba(0,0,0,0.06); }
.quick-answer { background: var(--pastel-yellow); border-left: 5px solid var(--primary-gold); border-radius: 12px; padding: 20px 22px; margin-bottom: 30px; line-height: 1.75; }
.quick-answer strong { color: var(--dark-gold); }
.article h2 { font-family: 'Playfair Display', serif; font-size: 1.75rem; line-height: 1.3; margin: 38px 0 14px; }
.article h3 { font-size: 1.15rem; margin: 24px 0 8px; }
.article p { color: #44403c; line-height: 1.85; margin-bottom: 16px; font-size: 1.02rem; }
.article ul, .article ol { margin: 0 0 18px 22px; color: #44403c; line-height: 1.85; }
.article li { margin-bottom: 6px; padding-left: 4px; }
.article a { color: var(--dark-gold); }
.article table { width: 100%; border-collapse: collapse; margin: 18px 0 24px; font-size: 0.93rem; display: block; overflow-x: auto; }
.article th, .article td { border: 1px solid #e7e5e4; padding: 10px 12px; text-align: left; vertical-align: top; min-width: 130px; }
.article th { background: var(--pastel-yellow); }
.callout { background: var(--warm-white); border: 1px solid #e7e5e4; border-radius: 14px; padding: 18px 20px; margin: 22px 0; }
.callout p:last-child { margin-bottom: 0; }
.article-cta { background: linear-gradient(135deg, var(--text-dark), #1c1917); color: #fff; border-radius: 22px; padding: 34px 28px; margin: 40px 0; text-align: center; border-top: 4px solid var(--primary-gold); }
.article-cta h2 { color: var(--primary-gold); margin: 0 0 10px; font-size: 1.6rem; }
.article-cta p { color: #d6d3d1; margin-bottom: 18px; }
.article-cta .btn-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.article-cta a.header-cta { color: #fff; text-decoration: none; }
.article-cta a.btn-gold { background: var(--primary-gold); }
.article-cta a.btn-outline { background: transparent; border: 2px solid var(--primary-gold); }
.article-cta .nap { margin-top: 18px; font-size: 0.88rem; color: #a8a29e; line-height: 1.6; }
.article-faq details { border: 1px solid #e7e5e4; border-radius: 12px; background: var(--warm-white); margin-bottom: 12px; }
.article-faq summary { padding: 16px 18px; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.article-faq summary::-webkit-details-marker { display: none; }
.article-faq summary::after { content: "+"; color: var(--primary-gold); font-size: 1.3rem; font-weight: 700; flex-shrink: 0; }
.article-faq details[open] summary::after { content: "−"; }
.article-faq details p { padding: 0 18px 16px; margin: 0; }
.disclaimer { font-size: 0.85rem; color: var(--text-muted); border-top: 1px solid #e7e5e4; padding-top: 18px; margin-top: 30px; line-height: 1.7; }
.related { max-width: 1200px; margin: 0 auto; padding: 0 20px 70px; }
.related > h2 { font-family: 'Playfair Display', serif; font-size: 1.9rem; text-align: center; margin-bottom: 26px; }
.related .blog-grid { padding: 0; }

footer .footer-column ul { list-style: none; }
footer .footer-column li { margin-bottom: 8px; font-size: 0.9rem; }
.footer-wrap { align-items: flex-start; }

/* --- NAVIGATION: switch to hamburger earlier now that the menu has a Blog item --- */
@media (max-width: 1180px) {
    .navbar { padding: 12px 15px; }
    .logo-area { height: 62px; }
    .logo-graphic { max-height: 62px; }
    .nav-toggle { display: flex; }
    .nav-menu {
        position: fixed; top: 0; right: -100%; width: min(340px, 88vw); height: 100vh; height: 100dvh;
        background: var(--pure-white); flex-direction: column; align-items: flex-start; justify-content: flex-start;
        gap: 28px; padding: 96px 28px 40px; box-shadow: -10px 0 40px rgba(0,0,0,0.12);
        transition: right 0.35s cubic-bezier(0.4,0,0.2,1), visibility 0s linear 0.35s; overflow-y: auto; visibility: hidden;
    }
    .nav-menu.open { right: 0; visibility: visible; transition: right 0.35s cubic-bezier(0.4,0,0.2,1), visibility 0s; }
    /* backdrop-filter would trap position:fixed children (menu + overlay) inside the header box */
    header { -webkit-backdrop-filter: none; backdrop-filter: none; background-color: #ffffff; }
    .nav-menu { z-index: 100; }
    .nav-overlay { z-index: 99; }
    .nav-toggle { z-index: 101; position: relative; }
    .nav-links { flex-direction: column; align-items: flex-start; gap: 20px; width: 100%; }
    .nav-links a::after, .nav-links a::before { display: none !important; }
    .nav-links a { font-size: 1.05rem; font-weight: 600; color: var(--text-dark); }
    .dropdown-menu { position: static; box-shadow: none; border: none; padding: 8px 0 0 14px; opacity: 1; visibility: visible; transform: none; background: transparent; max-height: none; overflow: visible; }
    .dropdown-menu a { font-size: 0.95rem; font-weight: 500; padding: 6px 0; color: var(--text-muted); white-space: normal; }
    .dropdown-menu a.menu-all { border: none; margin: 0; }
    .header-cta { width: 100%; text-align: center; padding: 13px 24px; font-weight: 600; }
    .nav-overlay { display: block; }
    .nav-overlay.open { opacity: 1; pointer-events: auto; }
}
@media (min-width: 1181px) and (max-width: 1280px) {
    .nav-links { gap: 18px; }
    .nav-menu { gap: 20px; }
    .nav-links > li > a { font-size: 0.9rem; }
    .header-cta { padding: 10px 16px; font-size: 0.85rem; }
}
@media (max-width: 992px) {
    .blog-hero h1 { font-size: 2.2rem; }
    .article h1 { font-size: 2.1rem; }
    .glance-card { padding: 26px 20px; }
}
@media (max-width: 600px) {
    .blog-hero { padding: 40px 16px 28px; }
    .blog-hero h1 { font-size: 1.8rem; }
    .article { padding: 14px 16px 50px; }
    .article h1 { font-size: 1.75rem; }
    .article h2 { font-size: 1.4rem; }
    .breadcrumb { padding: 0 16px; margin-top: 20px; }
    .blog-grid { padding: 16px 16px 50px; gap: 20px; grid-template-columns: 1fr; }
    .related { padding: 0 16px 50px; }
    .article-cta { padding: 26px 18px; }
    .article-cta .btn-row a { width: 100%; text-align: center; }
    .doctors-grid { grid-template-columns: minmax(0, 260px); }
    .hero { margin: 24px auto 40px; }
    .testimonial-grid { grid-template-columns: 1fr; }
    .tech-grid { grid-template-columns: 1fr; }
    .testimonial-card { padding: 28px 22px; }
    .section-header h2 { font-size: 1.7rem; }
    .footer-wrap { align-items: center; }
}
@media (max-width: 360px) {
    .hero-content h1 { font-size: 1.75rem; }
    .header-cta { font-size: 0.85rem; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
    .reveal, .reveal-left { opacity: 1 !important; transform: none !important; }
}


/* --- v5: doctors page, link cards, popular treatments --- */
.doc-profile { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: start; margin: 28px 0; padding: 22px; border: 1px solid #e7e5e4; border-radius: 20px; background: var(--warm-white); }
.doc-profile img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top center; border-radius: 14px; display: block; }
.article .doc-profile h2 { margin-top: 0; }
.doc-role { color: var(--dark-gold); font-weight: 600; font-size: 0.95rem; }
.link-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 18px 0 26px; }
.link-cards a, .article .link-cards a { display: block; padding: 16px 18px; border: 1px solid #e7e5e4; border-radius: 14px; background: #fff; font-weight: 600; color: var(--text-dark); text-decoration: none; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.link-cards a:hover { transform: translateY(-3px); border-color: var(--primary-gold); box-shadow: 0 10px 25px rgba(212,175,55,.15); }
.link-cards small { display: block; margin-top: 4px; font-weight: 400; font-size: .85rem; color: var(--text-muted); }
.popular-section { max-width: 1100px; margin: 10px auto 40px; padding: 0 20px; }
.popular-section .section-header { margin-bottom: 20px; }
.more-doctors { text-align: center; margin: 30px 0 0; }
.more-doctors a { display: inline-block; color: #fff; text-decoration: none; }
@media (max-width: 700px) {
    .doc-profile { grid-template-columns: 1fr; padding: 16px; }
    .doc-profile img { max-width: 260px; margin: 0 auto; }
    .article h1 { font-size: 2rem; }
}
.popular-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
