/* ==========================================================================
   CSS Variables & Resets
   ========================================================================== */
:root {
    /* Brand Colors */
    --primary-blue: #1A73E8;
    --primary-light: #EBF4FB;
    --primary-dark: #0D47A1;
    --accent-blue: #4FC3F7;
    
    /* Neutral Colors */
    --white: #FFFFFF;
    --bg-light: #F8FAFC;
    --text-main: #334155;
    --text-muted: #64748B;
    --text-heading: #0F172A;
    --border-color: #E2E8F0;
    
    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Layout */
    --max-width: 1200px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    /* Shadows */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 25px -3px rgba(26, 115, 232, 0.05), 0 4px 6px -2px rgba(26, 115, 232, 0.03);
    --shadow-lg: 0 20px 30px -5px rgba(26, 115, 232, 0.08), 0 10px 10px -5px rgba(26, 115, 232, 0.04);
    
    /* Animations */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-heading);
    font-weight: 600;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

ul {
    list-style: none;
}

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

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

.section-padding {
    padding: 100px 0;
}

.text-center {
    text-align: center;
}

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

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-base);
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(26, 115, 232, 0.4);
    transform: translateY(-2px);
    color: var(--white);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary-blue);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
}

.btn-outline:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-large {
    padding: 16px 40px;
    font-size: 1.125rem;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition-base);
    background: transparent;
    padding: 24px 0;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 16px 0;
    box-shadow: var(--shadow-sm);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-weight: 500;
    position: relative;
    color: var(--text-heading);
}

.navbar:not(.scrolled) .nav-links a {
    color: var(--white);
}

.navbar:not(.scrolled) .logo {
    color: var(--white);
}

/* Handle subpages without hero image to have dark text initially */
body:not(:has(.hero)) .navbar:not(.scrolled) .nav-links a,
body:not(:has(.hero)) .navbar:not(.scrolled) .logo {
    color: var(--text-heading);
}
body:not(:has(.hero)) .navbar:not(.scrolled) .logo {
    color: var(--primary-blue);
}
body:not(:has(.hero)) .navbar {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--border-color);
}


.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-blue);
    transition: var(--transition-base);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.navbar:not(.scrolled) .nav-links a::after {
    background-color: var(--white);
}
body:not(:has(.hero)) .navbar:not(.scrolled) .nav-links a::after {
    background-color: var(--primary-blue);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-btn span {
    width: 30px;
    height: 2px;
    background-color: var(--primary-blue);
    transition: var(--transition-base);
}

.navbar:not(.scrolled) .mobile-menu-btn span {
    background-color: var(--white);
}
body:not(:has(.hero)) .navbar:not(.scrolled) .mobile-menu-btn span {
    background-color: var(--primary-blue);
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background: var(--white);
    z-index: 999;
    padding: 100px 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    transition: 0.4s cubic-bezier(0.8, 0, 0.2, 1);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu a {
    font-size: 1.25rem;
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--text-heading);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu a.btn {
    border: none;
    margin-top: 24px;
    font-size: 1rem;
    padding: 16px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#hero-canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 115, 232, 0.6) 0%, rgba(13, 71, 161, 0.8) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    max-width: 800px;
    padding: 0 24px;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 24px;
    color: var(--white);
}

.hero-content p {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* Floating Elements */
.floating-element {
    position: absolute;
    z-index: 2;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 6s ease-in-out infinite;
    border: 1px solid rgba(255,255,255,0.2);
}

.el-1 {
    top: 25%;
    left: 15%;
    width: 80px;
    height: 80px;
    animation-delay: 0s;
}

.el-2 {
    bottom: 20%;
    right: 15%;
    width: 100px;
    height: 100px;
    animation-delay: 2s;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* ==========================================================================
   Features Section
   ========================================================================== */
.features {
    padding: 80px 0;
    position: relative;
    z-index: 10;
    margin-top: -60px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition-base);
    border-bottom: 4px solid transparent;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-bottom-color: var(--primary-blue);
}

.feature-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 24px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
}

.feature-icon svg {
    width: 32px;
    height: 32px;
}

.feature-card:hover .feature-icon {
    background: var(--primary-blue);
}

.feature-card:hover .feature-icon svg {
    stroke: var(--white);
}

.feature-card h3 {
    margin-bottom: 16px;
    font-size: 1.25rem;
}

.feature-card p {
    color: var(--text-muted);
}

/* ==========================================================================
   Services Section
   ========================================================================== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 16px;
    position: relative;
    display: inline-block;
}

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

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

.service-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    padding: 40px 30px;
    border-radius: var(--radius-md);
    transition: var(--transition-base);
}

.service-card:hover {
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.service-icon svg {
    width: 28px;
    height: 28px;
}

.service-card h3 {
    margin-bottom: 16px;
    font-size: 1.25rem;
}

.service-card p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 0.95rem;
}

.service-link svg {
    transition: var(--transition-fast);
}

.service-link:hover svg {
    transform: translateX(4px);
}

/* Detailed Grid for Services Page */
.detailed-grid .service-card {
    background: var(--bg-light);
    border: none;
}
.detailed-grid .service-card .benefits {
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--text-main);
}

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

.image-wrapper {
    position: relative;
}

.image-wrapper img, .rounded-image {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    width: 100%;
}

.shadow-hover {
    transition: var(--transition-base);
}
.shadow-hover:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.experience-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: var(--primary-blue);
    color: var(--white);
    padding: 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 4px solid var(--white);
}

.experience-badge .number {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
    line-height: 1;
}

.experience-badge .text {
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    margin-top: 8px;
}

.about-content h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.about-content .subtitle {
    font-size: 1.25rem;
    color: var(--primary-blue);
    font-weight: 500;
    margin-bottom: 24px;
}

.about-content p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.check-list {
    margin-bottom: 32px;
}

.check-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-weight: 500;
}

.check-list svg {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   Doctors Section
   ========================================================================== */
.doctor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.doctor-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}

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

.doc-img-wrapper {
    height: 350px;
    overflow: hidden;
}

.doc-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.doctor-card:hover .doc-img-wrapper img {
    transform: scale(1.05);
}

.doc-info {
    padding: 24px;
    text-align: center;
}

.doc-info h3 {
    margin-bottom: 8px;
}

.doc-info .specialty {
    color: var(--primary-blue);
    font-weight: 500;
    margin-bottom: 8px;
}

.doc-info .exp {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ==========================================================================
   Testimonials Slider
   ========================================================================== */
.testimonial-slider {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    padding: 50px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.testimonial-card {
    animation: fade-in 0.5s ease-out;
}

.stars {
    color: #FBBF24;
    font-size: 1.5rem;
    margin-bottom: 24px;
    letter-spacing: 2px;
}

.review-text {
    font-size: 1.25rem;
    font-style: italic;
    color: var(--text-heading);
    margin-bottom: 32px;
}

.patient-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.patient-info img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.slider-controls {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
}

.slide-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--white);
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition-fast);
    font-weight: bold;
}

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

/* ==========================================================================
   CTA Section
   ========================================================================== */
.cta {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
    color: var(--white);
}

.cta h2 {
    color: var(--white);
    margin-bottom: 16px;
    font-size: clamp(2rem, 4vw, 3rem);
}

.cta p {
    margin-bottom: 40px;
    font-size: 1.25rem;
    opacity: 0.9;
}

.cta .btn {
    background: var(--white);
    color: var(--primary-blue);
}

.cta .btn:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.cta-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: var(--bg-light);
    padding: 80px 0 24px;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h4 {
    margin-bottom: 24px;
    font-size: 1.125rem;
}

.footer-col.brand p {
    color: var(--text-muted);
    margin-top: 16px;
    max-width: 300px;
}

.footer-col.links ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col.links a {
    color: var(--text-muted);
}

.footer-col.links a:hover {
    color: var(--primary-blue);
    padding-left: 4px;
}

.footer-col.contact p {
    color: var(--text-muted);
    margin-bottom: 12px;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    box-shadow: var(--shadow-sm);
}

.social-links a:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ==========================================================================
   Other Pages (About, Contact)
   ========================================================================== */
.page-header {
    padding: 150px 0 80px;
    background: var(--primary-light);
}
.page-header h1 {
    font-size: 3rem;
    margin-bottom: 16px;
}
.page-header p {
    font-size: 1.25rem;
    color: var(--text-muted);
}

.mission-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}
.mission-card {
    background: var(--white);
    padding: 50px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    text-align: center;
}
.mission-card .icon-wrap {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mission-card .icon-wrap svg {
    width: 36px;
    height: 36px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}
.gallery-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.info-block {
    display: flex;
    flex-direction: column;
    gap: 30px;
}
.info-item {
    display: flex;
    gap: 20px;
}
.info-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-form-wrap {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}
.contact-form .form-group {
    margin-bottom: 20px;
}
.contact-form .form-row {
    display: flex;
    gap: 20px;
}
.contact-form .half {
    flex: 1;
}
.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-fast);
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    border-color: var(--primary-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26,115,232,0.1);
}

/* ==========================================================================
   Animations
   ========================================================================== */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

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

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 991px) {
    .nav-links, .navbar .btn {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .about-grid, .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .experience-badge {
        bottom: 20px;
        right: 20px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .contact-form .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .mission-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .section-padding {
        padding: 60px 0;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-content h1 {
        font-size: 2.25rem;
    }
}
