/* ==========================================================================
   CSS Variables & Tokens
   ========================================================================== */
:root {
    /* Color Palette */
    --clr-primary: #0A2540; /* Deep Medical Blue */
    --clr-secondary: #00A896; /* Soft Teal Green */
    --clr-accent: #02C39A;
    --clr-bg: #FFFFFF;
    --clr-light: #F7F9FC;
    --clr-text: #334155;
    --clr-text-light: #64748B;
    --clr-danger: #EF4444;
    --clr-border: #E2E8F0;

    /* Typography */
    --ff-main: 'Outfit', sans-serif;
    
    /* Fluid Sizing (Mobile First) */
    --fs-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    --fs-h1: clamp(2rem, 1.5rem + 2.5vw, 3.5rem);
    --fs-h2: clamp(1.75rem, 1.4rem + 1.75vw, 2.5rem);
    --fs-h3: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
    
    /* Spacing */
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;
    --section-pad: clamp(3rem, 2rem + 5vw, 6rem);
    
    /* Box Shadow */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius: 12px;
}

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

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

body {
    font-family: var(--ff-main);
    background-color: var(--clr-bg);
    color: var(--clr-text);
    line-height: 1.6;
    font-size: var(--fs-base);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--ff-main);
    color: var(--clr-primary);
    line-height: 1.2;
    margin-bottom: var(--space-md);
    font-weight: 700;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { margin-bottom: var(--space-md); }
a { text-decoration: none; color: var(--clr-secondary); transition: var(--transition); }
a:hover { color: var(--clr-primary); }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.section-padding { padding: var(--section-pad) 0; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.bg-light { background-color: var(--clr-light); }
.bg-primary { background-color: var(--clr-primary); color: white; }
.bg-primary h2, .bg-primary p { color: white; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }
.w-full { width: 100%; }

.section-title {
    text-align: center;
    margin-bottom: var(--space-xl);
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--clr-secondary);
    border-radius: 2px;
}
.section-title.text-left::after {
    left: 0;
    transform: none;
}

/* Grids */
.grid-2, .grid-3, .grid-4 {
    display: grid;
    gap: var(--space-lg);
}

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

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    text-align: center;
}

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

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

.btn-light {
    background-color: white;
    color: var(--clr-primary);
}
.btn-light:hover {
    background-color: var(--clr-light);
    color: var(--clr-primary);
}

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

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

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

.header.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-md);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--clr-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.logo i { color: var(--clr-danger); }
.logo span { color: var(--clr-secondary); }
.logo-img { height: 40px; width: auto; object-fit: contain; }

.mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--clr-primary);
    cursor: pointer;
}

.nav {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: white;
    padding: var(--space-md);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0); /* Hidden state */
    transition: clip-path 0.3s ease-in-out;
}

.nav.active {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.nav-link {
    color: var(--clr-text);
    font-weight: 500;
    display: block;
    padding: 0.5rem 0;
}
.nav-link:hover { color: var(--clr-secondary); }

.mobile-cta {
    margin-top: 1rem;
    width: 100%;
}

@media (min-width: 1024px) {
    .mobile-menu-toggle { display: none; }
    .nav {
        position: static;
        width: auto;
        background: transparent;
        padding: 0;
        box-shadow: none;
        flex-direction: row;
        align-items: center;
        gap: 2rem;
        clip-path: none;
    }
    .nav-list {
        flex-direction: row;
        gap: 2rem;
    }
    .mobile-cta { margin-top: 0; width: auto; }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    padding-top: 120px;
    padding-bottom: var(--section-pad);
    background: linear-gradient(to bottom, var(--clr-light), white);
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero h1 span { color: var(--clr-secondary); }
.hero p {
    font-size: 1.125rem;
    color: var(--clr-text-light);
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 3rem;
}

@media (min-width: 640px) {
    .hero-actions {
        flex-direction: row;
        justify-content: center;
    }
}

.trust-indicators {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 1.5rem;
    color: var(--clr-text-light);
    font-size: 0.9rem;
    font-weight: 500;
}
.trust-indicators i { color: var(--clr-secondary); margin-right: 0.25rem; }

/* ==========================================================================
   Cards (Trust, Services, Doctors)
   ========================================================================== */
.card {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--clr-border);
    transition: var(--transition);
    height: 100%;
}
.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
    border-color: var(--clr-secondary);
}

.card-icon {
    width: 60px;
    height: 60px;
    background-color: var(--clr-light);
    color: var(--clr-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}
.card:hover .card-icon {
    background-color: var(--clr-secondary);
    color: white;
}

/* ==========================================================================
   Patient Journey
   ========================================================================== */
.journey-steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
}

.journey-steps::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--clr-border);
    z-index: 0;
}

.step {
    position: relative;
    padding-left: 4rem;
    z-index: 1;
}

.step-number {
    position: absolute;
    left: 0;
    top: 0;
    width: 50px;
    height: 50px;
    background-color: var(--clr-secondary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    box-shadow: 0 0 0 6px white;
}

@media (min-width: 768px) {
    .journey-steps {
        flex-direction: row;
        justify-content: space-between;
    }
    .journey-steps::before {
        top: 24px;
        left: 0;
        right: 0;
        bottom: auto;
        height: 2px;
        width: 100%;
    }
    .step {
        padding-left: 0;
        padding-top: 4rem;
        text-align: center;
        flex: 1;
    }
    .step-number {
        left: 50%;
        transform: translateX(-50%);
    }
}

/* ==========================================================================
   Statistics
   ========================================================================== */
.stats-grid { text-align: center; }
.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--clr-secondary);
    line-height: 1;
    display: inline-block;
}
.stat-plus {
    font-size: 2rem;
    font-weight: 700;
    color: var(--clr-secondary);
}
.stat-label {
    font-size: 1.125rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

/* ==========================================================================
   Testimonials
   ========================================================================== */
.testimonial-card .stars {
    color: #F59E0B;
    margin-bottom: 1rem;
}
.testimonial-card .review {
    font-size: 1.125rem;
    font-style: italic;
    color: var(--clr-text);
}

/* ==========================================================================
   Doctors
   ========================================================================== */
.doctor-card { padding: 0; overflow: hidden; }
.doctor-image-placeholder {
    height: 250px;
    background-color: var(--clr-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--clr-text-light);
}
.doctor-info { padding: 1.5rem; }
.specialty { display: block; color: var(--clr-secondary); font-weight: 600; margin-bottom: 0.25rem; }
.experience { display: block; font-size: 0.875rem; color: var(--clr-text-light); margin-bottom: 1rem; }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq-container { max-width: 800px; margin: 0 auto; }
.faq-item {
    background: white;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.faq-question {
    width: 100%;
    text-align: left;
    padding: 1.5rem;
    background: none;
    border: none;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--clr-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-question i { transition: transform 0.3s; color: var(--clr-secondary); }
.faq-question[aria-expanded="true"] i { transform: rotate(180deg); }
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 1.5rem;
}
.faq-answer p { margin-bottom: 1.5rem; color: var(--clr-text-light); }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-wrapper {
    display: grid;
    gap: 3rem;
}
@media (min-width: 768px) {
    .contact-wrapper { grid-template-columns: 1fr 1fr; }
}
.contact-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.contact-list i { color: var(--clr-secondary); font-size: 1.25rem; width: 24px; text-align: center; }

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}
.form-group { margin-bottom: 1.5rem; }
.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid var(--clr-border);
    border-radius: 8px;
    font-family: inherit;
    transition: border-color 0.3s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--clr-secondary);
    box-shadow: 0 0 0 3px rgba(0, 168, 150, 0.1);
}

.map-placeholder {
    height: 400px;
    background-color: var(--clr-border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--clr-text-light);
}
.map-inner i { font-size: 3rem; margin-bottom: 1rem; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: #051320; /* Very dark blue */
    color: white;
    padding: 4rem 0 0;
}
.footer-grid {
    display: grid;
    gap: 3rem;
    margin-bottom: 3rem;
}
@media (min-width: 768px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

.footer-logo { color: white; }
.footer-logo span { color: var(--clr-secondary); }
.footer h4 { color: white; margin-bottom: 1.5rem; }
.footer ul li { margin-bottom: 0.75rem; }
.footer a { color: #CBD5E1; }
.footer a:hover { color: var(--clr-secondary); }
.footer-contact li { display: flex; gap: 0.75rem; color: #CBD5E1; }
.footer-contact i { color: var(--clr-secondary); margin-top: 0.25rem; }

.social-links { display: flex; gap: 1rem; }
.social-links a {
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.social-links a:hover { background-color: var(--clr-secondary); color: white; }

.footer-bottom {
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #94A3B8;
    font-size: 0.875rem;
}

/* ==========================================================================
   WhatsApp Floating Button
   ========================================================================== */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    animation: pulse 2s infinite;
    transition: transform 0.3s;
}
.whatsapp-float:hover {
    transform: scale(1.1);
    color: white;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ==========================================================================
   Animations (Intersection Observer)
   ========================================================================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
