:root {
    /* Premium Clinical Palette */
    --primary: #0066FF;
    --primary-dark: #0052cc;
    --primary-glow: rgba(0, 102, 255, 0.08);
    --secondary: #0a192f; /* Deep Clinical Blue */
    --accent: #00C7BE;
    
    /* Backgrounds & Surfaces */
    --background: #fcfdfe;
    --surface: #ffffff;
    --surface-muted: #f8fafc;
    
    /* Text Hierarchy */
    --on-surface: #0f172a;
    --on-surface-variant: #475569;
    --on-surface-muted: #94a3b8;
    
    /* System Tokens */
    --transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 30px 60px -12px rgba(0, 0, 0, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--background);
    color: var(--on-surface);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    padding-bottom: 70px; /* Space for mobile nav */
}

@media (min-width: 769px) {
    body { padding-bottom: 0; }
}

/* Typography Hierarchy - Mobile First */
h1, h2, h3, h4 {
    font-family: 'Manrope', sans-serif;
    color: var(--secondary);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

h1 { font-size: clamp(2rem, 8vw, 2.25rem); margin-bottom: 1rem; }
h2 { font-size: 1.75rem; margin-bottom: 1.25rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.1rem; }

@media (min-width: 768px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2.5rem; }
    h3 { font-size: 1.6rem; }
    h4 { font-size: 1.25rem; }
}

@media (min-width: 1024px) {
    h1 { font-size: 3.5rem; }
}

.label-caps {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--primary);
    margin-bottom: 1rem;
    display: block;
}

/* Layout System */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.25rem; /* Tighter padding for mobile */
}

@media (min-width: 768px) {
    .container { padding: 0 2.5rem; }
}

section {
    padding: 3.5rem 0;
}

@media (min-width: 768px) {
    section { padding: 6rem 0; }
}

/* Responsive Grid System */
.grid-12 {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.25rem;
}

.col-12 { grid-column: span 12; }
.col-6 { grid-column: span 12; }
.col-4 { grid-column: span 12; }
.col-3 { grid-column: span 12; }

@media (min-width: 768px) {
    .grid-12 { gap: 2rem; }
    .col-6-md { grid-column: span 6; }
    .col-4-md { grid-column: span 4; }
    .col-3-md { grid-column: span 3; }
    
    .col-6 { grid-column: span 6; }
    .col-4 { grid-column: span 4; }
    .col-3 { grid-column: span 3; }
}

@media (min-width: 1024px) {
    .col-3-lg { grid-column: span 3; }
}

/* Component Utilities Continued */
.star-rating { color: #FFB800; display: flex; gap: 4px; margin-bottom: 1.5rem; }
.avatar { width: 44px; height: 44px; background: var(--primary-glow); color: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1rem; flex-shrink: 0; }
.bio-text { line-height: 1.8; color: var(--on-surface-variant); font-size: 1rem; }
.radial-container { margin: 0 auto 1.5rem; }

/* Header & Navigation */
header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.75rem 0;
}

.header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap; /* Allow wrapping in desktop-mode-on-mobile */
}

.logo-link {
    flex-shrink: 0;
}

.nav-links {
    display: none; /* Hidden on mobile */
    gap: 0.75rem;
    margin-right: auto;
    margin-left: 1rem;
}

@media (min-width: 769px) {
    .nav-links { display: flex; }
}

.nav-links a {
    text-decoration: none;
    color: var(--on-surface-variant);
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
    padding: 0.5rem 0.8rem;
    border-radius: 99px;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.8rem 1.5rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: inherit;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 8px 16px var(--primary-glow);
}

.btn-secondary {
    background: var(--surface-muted);
    color: var(--on-surface);
    border: 1px solid rgba(0,0,0,0.05);
}

.btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

/* Hero Section */
.hero {
    padding-top: 2rem;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .hero-grid { grid-template-columns: 1.2fr 1fr; gap: 5rem; }
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-glow);
    color: var(--primary);
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    margin-bottom: 1.5rem;
    white-space: nowrap; /* Prevent wrapping of badge text */
    flex-shrink: 0;
}

.hero-content {
    text-align: center;
    min-width: 0; /* Prevents grid items from overflowing if content is long */
}

@media (min-width: 1024px) {
    .hero-content { text-align: left; }
}

.hero-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2.5rem;
}

@media (min-width: 1024px) {
    .hero-btns { justify-content: flex-start; }
}

.hero-image-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    aspect-ratio: 4/5;
    background: #eef2f6;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

@media (min-width: 1024px) {
    .hero-image-wrapper { aspect-ratio: 1; }
}

.hero-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.doctor-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    padding: 1.25rem;
    border-top: 1px solid rgba(0, 102, 255, 0.1);
}

.badge-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

/* Trust Bar / Stats Grid */
.trust-bar {
    padding: 2.5rem 0;
    background: var(--surface-muted);
}

.trust-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 640px) {
    .trust-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .trust-grid { grid-template-columns: repeat(4, 1fr); }
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.02);
}

.trust-item .material-symbols-outlined {
    font-size: 2rem;
    color: var(--primary);
    background: var(--primary-glow);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
}

/* Cards & Services */
.card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.04);
    transition: var(--transition);
}

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

.card-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-glow);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
}

.grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Tag System */
.tag-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.tag {
    font-size: 0.7rem;
    background: var(--primary-glow);
    padding: 0.3rem 0.7rem;
    border-radius: 99px;
    font-weight: 700;
    color: var(--primary);
}

/* Contact & Forms */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 1024px) {
    .contact-grid { grid-template-columns: 1.2fr 1fr; gap: 5rem; }
}

.info-item {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.form-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0,0,0,0.05);
}

.input-group {
    margin-bottom: 1.25rem;
}

.input-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--on-surface-variant);
}

.input-group input, .input-group select, .input-group textarea {
    width: 100%;
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0,0,0,0.1);
    background: var(--surface-muted);
    font-family: inherit;
    font-size: 0.95rem;
}

/* Component Utilities */
.logo-img { height: 40px; width: auto; display: block; border-radius: 8px; }
@media (min-width: 768px) { .logo-img { height: 50px; } }

.cta-btn { display: none; }
@media (min-width: 640px) { 
    .cta-btn { 
        display: inline-flex; 
        font-size: 0.75rem; 
        padding: 0.5rem 1rem; 
    } 
}
@media (min-width: 1024px) {
    .cta-btn {
        font-size: 0.85rem;
        padding: 0.6rem 1.2rem;
    }
}

.doctor-name { font-size: 0.7em; color: var(--primary); display: block; margin-top: 0.5rem; }
.hero-tagline { 
    color: var(--on-surface-variant); 
    font-size: 1rem; 
    margin-bottom: 2rem; 
    max-width: 600px; 
    margin-left: auto; 
    margin-right: auto;
    overflow-wrap: break-word;
    word-wrap: break-word;
    white-space: normal;
}
@media (min-width: 769px) { 
    .hero-tagline { font-size: 1.15rem; }
}
@media (min-width: 1024px) {
    .hero-tagline { margin-left: 0; margin-right: 0; }
}

.section-header { text-align: center; margin-bottom: 3rem; }
@media (min-width: 768px) { .section-header { margin-bottom: 5rem; } }

.section-desc { color: var(--on-surface-variant); max-width: 600px; margin: 1rem auto; font-size: 0.95rem; }
@media (min-width: 768px) { .section-desc { font-size: 1.1rem; } }

.info-list { display: grid; gap: 1.5rem; }
.info-text h4 { font-size: 1rem; margin-bottom: 0.25rem; }
.info-text p { color: var(--on-surface-variant); font-size: 0.9rem; }

.full-width { width: 100%; }
.select-field { cursor: pointer; appearance: none; background-color: var(--surface-muted); }

.timings-card { margin-bottom: 2rem; }
.timings-list { display: grid; gap: 0.75rem; }
.timing-row { display: flex; justify-content: space-between; padding-bottom: 0.75rem; border-bottom: 1px solid rgba(0,0,0,0.05); font-size: 0.9rem; }
.timing-row span:last-child { font-weight: 700; color: var(--secondary); }
.timing-row.sunday span:last-child { color: #ff5252; }

.map-wrapper { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); border: 1px solid rgba(0,0,0,0.05); }

/* About & Profile Section */
.profile-section { margin-bottom: 4rem; }
@media (min-width: 1024px) { .profile-section { margin-bottom: 8rem; } }

.doctor-qualifications { color: var(--on-surface-variant); font-weight: 700; margin-bottom: 2rem; }

.philosophy-card { background: var(--primary); color: white; margin-bottom: 3rem; }
.philosophy-card h3 { color: white; margin-bottom: 2rem; }
.phil-item { display: flex; flex-direction: column; gap: 1rem; }
.phil-item .material-symbols-outlined { font-size: 2.5rem; opacity: 0.8; }
.phil-item p { line-height: 1.7; opacity: 0.9; font-size: 1rem; }

.spec-card { display: flex; flex-direction: column; align-items: center; text-align: center; }
.radial-svg { transform: rotate(-90deg); }
.radial-progress { transition: stroke-dashoffset 2s ease-out; }
.radial-content { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.radial-icon { font-size: 1.5rem; color: var(--primary); opacity: 0.4; margin-bottom: -0.2rem; }
.radial-value { font-weight: 800; color: var(--on-surface); font-size: 1.1rem; }

/* Testimonials */
.testimonial-card { display: flex; flex-direction: column; }
.star-icon { font-variation-settings: 'FILL' 1; font-size: 1.2rem; }
.testimonial-text { font-style: italic; margin-bottom: 2rem; color: var(--on-surface); line-height: 1.7; font-size: 1rem; }
.testimonial-author { border-top: 1px solid rgba(0,0,0,0.05); padding-top: 1.5rem; display: flex; align-items: center; gap: 1rem; margin-top: auto; }
.author-name { font-weight: 700; color: var(--on-surface); }
.author-role { font-size: 0.65rem; color: var(--on-surface-variant); margin-bottom: 0; }

/* Gallery */
.gallery-card { padding: 0; overflow: hidden; aspect-ratio: 16/10; cursor: pointer; }
.gallery-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: var(--transition); }
.gallery-card:hover .gallery-img { transform: scale(1.05); }

/* Health Tips & Education */
.grid-margin-bottom { margin-bottom: 4rem; }
@media (min-width: 768px) { .grid-margin-bottom { margin-bottom: 8rem; } }

.education-block { background: var(--secondary); border-radius: var(--radius-lg); padding: 3rem 1.5rem; color: white; margin-bottom: 4rem; }
@media (min-width: 768px) { .education-block { padding: 5rem; margin-bottom: 8rem; } }

.label-primary { color: var(--primary) !important; }
.text-white { color: white !important; }

.glass-dark { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); }
.myth-title { color: #FF5252; margin-bottom: 1rem; }
.fact-title { color: var(--accent); margin-bottom: 1rem; }
.myth-desc { color: rgba(255,255,255,0.6); line-height: 1.6; font-size: 0.9rem; }

.large-cards { margin-bottom: 4rem; }
@media (min-width: 768px) { .large-cards { margin-bottom: 8rem; } }

.optimization-card { padding: 2rem; }
@media (min-width: 768px) { .optimization-card { padding: 3rem; } }

.flex-row { display: flex; flex-direction: column; gap: 1.5rem; align-items: flex-start; }
@media (min-width: 640px) { .flex-row { flex-direction: row; gap: 2rem; } }

.optimization-content h4 { font-size: 1.15rem; margin-bottom: 1rem; }

.card-text { color: var(--on-surface-variant); font-size: 0.95rem; line-height: 1.6; }

/* Footer Modernization */
.logo-img-footer { height: 45px; width: auto; margin-bottom: 1.5rem; border-radius: 8px; filter: brightness(1.2); }
.footer-desc { color: rgba(255,255,255,0.6); margin: 1.5rem 0; max-width: 400px; font-size: 0.9rem; }

.social-links { display: flex; gap: 1rem; margin-top: 1.5rem; }
.social-link { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; transition: transform 0.3s ease; }
.social-link:hover { transform: scale(1.1); }
.social-link.facebook { background: #1877F2; }
.social-link.instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.social-link.youtube { background: #FF0000; }

.address-label { color: white; font-size: 0.8rem; letter-spacing: 0.1em; margin-top: 1.5rem; margin-bottom: 0.75rem; opacity: 0.8; font-weight: 800; }
.footer-address { color: rgba(255,255,255,0.5); font-size: 0.9rem; line-height: 1.6; margin-bottom: 1.5rem; }
.footer-phone { color: white; text-decoration: none; font-weight: 700; display: block; margin-bottom: 0.5rem; }
.footer-email { color: var(--primary); text-decoration: none; font-weight: 600; font-size: 0.9rem; }

.footer-bottom { padding-top: 3rem; border-top: 1px solid rgba(255,255,255,0.05); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1.5rem; margin-top: 3rem; }
.copyright { color: rgba(255,255,255,0.3); font-size: 0.75rem; }
.developer { color: rgba(255,255,255,0.5); font-size: 0.8rem; }
.developer span { color: white; font-weight: 700; }

/* Footer */
footer {
    background: var(--secondary);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

@media (min-width: 640px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.5fr; }
}

.footer-brand p {
    color: rgba(255,255,255,0.6);
    margin: 1.5rem 0;
    max-width: 400px;
}

.footer-links-col h4 {
    margin-bottom: 1.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.4);
}

.footer-links-list {
    list-style: none;
    display: grid;
    gap: 1rem;
}

.footer-links-list a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
}

.footer-links-list a:hover {
    color: white;
}

/* Mobile Bottom Nav */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid rgba(0,0,0,0.05);
    z-index: 1000;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.05);
}

@media (min-width: 769px) {
    .mobile-bottom-nav { display: none !important; }
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
    color: var(--on-surface-variant);
    font-size: 0.65rem;
    font-weight: 700;
}

.mobile-nav-item .material-symbols-outlined { font-size: 1.5rem; }
.mobile-nav-item.active { color: var(--primary); }

/* Floating WhatsApp Widget */
.whatsapp-sidebar {
    position: fixed;
    right: 0;
    top: 40%;
    background: #25D366;
    color: white;
    padding: 0.8rem 0.5rem;
    border-radius: 12px 0 0 12px;
    text-decoration: none;
    z-index: 900;
    writing-mode: vertical-rl;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}


/* Animations handled by JS for better control */

/* Loader */
#loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

#loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.5s ease;
}

.heartbeat-icon {
    animation: heartbeat 2s infinite ease-in-out;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    10% { transform: scale(1.1); }
    20% { transform: scale(1); }
    30% { transform: scale(1.05); }
    40% { transform: scale(1); }
}

/* Lightbox */
#lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.9);
    display: none;
    align-items: center;
    justify-content: center;
}

#lightbox.active { display: flex; }
#lightbox img { max-width: 90%; max-height: 80%; border-radius: 12px; }
.lightbox-close { position: absolute; top: 1.5rem; right: 1.5rem; color: white; cursor: pointer; }
