/* ==========================================================================
   0. DESIGN TOKENS & GLOBAL RESET
   ========================================================================== */
:root {
    --c-bg: #fcfbfa;
    --c-bg-soft: #f7f5f0;
    --c-surface: #ffffff;
    --c-ink: #1a1a1a;
    --c-ink-muted: #555a5e;
    --c-ink-soft: #686d71;
    --c-line: #ececec;
    --c-line-soft: #f1ede5;
    --c-primary: #1b4d3e;
    --c-primary-dark: #0f2d24;
    --c-primary-darker: #0b2e24;
    --c-primary-soft: #e2ece9;
    --c-accent: #b58c44;
    --c-accent-dark: #9a7434;
    /* Darker gold reserved for accent-coloured TEXT on light backgrounds (passes WCAG AA) */
    --c-accent-text: #8a6a2e;
    --c-gold-soft: #f4ead7;
    --shadow-sm: 0 2px 8px rgba(15, 45, 36, 0.04);
    --shadow-md: 0 10px 30px rgba(15, 45, 36, 0.07);
    --shadow-lg: 0 24px 60px rgba(15, 45, 36, 0.14);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
    --container: 1480px;
    --side-x: max(40px, calc((100vw - var(--container)) / 2));
    --c-whatsapp: #25d366;
    --c-whatsapp-dark: #128c7e;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

/* Keep anchored sections clear of the sticky navbar on direct #hash visits */
[id$="-section"] { scroll-margin-top: 84px; }

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

body {
    background-color: var(--c-bg);
    color: var(--c-ink-muted);
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.svg-symbols { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ==========================================================================
   1. UNIVERSAL ICON STYLE (inline SVG via <use>)
   ========================================================================== */
.icon {
    width: 1em;
    height: 1em;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
    overflow: visible;
}

.icon--xs { font-size: 0.95rem; }
.icon--sm { font-size: 1.15rem; }
.icon--md { font-size: 1.7rem; }
.icon--lg { font-size: 2.4rem; }
.icon--xl { font-size: 3.6rem; }

/* ==========================================================================
   2. TOP CLINIC HEADER
   ========================================================================== */
.main-header {
    padding: 24px var(--side-x);
    background-color: var(--c-bg);
    border-bottom: 1px solid rgba(27, 77, 62, 0.06);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    max-width: var(--container);
    margin: 0 auto;
}

.doctor-info { flex: 1; min-width: 0; }

.doctor-info h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.05rem;
    color: var(--c-ink);
    font-weight: 600;
    letter-spacing: 0.1px;
}

.doctor-info .degree { font-size: 0.8rem; color: var(--c-ink-soft); }

.doctor-info .role {
    font-size: 0.78rem;
    color: var(--c-accent-text);
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-top: 3px;
}

.doctor-info .specialty {
    font-size: 0.8rem;
    color: var(--c-ink-soft);
    margin-top: 4px;
    font-style: italic;
}

.text-left { text-align: left; }
.text-right { text-align: right; }

.logo-area {
    flex: 1.5;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.text-logo-icon { color: var(--c-primary); margin-bottom: 2px; font-size: 2rem; }

.text-logo-image {
    height: 90px;
    width: auto;
    margin-bottom: 4px;
    object-fit: contain;
}

@media (max-width: 768px) {
    .text-logo-image { height: 68px; }
}

.text-logo-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2.5rem, 4vw, 3.3rem);
    letter-spacing: 2.5px;
    color: var(--c-primary);
    font-weight: 800;
    line-height: 1.02;
    text-transform: uppercase;
}

.text-logo-tagline {
    font-size: 0.8rem;
    color: var(--c-accent-text);
    font-style: italic;
    font-weight: 600;
    margin-top: 2px;
    letter-spacing: 1.2px;
}

/* ==========================================================================
   BRAND TREE LOGO MOTIF (replaces the legacy leaf icon everywhere)
   ========================================================================== */
.brand-mark {
    display: inline-block;
    width: auto;
    object-fit: contain;
    vertical-align: middle;
    flex-shrink: 0;
}

.brand-mark--nav { height: 32px; }

/* Hero brand logo — shown only when the top clinic header is hidden (<= 1024px) */
.hero-logo {
    display: none;
    height: 110px;
    width: auto;
    max-width: 88%;
    margin: 0 auto 22px;
    object-fit: contain;
}

/* Brand name shown in the hero on tablet/mobile only — mirrors the desktop
   clinic header (which is hidden <= 1024px) so the full lockup is everywhere */
.hero-brand-name { display: none; }

/* ==========================================================================
   3. NAVIGATION BAR
   ========================================================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--c-surface);
    padding: 14px var(--side-x);
    border-top: 1px solid var(--c-line);
    border-bottom: 1px solid var(--c-line);
    position: sticky;
    top: 0;
    z-index: 999;
    backdrop-filter: saturate(140%) blur(8px);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    background: transparent;
    border: 0;
    cursor: pointer;
    /* Enlarge the tap target to ~52x46px without moving the bars (WCAG 2.5.5) */
    padding: 12px;
    margin: -8px;
    box-sizing: content-box;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--c-primary);
    border-radius: 2px;
    transition: transform 0.35s var(--ease), opacity 0.25s ease;
}

.menu-toggle.is-active span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.menu-toggle.is-active span:nth-child(2) { opacity: 0; }
.menu-toggle.is-active span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

.navbar-brand {
    display: none;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--c-primary);
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    flex: 1;
    justify-content: center;
    min-width: 0;
}

.navbar-brand .icon { color: var(--c-primary); }

.navbar-brand__name {
    /* Fluid size — single source of truth across every screen.
       Scales up on tablet (bigger at 768) yet always fits on phones (375–425). */
    font-size: clamp(1rem, 0.55rem + 1.8vw, 1.4rem);
    letter-spacing: 0.4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.unique-nav-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 32px;
}

.single-menu-item {
    text-decoration: none;
    color: var(--c-ink-muted);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 1.2px;
    position: relative;
    padding: 8px 0;
    white-space: nowrap;
    transition: color 0.25s ease;
}

.single-menu-item:hover { color: var(--c-primary); }

.active-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 25%;
    width: 50%;
    height: 2px;
    background-color: var(--c-primary);
    border-radius: 2px;
}

.btn-appointment__short { display: none; }

/* ==========================================================================
   4. HERO BANNER
   ========================================================================== */
.hero-section {
    background:
        radial-gradient(1100px 320px at 80% -10%, rgba(181, 140, 68, 0.08), transparent 60%),
        radial-gradient(1000px 360px at -10% 50%, rgba(27, 77, 62, 0.06), transparent 60%),
        var(--c-bg);
    padding: 80px var(--side-x);
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.hero-content { flex: 1; min-width: 0; }

.hero-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2rem, 4vw, 3.1rem);
    color: var(--c-primary);
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -0.4px;
    margin-bottom: 16px;
}

/* Small decorative divider under section subtitles (replaces the old leaf) */
.title-divider {
    display: block;
    width: 56px;
    height: 3px;
    margin: 16px auto 0;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--c-accent), var(--c-primary));
}

.hero-description {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--c-ink-muted);
    margin-bottom: 34px;
    max-width: 560px;
}

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

/* Doctor names + roles on the front page — shown only on tablet/mobile,
   where the big stacked clinic header (which carries them) is hidden */
.hero-doctors {
    display: none;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--c-line);
    width: 100%;
    max-width: 560px;
}
.hero-doctor + .hero-doctor { margin-top: 14px; }
.hero-doctor__name {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--c-ink);
    line-height: 1.3;
}
.hero-doctor__degree { font-size: 0.78rem; color: var(--c-ink-soft); font-weight: 500; }
.hero-doctor__role {
    display: block;
    font-size: 0.82rem;
    color: var(--c-accent-text);
    font-weight: 600;
    margin-top: 1px;
    line-height: 1.4;
}

.hero-image-area {
    flex: 1;
    display: flex;
    justify-content: center;
    min-width: 0;
}

.hero-media {
    width: 100%;
    aspect-ratio: 500 / 817;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-lg);
    background:
        radial-gradient(120% 120% at 0% 0%, rgba(255, 255, 255, 0.7), transparent 50%),
        linear-gradient(135deg, var(--c-primary-soft) 0%, #cfe1d8 100%);
}

.hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(15, 45, 36, 0.18));
    pointer-events: none;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.hero-media__badge {
    position: absolute;
    left: 22px;
    bottom: 22px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.92);
    color: var(--c-primary);
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 18px rgba(15, 45, 36, 0.12);
}

.hero-media__badge::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e63946;
    box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.55);
    animation: pulse-dot 1.8s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.55); }
    50% { box-shadow: 0 0 0 8px rgba(230, 57, 70, 0); }
}

.fallback-hero-box {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--c-primary);
    position: relative;
    gap: 10px;
}

.fallback-hero-box::before {
    content: "";
    position: absolute;
    inset: 14px;
    border: 1px dashed rgba(27, 77, 62, 0.35);
    border-radius: calc(var(--radius-lg) - 8px);
    pointer-events: none;
}

.fallback-hero-box h3 { font-family: 'Playfair Display', serif; font-size: 1.6rem; font-weight: 600; }
.fallback-hero-box p { font-size: 0.95rem; opacity: 0.8; }

/* ==========================================================================
   5. SHARED HEADINGS
   ========================================================================== */
.section-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-subtitle {
    display: inline-block;
    font-size: 0.78rem;
    color: var(--c-accent-text);
    letter-spacing: 2.5px;
    font-weight: 700;
    text-transform: uppercase;
}

.section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.7rem, 3.2vw, 2.5rem);
    color: var(--c-primary);
    margin-top: 12px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.3px;
}

.section-description {
    margin-top: 14px;
    color: var(--c-ink-soft);
    font-size: 1rem;
    line-height: 1.65;
}

/* Welcome section — the gold "WELCOME TO REVATHY DENTISTREE" line is the lead;
   the green title sits deliberately SMALLER than it at every screen size */
.welcome-section .section-subtitle { font-size: clamp(1.05rem, 2.8vw, 1.3rem); letter-spacing: 2px; }
.welcome-section .section-title { font-size: clamp(0.9rem, 2.2vw, 1.1rem); margin-top: 10px; }

/* ==========================================================================
   6. OUR DOCTORS CARDS
   ========================================================================== */
.doctors-section {
    padding: 80px var(--side-x);
}

.doctors-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 940px;
    margin: 16px auto 0;
}

.doctor-card {
    background-color: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-md);
    display: flex;
    align-items: flex-start;
    gap: 26px;
    padding: 28px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.75s var(--ease), box-shadow 0.75s var(--ease), border-color 0.5s ease;
}

.doctor-card__photo { align-self: flex-start; }

.doctor-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(27, 77, 62, 0.18);
}

.doctor-card__photo {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--c-primary-soft), #cfe1d8);
    border: 3px solid var(--c-surface);
    box-shadow: 0 0 0 2px var(--c-primary), 0 10px 24px rgba(15, 45, 36, 0.12);
}

.doctor-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 1s var(--ease);
}

.doctor-card:hover .doctor-photo { transform: scale(1.06); }

/* Per-doctor framing overrides — studio portraits, face sits high & centred */
.doctor-card__photo--geetha .doctor-photo {
    object-position: center 20%;
}
.doctor-card__photo--karthik .doctor-photo {
    object-position: center 18%;
}

.doc-card-details { min-width: 0; }
.doc-card-details h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    color: var(--c-ink);
    font-weight: 600;
    line-height: 1.3;
}
.degree-small { font-size: 0.85rem; color: var(--c-ink-soft); font-weight: 500; }
.doc-card-specialty { font-size: 0.9rem; color: var(--c-ink-muted); margin-top: 6px; }
.doc-card-affiliation { font-size: 0.8rem; color: var(--c-accent-text); font-weight: 600; line-height: 1.4; margin-top: 5px; }
.doc-card-bio { font-size: 0.82rem; color: var(--c-ink-soft); line-height: 1.55; margin-top: 8px; }
/* Doctor — areas of expertise + signature quote */
.doc-expertise { margin-top: 14px; }
.doc-expertise__label {
    display: block;
    font-size: 0.68rem;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--c-accent);
    margin-bottom: 8px;
}
.doc-chips {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.doc-chips li {
    font-size: 0.72rem;
    color: var(--c-primary);
    background-color: var(--c-primary-soft);
    border: 1px solid rgba(27, 77, 62, 0.12);
    border-radius: 999px;
    padding: 5px 12px;
    line-height: 1.3;
}
.doc-quote {
    margin-top: 14px;
    padding-left: 14px;
    border-left: 3px solid var(--c-accent);
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-size: 0.92rem;
    color: var(--c-ink);
    line-height: 1.45;
}

/* ==========================================================================
   6B. WELCOME / ABOUT SECTION
   ========================================================================== */
.welcome-section {
    padding: 90px var(--side-x);
    background-color: var(--c-bg-soft);
}

.welcome-intro {
    max-width: 880px;
    margin: 0 auto;
    text-align: center;
}
.welcome-intro p {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--c-ink-muted);
}
.welcome-intro p + p { margin-top: 18px; }

.welcome-highlights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: var(--container);
    margin: 48px auto 0;
}
.welcome-highlight {
    background-color: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-md);
    padding: 30px 26px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.welcome-highlight:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.welcome-highlight__icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--c-primary-soft), #cfe1d8);
    color: var(--c-primary);
    font-size: 1.5rem;
    margin-bottom: 16px;
}
.welcome-highlight h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    color: var(--c-ink);
    font-weight: 600;
    margin-bottom: 8px;
}
.welcome-highlight p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--c-ink-soft);
}

.specializations-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    max-width: var(--container);
    margin: 28px auto 0;
}
.specialization-card {
    background-color: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    padding: 34px;
    box-shadow: var(--shadow-sm);
}
.specialization-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--c-primary);
    margin-bottom: 14px;
}
.specialization-card__head h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    color: var(--c-primary);
    font-weight: 700;
}
.specialization-card__lead {
    font-size: 0.92rem;
    color: var(--c-ink-muted);
    margin-bottom: 14px;
}
.spec-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 11px;
}
.spec-list li {
    position: relative;
    padding-left: 26px;
    font-size: 0.92rem;
    color: var(--c-ink-muted);
    line-height: 1.5;
}
.spec-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 7px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: var(--c-accent);
    box-shadow: 0 0 0 3px var(--c-gold-soft);
}

/* ==========================================================================
   7. TREATMENTS GRID
   ========================================================================== */
.treatments-section {
    padding: 90px var(--side-x);
    background-color: var(--c-bg);
}

.treatments-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.treatment-card {
    position: relative;
    background: transparent;
    border: 0;
    border-radius: var(--radius-lg);
    height: 440px;
    perspective: 1800px;
    -webkit-perspective: 1800px;
}

.treatment-card__inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    transition: transform 0.85s var(--ease);
}

.treatment-card.is-flipped .treatment-card__inner {
    transform: rotateY(180deg);
}

/* Promote to a GPU layer ONLY while flipping. A permanent will-change keeps the
   card on a composited layer that high-DPI mobile browsers rasterise at reduced
   resolution — which softens the idle card text. Scoping it keeps idle cards crisp. */
.treatment-card:hover .treatment-card__inner,
.treatment-card:focus-within .treatment-card__inner,
.treatment-card.is-flipped .treatment-card__inner { will-change: transform; }

.treatment-card__face {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    border: 1px solid var(--c-line);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* ---------- FRONT FACE ---------- */
.treatment-card__face--front {
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 15px;
    padding: 40px 26px;
    background:
        radial-gradient(125% 90% at 50% -12%, var(--c-primary-soft) 0%, transparent 58%),
        var(--c-surface);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.6s var(--ease);
}

.treatment-card:hover .treatment-card__face--front { box-shadow: var(--shadow-lg); }

.treatment-card__face--front::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--c-primary), var(--c-accent));
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.7s var(--ease);
}

.treatment-card:hover .treatment-card__face--front::before { transform: scaleX(1); }

.treatment-card__icon-wrap {
    width: 124px;
    height: 124px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 32% 26%, #ffffff 0%, var(--c-primary-soft) 68%, #cfe1d8 100%);
    box-shadow: inset 0 0 0 1px rgba(27, 77, 62, 0.08), 0 12px 24px rgba(15, 45, 36, 0.08);
    transition: transform 0.7s var(--ease);
}

.treatment-card:hover .treatment-card__icon-wrap { transform: translateY(-4px) scale(1.05); }

.treatment-card__icon {
    width: 76px;
    height: 76px;
    object-fit: contain;
}

.treatment-card__title {
    font-family: 'Playfair Display', serif;
    font-size: 1.26rem;
    color: var(--c-primary);
    font-weight: 600;
    line-height: 1.3;
}

.treatment-card__desc {
    color: var(--c-ink-muted);
    font-size: 0.93rem;
    line-height: 1.6;
    max-width: 31ch;
}

.treatment-card__more {
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 22px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-dark) 100%);
    color: #fff;
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    letter-spacing: 0.6px;
    cursor: pointer;
    opacity: 0;
    transform: translateY(10px);
    box-shadow: 0 8px 20px rgba(15, 45, 36, 0.18);
    transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), background 0.4s ease;
}

.treatment-card:hover .treatment-card__more,
.treatment-card:focus-within .treatment-card__more {
    opacity: 1;
    transform: translateY(0);
}

.treatment-card__more:hover { background: linear-gradient(135deg, var(--c-primary) 0%, #16412f 100%); }
.treatment-card__more .tc-ico { width: 16px; height: 16px; transition: transform 0.6s var(--ease); }
.treatment-card__more:hover .tc-ico { transform: rotate(-130deg); }

/* ---------- BACK FACE ---------- */
.treatment-card__face--back {
    transform: rotateY(180deg);
    background: linear-gradient(160deg, var(--c-primary) 0%, var(--c-primary-dark) 70%, var(--c-primary-darker) 100%);
    color: rgba(255, 255, 255, 0.9);
}

.treatment-card__back-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 26px 24px 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.4) transparent;
}

.treatment-card__back-scroll::-webkit-scrollbar { width: 6px; }
.treatment-card__back-scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.32); border-radius: 999px; }

.treatment-card__back-eyebrow {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

.treatment-card__tagline {
    margin-top: 6px;
    font-size: 0.85rem;
    font-style: italic;
    color: var(--c-gold-soft);
    line-height: 1.45;
}

.treatment-card__text {
    margin-top: 12px;
    font-size: 0.85rem;
    line-height: 1.62;
    color: rgba(255, 255, 255, 0.86);
}

.treatment-card__subhead {
    margin-top: 16px;
    margin-bottom: 9px;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    font-weight: 700;
    color: var(--c-accent);
    display: flex;
    align-items: center;
    gap: 10px;
}

.treatment-card__subhead::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.16);
}

.treatment-card__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.treatment-card__list li {
    position: relative;
    padding-left: 16px;
    font-size: 0.83rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.85);
}

.treatment-card__list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 7px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--c-accent);
}

.treatment-card__list strong { color: #fff; font-weight: 600; }

.treatment-card__faq { display: flex; flex-direction: column; }

.treatment-card__q {
    font-size: 0.83rem;
    font-weight: 600;
    color: #fff;
    margin-top: 9px;
}

.treatment-card__a {
    margin-top: 2px;
    font-size: 0.81rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.76);
}

.treatment-card__back-btn {
    flex-shrink: 0;
    margin: 6px 16px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.4s ease, border-color 0.4s ease, color 0.4s ease;
}

.treatment-card__back-btn:hover {
    background: var(--c-accent);
    border-color: var(--c-accent);
    color: var(--c-primary-dark);
}

.treatment-card__back-btn .tc-ico { width: 16px; height: 16px; transition: transform 0.4s var(--ease); }
.treatment-card__back-btn:hover .tc-ico { transform: translateX(-3px); }

.treatment-card__more:focus-visible,
.treatment-card__back-btn:focus-visible {
    outline: 2px solid var(--c-accent);
    outline-offset: 2px;
}

/* ==========================================================================
   GLOBAL KEYBOARD FOCUS — visible indicator for every interactive element
   ========================================================================== */
a:focus-visible,
button:focus-visible,
.single-menu-item:focus-visible,
.menu-toggle:focus-visible,
.whatsapp-fab:focus-visible,
.read-more-link:focus-visible,
.article-back:focus-visible,
.article-topbar__brand:focus-visible {
    outline: 2px solid var(--c-accent-dark);
    outline-offset: 2px;
    border-radius: 3px;
}

/* CTAs with overflow:hidden can clip an outset outline — use a shadow ring instead */
.btn-appointment:focus-visible,
.btn-sub-appointment:focus-visible,
.btn-whatsapp:focus-visible,
.btn-panel-whatsapp:focus-visible,
.btn-directions:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--c-accent-dark);
}

@media (hover: none) {
    .treatment-card__more { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .treatment-card__inner,
    .treatment-card__more,
    .treatment-card__icon-wrap,
    .treatment-card__face--front::before { transition: none; }
}

/* ==========================================================================
   8. WHY GO WITH REVATHY DENTISTREE
   ========================================================================== */
.why-choose-section {
    padding: 90px var(--side-x);
    background-color: var(--c-bg-soft);
}

.why-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 60px;
}

.why-feature {
    background-color: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    padding: 36px 30px;
    text-align: left;
    box-shadow: var(--shadow-sm);
    transition: transform 0.75s var(--ease), box-shadow 0.75s var(--ease), border-color 0.5s ease;
    position: relative;
    overflow: hidden;
}

.why-feature::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(181, 140, 68, 0.12), transparent 70%);
    border-radius: 50%;
    transform: translate(30%, -30%);
    transition: transform 0.6s var(--ease);
    pointer-events: none;
}

.why-feature:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: rgba(27, 77, 62, 0.18);
}

.why-feature:hover::after { transform: translate(10%, -10%) scale(1.2); }

.why-feature__icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    margin-bottom: 22px;
    box-shadow: 0 12px 24px rgba(27, 77, 62, 0.18);
}

.why-feature__icon .icon { font-size: 1.7rem; stroke-width: 1.5; }

.why-feature h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    color: var(--c-ink);
    font-weight: 600;
    margin-bottom: 10px;
}

.why-feature p {
    color: var(--c-ink-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ==========================================================================
   9. CLINIC INFO GRID
   ========================================================================== */
.info-split-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 28px;
    align-items: stretch;
}

.info-panel {
    background-color: var(--c-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.address-card {
    background: linear-gradient(160deg, var(--c-primary), var(--c-primary-darker));
    color: #fff;
    padding: 34px;
    text-align: left;
}

.address-card .panel-heading {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    letter-spacing: 2px;
    margin-bottom: 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    padding-bottom: 12px;
    font-weight: 600;
}

.contact-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
}

.geo-icon {
    color: rgba(255, 255, 255, 0.92);
    margin-top: 2px;
    display: inline-flex;
    flex-shrink: 0;
}

.contact-detail-item p {
    font-size: 0.9rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.88);
}

.btn-directions {
    display: inline-block;
    align-self: flex-start;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    text-decoration: none;
    padding: 11px 22px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 6px;
    margin-top: auto;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.btn-directions:hover {
    background-color: var(--c-accent);
    border-color: var(--c-accent);
}

.map-embed {
    width: 100%;
    flex: 1;
    min-height: 285px;
    border: 0;
    display: block;
}

.booking-card {
    padding: 38px 30px;
    background: linear-gradient(180deg, #f4f8f6 0%, #ecf2ee 100%);
    border: 1px dashed rgba(27, 77, 62, 0.4);
    text-align: left;
    justify-content: center;
}

.booking-card h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: var(--c-primary);
    margin-bottom: 12px;
    font-weight: 600;
}

.booking-card p {
    font-size: 0.95rem;
    color: var(--c-ink-muted);
    line-height: 1.6;
    margin-bottom: 24px;
}

/* ==========================================================================
   10. BLOG SECTION
   ========================================================================== */
.blog-section {
    padding: 90px var(--side-x);
}

.blog-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-top: 16px;
}

.blog-card {
    background-color: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.7s var(--ease), box-shadow 0.7s var(--ease);
}

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

.blog-badge {
    display: inline-block;
    background-color: var(--c-primary-soft);
    color: var(--c-primary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 5px 12px;
    border-radius: 30px;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.blog-card h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--c-primary);
    margin-bottom: 12px;
    font-weight: 600;
}

.blog-card p {
    font-size: 0.93rem;
    color: var(--c-ink-muted);
    line-height: 1.65;
    margin-bottom: 22px;
}

.read-more-link {
    text-decoration: none;
    color: var(--c-accent-text);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.25s ease, gap 0.3s ease;
}

.read-more-link:hover { color: var(--c-accent-text); gap: 10px; }

/* Whole-card link variant (used on the dedicated blog listing page) */
.blog-card--link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}
.blog-card--link .blog-badge { align-self: flex-start; }
.blog-card--link p { flex: 1; }
.blog-card--link:hover .read-more-link { color: var(--c-accent-text); gap: 10px; }

/* ==========================================================================
   10B. BLOG ARTICLE PAGES
   ========================================================================== */
.article-topbar {
    position: sticky;
    top: 0;
    z-index: 999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 15px var(--side-x);
    background-color: var(--c-surface);
    border-bottom: 1px solid var(--c-line);
    backdrop-filter: saturate(140%) blur(8px);
}
.article-topbar__brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    text-decoration: none;
    color: var(--c-primary);
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    /* Fluid: comfortable on desktop, always fits the full name on phones */
    font-size: clamp(1.05rem, 0.5rem + 2vw, 1.55rem);
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.article-topbar__brand .icon { flex-shrink: 0; }

/* Brand tree logo used as the clinical-team author avatar */
.article-author__avatar--logo { background: #fff; }
.article-author__avatar--logo img { object-fit: contain; object-position: center; padding: 7px; }
.article-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    color: var(--c-ink-muted);
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    transition: color 0.25s ease, gap 0.3s ease;
}
.article-back:hover { color: var(--c-primary); gap: 11px; }
.article-back .icon { transform: rotate(180deg); }

.article-hero {
    max-width: 820px;
    margin: 0 auto;
    padding: 58px var(--side-x) 26px;
    text-align: center;
}
.article-hero .blog-badge { margin-bottom: 18px; }
.article-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    color: var(--c-primary);
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.3px;
}
.article-meta {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
    color: var(--c-ink-soft);
    font-size: 0.85rem;
}
.article-meta span { display: inline-flex; align-items: center; gap: 6px; }
.article-meta .icon { color: var(--c-accent); }

.article-body {
    max-width: 760px;
    margin: 0 auto;
    padding: 14px var(--side-x) 20px;
}
.article-body > p,
.article-body > ul,
.article-body > h2,
.article-body > h3 { animation: none; }
.article-lead {
    font-size: 1.16rem;
    color: var(--c-ink);
    line-height: 1.75;
    margin-bottom: 24px;
}
.article-body h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--c-primary);
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 14px;
}
.article-body h3 {
    font-size: 1.12rem;
    color: var(--c-ink);
    font-weight: 600;
    margin-top: 28px;
    margin-bottom: 10px;
}
.article-body p {
    font-size: 1.02rem;
    line-height: 1.8;
    color: var(--c-ink-muted);
    margin-bottom: 18px;
}
.article-body ul {
    list-style: none;
    margin: 0 0 22px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 11px;
}
.article-body ul li {
    position: relative;
    padding-left: 26px;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--c-ink-muted);
}
.article-body ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: var(--c-accent);
    box-shadow: 0 0 0 3px var(--c-gold-soft);
}
.article-note {
    background-color: var(--c-bg-soft);
    border-left: 3px solid var(--c-primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 18px 22px;
    margin: 26px 0;
}
.article-note p { margin: 0; font-size: 0.96rem; color: var(--c-ink); }

.article-author {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 760px;
    margin: 30px auto 0;
    padding: 24px var(--side-x) 0;
    border-top: 1px solid var(--c-line);
}
.article-author__avatar {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--c-primary-soft), #cfe1d8);
    box-shadow: 0 0 0 2px var(--c-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--c-primary);
}
.article-author__avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.article-author__name { font-family: 'Playfair Display', serif; font-weight: 600; color: var(--c-ink); font-size: 1rem; }
.article-author__role { font-size: 0.83rem; color: var(--c-ink-soft); margin-top: 2px; }

.article-cta {
    max-width: 760px;
    margin: 44px auto 80px;
    padding: 42px 40px;
    text-align: center;
    background:
        radial-gradient(600px 200px at 80% -20%, rgba(181, 140, 68, 0.18), transparent 60%),
        linear-gradient(135deg, var(--c-primary), var(--c-primary-darker));
    border-radius: var(--radius-lg);
}
.article-cta h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.55rem;
    color: #fff;
    font-weight: 600;
    margin-bottom: 10px;
}
.article-cta p { color: rgba(255, 255, 255, 0.85); margin-bottom: 24px; }
.article-cta .btn-whatsapp { display: inline-flex; }

@media (max-width: 480px) {
    .article-topbar { gap: 10px; }
    .article-back { font-size: 0.8rem; }
    .article-cta { padding: 32px 22px; }
    .article-body p { font-size: 0.98rem; }
    .article-lead { font-size: 1.06rem; }
}

/* ==========================================================================
   11. TESTIMONIALS
   ========================================================================== */
.testimonials-section {
    padding: 90px var(--side-x);
}

.testimonials-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 16px;
}

.testimonial-card {
    background-color: var(--c-surface);
    border: 1px solid var(--c-line);
    padding: 32px 26px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.7s var(--ease), box-shadow 0.7s var(--ease);
}

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

.rating-stars {
    color: #f5b400;
    display: inline-flex;
    gap: 4px;
    margin-bottom: 14px;
}

.rating-stars .icon { font-size: 1rem; }

.review-text {
    font-size: 0.92rem;
    color: var(--c-ink-muted);
    line-height: 1.7;
    font-style: italic;
    margin-bottom: 18px;
}

.patient-name { font-size: 0.92rem; color: var(--c-primary); font-weight: 700; letter-spacing: 0.3px; }

/* Live Google reviews widget (Featurable) */
.reviews-embed {
    max-width: var(--container);
    margin: 8px auto 0;
    min-height: 120px;
}

/* Google reviews call-to-action under the testimonials */
.reviews-cta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 36px;
}
.btn-review {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--c-accent);
    color: #fff;
    text-decoration: none;
    padding: 14px 24px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 6px;
    transition: background-color 0.3s ease, transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.btn-review:hover {
    background: var(--c-accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(181, 140, 68, 0.28);
}

/* ==========================================================================
   FAQ SECTION
   ========================================================================== */
.faq-section {
    padding: 90px var(--side-x);
    background-color: var(--c-bg-soft);
}
.faq-list {
    max-width: 820px;
    margin: 8px auto 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.faq-item {
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow 0.4s var(--ease), border-color 0.3s ease;
}
.faq-item[open] { box-shadow: var(--shadow-md); border-color: rgba(27, 77, 62, 0.18); }
.faq-item summary {
    cursor: pointer;
    list-style: none;
    padding: 18px 52px 18px 22px;
    position: relative;
    font-family: 'Playfair Display', serif;
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--c-primary);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "+";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    line-height: 1;
    color: var(--c-accent);
}
.faq-item[open] summary::after { content: "\2013"; }
.faq-item summary:focus-visible { outline: 2px solid var(--c-accent-dark); outline-offset: -2px; }
.faq-item p {
    padding: 0 22px 20px;
    color: var(--c-ink-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}
.faq-item p a { color: var(--c-accent-text); font-weight: 600; }

/* ==========================================================================
   12. FOOTER
   ========================================================================== */
.main-footer {
    background-color: var(--c-primary-darker);
    color: #fff;
    padding: 80px var(--side-x) 24px;
    margin-top: 80px;
}

.footer-grid-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 40px;
    max-width: var(--container);
    margin: 0 auto;
    text-align: left;
}

.footer-logo-layout {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
}

.footer-logo-layout .f-icon { color: var(--c-accent); font-size: 1.3rem; }

.footer-logo-layout h4 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.4rem, 4vw, 1.6rem);
    letter-spacing: 1.5px;
    color: #fff;
    font-weight: 700;
}

.brand-subtext { font-size: 0.82rem; color: var(--c-accent); font-style: italic; font-weight: 600; margin-bottom: 18px; }
.brand-desc-p { font-size: 0.88rem; color: #a3b8b1; line-height: 1.6; margin-bottom: 22px; }

.footer-col h4 {
    font-size: 0.82rem;
    letter-spacing: 1.4px;
    color: #fff;
    margin-bottom: 22px;
    font-weight: 700;
    text-transform: uppercase;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 11px; }
.footer-col ul li a {
    text-decoration: none;
    font-size: 0.88rem;
    color: #a3b8b1;
    transition: color 0.25s ease;
}
.footer-col ul li a:hover { color: var(--c-accent); }

.contact-col p {
    font-size: 0.88rem;
    color: #a3b8b1;
    line-height: 1.7;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.contact-col p .icon { color: var(--c-accent); margin-top: 4px; flex-shrink: 0; }

.footer-bottom-bar {
    max-width: var(--container);
    margin: 50px auto 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 22px;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #a3b8b1;
    flex-wrap: wrap;
    gap: 10px;
}

/* ==========================================================================
   13. BUTTONS
   ========================================================================== */
.btn-appointment,
.btn-sub-appointment,
.btn-whatsapp,
.btn-panel-whatsapp {
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: color 0.4s var(--ease), border-color 0.4s ease, transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.btn-appointment::before,
.btn-sub-appointment::before,
.btn-whatsapp::before,
.btn-panel-whatsapp::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    z-index: -1;
    transition: left 0.45s var(--ease);
}

.btn-appointment::before,
.btn-whatsapp::before,
.btn-panel-whatsapp::before { background-color: var(--c-accent); }
.btn-sub-appointment::before { background-color: var(--c-primary); }

.btn-appointment:hover::before,
.btn-whatsapp:hover::before,
.btn-panel-whatsapp:hover::before,
.btn-sub-appointment:hover::before { left: 0; }

.btn-appointment:hover,
.btn-whatsapp:hover,
.btn-panel-whatsapp:hover,
.btn-sub-appointment:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(15, 45, 36, 0.18);
}

.btn-sub-appointment:hover { border-color: var(--c-primary); }

.btn-appointment {
    background-color: var(--c-primary);
    color: #fff;
    text-decoration: none;
    padding: 11px 20px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-whatsapp {
    background-color: var(--c-primary);
    color: #fff;
    text-decoration: none;
    padding: 14px 24px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-panel-whatsapp {
    background-color: var(--c-primary);
    color: #fff;
    text-decoration: none;
    padding: 13px 22px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 6px;
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 10px;
}

.btn-sub-appointment {
    background-color: #fff;
    color: var(--c-ink);
    text-decoration: none;
    padding: 14px 24px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 6px;
    border: 1px solid #d8d6cf;
    display: inline-flex;
    align-items: center;
}

/* ==========================================================================
   13B. FLOATING ACTION STACK — Book / Call / WhatsApp (with quick menu)
   ========================================================================== */
.fab-stack {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.fab {
    position: relative;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    cursor: pointer;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    transition: transform 0.35s var(--ease), background-color 0.3s ease, box-shadow 0.35s var(--ease);
}

.fab:hover { transform: translateY(-3px) scale(1.05); }
.fab:active { transform: translateY(-1px) scale(1); }
.fab__icon { width: 26px; height: 26px; color: #fff; stroke-width: 1.8; }

.fab--book { background: var(--c-accent); box-shadow: 0 10px 24px rgba(181, 140, 68, 0.45), 0 4px 12px rgba(0, 0, 0, 0.12); }
.fab--book:hover { background: var(--c-accent-dark); }
.fab--call { background: var(--c-primary); box-shadow: 0 10px 24px rgba(27, 77, 62, 0.4), 0 4px 12px rgba(0, 0, 0, 0.12); }
.fab--call:hover { background: var(--c-primary-dark); }
.fab--whatsapp { background: var(--c-whatsapp); box-shadow: 0 10px 24px rgba(37, 211, 102, 0.4), 0 4px 12px rgba(0, 0, 0, 0.12); }
.fab--whatsapp:hover { background: var(--c-whatsapp-dark); }

.whatsapp-fab__icon { width: 32px; height: 32px; color: #fff; }
.fab--whatsapp .whatsapp-fab__icon { width: 30px; height: 30px; }
.whatsapp-fab__pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--c-whatsapp);
    z-index: -1;
    animation: whatsapp-pulse 2s ease-out infinite;
}

@keyframes whatsapp-pulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* WhatsApp quick menu — pops up above the stack */
.fab-menu {
    position: absolute;
    bottom: calc(100% + 12px);
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s var(--ease), visibility 0.25s;
}
.fab-stack.is-open .fab-menu { opacity: 1; visibility: visible; transform: translateY(0); }

.fab-menu a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    background: #fff;
    color: var(--c-ink);
    padding: 11px 16px;
    border-radius: 999px;
    border: 1px solid var(--c-line);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 600;
    transition: transform 0.2s ease, color 0.2s ease;
}
.fab-menu a:hover { transform: translateX(-3px); color: var(--c-primary); }
.fab-menu a .icon { width: 18px; height: 18px; color: var(--c-primary); flex-shrink: 0; }

@media (max-width: 768px) {
    .fab-stack {
        right: max(16px, env(safe-area-inset-right));
        bottom: max(16px, env(safe-area-inset-bottom));
        gap: 12px;
    }
    .fab { width: 52px; height: 52px; }
    .fab__icon { width: 24px; height: 24px; }
    .fab--whatsapp .whatsapp-fab__icon { width: 27px; height: 27px; }
    .fab-menu a { font-size: 0.8rem; padding: 10px 14px; max-width: 70vw; }
}

/* Footer brand logo badge */
.footer-logo-mark {
    height: 72px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

/* Footer "Book Appointment" CTA (gold, stands out on the dark footer) */
.footer-book-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    background: var(--c-accent);
    color: #fff;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    transition: background-color 0.3s ease, transform 0.3s var(--ease);
}
.footer-book-btn:hover { background: var(--c-accent-dark); transform: translateY(-2px); }

/* ==========================================================================
   13D. BOOKING PAGE (embedded Clinicia widget)
   ========================================================================== */
.booking-hero {
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
    padding: 54px var(--side-x) 8px;
}
.booking-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    color: var(--c-primary);
    font-weight: 700;
    margin-top: 10px;
    line-height: 1.1;
}
.booking-lead {
    margin-top: 14px;
    color: var(--c-ink-muted);
    font-size: 1.02rem;
    line-height: 1.7;
}
.booking-embed-wrap {
    max-width: 960px;
    margin: 28px auto 0;
    padding: 0 var(--side-x) 40px;
}
.booking-frame {
    width: 100%;
    min-height: 1150px;
    border: 0;
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-md);
}
.booking-fallback {
    margin-top: 16px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--c-ink-soft);
}
.booking-fallback a { color: var(--c-accent-text); font-weight: 600; text-decoration: underline; }

@media (max-width: 768px) {
    .booking-frame { min-height: 1250px; border-radius: var(--radius-md); }
}

/* ==========================================================================
   14. RESPONSIVE — TABLET (<= 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
    :root { --side-x: 28px; }

    /* Hide the big stacked header — navbar carries the brand from tablet down */
    .main-header { display: none; }

    /* Bring the full brand lockup into the hero since the stacked header is gone:
       tree logo  ->  REVATHY DENTISTREE (bold)  ->  Nurturing Smiles (gold) */
    .hero-logo { display: block; margin-bottom: 12px; }

    .hero-brand-name {
        display: block;
        font-family: 'Playfair Display', Georgia, serif;
        font-size: clamp(1.9rem, 7vw, 2.9rem);
        font-weight: 800;
        letter-spacing: 2px;
        line-height: 1.03;
        color: var(--c-primary);
        text-transform: uppercase;
    }

    /* "Nurturing Smiles" becomes the golden tagline beneath the name */
    .hero-title {
        font-size: clamp(1.05rem, 4.6vw, 1.5rem);
        font-weight: 600;
        font-style: italic;
        color: var(--c-accent-text);
        letter-spacing: 0.4px;
        margin-top: 6px;
        margin-bottom: 18px;
    }
    .hero-title br { display: none; }

    /* Surface the doctors on the front page now the stacked header is hidden */
    .hero-doctors { display: block; }

    /* Compact sticky navbar: hamburger | brand | BOOK APPOINTMENT */
    .navbar {
        padding-block: 12px;
        flex-wrap: nowrap;
        gap: 10px;
    }

    .menu-toggle { display: flex; }
    .unique-nav-row.is-open { opacity: 1; max-height: 480px; padding: 8px 0 14px; }

    .navbar-brand { display: inline-flex; }
    .navbar-brand .icon { font-size: 1.5rem; }

    .btn-appointment { padding: 11px 20px; font-size: 0.78rem; gap: 8px; }
    .btn-appointment .icon { font-size: 1rem; }

    .unique-nav-row {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background-color: #fff;
        border-bottom: 1px solid var(--c-line);
        box-shadow: var(--shadow-md);
        padding: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.45s var(--ease), opacity 0.3s ease, padding 0.3s ease;
    }

    .single-menu-item {
        padding: 14px 24px;
        font-size: 0.85rem;
        border-bottom: 1px solid var(--c-line);
        white-space: nowrap;
    }
    .single-menu-item:last-child { border-bottom: 0; }
    .active-link::after { display: none; }

    .hero-section { padding-block: 70px; }
    .hero-container { gap: 40px; }

    .welcome-section,
    .doctors-section,
    .treatments-section,
    .why-choose-section,
    .blog-section,
    .testimonials-section { padding-block: 70px; }

    .treatments-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
    .why-features-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
    .why-feature { padding: 30px 24px; }

    .info-split-grid { grid-template-columns: 1fr 1fr; }
    .info-split-grid .booking-card { grid-column: 1 / -1; }

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

/* ==========================================================================
   14B. RESPONSIVE — TABLET PORTRAIT (<= 900px)
   Catches iPad portrait + small tablets where row layouts get cramped
   ========================================================================== */
@media (max-width: 900px) {
    /* Hero: stack vertically instead of cramped 2-col */
    .hero-container {
        flex-direction: column;
        gap: 40px;
        text-align: center;
        align-items: center;
    }
    .hero-content { width: 100%; }
    .hero-description { margin-left: auto; margin-right: auto; }
    .hero-buttons { justify-content: center; }
    .hero-doctors { margin-left: auto; margin-right: auto; text-align: center; }
    .hero-image-area { width: 100%; max-width: 620px; }
    .hero-media { max-width: 100%; aspect-ratio: 500 / 817; max-height: 72vh; }

    /* Why-features: 3 cards at ~250px each is too cramped, drop to 1 */
    .why-features-grid {
        grid-template-columns: 1fr;
        gap: 18px;
        max-width: 620px;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 50px;
    }

    /* Doctors keep 2 cols but tighter */
    .doctors-container { gap: 20px; }
    .doctor-card { padding: 22px; gap: 18px; }
    .doctor-card__photo { width: 96px; height: 96px; }

    /* Welcome: stack highlights, keep specializations 1 col */
    .welcome-highlights { grid-template-columns: 1fr; gap: 18px; max-width: 620px; }
    .specializations-grid { grid-template-columns: 1fr; gap: 20px; max-width: 620px; }

    /* Treatments: stack to 1 col like the sibling grids (2-up flip cards are cramped here) */
    .treatments-grid {
        grid-template-columns: 1fr;
        gap: 22px;
        max-width: 620px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Slightly smaller section vertical padding */
    .hero-section,
    .welcome-section,
    .doctors-section,
    .treatments-section,
    .why-choose-section,
    .blog-section,
    .testimonials-section { padding-block: 64px; }
}

/* ==========================================================================
   15. RESPONSIVE — MOBILE (<= 768px)
   ========================================================================== */
@media (max-width: 768px) {
    :root { --side-x: 20px; }

    /* Hero */
    .hero-section { padding-block: 50px; }
    .hero-container {
        flex-direction: column;
        gap: 36px;
        text-align: center;
        align-items: center;
    }
    .hero-content { width: 100%; }
    .hero-description { margin-left: auto; margin-right: auto; }
    .hero-buttons { justify-content: center; }
    .hero-media { max-width: 100%; aspect-ratio: 500 / 817; max-height: 70vh; }

    /* Navbar: give the brand name room by collapsing BOOK APPOINTMENT → BOOK */
    .navbar-brand {
        flex: 1;
        min-width: 0;
        justify-content: flex-start;
    }
    .navbar-brand__name { letter-spacing: 0.3px; }
    .btn-appointment__full { display: none; }
    .btn-appointment__short { display: inline; }
    .btn-appointment { padding: 9px 14px; font-size: 0.74rem; gap: 6px; }
    .btn-appointment .icon { font-size: 0.95rem; }

    /* Sections */
    .welcome-section,
    .doctors-section,
    .treatments-section,
    .why-choose-section,
    .blog-section,
    .testimonials-section { padding-block: 60px; }

    .section-header { margin-bottom: 36px; }

    /* Doctors */
    .doctors-container { grid-template-columns: 1fr; gap: 18px; }
    .doctor-card { gap: 18px; padding: 20px; }
    .doctor-card__photo { width: 86px; height: 86px; }

    /* Treatments */
    .treatments-grid { grid-template-columns: 1fr; gap: 22px; }
    .treatment-card { height: 430px; }
    .treatment-card__face--front { padding: 34px 24px; }
    .treatment-card__icon-wrap { width: 112px; height: 112px; }
    .treatment-card__icon { width: 70px; height: 70px; }
    .treatment-card__back-scroll { padding: 24px 20px 10px; }

    /* Why features */
    .why-features-grid {
        grid-template-columns: 1fr;
        gap: 18px;
        margin-bottom: 44px;
    }
    .why-feature { padding: 28px 22px; }

    /* Info grid */
    .info-split-grid { grid-template-columns: 1fr; gap: 20px; }
    .info-split-grid .booking-card { grid-column: auto; }
    .map-embed { min-height: 240px; }

    /* Blog topbar: give the brand priority so it never gets clipped */
    .article-topbar { gap: 12px; }
    .article-topbar__brand {
        flex: 1 1 auto;
        letter-spacing: 0.5px;
    }
    .article-back { flex: 0 0 auto; font-size: 0.8rem; }

    /* Blog */
    .blog-container { grid-template-columns: 1fr; gap: 20px; }
    .blog-card { padding: 26px; }

    /* Testimonials */
    .testimonials-container { grid-template-columns: 1fr; gap: 18px; }

    /* Footer */
    .main-footer { padding-block: 60px 22px; }
    .footer-grid-container { grid-template-columns: 1fr; gap: 32px; text-align: left; }
    .footer-bottom-bar { flex-direction: column; text-align: center; }
}

/* ==========================================================================
   RESPONSIVE — PHONES (<= 600px)
   The hero now carries the tree logo, so drop it from the navbar to free space
   for the clinic name.
   ========================================================================== */
@media (max-width: 600px) {
    .navbar-brand .brand-mark--nav { display: none; }
}

/* ==========================================================================
   16. RESPONSIVE — SMALL MOBILE (<= 480px)
   ========================================================================== */
@media (max-width: 480px) {
    :root { --side-x: 14px; }

    .navbar { padding-block: 10px; gap: 8px; }
    .navbar-brand { gap: 6px; }
    .navbar-brand .icon { font-size: 1.1rem; }
    .navbar-brand__name { letter-spacing: 0.2px; }

    /* Blog topbar: collapse "Back" to its arrow icon so the full brand
       name stays visible on phones (text node still read by screen readers).
       Keep a ~44px tap target via padding while the bars stay icon-sized. */
    .article-back { font-size: 0; gap: 0; padding: 11px; margin: -11px; }
    .article-back .icon { width: 22px; height: 22px; }

    /* At true phone widths, collapse the appointment button to an icon only
       so the brand name always has room and never gets clipped */
    .btn-appointment__full,
    .btn-appointment__short { display: none; }
    .btn-appointment { padding: 9px; gap: 0; }
    .btn-appointment .icon { font-size: 1.15rem; }

    .hero-description { font-size: 0.95rem; }

    .btn-whatsapp,
    .btn-sub-appointment,
    .btn-panel-whatsapp {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .doctor-card {
        flex-direction: column;
        text-align: center;
        gap: 14px;
    }
    /* Keep expertise + quote tidy in the centered mobile card */
    .doc-chips { justify-content: center; }
    .doc-quote {
        border-left: 0;
        border-top: 3px solid var(--c-accent);
        padding-left: 0;
        padding-top: 12px;
    }
    .specialization-card { padding: 26px 22px; }
    .welcome-intro p { font-size: 0.98rem; }

    .section-title { font-size: 1.55rem; }
    .treatment-card__title { font-size: 1.18rem; }

    .address-card,
    .booking-card { padding: 26px; }

    .why-feature__icon { width: 50px; height: 50px; font-size: 1.4rem; }
}
/* ==========================================================================
   16B. RESPONSIVE — EXTRA-SMALL MOBILE (<= 360px)

   ========================================================================== */
@media (max-width: 380px) and (min-width: 361px) {
    .navbar-brand__name { font-size: 1.2rem; }
}

@media (max-width: 360px) {
    :root { --side-x: 12px; }

    .navbar { gap: 6px; }
    .navbar-brand { gap: 5px; }
    .navbar-brand .icon { font-size: 1rem; }
    .navbar-brand__name { font-size: 0.85rem; letter-spacing: 0; }
    .article-topbar__brand { font-size: 1.2rem; }
    .btn-appointment { padding: 8px; }
    .btn-appointment .icon { font-size: 1.05rem; }
}

/* ==========================================================================
   17. SCROLL REVEAL & ENTRANCE MOTION
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
    transition-delay: var(--reveal-delay, 0s);
    will-change: opacity, transform;
}
.reveal.is-visible {
    opacity: 1;
    transform: none;
}

@keyframes heroFadeUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: none; }
}
.hero-logo,
.hero-brand-name,
.hero-title,
.hero-description,
.hero-buttons,
.hero-doctors {
    animation: heroFadeUp 0.9s var(--ease) both;
}
.hero-brand-name { animation-delay: 0.08s; }
.hero-title { animation-delay: 0.16s; }
.hero-description { animation-delay: 0.24s; }
.hero-buttons { animation-delay: 0.32s; }
.hero-doctors { animation-delay: 0.4s; }
.hero-media {
    animation: heroFadeUp 1s var(--ease) both;
    animation-delay: 0.2s;
}

/* ==========================================================================
   18. REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}
