/* ============================================================
   MANGALAM DENTAL CLINIC — Main Stylesheet
   "We smile with your smile"
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
    /* Brand palette — soft, medical, trustworthy */
    --color-primary: #0891b2;          /* sky-cyan */
    --color-primary-dark: #0e7490;
    --color-primary-light: #e0f7fa;
    --color-secondary: #14b8a6;        /* soft teal */
    --color-accent: #06b6d4;
    --color-dark: #0f172a;
    --color-text: #334155;
    --color-text-light: #64748b;
    --color-muted: #94a3b8;
    --color-bg: #ffffff;
    --color-bg-alt: #f8fafc;
    --color-bg-soft: #f1f5f9;
    --color-border: #e2e8f0;
    --color-white: #ffffff;

    /* Semantic */
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-info: #3b82f6;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #0891b2 0%, #14b8a6 100%);
    --gradient-soft: linear-gradient(135deg, #e0f7fa 0%, #f0fdfa 100%);
    --gradient-hero: linear-gradient(135deg, rgba(8,145,178,0.92) 0%, rgba(20,184,166,0.88) 100%);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(15,23,42,0.04);
    --shadow-md: 0 4px 12px rgba(15,23,42,0.06);
    --shadow-lg: 0 10px 30px rgba(15,23,42,0.08);
    --shadow-xl: 0 20px 50px rgba(8,145,178,0.15);
    --shadow-glow: 0 0 40px rgba(8,145,178,0.2);

    /* Typography */
    --font-display: 'Poppins', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;

    /* Layout */
    --container: 1200px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    /* Motion */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================================
   THEMES
   ============================================================ */

/* Smooth transitions when switching themes */
body, .navbar, .section, .service-card, .contact-card, .form-card,
.appointment-info, .doctor-card, .footer, .float-card, .stat-card,
.gallery-item, .form-control, .btn, .hero-eyebrow {
    transition:
        background-color 0.4s var(--ease),
        color 0.4s var(--ease),
        border-color 0.4s var(--ease),
        box-shadow 0.4s var(--ease);
}

/* ---------- DARK THEME ---------- */
:root[data-theme="dark"] {
    --color-primary: #22d3ee;          /* brighter cyan for dark bg */
    --color-primary-dark: #06b6d4;
    --color-primary-light: rgba(34, 211, 238, 0.12);
    --color-secondary: #2dd4bf;
    --color-accent: #67e8f9;
    --color-dark: #f1f5f9;             /* inverted — used for text */
    --color-text: #cbd5e1;
    --color-text-light: #94a3b8;
    --color-muted: #64748b;
    --color-bg: #0a0f1e;               /* deep navy */
    --color-bg-alt: #0f172a;
    --color-bg-soft: #1e293b;
    --color-border: #1e293b;
    --color-white: #f1f5f9;

    --gradient-primary: linear-gradient(135deg, #06b6d4 0%, #14b8a6 100%);
    --gradient-soft: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --gradient-hero: linear-gradient(135deg, rgba(6,182,212,0.92) 0%, rgba(20,184,166,0.88) 100%);

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.4);
    --shadow-xl: 0 20px 50px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 40px rgba(34, 211, 238, 0.25);
}

[data-theme="dark"] body {
    background: #0a0f1e;
    color: var(--color-text);
}

[data-theme="dark"] .navbar {
    background: rgba(10, 15, 30, 0.75);
    border-bottom-color: rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] .navbar.scrolled {
    background: rgba(10, 15, 30, 0.92);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .logo,
[data-theme="dark"] h1, [data-theme="dark"] h2,
[data-theme="dark"] h3, [data-theme="dark"] h4,
[data-theme="dark"] h5, [data-theme="dark"] h6 {
    color: #f1f5f9;
}

[data-theme="dark"] .nav-link { color: #cbd5e1; }

[data-theme="dark"] .hero {
    background:
        radial-gradient(ellipse at top right, rgba(6,182,212,0.15) 0%, transparent 50%),
        radial-gradient(ellipse at bottom left, rgba(20,184,166,0.12) 0%, transparent 50%),
        #0a0f1e;
}
[data-theme="dark"] .hero::before {
    background-image: radial-gradient(circle at 1px 1px, rgba(34,211,238,0.08) 1px, transparent 0);
}

[data-theme="dark"] .hero-eyebrow {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--color-primary);
}

[data-theme="dark"] .section-alt {
    background: #0f172a;
}

[data-theme="dark"] .service-card,
[data-theme="dark"] .contact-card,
[data-theme="dark"] .form-card,
[data-theme="dark"] .doctor-card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .stat-card-mini,
[data-theme="dark"] .float-card,
[data-theme="dark"] .floating-badge {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.06);
}

/* Dark mode: hero stat card text colors */
[data-theme="dark"] .stat-card-mini .stat-num,
[data-theme="dark"] .stat-card-mini .stat-num span {
    color: #f1f5f9;
}

[data-theme="dark"] .stat-card-mini .stat-label {
    color: #94a3b8;
}

/* Dark mode: floating badge text */
[data-theme="dark"] .floating-badge strong {
    color: #f1f5f9;
}

[data-theme="dark"] .floating-badge span {
    color: #94a3b8;
}

[data-theme="dark"] .floating-badge .ico {
    background: rgba(34, 211, 238, 0.15);
}

[data-theme="dark"] .form-control {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}
[data-theme="dark"] .form-control:focus {
    background: #1e293b;
    border-color: var(--color-primary);
}

[data-theme="dark"] .map-wrap iframe { filter: invert(0.92) hue-rotate(180deg); }

[data-theme="dark"] .footer { background: #050810; }

[data-theme="dark"] .preloader { background: #0a0f1e; }

[data-theme="dark"] .lightbox-close { background: #1e293b; color: #f1f5f9; }

[data-theme="dark"] .alert-success { background: rgba(16,185,129,0.15); color: #6ee7b7; }
[data-theme="dark"] .alert-error   { background: rgba(239,68,68,0.15); color: #fca5a5; }
[data-theme="dark"] .alert-info    { background: rgba(59,130,246,0.15); color: #93c5fd; }

[data-theme="dark"] .gallery-item .placeholder {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

[data-theme="dark"] .breadcrumb { background: #1e293b; }

[data-theme="dark"] .page-banner {
    background:
        radial-gradient(ellipse at top right, rgba(6,182,212,0.15) 0%, transparent 50%),
        radial-gradient(ellipse at bottom left, rgba(20,184,166,0.12) 0%, transparent 50%),
        #0a0f1e;
}

/* Dropdown menu on dark */
[data-theme="dark"] .navbar .nav-menu {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .navbar .nav-menu .nav-link {
    color: #cbd5e1;
}
[data-theme="dark"] .navbar .nav-menu .nav-link:hover,
[data-theme="dark"] .navbar .nav-menu .nav-link.active {
    background: rgba(34, 211, 238, 0.15);
    color: var(--color-primary);
}
[data-theme="dark"] .navbar .nav-cta { border-top-color: rgba(255,255,255,0.06); }

/* ============================================================
   THEME TOGGLE BUTTON (in navbar, next to menu/hamburger)
   ============================================================ */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-toggle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--color-bg-soft);
    color: var(--color-text);
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 14px;
    border: 1px solid var(--color-border);
    transition: all 0.25s var(--ease);
    position: relative;
    flex-shrink: 0;
}

.theme-toggle:hover {
    color: var(--color-primary);
    background: var(--color-primary-light);
    border-color: transparent;
    transform: translateY(-1px);
}

.theme-toggle:active { transform: scale(0.95); }

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    position: absolute;
    transition: opacity 0.3s var(--ease), transform 0.4s var(--ease-bounce);
}

/* Light mode: show moon (click to go dark) */
.theme-toggle .icon-moon { opacity: 1; transform: rotate(0deg) scale(1); }
.theme-toggle .icon-sun  { opacity: 0; transform: rotate(90deg) scale(0.5); }

/* Dark mode: show sun (click to go light) */
[data-theme="dark"] .theme-toggle {
    background: rgba(255, 255, 255, 0.05);
    color: #f1f5f9;
    border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .theme-toggle:hover {
    background: rgba(34, 211, 238, 0.15);
    color: var(--color-primary);
}
[data-theme="dark"] .theme-toggle .icon-moon { opacity: 0; transform: rotate(-90deg) scale(0.5); }
[data-theme="dark"] .theme-toggle .icon-sun  { opacity: 1; transform: rotate(0deg) scale(1); }

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;          /* prevent iOS auto text scaling on rotate */
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    font-size: 15px;              /* was 16px - foundational size down */
    line-height: 1.65;            /* was 1.7 */
    color: var(--color-text);
    background: var(--color-bg);
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
    -webkit-tap-highlight-color: transparent; /* remove iOS tap blue flash */
}

/* Containment to prevent layout shift from off-screen elements */
.hero, .section { overflow: hidden; }

/* Safe-area support for iPhone notch / iOS home indicator */
@supports (padding: env(safe-area-inset-bottom)) {
    .floating-btns {
        right: calc(24px + env(safe-area-inset-right));
        bottom: calc(24px + env(safe-area-inset-bottom));
    }
}

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

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

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.25;
    color: var(--color-dark);
    letter-spacing: -0.02em;
}

ul { list-style: none; }

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ---------- Container ---------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 24px;       /* was 14px 32px */
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 13.5px;        /* was 15px */
    border-radius: var(--radius-full);
    transition: all 0.3s var(--ease);
    cursor: pointer;
    border: 2px solid transparent;
    white-space: nowrap;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 6px 16px rgba(8,145,178,0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(8,145,178,0.35);
    color: white;
}

.btn-outline {
    background: rgba(255,255,255,0.1);
    color: white;
    border-color: rgba(255,255,255,0.6);
    backdrop-filter: blur(10px);
}

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

.btn-light {
    background: white;
    color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

.btn-light:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-sm { padding: 8px 18px; font-size: 12.5px; }       /* was 10px 22px / 14px */
.btn-lg { padding: 13px 28px; font-size: 14px; }        /* was 18px 40px / 16px */

/* ---------- Navigation ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid transparent;
    transition: all 0.35s var(--ease);
    padding: 14px 0;          /* was 18px */
}

.navbar.scrolled {
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(28px) saturate(200%);
    -webkit-backdrop-filter: blur(28px) saturate(200%);
    border-bottom-color: var(--color-border);
    box-shadow: var(--shadow-md);
    padding: 10px 0;          /* was 12px */
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    color: var(--color-dark);
    line-height: 1.2;
}

.logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--gradient-primary);
    display: grid;
    place-items: center;
    color: white;
    font-size: 16px;
    box-shadow: 0 4px 14px rgba(8,145,178,0.3);
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
    gap: 1px;
}

.logo-text small {
    font-size: 9.5px;
    font-weight: 600;
    color: var(--color-primary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

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

.nav-link {
    padding: 8px 16px;        /* was 10px 18px */
    font-weight: 500;
    font-size: 13.5px;        /* was 15px */
    color: var(--color-text);
    border-radius: var(--radius-full);
    transition: all 0.25s var(--ease);
    position: relative;
}

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

.nav-cta {
    margin-left: 12px;
}

.menu-toggle {
    display: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--color-bg-soft);
    color: var(--color-dark);
    font-size: 14px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    transition: all 0.25s var(--ease);
    flex-shrink: 0;
}

.menu-toggle:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-color: transparent;
}

[data-theme="dark"] .menu-toggle {
    background: rgba(255, 255, 255, 0.05);
    color: #f1f5f9;
    border-color: rgba(255, 255, 255, 0.1);
}

/* ---------- Hero ---------- */
/* ============================================================
   HERO — Premium professional design
   ============================================================ */
.hero {
    position: relative;
    display: flex;
    align-items: flex-start;
    overflow: hidden;
    padding: 130px 0 70px;            /* big gap after navbar */
    background:
        radial-gradient(ellipse at top right, #d4f5fa 0%, transparent 55%),
        radial-gradient(ellipse at bottom left, #e6fdf9 0%, transparent 55%),
        #f5fcfc;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(8,145,178,0.05) 1px, transparent 0);
    background-size: 24px 24px;
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;      /* was 1.05fr 1fr — text column wider, image narrower */
    gap: 56px;
    align-items: start;
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 16px;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 20px;       /* was 28px — tighter */
    box-shadow: var(--shadow-sm);
}

.hero-eyebrow .dot {
    width: 7px;
    height: 7px;
    background: var(--color-secondary);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(20,184,166,0.2);
    animation: pulse 2s infinite;
}

/* Main headline — 2.75rem on desktop (was 3.1rem, fits viewport better) */
.hero h1 {
    font-size: 2.75rem;
    line-height: 1.1;
    margin-bottom: 16px;       /* was 22px */
    letter-spacing: -0.03em;
    font-weight: 800;
    color: var(--color-dark);
}

@media (min-width: 1440px) {
    .hero h1 { font-size: 3.1rem; }
}

.hero h1 .gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-slogan {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 500;
    font-size: 16px;
    color: var(--color-primary);
    margin-bottom: 14px;       /* was 18px */
}

.hero-desc {
    font-size: 14.5px;
    line-height: 1.65;
    color: var(--color-text-light);
    margin-bottom: 28px;       /* was 36px */
    max-width: 490px;
}

/* CTA buttons — side by side */
.hero-cta {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    margin-bottom: 32px;       /* was 44px */
    align-items: stretch;
}

.hero-cta .btn { padding: 12px 22px; font-size: 13.5px; }

/* Stat cards — white pills with hierarchy */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;                /* was 14px - kept */
}

.stat-card-mini {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 16px 14px;
    text-align: center;       /* was left — centered for balance */
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
    transition: all 0.25s var(--ease);
}

.stat-card-mini:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    border-color: transparent;
}

.stat-card-mini .stat-num {
    font-family: var(--font-display);
    font-size: 23px;
    font-weight: 700;
    color: var(--color-dark);
    line-height: 1;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.stat-card-mini .stat-num span { color: var(--color-dark); }

.stat-card-mini .stat-label {
    font-size: 10.5px;
    color: var(--color-text-light);
    letter-spacing: 0.1em;
    font-weight: 600;
}

/* ============================================================
   HERO VISUAL — Just the image (no fallback tooth)
   ============================================================ */
.hero-visual {
    position: relative;
    width: 100%;
    max-width: 440px;       /* hard cap so image never gets too big */
    margin-left: auto;      /* push to the right within its column */
}

.hero-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;              /* perfect square */
    max-height: 480px;
    border-radius: 24px;
    overflow: visible;
    background-size: cover;
    background-position: center;
    background-color: #e0f7fa;
    box-shadow:
        0 30px 60px -20px rgba(8, 145, 178, 0.25),
        0 18px 36px -18px rgba(15, 23, 42, 0.2);
}

/* Wrap content inside the image */
.hero-image::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
}

/* Empty placeholder when no image uploaded */
.hero-image-empty {
    background: var(--gradient-soft);
    border: 2px dashed var(--color-border);
    box-shadow: none;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.hero-empty-content {
    text-align: center;
    color: var(--color-text-light);
    padding: 24px;
}

.hero-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 16px;
    background: white;
    display: grid;
    place-items: center;
    font-size: 28px;
    color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

.hero-empty-content h4 {
    font-size: 17px;
    color: var(--color-dark);
    margin-bottom: 8px;
    font-weight: 600;
}

.hero-empty-content p {
    font-size: 13px;
    line-height: 1.5;
}

.hero-empty-content strong {
    color: var(--color-primary);
}

/* Three floating badges overlapping the image */
.floating-badge {
    position: absolute;
    background: white;
    padding: 12px 18px;
    border-radius: 14px;
    box-shadow:
        0 14px 32px rgba(15, 23, 42, 0.12),
        0 2px 6px rgba(15, 23, 42, 0.06);
    display: flex;
    align-items: center;
    gap: 11px;
    z-index: 2;
    animation: floaty 4s ease-in-out infinite;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.floating-badge .ico {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    display: grid;
    place-items: center;
    font-size: 15px;
    flex-shrink: 0;
}

.floating-badge strong {
    display: block;
    font-size: 13px;
    color: var(--color-dark);
    font-family: var(--font-display);
    line-height: 1.2;
    font-weight: 600;
}

.floating-badge span {
    font-size: 11px;
    color: var(--color-text-light);
    line-height: 1.3;
}

/* Badge positions — slight overflow outside the image */
.floating-badge-1 {
    top: 16%;
    left: -32px;
    animation-delay: 0s;
}

.floating-badge-2 {
    top: 50%;
    right: -32px;
    transform: translateY(-50%);
    animation-name: floaty-centered;
    animation-delay: 1s;
}

.floating-badge-3 {
    bottom: 10%;
    left: -16px;
    animation-delay: 2s;
}

@keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

@keyframes floaty-centered {
    0%, 100% { transform: translateY(-50%); }
    50%      { transform: translateY(calc(-50% - 8px)); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.2); opacity: 0.7; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ---------- Section Base ---------- */
.section {
    padding: 72px 0;          /* was 84px */
    position: relative;
}

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

.section-head {
    text-align: center;
    max-width: 640px;         /* was 680px */
    margin: 0 auto 48px;      /* was 56px */
}

.section-eyebrow {
    display: inline-block;
    font-size: 11px;          /* was 12px */
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 10px;
    padding: 4px 14px;
    background: var(--color-primary-light);
    border-radius: var(--radius-full);
}

.section-title {
    font-size: 28px;                 /* was 32px */
    margin-bottom: 12px;
    letter-spacing: -0.025em;
    line-height: 1.2;
    font-weight: 700;
}

@media (min-width: 1280px) {
    .section-title { font-size: 32px; }   /* was 36px */
}

.section-desc {
    font-size: 14.5px;        /* was 15px */
    line-height: 1.65;
    color: var(--color-text-light);
}

/* ---------- About ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 64px;
    align-items: center;
}

.about-image-wrap {
    position: relative;
}

.about-image {
    position: relative;
    aspect-ratio: 4/5;
    border-radius: var(--radius-xl);
    background:
        linear-gradient(135deg, rgba(8,145,178,0.85), rgba(20,184,166,0.85)),
        url('https://images.unsplash.com/photo-1606811971618-4486d14f3f99?w=800') center/cover;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.about-image::after {
    content: '\f5c9';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 180px;
    color: rgba(255,255,255,0.18);
}

/* Hide tooth-icon overlay when a real image is uploaded (inline style is present) */
.about-image[style]::after { display: none; }

.about-badge {
    position: absolute;
    bottom: -24px;
    right: -24px;
    background: white;
    padding: 24px 28px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 16px;
}

.about-badge .num {
    font-family: var(--font-display);
    font-size: 40px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.about-badge .lbl {
    font-size: 13px;
    color: var(--color-text-light);
    line-height: 1.3;
}

.about-content .section-head { text-align: left; margin: 0 0 32px; }

.doctor-card {
    background: white;
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    margin-top: 28px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 24px;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.doctor-avatar {
    width: 76px;              /* was 88px */
    height: 76px;
    border-radius: var(--radius-md);
    background: var(--gradient-primary);
    display: grid;
    place-items: center;
    color: white;
    font-size: 30px;          /* was 36px */
    box-shadow: var(--shadow-md);
}

.doctor-card h4 {
    font-size: 17px;          /* was 20px */
    margin-bottom: 4px;
    font-weight: 600;
}

.doctor-card .quals {
    font-size: 13px;          /* was 14px */
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 6px;
}

.doctor-card .nmc {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;        /* was 12px */
    color: var(--color-text-light);
    background: var(--color-bg-soft);
    padding: 3px 10px;
    border-radius: var(--radius-full);
}

.feature-list {
    display: grid;
    gap: 12px;                /* was 14px */
    margin-top: 24px;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13.5px;        /* was 15px */
    color: var(--color-text);
}

.feature-list .check {
    flex-shrink: 0;
    width: 20px;              /* was 24px */
    height: 20px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: white;
    font-size: 10px;          /* was 11px */
}

/* ---------- Services ---------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.service-card {
    position: relative;
    background: white;
    padding: 28px 24px;       /* was 36px 28px */
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    transition: all 0.4s var(--ease);
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.service-card:hover::before { transform: scaleX(1); }

.service-icon {
    width: 54px;              /* was 64px */
    height: 54px;
    border-radius: var(--radius-md);
    background: var(--color-primary-light);
    color: var(--color-primary);
    display: grid;
    place-items: center;
    font-size: 22px;          /* was 26px */
    margin-bottom: 20px;
    transition: all 0.4s var(--ease);
}

.service-card:hover .service-icon {
    background: var(--gradient-primary);
    color: white;
    transform: rotate(-8deg) scale(1.05);
}

.service-card h3 {
    font-size: 16px;          /* was 19px */
    margin-bottom: 10px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.service-card p {
    font-size: 13.5px;        /* was 14.5px */
    color: var(--color-text-light);
    line-height: 1.65;
}

/* ---------- Gallery ---------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    background: var(--gradient-soft);
}

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

.gallery-item .placeholder {
    display: grid;
    place-items: center;
    background: var(--gradient-primary);
    color: white;
    font-size: 60px;
}

.gallery-item:hover img,
.gallery-item:hover .placeholder { transform: scale(1.08); }

.gallery-item::after {
    content: '\f00e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(8,145,178,0.85);
    color: white;
    font-size: 30px;
    opacity: 0;
    transition: opacity 0.3s var(--ease);
}

.gallery-item:hover::after { opacity: 1; }

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.95);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.lightbox.active { display: flex; }

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    color: var(--color-dark);
    font-size: 20px;
    display: grid;
    place-items: center;
}

/* ---------- Appointment Form ---------- */
.appointment-section {
    background:
        linear-gradient(135deg, rgba(8,145,178,0.03), rgba(20,184,166,0.04)),
        var(--color-bg-alt);
}

.appointment-wrap {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 60px;
    align-items: start;
}

.appointment-info {
    background: var(--gradient-primary);
    color: white;
    padding: 48px 40px;
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.appointment-info::before {
    content: '\f5c9';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    bottom: -40px;
    right: -40px;
    font-size: 220px;
    opacity: 0.1;
}

.appointment-info h3 {
    color: white;
    font-size: 22px;          /* was 26px */
    margin-bottom: 14px;
    position: relative;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.appointment-info p {
    opacity: 0.92;
    margin-bottom: 24px;
    position: relative;
    font-size: 13.5px;
}

.info-list {
    display: grid;
    gap: 16px;
    position: relative;
}

.info-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13.5px;        /* was 14.5px */
}

.info-list .ico {
    width: 36px;              /* was 40px */
    height: 36px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-size: 13px;
}

.info-list strong { display: block; font-weight: 600; font-size: 13.5px; }
.info-list span { opacity: 0.85; font-size: 12.5px; }    /* was 13.5px */

.form-card {
    background: white;
    padding: 32px;            /* was 40px */
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

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

.form-group label {
    display: block;
    font-size: 12.5px;        /* was 13.5px */
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 11px 14px;       /* was 14px 16px */
    font-family: inherit;
    font-size: 14px;          /* was 15px */
    color: var(--color-dark);
    background: var(--color-bg-alt);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all 0.2s var(--ease);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(8,145,178,0.12);
}

textarea.form-control {
    resize: vertical;
    min-height: 90px;
}

/* ---------- Contact ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 48px;
}

.contact-cards {
    display: grid;
    gap: 20px;
}

.contact-card {
    background: white;
    padding: 22px 24px;       /* was 28px */
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    display: flex;
    gap: 16px;
    align-items: flex-start;
    transition: all 0.3s var(--ease);
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.contact-card .ico {
    width: 44px;              /* was 52px */
    height: 44px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 17px;          /* was 20px */
    flex-shrink: 0;
}

.contact-card h4 {
    font-size: 15px;          /* was 16px */
    margin-bottom: 4px;
    font-weight: 600;
}

.contact-card p, .contact-card a {
    font-size: 13.5px;        /* was 14.5px */
    color: var(--color-text-light);
    line-height: 1.6;
}

.map-wrap {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    height: 100%;
    min-height: 420px;
    border: 1px solid var(--color-border);
}

.map-wrap iframe {
    width: 100%;
    height: 100%;
    min-height: 420px;
    border: 0;
    display: block;
}

/* ---------- Footer ---------- */
.footer {
    background: var(--color-dark);
    color: rgba(255,255,255,0.7);
    padding: 80px 0 0;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 48px;
    margin-bottom: 56px;
}

.footer h5 {
    color: white;
    font-size: 14px;          /* was 16px */
    margin-bottom: 18px;
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.footer-brand p {
    font-size: 13.5px;        /* was 14.5px */
    margin: 14px 0 18px;
    line-height: 1.65;
}

.footer .logo { color: white; }
.footer .logo small { color: var(--color-secondary); }

.footer-links { display: grid; gap: 10px; }

.footer-links a {
    color: rgba(255,255,255,0.7);
    font-size: 13.5px;        /* was 14.5px */
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s var(--ease);
}

.footer-links a:hover {
    color: white;
    transform: translateX(4px);
}

.footer-contact li {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 13px;          /* was 14px */
    align-items: flex-start;
}

.footer-contact i {
    color: var(--color-secondary);
    margin-top: 4px;
    width: 16px;
}

.socials {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.socials a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: white;
    display: grid;
    place-items: center;
    transition: all 0.3s var(--ease);
}

.socials a:hover {
    background: var(--gradient-primary);
    transform: translateY(-3px);
}

.footer-bottom {
    padding: 24px 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13.5px;
}

/* ---------- Floating Buttons ---------- */
.floating-btns {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 900;
}

.float-btn {
    width: 46px;              /* was 54px */
    height: 46px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: white;
    font-size: 18px;          /* was 22px */
    box-shadow: var(--shadow-lg);
    transition: all 0.3s var(--ease);
    position: relative;
}

.float-btn:hover {
    transform: scale(1.1);
    color: white;
}

.float-btn.whatsapp { background: #25D366; }
.float-btn.emergency { background: var(--color-danger); animation: ringPulse 2s infinite; }
.float-btn.scroll-top {
    background: var(--gradient-primary);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
}

.float-btn.scroll-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

@keyframes ringPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.6), var(--shadow-lg); }
    50%      { box-shadow: 0 0 0 12px rgba(239,68,68,0), var(--shadow-lg); }
}

/* ---------- Loader ---------- */
.preloader {
    position: fixed;
    inset: 0;
    background: white;
    z-index: 9999;
    display: grid;
    place-items: center;
    transition: opacity 0.5s var(--ease), visibility 0.5s var(--ease);
}

.preloader.done {
    opacity: 0;
    visibility: hidden;
}

.loader {
    text-align: center;
}

.loader-tooth {
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%;
    display: grid;
    place-items: center;
    color: white;
    font-size: 30px;
    margin: 0 auto 16px;
    animation: toothBeat 1.2s ease-in-out infinite;
}

@keyframes toothBeat {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.1); }
}

.loader-text {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--color-primary);
    letter-spacing: 0.08em;
    font-size: 13px;
    text-transform: uppercase;
}

/* ---------- Page banner ---------- */
.page-banner {
    padding: 160px 0 80px;
    background:
        radial-gradient(ellipse at top right, #e0f7fa 0%, transparent 50%),
        radial-gradient(ellipse at bottom left, #f0fdfa 0%, transparent 50%),
        #fafffe;
    position: relative;
    overflow: hidden;
}

.page-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(8,145,178,0.06) 1px, transparent 0);
    background-size: 24px 24px;
}

.page-banner-content {
    text-align: center;
    position: relative;
}

.page-banner h1 {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    margin-bottom: 12px;
}

.breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    background: white;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
    font-size: 13.5px;
    color: var(--color-text-light);
}

.breadcrumb a { color: var(--color-primary); font-weight: 500; }
.breadcrumb .sep { color: var(--color-muted); }

/* ---------- Alerts ---------- */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 4px solid;
}

.alert-success { background: #ecfdf5; color: #065f46; border-color: var(--color-success); }
.alert-error   { background: #fef2f2; color: #991b1b; border-color: var(--color-danger); }
.alert-info    { background: #eff6ff; color: #1e40af; border-color: var(--color-info); }

/* ---------- Reveal Animation ---------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.in {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   RESPONSIVE — Mobile-first refinements
   Breakpoints: 1024px (tablet), 768px (small tablet),
                640px (large phone), 480px (phone), 380px (small phone)
   ============================================================ */

/* ---------- Tablet (≤ 1024px) ---------- */
@media (max-width: 1024px) {
    .container { padding: 0 20px; }

    .hero-grid,
    .about-grid,
    .appointment-wrap,
    .contact-grid { grid-template-columns: 1fr; gap: 48px; }

    .hero-visual { max-width: 480px; margin: 0 auto; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }

    /* Compact dropdown menu from top-right of navbar */
    .navbar .nav-menu {
        position: absolute;
        top: calc(100% + 8px);
        right: 16px;
        left: auto;
        bottom: auto;
        width: 240px;
        max-width: calc(100vw - 32px);
        height: auto;
        max-height: calc(100vh - 100px);

        /* Glassmorphism */
        background: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(24px) saturate(180%);
        -webkit-backdrop-filter: blur(24px) saturate(180%);
        border: 1px solid rgba(255, 255, 255, 0.6);

        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 10px;
        border-radius: 16px;
        box-shadow:
            0 20px 50px rgba(15, 23, 42, 0.15),
            0 4px 12px rgba(15, 23, 42, 0.06);

        /* Initially hidden (opacity + transform for smooth open) */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px) scale(0.96);
        transform-origin: top right;
        transition:
            opacity 0.22s var(--ease),
            transform 0.22s var(--ease),
            visibility 0.22s;

        overflow-y: auto;
        z-index: 999;
        margin: 0;
        list-style: none;
    }

    .navbar .nav-menu.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
    }

    .navbar .nav-menu li {
        width: 100%;
        list-style: none;
    }

    .navbar .nav-menu .nav-link {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        padding: 11px 14px;
        font-size: 14.5px;
        font-weight: 500;
        border-radius: 10px;
        text-align: left;
        color: var(--color-text);
        transition: all 0.18s ease;
    }

    .navbar .nav-menu .nav-link:hover,
    .navbar .nav-menu .nav-link.active {
        background: var(--color-primary-light);
        color: var(--color-primary);
    }

    /* Light backdrop — subtle, doesn't dim the whole page heavily */
    body.menu-open::after {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.18);
        z-index: 997;
        opacity: 1;
        animation: fadeIn 0.22s ease;
        pointer-events: none;
    }

    /* No scroll lock — user can still see the page behind the dropdown */
    .nav-cta { margin: 6px 0 0; padding-top: 6px; border-top: 1px solid rgba(0,0,0,0.06); }
    .nav-cta .btn { width: 100%; justify-content: center; }
    .menu-toggle { display: grid; }

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

/* ---------- Small tablet (≤ 768px) ---------- */
@media (max-width: 768px) {
    body { font-size: 15px; line-height: 1.65; }

    .container { padding: 0 18px; }

    /* Tighter heading sizes */
    .hero h1 { font-size: clamp(1.85rem, 7vw, 2.5rem); line-height: 1.15; }
    .section-title { font-size: clamp(1.55rem, 5vw, 2rem); }

    .hero { padding: 100px 0 60px; min-height: auto; }
    .hero-desc { font-size: 15px; }

    .section { padding: 64px 0; }
    .section-head { margin-bottom: 40px; }
    .section-desc { font-size: 15px; }

    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 18px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 16px;
    }

    .about-badge { padding: 18px 20px; bottom: -16px; right: -16px; }
    .about-badge .num { font-size: 32px; }

    .form-card { padding: 28px 22px; }
    .appointment-info { padding: 36px 28px; }
}

/* ---------- Large phone (≤ 640px) ---------- */
@media (max-width: 640px) {
    body { font-size: 14px; line-height: 1.6; }

    .container { padding: 0 16px; }

    /* Compact navbar */
    .navbar { padding: 10px 0; }
    .navbar.scrolled { padding: 8px 0; }
    .nav-wrapper { gap: 12px; }
    .logo { font-size: 16px; gap: 9px; }
    .logo-mark { width: 36px; height: 36px; font-size: 16px; border-radius: 11px; }
    .logo-text small { font-size: 9.5px; letter-spacing: 0.06em; }
    .menu-toggle { width: 36px; height: 36px; font-size: 13px; }
    .theme-toggle { width: 36px; height: 36px; font-size: 13px; }

    /* Hero — mobile (premium breathing room) */
    .hero { padding: 110px 0 50px; }       /* was 80px 0 40px — much more top gap after navbar */
    .hero h1 {
        font-size: 28px;
        line-height: 1.18;
        margin-bottom: 18px;                /* was 12px — more gap before slogan */
        letter-spacing: -0.025em;
        font-weight: 800;
    }
    .hero-slogan {
        font-size: 14px;
        margin-bottom: 16px;                /* was 12px */
    }
    .hero-desc {
        font-size: 13.5px;
        margin-bottom: 30px;                /* was 22px — generous gap before buttons */
        max-width: none;
        line-height: 1.65;
    }
    .hero-eyebrow {
        font-size: 10px;
        padding: 5px 12px;
        margin-bottom: 22px;                /* was 16px — gap before headline */
        letter-spacing: 0.08em;
    }
    .hero-eyebrow .dot { width: 6px; height: 6px; }

    /* CTAs stay SIDE-BY-SIDE on mobile */
    .hero-cta {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 10px;
        margin-bottom: 32px;                /* was 24px — gap before stats */
        align-items: stretch;
    }
    .hero-cta .btn {
        flex: 1 1 0;
        min-width: 0;
        padding: 11px 12px;
        font-size: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        justify-content: center;
    }

    /* Stat cards as 3-column grid */
    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    .stat-card-mini { padding: 11px 10px; border-radius: 12px; }
    .stat-card-mini .stat-num { font-size: 17px; margin-bottom: 3px; }
    .stat-card-mini .stat-label { font-size: 9px; letter-spacing: 0.08em; }

    /* Image: full width on mobile, with proper gap above */
    .hero-visual { max-width: none; margin: 40px 0 0; }
    .hero-image { aspect-ratio: 4 / 3; border-radius: 18px; }
    .hero-image-empty { aspect-ratio: 4 / 3; }
    .hero-empty-icon { width: 52px; height: 52px; font-size: 22px; margin-bottom: 12px; }
    .hero-empty-content h4 { font-size: 15px; }
    .hero-empty-content p { font-size: 12px; }

    /* Floating badges on mobile - smaller, inside the image */
    .floating-badge {
        padding: 8px 11px;
        gap: 8px;
        border-radius: 11px;
    }
    .floating-badge .ico { width: 28px; height: 28px; font-size: 12px; border-radius: 8px; }
    .floating-badge strong { font-size: 11px; }
    .floating-badge span { font-size: 9.5px; }

    /* Position 3 badges INSIDE the image on mobile, no overflow */
    .floating-badge-1 { top: 12px;    left: 12px;   right: auto; }
    .floating-badge-2 {
        top: 50%;
        right: 12px;
        left: auto;
        transform: translateY(-50%);
        animation: floaty-centered 4s ease-in-out infinite;
    }
    .floating-badge-3 { bottom: 12px; left: 12px;   right: auto; }

    /* Buttons */
    .btn { padding: 11px 22px; font-size: 13.5px; }
    .btn-lg { padding: 13px 26px; font-size: 14px; }
    .btn-sm { padding: 8px 16px; font-size: 12.5px; }

    /* Sections */
    .section { padding: 48px 0; }
    .section-head { margin-bottom: 32px; }
    .section-title {
        font-size: 1.5rem;             /* 24px */
        line-height: 1.2;
        margin-bottom: 12px;
    }
    .section-desc { font-size: 13.5px; line-height: 1.6; }
    .section-eyebrow {
        font-size: 10px;
        padding: 4px 12px;
        margin-bottom: 10px;
        letter-spacing: 0.1em;
    }

    /* About */
    .about-content .section-head { margin-bottom: 20px; }
    .about-image { aspect-ratio: 4/3; }   /* Less tall on mobile */
    .doctor-card {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 22px 18px;
        gap: 14px;
        margin-top: 20px;
    }
    .doctor-avatar { margin: 0 auto; width: 64px; height: 64px; font-size: 26px; }
    .doctor-card h4 { font-size: 16px; }
    .doctor-card .quals { font-size: 13px; }
    .about-badge {
        position: static;
        margin: 14px auto 0;
        display: inline-flex;
        padding: 14px 18px;
    }
    .about-badge .num { font-size: 24px; }
    .about-badge .lbl { font-size: 11.5px; line-height: 1.3; }

    .feature-list { gap: 10px; margin-top: 20px; }
    .feature-list li { font-size: 13.5px; gap: 10px; }
    .feature-list .check { width: 20px; height: 20px; font-size: 10px; }

    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .service-card { padding: 22px 18px; }
    .service-card h3 { font-size: 15.5px; margin-bottom: 8px; }
    .service-card p { font-size: 13.5px; line-height: 1.6; }
    .service-icon {
        width: 48px; height: 48px;
        font-size: 19px;
        margin-bottom: 14px;
        border-radius: 11px;
    }

    /* Gallery */
    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .gallery-item .placeholder { font-size: 36px; }
    .gallery-item { border-radius: 10px; }

    /* Appointment */
    .appointment-info { padding: 26px 20px; }
    .appointment-info h3 { font-size: 18px; margin-bottom: 10px; }
    .appointment-info p { font-size: 13.5px; margin-bottom: 22px; }
    .info-list { gap: 14px; }
    .info-list li { font-size: 13px; gap: 10px; }
    .info-list .ico { width: 32px; height: 32px; font-size: 12px; border-radius: 9px; }
    .info-list strong { font-size: 13.5px; }
    .info-list span { font-size: 12.5px; }

    .form-card { padding: 20px 16px; }
    .form-row { grid-template-columns: 1fr; gap: 0; margin-bottom: 0; }
    .form-group { margin-bottom: 14px; }
    .form-group label { font-size: 12.5px; margin-bottom: 6px; }
    .form-control { padding: 11px 13px; border-radius: 10px; }
    textarea.form-control { min-height: 90px; }

    /* Contact */
    .contact-grid { gap: 28px; }
    .contact-cards { gap: 12px; }
    .contact-card { padding: 18px 16px; gap: 12px; }
    .contact-card .ico { width: 40px; height: 40px; font-size: 15px; border-radius: 11px; }
    .contact-card h4 { font-size: 14px; margin-bottom: 4px; }
    .contact-card p, .contact-card a { font-size: 13px; }
    .map-wrap, .map-wrap iframe { min-height: 280px; border-radius: 14px; }

    /* Footer */
    .footer { padding: 48px 0 0; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; margin-bottom: 32px; }
    .footer h5 { font-size: 14px; margin-bottom: 14px; }
    .footer-brand p { font-size: 13.5px; margin: 12px 0 16px; }
    .footer-links { gap: 10px; }
    .footer-links a, .footer-contact li { font-size: 13.5px; }
    .footer-contact li { margin-bottom: 10px; }
    .socials a { width: 36px; height: 36px; font-size: 14px; }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 6px;
        font-size: 12px;
        padding: 18px 0;
    }

    /* Floating buttons - smaller on mobile */
    .floating-btns { right: 14px; bottom: 14px; gap: 8px; }
    .float-btn { width: 42px; height: 42px; font-size: 15px; }
}

/* ---------- Phone (≤ 480px) ---------- */
@media (max-width: 480px) {
    body { font-size: 14px; }

    .container { padding: 0 14px; }

    .navbar { padding: 10px 0; }
    .logo { font-size: 16px; }
    .logo-mark { width: 36px; height: 36px; font-size: 16px; }
    .logo-text small { font-size: 9.5px; letter-spacing: 0.06em; }

    .nav-menu {
        top: 64px;
        width: calc(100vw - 32px);
        max-width: 320px;
    }

    /* Hero very compact */
    .hero { padding: 75px 0 36px; }
    .hero h1 { font-size: 26px; }
    .hero-desc { font-size: 13px; }
    .hero-visual { margin-top: 22px; }
    .hero-image { aspect-ratio: 4 / 3; border-radius: 16px; }
    .hero-image-empty { aspect-ratio: 4 / 3; }
    .hero-stats { gap: 6px; }
    .stat-card-mini { padding: 9px 10px; }
    .stat-card-mini .stat-num { font-size: 16px; }
    .stat-card-mini .stat-label { font-size: 9px; }

    .hero-cta { gap: 8px; }
    .hero-cta .btn { padding: 10px 10px; font-size: 12px; }

    .floating-badge { padding: 7px 10px; gap: 7px; }
    .floating-badge .ico { width: 24px; height: 24px; font-size: 10px; }
    .floating-badge strong { font-size: 10.5px; }
    .floating-badge span { font-size: 9px; }
    .floating-badge-2 { display: none; }   /* hide middle badge on very small phones — image gets too crowded */
    .floating-badge-1 { top: 10px; left: 10px; }
    .floating-badge-3 { bottom: 10px; right: 10px; left: auto; }

    .section { padding: 48px 0; }
    .section-head { margin-bottom: 32px; }
    .section-title { font-size: clamp(1.3rem, 6vw, 1.6rem); }
    .section-desc { font-size: 13.5px; }

    .service-card { padding: 24px 20px; }
    .gallery-grid { gap: 8px; }
    .gallery-item { border-radius: 10px; }

    .appointment-info,
    .form-card { padding: 22px 16px; }
    .appointment-info h3 { font-size: 19px; }

    .contact-card { padding: 18px 16px; }

    .float-btn { width: 44px; height: 44px; font-size: 17px; }

    /* Lightbox close button position */
    .lightbox-close { top: 14px; right: 14px; width: 40px; height: 40px; font-size: 16px; }
}

/* ---------- Very small phone (≤ 380px) ---------- */
@media (max-width: 380px) {
    body { font-size: 13.5px; }

    .container { padding: 0 12px; }

    .logo-text small { display: none; }
    .logo { font-size: 15px; }

    .hero h1 { font-size: 1.45rem; }
    .hero-stats { padding-top: 16px; }
    .stat-num { font-size: 17px; }

    .section-title { font-size: 1.3rem; }

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

    .floating-btns { gap: 8px; }
}

/* ---------- Landscape phone (height-constrained) ---------- */
@media (max-height: 500px) and (orientation: landscape) {
    .hero { min-height: auto; padding: 90px 0 40px; }
    .preloader .loader-tooth { width: 50px; height: 50px; font-size: 22px; }
}

/* ---------- Prevent iOS form zoom: inputs must be ≥16px ---------- */
@media (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    input[type="date"],
    input[type="time"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px;   /* CRITICAL: iOS zooms in if <16px */
    }
}
