/* ============================================================
   Klinik Pergigian Luna, Miharja — Main Stylesheet
   "Nothing Hidden" identity: warm off-white ground, confident red,
   a certificate/registration motif for credentials, an oversized
   low-contrast tooth watermark drawn from the clinic's own mark.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
    /* Palette */
    --ground: #FAF7F4;
    --ground-raised: #F1E6D6;
    --brand: #C8392F;
    --brand-dark: #8E2B24;
    --brand-tint: #F4E2DF;
    --ink: #241F1D;
    --support: #6E635E;
    /* was #9C9089 (3.10:1 on white — AA fail). First fix (#786D62) only
       checked against white; --text-light is also used against
       var(--bg-light), which now resolves to --surface-warm and failed at
       4.09:1. #635A50 clears white/ground/warm/blush (5.48-6.75:1) —
       verified against every surface it can land on. Fixed 2026-07-20. */
    --support-light: #635A50;
    --line: #E4D9D0;
    --white: #FFFFFF;

    /* Surface system — background as an information device, not decoration.
       Intermediate tones between --ground (lightest) and --ink (heaviest),
       all derived from the brand red/maroon hue family except --surface-warm
       (a genuinely different, neutral-warm hue for real chromatic variety).
       --surface-ink is reserved specifically for credential/registration
       authority moments (homepage credentials strip, the About page's doctor
       section, the footer) so it reads as a consistent "verified" signal
       site-wide, not just a dark accent. Every pairing below is contrast-
       checked in scripts/_contrast.js before use — see COLOR_AUDIT notes. */
    --surface-ground: #FAF7F4;      /* lightest — plain, "honest document" */
    --surface-warm: #F1E6D6;        /* light-medium neutral-warm (sand) */
    --surface-blush: #F6E4DC;       /* light-medium, soft red-tinted */
    --surface-rose: #9C4C43;        /* medium color block, muted brand-red family — needs light text */
    --surface-ink: #241F1D;         /* heaviest — credential/registration authority only */

    /* Semantic aliases used across the file */
    --primary-color: var(--brand);
    --primary-dark: var(--brand-dark);
    --primary-light: #DE6157;
    --secondary-color: var(--brand-dark);
    --accent-color: #E8B84B;
    --success-color: #4C7A5E;
    --warning-color: #C68A2E;
    --danger-color: #B3261E;

    --text-dark: var(--ink);
    --text-medium: var(--support);
    --text-light: var(--support-light);
    --text-white: var(--white);

    --bg-white: var(--white);
    --bg-light: var(--ground-raised);
    --bg-gray: var(--line);
    --bg-dark: var(--ink);

    --border-color: var(--line);
    --border-radius: 10px;
    --border-radius-lg: 18px;
    --border-radius-xl: 26px;

    --shadow-sm: 0 1px 2px 0 rgba(36, 31, 29, 0.06);
    --shadow-md: 0 6px 16px -4px rgba(36, 31, 29, 0.14);
    --shadow-lg: 0 16px 36px -8px rgba(36, 31, 29, 0.18);
    --shadow-xl: 0 28px 56px -12px rgba(36, 31, 29, 0.22);

    --transition: all 0.25s ease;
    --transition-fast: all 0.15s ease;

    /* Typography — populated by next/font on <html>; fallbacks are close
       analogues so the page never renders in a system default while
       loading. Fraunces = display/headings, Work Sans = body/UI,
       IBM Plex Mono = data (prices, registration numbers). */
    --font-display: var(--font-display, 'Fraunces', Georgia, 'Times New Roman', serif);
    --font-body: var(--font-body, 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
    --font-data: var(--font-data, 'IBM Plex Mono', 'Courier New', monospace);
    --font-family: var(--font-body);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text-dark);
    background-color: var(--ground);
    overflow-x: hidden;
}

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

/* --brand (#C8392F) as default link text only reaches 4.17-4.39:1 on the
   site's light-tinted surfaces — fails AA (needs 4.5:1). --brand-dark
   passes everywhere it's used (6.75-8.33:1), same hue family, no visual
   identity loss. Found via live audit on services.html sidebar links
   against --surface-warm; fixed 2026-07-20, see COLOR_AUDIT. --brand
   itself is unaffected and still used for buttons/accents where it
   already passes (verified: white-on-brand 5.14:1). */
a { color: var(--brand-dark); text-decoration: none; transition: var(--transition-fast); }
a:hover { color: #6E211B; }

ul { list-style: none; }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--text-dark);
}

/* Visible keyboard focus everywhere — no invisible-focus regressions */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 3px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- Layout ---------- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5.5rem 0;
    position: relative;
    background: var(--surface-ground);
}

/* No blind nth-child alternation — every section below sets its own
   surface deliberately (see COLOR_AUDIT). A position-based rule here would
   silently outrank a single-class background rule by specificity and flip
   colors based on sibling order rather than design intent — exactly the
   fragile pattern that produced a real, confirmed contrast bug (why-us
   inheriting a light background by even/odd position, leaving white
   headings unreadable). Fixed 2026-07-20; do not reintroduce. */

/* Tooth watermark — the clinic's own mark (see public/favicon.svg),
   rendered oversized and low-contrast behind section headings. Restrained
   and atmospheric, not decorative clutter. */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
    position: relative;
    isolation: isolate;
}

.section-header::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 340px;
    height: 340px;
    transform: translate(-50%, -55%);
    z-index: -1;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 15C35 15 25 28 25 40C25 48 27 58 30 70C33 82 40 85 50 85C60 85 67 82 70 70C73 58 75 48 75 40C75 28 65 15 50 15Z' fill='%23C8392F'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.05;
}

/* ============================================================
   Authored SVG artwork layer (added 2026-07-20)
   Extends the single tooth-watermark motif above into three
   restrained, non-photographic devices: (1) a larger asymmetric
   "tooth constellation" ambient composition — the same brand path,
   stroke-only, at two scales — for the site's full-bleed colour-block
   moments; (2) a near-invisible repeating dot texture for the warm
   sand surface; (3) an extension of the credentials-strip's own
   perforated-stub top edge to two more colour-band transitions, using
   the exact same recipe so it reads as one consistent seam treatment
   threaded through the page rather than a one-off graphic. All pure
   line-art/geometry — nothing photographic, nothing figurative,
   nothing in the stripped mascot/confetti/sparkle motion family.
   ============================================================ */

/* --- Tooth constellation: stroke-only pair (echoes, doesn't repeat,
   the filled centred watermark above) anchored to a far corner of the
   two full-bleed colour-block sections outside the credentials strip.
   White stroke reads correctly on both --surface-rose and --surface-ink
   since both sections carry white text already. isolation:isolate
   mirrors the .section-header technique above so the z-index:-1 layer
   sits behind the section's own text but above its flat background. */
.why-us,
.doctor-section,
.about-header {
    isolation: isolate;
}
.why-us::after,
.doctor-section::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 300px;
    height: 260px;
    z-index: -1;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 200'%3E%3Cg fill='none' stroke='%23FFFFFF' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='translate(6,4) scale(1.32) rotate(-7 50 50)'%3E%3Cpath d='M50 15C35 15 25 28 25 40C25 48 27 58 30 70C33 82 40 85 50 85C60 85 67 82 70 70C73 58 75 48 75 40C75 28 65 15 50 15Z'/%3E%3Cpath d='M42 75L40 85M58 75L60 85'/%3E%3C/g%3E%3Cg transform='translate(150,100) scale(0.6) rotate(11 50 50)'%3E%3Cpath d='M50 15C35 15 25 28 25 40C25 48 27 58 30 70C33 82 40 85 50 85C60 85 67 82 70 70C73 58 75 48 75 40C75 28 65 15 50 15Z'/%3E%3Cpath d='M42 75L40 85M58 75L60 85'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: bottom right;
    opacity: 0.07;
}
/* Larger variant for the About page header, which lost a stock photo
   of an uncredited person (see about/page.tsx edit note) — this fills
   the same visual role (texture behind the page <h1>) without ever
   implying a photograph of clinic staff. */
.about-header::after {
    content: '';
    position: absolute;
    top: -20px;
    right: -30px;
    width: 460px;
    height: 380px;
    z-index: -1;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 200'%3E%3Cg fill='none' stroke='%23FFFFFF' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='translate(6,4) scale(1.32) rotate(-7 50 50)'%3E%3Cpath d='M50 15C35 15 25 28 25 40C25 48 27 58 30 70C33 82 40 85 50 85C60 85 67 82 70 70C73 58 75 48 75 40C75 28 65 15 50 15Z'/%3E%3Cpath d='M42 75L40 85M58 75L60 85'/%3E%3C/g%3E%3Cg transform='translate(150,100) scale(0.6) rotate(11 50 50)'%3E%3Cpath d='M50 15C35 15 25 28 25 40C25 48 27 58 30 70C33 82 40 85 50 85C60 85 67 82 70 70C73 58 75 48 75 40C75 28 65 15 50 15Z'/%3E%3Cpath d='M42 75L40 85M58 75L60 85'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: top right;
    opacity: 0.06;
}

/* --- Repeating geometric texture: a near-invisible dot grid on the
   warm sand surface, shared by two pages (homepage about-preview,
   services grid on both /services and the About page's own facilities
   reuse of .services). Texture, not decoration — fill-opacity is baked
   low in the SVG itself and the element opacity dims it further. */
.about-preview,
.services {
    isolation: isolate;
}
.about-preview::after,
.services::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26'%3E%3Ccircle cx='2' cy='2' r='1.1' fill='%238E2B24' fill-opacity='0.55'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 26px 26px;
    opacity: 0.16;
}

/* --- Perforated-stub edge, extended: the exact recipe already used at
   the top of .credentials-strip, reused verbatim at two more colour-band
   seams so the certificate/ticket-stub language reads as one continuous
   system rather than a single isolated graphic. */
.why-us::before,
.doctor-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background-image: radial-gradient(circle, var(--ground) 2px, transparent 2.5px);
    background-size: 18px 3px;
    background-repeat: repeat-x;
    background-position: center;
    pointer-events: none;
}

.section-tag {
    display: inline-block;
    background: var(--brand-dark);
    color: var(--white);
    font-family: var(--font-data);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    padding: 0.5rem 1.1rem;
    border-radius: 3px;
    margin-bottom: 1.1rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.85rem;
}

.section-header p { color: var(--text-medium); font-size: 1.1rem; }

.highlight {
    color: var(--brand);
    font-style: italic;
    font-weight: 600;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.8rem 1.6rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.02rem; }
.btn-block { width: 100%; }

.btn-primary {
    background: var(--brand);
    color: var(--white);
    border-color: var(--brand);
}
.btn-primary:hover {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* --brand text on .btn-outline measured 1.59:1 on the hero photo and
   4.17:1 on --surface-warm (gallery social links) via real pixel
   sampling — both fail AA. --brand-dark is the established sitewide fix
   for this exact bug class (see the `a` rule note above: same
   4.17-4.39:1 failure, same fix). Border stays --brand (not
   text — WCAG text-contrast rules don't apply to decorative borders).
   Hero gets an explicit white override below, matching the hero h1
   precedent, since --brand-dark is too dark to read against a dark
   photo. Found + fixed 2026-07-20. */
.btn-outline { background: transparent; color: var(--brand-dark); border-color: var(--brand); }
.btn-outline:hover { background: var(--brand); color: var(--white); }
.hero .btn-outline { color: var(--white); border-color: var(--white); }
.hero .btn-outline:hover { background: var(--white); color: var(--brand-dark); border-color: var(--white); }

.btn-white { background: var(--white); color: var(--brand-dark); border-color: var(--white); }
.btn-white:hover { background: var(--ground-raised); color: var(--brand-dark); }

/* WhatsApp-brand-green text buttons. The literal WhatsApp brand green
   (#25D366) is 1.98:1 with white text — fails AA badly. Even the old hover
   shade (#128C7E) only reaches 4.14:1. #0F7A6B is the same teal-green
   family (recognizably "WhatsApp"), 5.23:1 with white — confirmed via
   scripts/_contrast.js. Fixed 2026-07-20 (pre-existing since the prior
   redesign pass, caught by this audit — not part of the reorder/surface
   work but reported and fixed per instruction). The icon-only floating
   WhatsApp button and small brand-mark icons are unaffected (icons aren't
   text; left as the recognizable brand color). */
.btn-outline-white {
    background: #0F7A6B;
    color: #ffffff;
    border: 1.5px solid #0F7A6B;
    font-weight: 600;
}
.btn-outline-white:hover { background: #0B6355; border-color: #0B6355; color: #fff; transform: translateY(-2px); }

/* ---------- Navigation ---------- */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: var(--ink);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    height: 80px;
}

.logo { display: flex; align-items: center; gap: 0.6rem; font-size: 0.95rem; color: white; }
.logo img { width: 38px; height: 38px; border-radius: 50%; object-fit: contain; background: rgba(255,255,255,0.9); flex-shrink: 0; }
.logo .logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo .logo-text .logo-main { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; white-space: nowrap; }
.logo .logo-text .logo-branch { font-size: 0.68rem; color: rgba(255,255,255,0.75); font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; }
.logo strong { color: white; }

.nav-menu { display: flex; align-items: center; gap: 0.35rem; }
.nav-menu li a {
    display: block;
    padding: 0.6rem 0.95rem;
    color: rgba(255,255,255,0.85);
    font-weight: 500;
    font-size: 0.92rem;
    border-radius: 6px;
    transition: var(--transition-fast);
}
.nav-menu li a:hover, .nav-menu li a.active { color: white; background: rgba(255,255,255,0.12); }

.nav-dropdown { position: relative; }
.nav-dropdown .dropdown-toggle {
    display: flex; align-items: center; gap: 0.4rem; cursor: pointer;
    padding: 0.6rem 0.95rem; color: rgba(255,255,255,0.85); font-weight: 500;
    font-size: 0.92rem; border-radius: 6px; transition: var(--transition-fast);
    background: transparent; border: none;
}
.nav-dropdown .dropdown-toggle:hover { color: white; background: rgba(255,255,255,0.12); }
.nav-dropdown .dropdown-toggle svg { transition: transform 0.25s ease; opacity: 0.7; }
.nav-dropdown .dropdown-menu {
    position: absolute; top: calc(100% + 8px); right: 0; min-width: 220px;
    background: white; border-radius: 12px; box-shadow: var(--shadow-lg);
    opacity: 0; visibility: hidden; transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 1000; padding: 0.4rem; border: 1px solid var(--line); overflow: hidden;
}
.nav-dropdown.active .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dropdown.active .dropdown-toggle svg { transform: rotate(180deg); }
.nav-dropdown .dropdown-menu li a {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 0.85rem;
    color: var(--text-medium); font-weight: 500; font-size: 0.86rem;
    border-radius: 8px; background: transparent; margin: 1px 0;
}
.nav-dropdown .dropdown-menu li a:hover, .nav-dropdown .dropdown-menu li a.active {
    background: var(--brand-tint); color: var(--brand-dark);
}
.nav-dropdown .dropdown-menu li a svg { flex-shrink: 0; color: var(--brand); }

.nav-booking-btn {
    display: inline-flex !important; align-items: center; gap: 0.5rem;
    padding: 0.6rem 1.15rem !important; background: #0F7A6B !important;
    color: #ffffff !important; border-radius: 8px !important; font-weight: 600 !important;
    font-size: 0.85rem; transition: var(--transition-fast); white-space: nowrap;
}
.nav-booking-btn:hover { background: #0B6355 !important; color: #fff !important; transform: translateY(-1px); }
.navbar .nav-booking-btn, .nav-menu .nav-booking-btn { background: #0F7A6B !important; color: #fff !important; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: white; border-radius: 2px; transition: var(--transition); }

/* ---------- Hero ---------- */
/* Rebuilt 2026-07-20: the old hero background photo (stock — European
   two-pin sockets, editorial styling, implied these were the clinic's own
   premises) was removed. .hero now runs on its own flat var(--ink) background with
   .hero-overlay's existing diagonal ink-to-brand-dark gradient layered on
   top (previously only used to tint a photo; here it IS the visual,
   exactly the "layered ink→dark-surface gradient" the sibling Shiny site
   used for its own stock-photo replacement). isolation:isolate + the two
   pseudo-elements below extend the clinic's own tooth-mark — already used
   as a low-contrast watermark behind every .section-header and as a
   stroke-pair "constellation" on .why-us/.doctor-section — scaled up here
   so it reads as real structure behind the hero rather than a corner
   accent, matching the sibling site's ring-motif treatment in principle
   without borrowing its unrelated ring device. */
.hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    background: var(--ink);
    padding-top: 80px;
    overflow: hidden;
    isolation: isolate;
}

.hero-overlay { position: absolute; inset: 0; background: linear-gradient(160deg, rgba(36,31,29,0.65) 0%, rgba(142,43,36,0.55) 100%); }

/* Large filled tooth silhouette, low-contrast, anchored off the right
   edge — the "real structure" layer. Same filled path as
   .section-header::before, scaled far beyond that watermark's 340px since
   the hero is the page's flagship moment. */
.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    right: -8%;
    width: 780px;
    height: 780px;
    transform: translateY(-52%);
    z-index: -1;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 15C35 15 25 28 25 40C25 48 27 58 30 70C33 82 40 85 50 85C60 85 67 82 70 70C73 58 75 48 75 40C75 28 65 15 50 15Z' fill='%23FFFFFF'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.05;
}
/* Stroke-only constellation pair, same recipe (and same SVG) as
   .why-us::after / .doctor-section::after, anchored bottom-left where the
   hero text never reaches. */
.hero::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -70px;
    width: 460px;
    height: 380px;
    z-index: -1;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 200'%3E%3Cg fill='none' stroke='%23FFFFFF' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='translate(6,4) scale(1.32) rotate(-7 50 50)'%3E%3Cpath d='M50 15C35 15 25 28 25 40C25 48 27 58 30 70C33 82 40 85 50 85C60 85 67 82 70 70C73 58 75 48 75 40C75 28 65 15 50 15Z'/%3E%3Cpath d='M42 75L40 85M58 75L60 85'/%3E%3C/g%3E%3Cg transform='translate(150,100) scale(0.6) rotate(11 50 50)'%3E%3Cpath d='M50 15C35 15 25 28 25 40C25 48 27 58 30 70C33 82 40 85 50 85C60 85 67 82 70 70C73 58 75 48 75 40C75 28 65 15 50 15Z'/%3E%3Cpath d='M42 75L40 85M58 75L60 85'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: bottom left;
    opacity: 0.09;
}

.hero .container { position: relative; z-index: 1; }

.hero-content { max-width: 700px; color: var(--white); }

.hero-content h1 {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 1.1rem;
    /* Explicit — the global h1 rule sets ink by default, which would sit
       ink-on-ink against the hero's dark overlay. Confirmed via
       getComputedStyle before this fix: rgb(36,31,29) on a near-black
       overlay. See COLOR_AUDIT. */
    color: var(--white);
}
.hero-content h1 .highlight { color: #F2C9AC; font-style: italic; }

/* .hero-subtitle/.hero-text/.hero-feature: explicit color (not just the
   inherited .hero-content white) — the same hardening principle as the h1
   fix above, so none of these depend on an ancestor rule staying intact. */
.hero-subtitle { font-family: var(--font-body); font-size: 1.35rem; font-weight: 500; margin-bottom: 1rem; opacity: 0.95; color: var(--white); }
.hero-text { font-size: 1.08rem; opacity: 0.85; margin-bottom: 2rem; max-width: 560px; color: var(--white); }

.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3rem; }

.hero-features { display: flex; gap: 2rem; flex-wrap: wrap; }
.hero-feature { display: flex; align-items: center; gap: 0.55rem; font-weight: 500; font-size: 0.95rem; color: var(--white); }
.hero-feature i { font-size: 1.1rem; color: #F2C9AC; }

/* ---------- Quick Info Bar ---------- */
.quick-info { background: var(--brand-dark); padding: 1.5rem 0; }
.info-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.info-item { display: flex; align-items: center; gap: 1rem; color: var(--white); padding: 0.75rem 1rem; border-radius: 8px; }
.info-item i { font-size: 1.35rem; color: #F2C9AC; }
.info-label { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.75; }
.info-item strong { font-weight: 600; font-family: var(--font-data); font-size: 0.95rem; letter-spacing: -0.02em; }

/* ---------- Price-forward teaser (homepage, narrative step 3) ----------
   Deliberately plain: --surface-ground, no tint, no card shadow tricks — it
   should read as an honest document, not a promotion. */
.price-teaser { background: var(--surface-ground); }
/* .price-teaser-intro inherits the standard .section-header p treatment
   (color: var(--text-medium)) — deliberately plain, no extra styling. */
.price-teaser-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    max-width: 720px;
    margin: 0 auto 2rem;
}
.price-teaser-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--border-radius-lg);
    padding: 1.75rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}
.price-teaser-card .price-teaser-label { font-weight: 500; color: var(--text-dark); }
.price-teaser-card .price-teaser-value {
    font-family: var(--font-data);
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--brand);
    white-space: nowrap;
}
.price-teaser-cta { text-align: center; }

/* ---------- Credentials strip (signature element, narrative step 3) ----------
   A designed certificate-style band: dentist registrations and clinic/company
   registration presented as verified data, not fine print. Perforated top
   edge (radial-gradient dots) nods to a certificate/ticket stub. */
.credentials-strip {
    background: var(--ink);
    color: var(--white);
    padding: 4rem 0 3.5rem;
    position: relative;
}
.credentials-strip::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background-image: radial-gradient(circle, var(--ground) 2px, transparent 2.5px);
    background-size: 18px 3px;
    background-repeat: repeat-x;
    background-position: center;
}
.credentials-strip-header { text-align: center; max-width: 620px; margin: 0 auto 2.5rem; }
.credentials-strip-eyebrow {
    display: inline-block;
    font-family: var(--font-data);
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #F2C9AC;
    margin-bottom: 0.85rem;
}
.credentials-strip-header h2 { color: var(--white); font-size: 2.1rem; }
.credentials-strip-header h2 .highlight { color: #F2C9AC; }

.credentials-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    max-width: 820px;
    margin: 0 auto 2.5rem;
}
.credential-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: var(--border-radius-lg);
    padding: 1.75rem;
}
.credential-card .credential-name {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.2rem;
}
.credential-card .credential-degree {
    color: rgba(255,255,255,0.65);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
.credential-card .credential-mdc {
    display: inline-flex;
    align-items: baseline;
    gap: 0.5rem;
    font-family: var(--font-data);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 6px;
    padding: 0.4rem 0.75rem;
}
.credential-card .credential-mdc .credential-mdc-label {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    /* 0.5 measured 4.10:1 (fail) against the true composited background —
       this label sits inside TWO stacked semi-transparent white layers
       (.credential-card 0.05 + .credential-mdc 0.08 over --ink), which
       lighten the effective bg well past plain --ink. 0.65 (matching
       .credential-degree) verified ~5.75:1 via real pixel sampling.
       Found + fixed 2026-07-20. */
    color: rgba(255,255,255,0.65);
}
.credential-card .credential-mdc .credential-mdc-num {
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.04em;
    color: #F2C9AC;
}

.credentials-strip-reg {
    text-align: center;
    font-family: var(--font-data);
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    letter-spacing: 0.01em;
    max-width: 620px;
    margin: 0 auto;
    padding-top: 1.75rem;
    border-top: 1px dashed rgba(255,255,255,0.18);
}
.credentials-strip-reg strong { color: rgba(255,255,255,0.85); font-weight: 600; }

/* Reuse on the About page's own doctor cards so the "serial number chip"
   treatment is consistent site-wide, not just a one-off homepage graphic. */
.doctor-credentials { width: 100%; display: flex; gap: 0.5rem; }
.credential-item {
    flex: 1;
    background: var(--ground-raised);
    padding: 0.75rem 0.5rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}
.credential-item i { color: var(--brand); font-size: 1rem; }
.credential-item span {
    color: var(--text-dark);
    font-family: var(--font-data);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Typographic credential chip (added 2026-07-20) — replaces stock/
   placeholder staff photography (a generic stock photo was doing duty
   under a real dentist's name; a second card reused the same file as a
   plain "female dentist" placeholder) with initials in the display
   face on --surface-ink, the same "verified credential" surface used
   for the homepage credentials strip and this page's own doctor-section
   background. Non-photographic by construction — cannot misrepresent
   anyone. .doctor-avatar/.dsa-avatar keep their existing box geometry
   (180x220, shadow, outline) from the base rules; this only overrides
   the fill. */
/* Compound selector (not just .doctor-avatar-mono) deliberately: the
   About page ships its own inline <style> block (inside the CONTENT
   HTML) that also sets a plain .doctor-avatar/.dsa-avatar background,
   and — being embedded later in the document than this stylesheet's
   <link> — it wins any same-specificity tie by cascade order. The
   compound selector raises specificity (0,2,0 vs 0,1,0) so this rule
   wins regardless of document position. Verified via getComputedStyle. */
.doctor-avatar.doctor-avatar-mono,
.dsa-avatar.dsa-avatar-mono {
    background: var(--surface-ink);
}
.avatar-initials {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 3.1rem;
    letter-spacing: 0.02em;
    color: var(--white);
}

/* ---------- About Preview (homepage) ---------- */
.about-preview { background: var(--surface-warm); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.about-content .section-tag { margin-bottom: 0.75rem; }
.about-content h2 { font-size: 2.25rem; margin-bottom: 1.5rem; }
.about-content p { color: var(--text-medium); margin-bottom: 1rem; }
.about-features { margin: 2rem 0; }
.about-features li { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0; color: var(--text-medium); }
.about-features i { color: var(--success-color); font-size: 1.1rem; }

/* ---------- Why Us ----------
   --surface-rose: a medium color block (not the full-ink treatment — ink is
   reserved for credential/registration authority elsewhere on the page).
   Every text colour on this surface is contrast-checked against #9C4C43
   specifically (see scripts/_contrast.js) — rgba(255,255,255,0.7)/dimmed
   cream, which worked fine on the old near-black ink background, FAILS here
   (3.79:1 / 2.39:1) and is deliberately not reused. */
.why-us { background: var(--surface-rose); color: var(--white); }
/* 0.15 measured 4.35:1 on white text (fails 4.5:1 body-text AA) — a 15%
   white tint over the mid-tone #9C4C43 rose lightens the pill enough to
   erode contrast, unlike the same rgba(255,255,255,0.15) pill elsewhere
   which sits on --surface-ink (much darker, plenty of margin). 0.08
   verified ~5.03:1 via real pixel sampling. Found + fixed 2026-07-20. */
.why-us .section-tag { background: rgba(255,255,255,0.08); }
.why-us .section-header h2 { color: var(--white); }
.why-us .highlight { color: #F2C9AC; } /* large text (2.5rem h2) — 3.89:1, passes the 3:1 large-text minimum */
.why-us .section-header p { color: rgba(255,255,255,0.9); } /* 5.16:1 */
.why-us .section-header::before { opacity: 0.08; filter: brightness(4); }
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.why-card { text-align: center; padding: 1.5rem; }
.why-number { font-family: var(--font-data); font-size: 1.7rem; font-weight: 600; color: #F2C9AC; margin-bottom: 1rem; } /* solid, no dimming — 3.89:1 on large text */
.why-card h3 { font-size: 1.2rem; margin-bottom: 0.85rem; color: var(--white); }
.why-card p { color: rgba(255,255,255,0.9); font-size: 0.92rem; } /* 5.16:1 */

/* ---------- FAQ ---------- */
.faq-section { background: var(--surface-blush); }
.faq-grid { max-width: 800px; margin: 0 auto; }
.faq-item {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--border-radius);
    margin-bottom: 0.85rem;
    overflow: hidden;
}
.faq-question {
    width: 100%; display: flex; justify-content: space-between; align-items: center;
    padding: 1.1rem 1.4rem; background: none; border: none; font-family: var(--font-body);
    font-size: 1rem; font-weight: 600; color: var(--text-dark); cursor: pointer; text-align: left;
}
.faq-question:hover { color: var(--brand); }
.faq-question i { color: var(--brand); transition: transform 0.25s ease; flex-shrink: 0; margin-left: 1rem; }
.faq-item.active .faq-question i { transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-item.active .faq-answer { max-height: 500px; padding: 0 1.4rem 1.4rem; }
.faq-answer p { color: var(--text-medium); line-height: 1.7; }

/* ---------- CTA Section ---------- */
.cta-section { background: var(--brand-dark); padding: 4.5rem 0; text-align: center; }
.cta-content h2 { color: var(--white); font-size: 2.2rem; margin-bottom: 1rem; }
.cta-content p { color: rgba(255,255,255,0.9); font-size: 1.08rem; max-width: 600px; margin: 0 auto 2rem; }
.cta-buttons { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

/* ---------- Staff / DSA (legacy homepage section, still supported) ---------- */
.staff-contact { background: var(--bg-white); }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--white); padding: 4rem 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; padding-bottom: 3rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-brand .logo { color: var(--white); margin-bottom: 1rem; }
.footer-brand p { color: rgba(255,255,255,0.65); font-size: 0.92rem; margin-bottom: 1.5rem; }
.social-links { display: flex; gap: 1rem; }
.social-links a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; color: var(--white); transition: var(--transition); }
.social-links a:hover { background: var(--brand); transform: translateY(-2px); }
.footer-links h4, .footer-contact h4 { font-family: var(--font-body); font-size: 1rem; font-weight: 600; margin-bottom: 1.25rem; color: var(--white); }
.footer-links ul li { margin-bottom: 0.7rem; }
.footer-links a { color: rgba(255,255,255,0.65); }
.footer-links a:hover { color: #F2C9AC; padding-left: 0.35rem; }
.footer-contact ul li { display: flex; align-items: flex-start; gap: 0.7rem; margin-bottom: 1rem; color: rgba(255,255,255,0.65); }
.footer-contact svg { color: #F2C9AC; margin-top: 0.25rem; flex-shrink: 0; }
.footer-contact a { color: rgba(255,255,255,0.65); }
.footer-contact a:hover { color: #F2C9AC; }

/* Registration line, restyled as the credential strip's quieter footer
   echo — same certificate/data register treatment in miniature.
   Colors tuned 2026-07-20 for AA contrast against --ink (#241F1D):
   copyright ~9.0:1 (was 4.38:1), registration ~10.8:1 (was 3.90:1) —
   the registration figures must read at LEAST as clearly as the
   copyright line, never less (this is the proof-of-transparency text). */
.footer-bottom {
    padding: 1.75rem 0 2rem;
    text-align: center;
    color: rgba(255,255,255,0.72);
    font-size: 0.85rem;
    border-top: 1px dashed rgba(255,255,255,0.12);
    margin-top: 0;
}
.footer-bottom p:last-child {
    font-family: var(--font-data);
    font-size: 0.78rem;
    color: rgba(255,255,255,0.8);
    margin-top: 0.4rem;
}

/* ---------- Page Header (inner pages) ---------- */
.page-header {
    background: var(--ink);
    padding: 8rem 0 4rem;
    text-align: center;
    color: var(--white);
}
.page-header h1 { font-family: var(--font-display); font-size: 2.5rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--white); }
.page-header p { font-size: 1.08rem; opacity: 0.85; }
.breadcrumb { display: flex; justify-content: center; gap: 0.5rem; margin-top: 1rem; font-size: 0.9rem; }
.breadcrumb a { color: rgba(255,255,255,0.75); }
.breadcrumb a:hover { color: var(--white); }
/* 0.5 measured 4.13:1 against the page-header's dark photo overlay (fails
   4.5:1) — bumped to 0.65, verified ~5.8:1. Found + fixed 2026-07-20. */
.breadcrumb span { color: rgba(255,255,255,0.65); }

/* about page's own richer header variant */
.about-header { background: var(--ink); position: relative; overflow: hidden; padding: 6rem 0 4rem; }
.header-content { text-align: center; }
.header-badge {
    display: inline-block; background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.85);
    padding: 0.45rem 1.15rem; border-radius: 4px; font-family: var(--font-data); font-size: 0.72rem;
    letter-spacing: 0.06em; margin-bottom: 1.1rem;
}
.about-header h1 { font-family: var(--font-display); font-size: 2.9rem; font-weight: 600; margin-bottom: 0.85rem; color: var(--white); }
.about-header p { font-size: 1.08rem; opacity: 0.85; max-width: 500px; margin: 0 auto 2rem; }
.header-nav-buttons { display: flex; justify-content: center; gap: 0.85rem; flex-wrap: wrap; }
.header-nav-btn {
    display: flex; align-items: center; gap: 0.5rem; background: rgba(255,255,255,0.1); color: white;
    padding: 0.7rem 1.35rem; border-radius: 8px; font-size: 0.88rem; font-weight: 500; border: 1px solid rgba(255,255,255,0.14);
    transition: var(--transition);
}
.header-nav-btn:hover { background: rgba(255,255,255,0.2); transform: translateY(-2px); }

/* Gallery / Tips / Prices page headers (2026-07-20): each referenced a
   background photo that turned out, on inspection, not to exist or to be
   stock itself — gallery's clinic-interior.jpg was simply missing, and
   the only real candidates (clinic-interior-1/-2.jpg, services/dental-
   tools.jpg, clinic-equipment.jpg) are themselves stock (studio lighting,
   no clutter, the same 800x533-ish dimension bucket already established
   for the removed team photos — see each page's own edit note). All
   three broken/stock references were removed rather than repointed. Same
   fix as .about-header::after above: extend the tooth-constellation
   motif to carry the texture the photo would have, never a photograph. */
.gallery-header,
.tips-header,
.prices-header {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.gallery-header::after,
.tips-header::after,
.prices-header::after {
    content: '';
    position: absolute;
    top: -20px;
    right: -30px;
    width: 460px;
    height: 380px;
    z-index: -1;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 200'%3E%3Cg fill='none' stroke='%23FFFFFF' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='translate(6,4) scale(1.32) rotate(-7 50 50)'%3E%3Cpath d='M50 15C35 15 25 28 25 40C25 48 27 58 30 70C33 82 40 85 50 85C60 85 67 82 70 70C73 58 75 48 75 40C75 28 65 15 50 15Z'/%3E%3Cpath d='M42 75L40 85M58 75L60 85'/%3E%3C/g%3E%3Cg transform='translate(150,100) scale(0.6) rotate(11 50 50)'%3E%3Cpath d='M50 15C35 15 25 28 25 40C25 48 27 58 30 70C33 82 40 85 50 85C60 85 67 82 70 70C73 58 75 48 75 40C75 28 65 15 50 15Z'/%3E%3Cpath d='M42 75L40 85M58 75L60 85'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: top right;
    opacity: 0.06;
}

/* ---------- Services grid + service detail ---------- */
.services { background: var(--surface-warm); }
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.service-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--brand); }
.service-icon {
    width: 78px; height: 78px; margin: 0 auto 1.4rem; background: var(--brand);
    border-radius: 16px; display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.service-card:hover .service-icon { transform: translateY(-3px); }
.service-icon i { font-size: 2rem; color: white; }
.service-card h3 { font-size: 1.1rem; margin-bottom: 0.7rem; }
.service-card p { color: var(--text-light); font-size: 0.92rem; margin-bottom: 1.1rem; }
.service-link { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--brand); font-weight: 600; font-size: 0.87rem; }
.service-link:hover { gap: 0.7rem; }

.service-detail { padding: 4rem 0; }
.service-detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 3rem; }
.service-main h2 { font-size: 1.65rem; margin-bottom: 1rem; }
.service-main p { color: var(--text-medium); margin-bottom: 1rem; }
.service-main ul { margin: 1.5rem 0; }
.service-main ul li { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.5rem 0; color: var(--text-medium); }
.service-main ul li i { color: var(--success-color); margin-top: 0.25rem; }
.service-sidebar { position: sticky; top: 100px; }
.sidebar-card { background: var(--bg-light); border-radius: var(--border-radius-lg); padding: 1.5rem; margin-bottom: 1.5rem; }
.sidebar-card h3 { font-size: 1.05rem; margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 2px solid var(--brand); }
.service-list li { padding: 0.7rem 0; border-bottom: 1px solid var(--border-color); }
.service-list li:last-child { border-bottom: none; }
.service-list a { display: flex; align-items: center; justify-content: space-between; color: var(--text-medium); }
.service-list a:hover { color: var(--brand); }

/* ---------- Pricing page ---------- */
/* Deliberately plain/calm per design direction — an honest document, not a
   promotion. Same --surface-ground as the homepage price teaser. */
.pricing-section { background: var(--surface-ground); }
.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.pricing-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    border: 1px solid var(--line);
}
.pricing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--brand); }
.pricing-badge {
    position: absolute; top: 0; right: 0; background: var(--brand); color: white;
    padding: 0.4rem 0.9rem; font-size: 0.7rem; font-weight: 700; border-bottom-left-radius: 8px;
}
.pricing-header { background: var(--ink); color: white; padding: 1.5rem; text-align: center; }
.pricing-header i { font-size: 1.8rem; margin-bottom: 0.7rem; display: block; }
.pricing-header h3 { font-family: var(--font-body); font-size: 1.05rem; font-weight: 600; color: white; }
.pricing-body { padding: 1.5rem; }
.pricing-list li { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.75rem 0; border-bottom: 1px solid var(--border-color); font-size: 0.88rem; color: var(--text-medium); }
.pricing-list li:last-child { border-bottom: none; }
.pricing-list .price { font-family: var(--font-data); font-weight: 600; color: var(--brand); white-space: nowrap; }
.pricing-note { background: var(--brand-tint); border-radius: var(--border-radius); padding: 1.5rem; margin-top: 2rem; text-align: center; }
.pricing-note p { color: var(--text-medium); font-size: 0.92rem; }
.pricing-note i { color: var(--brand); margin-right: 0.5rem; }

/* ---------- About page: story / mission / values ---------- */
.about-section { padding: 4rem 0; }
.about-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; margin-bottom: 4rem; }
.about-intro-content h2 { font-size: 2rem; margin-bottom: 1.5rem; }
.about-intro-content p { color: var(--text-medium); margin-bottom: 1rem; }
.mission-vision { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 4rem; }
.mission-card, .vision-card { background: var(--bg-light); border-radius: var(--border-radius-lg); padding: 2rem; }
.mission-card h3, .vision-card h3 { display: flex; align-items: center; gap: 0.75rem; font-size: 1.35rem; margin-bottom: 1rem; }
.mission-card h3 i, .vision-card h3 i { color: var(--brand); }
.mission-card p, .vision-card p { color: var(--text-medium); }

.values-section { padding: 4rem 0; background: var(--surface-blush); }
.values-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.value-card { background: var(--bg-white); border-radius: var(--border-radius-lg); padding: 2rem; text-align: center; transition: var(--transition); }
.value-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.value-icon { width: 64px; height: 64px; margin: 0 auto 1.4rem; background: var(--brand); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.value-icon i { font-size: 1.4rem; color: var(--white); }
.value-card h3 { font-size: 1.05rem; margin-bottom: 0.7rem; }
.value-card p { color: var(--text-light); font-size: 0.92rem; }

/* Panel / insurance registration */
.panel-section { background: var(--surface-warm); }
.panel-pill-list { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.85rem; max-width: 900px; margin: 0 auto 2rem; padding: 0; }
.panel-pill { display: inline-flex; align-items: center; gap: 0.5rem; background: white; color: var(--text-dark); padding: 0.65rem 1.15rem; border-radius: 8px; font-size: 0.88rem; font-weight: 600; box-shadow: var(--shadow-sm); }
.panel-pill i { color: var(--success-color); }
.panel-info-box { background: white; border-radius: var(--border-radius-lg); padding: 1.5rem 2rem; display: flex; align-items: center; gap: 1.5rem; max-width: 900px; margin: 0 auto; box-shadow: var(--shadow-sm); border-left: 3px solid var(--brand); }
.info-icon { width: 46px; height: 46px; background: var(--brand); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.info-icon i { color: white; font-size: 1.2rem; }
.info-content h4 { font-size: 1rem; margin-bottom: 0.25rem; }
.info-content p { color: var(--text-medium); font-size: 0.9rem; margin: 0; }

/* Doctor + DSA cards */
/* --surface-ink here too — same "credential authority" semantic as the
   homepage credentials strip and the footer registration line. The doctor
   CARDS stay opaque white (unchanged) so this is only a section-background
   change; card contents need no rework. The section-header text sitting
   directly on ink, though, needs the same explicit-white treatment as
   .why-us / .credentials-strip-header — verified via getComputedStyle,
   not assumed (see COLOR_AUDIT: this is the exact bug class hunted here). */
.doctor-section { background: var(--surface-ink); }
.doctor-section .section-tag { background: rgba(255,255,255,0.15); }
.doctor-section .section-header h2 { color: var(--white); }
.doctor-section .section-header h2 .highlight { color: #F2C9AC; }
.doctor-section .section-header p { color: rgba(255,255,255,0.9); }
.doctor-section .section-header::before { opacity: 0.08; filter: brightness(4); }
.doctors-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; max-width: 800px; margin: 0 auto; }
.doctor-card { background: white; border-radius: var(--border-radius-lg); padding: 2rem; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; align-items: center; text-align: center; }
.doctor-avatar { width: 180px; height: 220px; background: var(--brand-dark); border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 1.25rem; box-shadow: var(--shadow-md); border: 4px solid #fff; outline: 2px solid var(--brand); overflow: hidden; }
.doctor-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.doctor-info { margin-bottom: 1.25rem; min-height: 80px; display: flex; flex-direction: column; justify-content: center; }
.doctor-info h3 { font-size: 1.1rem; margin-bottom: 0.4rem; line-height: 1.4; }
.doctor-title { color: var(--brand); font-weight: 600; font-size: 0.92rem; }

.dsa-grid { display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; }
.dsa-card { background: white; padding: 2rem 2.5rem; border-radius: var(--border-radius-lg); text-align: center; box-shadow: var(--shadow-sm); min-width: 200px; transition: var(--transition); }
.dsa-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.dsa-avatar { width: 180px; height: 220px; background: var(--brand-dark); border-radius: 10px; display: flex; align-items: center; justify-content: center; margin: 0 auto 1.25rem; box-shadow: var(--shadow-md); border: 4px solid #fff; outline: 2px solid var(--brand); overflow: hidden; }
.dsa-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dsa-card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.dsa-role { color: var(--text-medium); font-size: 0.88rem; }

.org-chart-section { background: var(--surface-blush); }
.org-chart-container { text-align: center; margin-top: 2rem; }
.org-chart-img { max-width: 60%; height: auto; border-radius: var(--border-radius-lg); box-shadow: var(--shadow-md); display: block; margin: 0 auto; }

/* Testimonials */
.testimonials-section { background: var(--surface-blush); }
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.testimonial-card { background: white; padding: 1.75rem; border-radius: var(--border-radius-lg); box-shadow: var(--shadow-sm); border: 1px solid var(--line); transition: var(--transition); }
.testimonial-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.testimonial-rating { color: var(--warning-color); margin-bottom: 0.85rem; }
.testimonial-text { color: var(--text-medium); font-style: italic; line-height: 1.65; margin-bottom: 1.25rem; font-size: 0.93rem; }
.testimonial-author { display: flex; align-items: center; gap: 1rem; padding-top: 0.85rem; border-top: 1px solid var(--line); }
.testimonial-cta { text-align: center; margin-top: 2.5rem; padding: 2rem; background: white; border-radius: var(--border-radius-lg); box-shadow: var(--shadow-sm); }
.testimonial-cta p { color: var(--text-medium); margin-bottom: 1rem; }

/* ---------- Contact page (premium-* namespace) ---------- */
.premium-contact-bg { position: fixed; inset: 0; background: var(--ink); z-index: -2; }
.floating-icons { display: none; } /* decorative parallax icon field removed for a calmer, medical-trust tone */
.premium-header { min-height: 40vh; display: flex; align-items: center; justify-content: center; padding: 8rem 2rem 4rem; }
.glass-header {
    /* Darkened from a near-transparent white tint (rgba(255,255,255,0.06),
       which slightly LIGHTENS the warm-dark hero backdrop and was part of
       why the subtitle below failed AA contrast at 3.96:1) to a dark ink
       scrim. Computed worst-case against the hero gradient's lightest
       stop: 6.00:1 with opaque white text -- comfortable AA margin. */
    background: rgba(36,31,29,0.3);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: var(--border-radius-xl);
    padding: 3rem;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}
.glass-header h1 { font-family: var(--font-display); font-size: 2.6rem; color: #fff; margin-bottom: 1rem; }
.glass-header p { color: #fff; font-size: 1.05rem; line-height: 1.65; }

.premium-section { padding: 4.5rem 0; }
.premium-section-header { text-align: center; margin-bottom: 2.5rem; }
.premium-section-header .tag { display: inline-block; background: var(--brand-dark); color: white; padding: 0.45rem 1.1rem; border-radius: 4px; font-family: var(--font-data); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1rem; }
.premium-section-header h2 { font-size: 2.1rem; color: var(--ink); }
.premium-section-header h2 .highlight { color: var(--brand); }

.premium-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--border-radius-lg);
    padding: 2.25rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
}
.premium-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--brand); }
.premium-card .icon-circle { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1.4rem; font-size: 1.6rem; color: white; background: var(--brand) !important; }
.premium-card h3 { color: var(--ink) !important; font-size: 1.2rem; margin-bottom: 0.5rem; }
.premium-card p { color: var(--support) !important; }

.premium-btn {
    display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.8rem 1.6rem;
    border-radius: 8px; font-weight: 600; transition: var(--transition);
}
.premium-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.premium-btn-whatsapp { background: #0F7A6B; color: white; }
.premium-btn-whatsapp:hover { background: #0B6355; }
.premium-btn-primary { background: var(--brand); color: white; }
.premium-btn-primary:hover { background: var(--brand-dark); }
.premium-btn-blue { background: var(--ink); color: white; }
.premium-btn-blue:hover { background: #000; }

.map-container { border-radius: var(--border-radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); height: 100%; min-height: 350px; }

.social-premium { display: flex; justify-content: center; gap: 1.25rem; }
.social-premium a { width: 58px; height: 58px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 1.55rem; transition: var(--transition); box-shadow: var(--shadow-sm); }
.social-premium a:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.social-instagram, .social-links a[aria-label="Instagram"] { background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.social-facebook { background: #1877F2; }
.social-tiktok { background: #000; }

.premium-cta {
    background: var(--brand-dark);
    padding: 3.5rem 2rem;
    border-radius: var(--border-radius-xl);
    text-align: center;
    margin: 3rem auto;
    max-width: 900px;
}
.premium-cta h2 { color: white; font-size: 1.9rem; margin-bottom: 1rem; }
.premium-cta p { color: rgba(255,255,255,0.9); margin-bottom: 2rem; }
.premium-cta .cta-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.premium-cta .btn-white { background: white; color: var(--brand-dark); padding: 0.9rem 1.75rem; border-radius: 8px; font-weight: 600; display: inline-flex; align-items: center; gap: 0.5rem; transition: var(--transition); }
.premium-cta .btn-white:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.premium-cta .btn-outline-white { background: transparent; color: white; padding: 0.9rem 1.75rem; border-radius: 8px; font-weight: 600; display: inline-flex; align-items: center; gap: 0.5rem; border: 1.5px solid rgba(255,255,255,0.5); transition: var(--transition); }
.premium-cta .btn-outline-white:hover { background: rgba(255,255,255,0.1); border-color: white; }

/* ---------- Gallery page ---------- */
.gallery-tabs { display: flex; justify-content: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 2.25rem; padding: 0.85rem; background: var(--bg-light); border-radius: var(--border-radius-lg); }
.gallery-tab { padding: 0.75rem 1.4rem; border: none; border-radius: 8px; background: white; color: var(--brand); font-weight: 600; font-size: 0.87rem; cursor: pointer; transition: var(--transition); display: flex; align-items: center; gap: 0.5rem; }
.gallery-tab:hover { box-shadow: var(--shadow-sm); }
.gallery-tab.active { background: var(--brand); color: white; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.75rem; margin-top: 2rem; }
.gallery-item {
    position: relative; border-radius: var(--border-radius-lg); overflow: hidden; box-shadow: var(--shadow-sm);
    aspect-ratio: 4/3; background: var(--bg-light); display: flex; align-items: center; justify-content: center;
    transition: var(--transition); cursor: pointer; border: 1px solid var(--line);
}
.gallery-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--brand); }
.gallery-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--bg-light); }
.gallery-item .overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(36,31,29,0.92) 0%, rgba(36,31,29,0.55) 60%, transparent 100%);
    color: white; padding: 1.75rem 1.25rem 1.25rem; transform: translateY(100%);
    transition: transform 0.3s ease; z-index: 2;
}
.gallery-item:hover .overlay { transform: translateY(0); }
.gallery-item .overlay h4 { font-size: 1.02rem; font-weight: 700; margin-bottom: 0.25rem; color: white; }
.gallery-item .overlay p { font-size: 0.83rem; opacity: 0.9; }

.gallery-section-title { display: flex; align-items: center; justify-content: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.gallery-section-title i { color: var(--brand); }
.gallery-section-title h3 { font-size: 1.4rem; }

.before-after-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.before-after-container { border-radius: var(--border-radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); background: white; border: 1px solid var(--line); }
.before-after-slider { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.before-after-labels { position: absolute; inset: 0; z-index: 3; display: flex; justify-content: space-between; padding: 0.75rem; pointer-events: none; }
.before-after-labels span { background: rgba(0,0,0,0.65); color: white; padding: 0.3rem 0.7rem; border-radius: 4px; font-size: 0.75rem; font-weight: 600; }
.before-image, .after-image { position: absolute; inset: 0; }
.before-after-info { padding: 1rem 1.25rem; }
.before-after-info h4 { font-size: 1rem; margin-bottom: 0.2rem; }
.before-after-info p { color: var(--text-medium); font-size: 0.85rem; }

.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.video-item { border-radius: var(--border-radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); background: white; border: 1px solid var(--line); }
.video-cover { position: relative; aspect-ratio: 16/9; background: var(--ink); cursor: pointer; overflow: hidden; }
.video-cover-bg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; color: white; text-align: center; padding: 1rem; }
.video-cover-icon { font-size: 2rem; color: #F2C9AC; }
.video-cover-title { font-family: var(--font-display); font-weight: 600; font-size: 1rem; }
.video-cover-logo { position: absolute; bottom: 0.75rem; right: 0.9rem; font-size: 0.72rem; opacity: 0.7; letter-spacing: 0.06em; }
.video-play-btn { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,0.92); display: flex; align-items: center; justify-content: center; color: var(--brand); font-size: 1.15rem; transition: var(--transition); }
.video-cover:hover .video-play-btn { transform: translate(-50%, -50%) scale(1.08); }
.video-duration { position: absolute; bottom: 0.75rem; left: 0.9rem; background: rgba(0,0,0,0.6); color: white; padding: 0.15rem 0.5rem; border-radius: 4px; font-size: 0.72rem; }
.video-info { padding: 1rem 1.25rem; }
.video-info h4 { font-size: 0.98rem; margin-bottom: 0.2rem; }
.video-info p { color: var(--text-medium); font-size: 0.85rem; }

.lightbox {
    display: none; position: fixed; inset: 0; background: rgba(20,17,15,0.94); z-index: 999999;
    justify-content: center; align-items: center;
}
.lightbox.active { display: flex; }
.lightbox img { max-width: 90%; max-height: 90vh; object-fit: contain; border-radius: var(--border-radius); }
.lightbox-close { position: absolute; top: 20px; right: 30px; font-size: 2.25rem; color: white; cursor: pointer; }
.lightbox-caption { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); color: white; text-align: center; background: rgba(0,0,0,0.6); padding: 0.85rem 1.75rem; border-radius: var(--border-radius); }

/* ---------- Tips page ---------- */
.tips-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.75rem; margin-top: 2rem; }
.tip-card { background: white; border-radius: var(--border-radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--line); transition: var(--transition); }
.tip-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.tip-header { background: var(--brand-dark); color: white; padding: 1.4rem; display: flex; align-items: center; gap: 1rem; }
.tip-header i { font-size: 1.6rem; opacity: 0.9; }
.tip-header h3 { font-family: var(--font-body); font-size: 1.1rem; margin: 0; color: white; }
.tip-body { padding: 1.4rem; }
.tip-body p { color: var(--text-medium); line-height: 1.65; margin-bottom: 1rem; }
.tip-body ul { list-style: none; padding: 0; margin: 0; }
.tip-body ul li { padding: 0.45rem 0; padding-left: 1.4rem; position: relative; color: var(--text-medium); }
.tip-body ul li::before { content: '\f00c'; font-family: 'Font Awesome 7 Free'; font-weight: 900; position: absolute; left: 0; color: var(--brand); font-size: 0.78rem; }

.featured-tip { background: var(--brand-tint); border-radius: var(--border-radius-lg); padding: 2.25rem; margin-bottom: 2.5rem; display: grid; grid-template-columns: auto 1fr; gap: 1.75rem; align-items: center; }
.featured-tip-icon { width: 88px; height: 88px; background: var(--brand); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.featured-tip-icon i { font-size: 2.1rem; color: white; }
.featured-tip-content h3 { color: var(--brand-dark); margin-bottom: 0.5rem; font-size: 1.4rem; }
.featured-tip-content p { color: var(--text-medium); line-height: 1.65; }

/* Dental tips floating carousel — kept but visually quieted (no infinite
   pulse/bounce loops; a single slide-in on change only). See PageEffects
   for the reduced-motion posture applied site-wide. */
.dental-tips-carousel { position: fixed; bottom: 100px; left: 20px; z-index: 9998; max-width: 260px; }
.carousel-tips-card { background: white; border-radius: var(--border-radius-lg); padding: 1.25rem; box-shadow: var(--shadow-lg); border: 1px solid var(--line); position: relative; overflow: hidden; }
.carousel-tips-header { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.75rem; }
.carousel-tips-icon { width: 36px; height: 36px; background: var(--brand-tint); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.05rem; }
.carousel-tips-label { font-size: 0.65rem; color: var(--brand); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.carousel-tips-title { font-size: 0.82rem; color: var(--ink); font-weight: 700; }
.carousel-tips-content { font-size: 0.87rem; color: var(--text-medium); line-height: 1.55; margin-bottom: 0.75rem; }
.carousel-tips-content strong { color: var(--brand); }
.carousel-tips-footer { display: flex; align-items: center; justify-content: space-between; }
.carousel-tips-dots { display: flex; gap: 5px; }
.carousel-tips-nav { display: flex; gap: 4px; }
.carousel-tips-close { position: absolute; top: 8px; right: 10px; background: none; border: none; color: var(--text-light); cursor: pointer; font-size: 0.85rem; }
.carousel-tips-minimized { width: 46px; height: 46px; border-radius: 50%; background: var(--brand); display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow-md); font-size: 1.3rem; }

/* ---------- Floating widgets shared across the site (mostly inline-styled
   in components/PageEffects.tsx; class hooks kept for mobile overrides) ---------- */
.scroll-to-top, .dark-mode-toggle, .tooth-mascot, .speech-bubble { }


/* ---------- Scroll reveal (the one motion effect this site keeps) ----------
   Applied selectively via the .scroll-fade class; respects
   prefers-reduced-motion via the global rule above. */
/* Progressive enhancement: content is fully visible by default (no-JS,
   slow-JS, and reduced-motion users always see everything). JS only arms
   the fade (adds .js-armed) on elements it has confirmed are below the
   fold at load, then reveals them via IntersectionObserver as they
   scroll into view. Content can never get stuck invisible. */
.scroll-fade.js-armed { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.scroll-fade.js-armed.visible { opacity: 1; transform: translateY(0); }
.scroll-fade-delay-1 { transition-delay: 0.08s; }
.scroll-fade-delay-2 { transition-delay: 0.16s; }
.scroll-fade-delay-3 { transition-delay: 0.24s; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .services-grid, .pricing-grid { grid-template-columns: repeat(2, 1fr); }
    .why-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .values-grid { grid-template-columns: repeat(2, 1fr); }
    .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
    .credentials-grid, .price-teaser-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .nav-menu {
        position: fixed; top: 80px; left: 0; right: 0; bottom: 0; background: var(--white);
        flex-direction: column; padding: 2rem; gap: 0; transform: translateX(100%); transition: var(--transition);
    }
    .nav-menu.active { transform: translateX(0); }
    .nav-menu li { width: 100%; }
    .nav-menu li a { display: block; padding: 1rem; border-bottom: 1px solid var(--border-color); color: var(--ink); }
    .nav-booking-btn { width: 100%; justify-content: center; padding: 1rem !important; margin: 0.5rem 0; }
    .nav-dropdown .dropdown-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; background: var(--bg-light); border-radius: 8px; margin: 0.5rem 0; padding: 0; }
    .nav-dropdown .dropdown-toggle { padding: 1rem; color: var(--ink); border-bottom: 1px solid var(--border-color); }
    .nav-dropdown .dropdown-menu li a { padding: 0.75rem 1.5rem; border-bottom: none; }

    .hero-content h1 { font-size: 2.4rem; }
    .hero-features { flex-direction: column; gap: 1rem; }
    .info-grid { grid-template-columns: repeat(2, 1fr); }

    .about-grid, .about-intro, .mission-vision, .service-detail-grid,
    .premium-header .glass-header, .doctors-grid { grid-template-columns: 1fr; }
    .services-grid, .why-grid, .values-grid, .pricing-grid, .testimonials-grid,
    .credentials-grid, .price-teaser-grid { grid-template-columns: 1fr; }
    .doctors-grid { max-width: 350px; margin: 0 auto; }

    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .section-header h2 { font-size: 2rem; }
    .service-sidebar { position: static; }
    .dental-tips-carousel { position: static; max-width: none; margin: 2rem auto 0; padding: 0 1.5rem; }
}

@media (max-width: 480px) {
    html { font-size: 15px; }
    .container { padding: 0 1rem; }
    .section { padding: 3.5rem 0; }
    .hero-content h1 { font-size: 2rem; }
    .hero-buttons { flex-direction: column; }
    .hero-buttons .btn { width: 100%; }
    .info-grid { grid-template-columns: 1fr; }
    .cta-buttons { flex-direction: column; }
    .cta-buttons .btn { width: 100%; }
}

@media (max-width: 360px) {
    html { font-size: 14px; }
    .hero-content h1 { font-size: 1.75rem; }
    .container { padding-left: 0.85rem; padding-right: 0.85rem; }
}

/* ============================================================
   Bilingual (EN / BM) display — pure CSS, zero hydration risk.
   Both languages are always present in the DOM; html[data-lang],
   set by a beforeInteractive blocking script (see app/layout.tsx)
   and updated live by LangToggle, decides which one is visible.
   No JS is required for the switch itself, so there's no flash and
   no client/server React mismatch — see components/LangToggle.tsx
   and components/Bi.tsx for the two places this is produced.
   ============================================================ */

/* Whole-section pairs: the CONTENT / CONTENT_MS divs rendered by each
   page.tsx under app/(site)/. English is the static-export default. */
.lang-ms { display: none; }
html[data-lang="ms"] .lang-en { display: none; }
html[data-lang="ms"] .lang-ms { display: block; }

/* Inline text pairs: components/Bi.tsx, used inside Header/Footer/
   PageEffects for hand-written strings outside the CONTENT pipeline. */
.t-ms { display: none; }
html[data-lang="ms"] .t-en { display: none; }
html[data-lang="ms"] .t-ms { display: inline; }

/* ---------- Language toggle button ---------- */
.lang-toggle {
    display: inline-flex;
    align-items: center;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.28);
    flex-shrink: 0;
}
.lang-toggle-btn {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.75);
    padding: 0.5rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: var(--transition-fast);
    line-height: 1;
}
.lang-toggle-btn:hover { color: #fff; background: rgba(255,255,255,0.1); }
html[data-lang="en"] .lang-toggle-en,
html[data-lang="ms"] .lang-toggle-ms {
    background: rgba(255,255,255,0.22);
    color: #fff;
}
/* No data-lang yet (pre-JS / no-script fallback): default to English active
   so the button never looks blank. */
html:not([data-lang]) .lang-toggle-en { background: rgba(255,255,255,0.22); color: #fff; }

@media (max-width: 768px) {
    /* Inside the mobile dropdown the nav-menu list item background is dark
       ink (#241F1D) already, same family as the desktop navbar, so the
       toggle's light-on-dark styling above still reads correctly. Centre it
       within its row instead of left-aligning like the link items. */
    .nav-menu li.nav-lang-item {
        display: flex;
        justify-content: center;
        padding: 0.75rem 1rem;
    }
}
