/* Base Variables & Design System */
:root {
    /* Vibrant, Premium Color Palette */
    --primary: #5B42F3;
    /* Deep, vibrant purple-blue */
    --primary-light: #7E6BFA;
    --primary-dark: #3A23BE;

    --secondary: #F4F7FB;
    /* Very soft cool gray/blue */

    --accent: #E83E8C;
    /* Vibrant Pink/Coral */
    --accent-hover: #D81B60;

    --accent-alt: #00D2D3;
    /* Bright Cyan for highlights */

    --text-dark: #1e1e1e;
    /* Softened from #000000 absolute black */
    --text-muted: #333333;
    /* Slightly lighter than headings for hierarchy */
    --white: #FFFFFF;

    /* Gradients */
    --gradient-hero: linear-gradient(135deg, rgba(91, 66, 243, 0.85) 0%, rgba(232, 62, 140, 0.85) 100%);
    --gradient-accent: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-blur: blur(12px);

    --border-color: rgba(91, 66, 243, 0.1);

    /* Typography */
    --font-sans: 'Outfit', sans-serif;

    /* Spacing & Layout */
    --section-padding: 7rem 2rem;
    --container-width: 1240px;
    --border-radius-lg: 24px;
    --border-radius-md: 16px;
    --border-radius-sm: 8px;

    /* Transitions & Shadows */
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);

    --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 -5px rgba(91, 66, 243, 0.1), 0 8px 10px -6px rgba(91, 66, 243, 0.1);
    --shadow-lg: 0 25px 50px -12px rgba(91, 66, 243, 0.25);
    --shadow-glow: 0 0 20px rgba(232, 62, 140, 0.4);
}

/* Global Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(232, 62, 140, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(232, 62, 140, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(232, 62, 140, 0);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Scroll Reveal Classes */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: var(--transition-slow);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal.delay-1 {
    transition-delay: 0.1s;
}

.reveal.delay-2 {
    transition-delay: 0.2s;
}

.reveal.delay-3 {
    transition-delay: 0.3s;
}

.reveal.delay-4 {
    transition-delay: 0.4s;
}

/* Selection */
::selection {
    background: var(--accent);
    color: var(--white);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    color: var(--text-dark);
    background-color: transparent;
    /* Changed to transparent so fixed pseudo-elements show clearly */
    line-height: 1.6;
    overflow-x: hidden;
}

/* Global html background */
html {
    background-color: #fcfcff;
    /* very slight cool white tint for base */
}

/* Global Animated Gradient ambient glow */
body::before,
body::after {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200vw;
    height: 200vh;
    z-index: -2;
    pointer-events: none;
}

body::before {
    background: radial-gradient(circle at 40% 40%, rgba(232, 62, 140, 0.25) 0%, transparent 40%);
    animation: slowPulse 15s ease-in-out alternate infinite;
}

body::after {
    background: radial-gradient(circle at 60% 60%, rgba(91, 66, 243, 0.25) 0%, transparent 40%);
    animation: slowPulse 12s ease-in-out alternate-reverse infinite;
}

@keyframes slowPulse {
    0% {
        transform: scale(1) translate(0, 0);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.1) translate(2%, 5%);
        opacity: 1;
    }

    100% {
        transform: scale(1) translate(-2%, -5%);
        opacity: 0.8;
    }
}

/* Global Floating Background Shapes */
.global-shapes-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.global-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(4px);
    opacity: 0.15;
    /* Substantially reduced from 0.4 to prevent text readability issues */
    animation: floatGlobal 15s ease-in-out infinite alternate;
}

.g-shape-1 {
    width: 150px;
    height: 150px;
    background: var(--gradient-accent);
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.g-shape-2 {
    width: 200px;
    height: 200px;
    background: var(--primary-light);
    bottom: 20%;
    right: 5%;
    animation-delay: -3s;
}

.g-shape-3 {
    width: 100px;
    height: 100px;
    background: var(--gradient-hero);
    top: 60%;
    left: 45%;
    animation-delay: -7s;
}

.g-shape-4 {
    width: 120px;
    height: 120px;
    background: var(--accent-alt);
    top: 5%;
    right: 30%;
    animation-delay: -11s;
    opacity: 0.2;
}

.g-shape-5 {
    width: 180px;
    height: 180px;
    background: var(--gradient-accent);
    bottom: -5%;
    left: 25%;
    animation-delay: -16s;
    opacity: 0.3;
}

@keyframes floatGlobal {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }

    33% {
        transform: translate(30px, -50px) rotate(10deg) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) rotate(-5deg) scale(0.9);
    }

    100% {
        transform: translate(10px, -20px) rotate(5deg) scale(1.05);
    }
}

/* Typography */
h1,
h2,
h3,
h4 {
    color: var(--primary);
    line-height: 1.2;
    font-weight: 600;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    letter-spacing: -1px;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.5px;
}

h3 {
    font-size: 1.5rem;
}

p {
    color: var(--text-muted);
    font-weight: 500;
    /* Increased font-weight slightly for body text */
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Utility Classes */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    width: 100%;
}

.section {
    padding: 6rem 2rem;
}

.bg-light {
    background-color: var(--secondary);
}

.text-center {
    text-align: center;
}

.mt-12 {
    margin-top: 3rem;
}

.w-full {
    width: 100%;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
    font-family: var(--font-sans);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    z-index: -1;
    border-radius: 50px;
}

.btn-large {
    padding: 1.125rem 2.5rem;
    font-size: 1.125rem;
}

.btn-primary {
    background: var(--gradient-accent);
    background-size: 200% auto;
    color: var(--white);
    box-shadow: 0 4px 15px rgba(232, 62, 140, 0.3);
}

.btn-primary:hover {
    background-position: right center;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(232, 62, 140, 0.5);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--white);
    color: var(--white);
    backdrop-filter: blur(5px);
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Footer specific outline button */
.footer .btn-outline {
    border-color: var(--primary);
    color: var(--primary);
}

.footer .btn-outline:hover {
    background-color: var(--primary);
    color: var(--white);
}

/* ================= Navbar ================= */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    transition: var(--transition);
    padding: 1.2rem 0;
    background: transparent;
}

#navbar.scrolled {
    padding: 0.8rem 0;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    width: 100%;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 48px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-weight: 500;
    position: relative;
    padding-bottom: 0.25rem;
}

#navbar.scrolled .nav-links a {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 3px;
    border-radius: 3px;
    background: var(--gradient-accent);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--primary);
    cursor: pointer;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-left: 1px solid var(--glass-border);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    padding: 6rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 998;
}

.mobile-menu.active {
    right: 0;
}

.mobile-link {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

/* ================= Hero (Split Layout) ================= */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 5rem;
    overflow: hidden;
    /* Clean soft background removed to allow body gradient through */
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    text-align: left;
    /* Override global text-center centering */
    color: var(--text-dark);
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: rgba(91, 66, 243, 0.1);
    color: var(--primary);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(91, 66, 243, 0.2);
}

.hero-content h1 {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    text-shadow: none;
    line-height: 1.1;
    font-size: clamp(3rem, 5vw, 4.5rem);
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-content h1 span {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-content .tagline {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 100%;
    margin-left: 0;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.3s;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-start;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.6s;
}

/* Fix outline button in light mode */
.hero-content .btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
}

.hero-content .btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

/* Image Wrapper */
.hero-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-blob {
    width: 100%;
    max-width: 520px;
    /* Increased back up slightly to highlight the image */
    max-height: 75vh;
    /* Increased height to make it more prominent */
    aspect-ratio: 4 / 5;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-lg);
    border: 8px solid var(--white);
    background: var(--white);
    animation: blobMorph 8s ease-in-out infinite alternate;
}

.hero-image-blob img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

@keyframes blobMorph {
    0% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }

    50% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }

    100% {
        border-radius: 40% 60% 70% 30% / 40% 60% 30% 70%;
    }
}

/* ================= Section Headers ================= */
.section-header {
    margin-bottom: 4rem;
}

.section-header h2 {
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    color: var(--primary-dark);
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-accent);
    border-radius: 4px;
}

/* ================= Features Grid (Why Us) ================= */
.bg-light {
    background: transparent;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
}

.feature-card {
    background: var(--glass-bg);
    padding: 3rem 2.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(91, 66, 243, 0.2);
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    background: rgba(91, 66, 243, 0.05);
    /* very soft primary */
    border-radius: 20px;
    /* changed from 50% for modern look */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--primary);
    font-size: 2.5rem;
    transition: var(--transition);
}

.feature-card:hover .icon-wrapper {
    background: var(--gradient-accent);
    color: var(--white);
    transform: rotate(10deg) scale(1.1);
    box-shadow: var(--shadow-glow);
}

.feature-card h3 {
    margin-bottom: 1rem;
}

/* ================= Services ================= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius-md);
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid var(--secondary);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.service-card i {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: block;
    transition: var(--transition);
}

.service-card h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-accent);
    opacity: 0;
    z-index: 0;
    transition: var(--transition);
}

.service-card:hover::before {
    opacity: 1;
}

.service-card>* {
    position: relative;
    z-index: 1;
}

.service-card:hover h3,
.service-card:hover i {
    color: var(--white);
    transform: scale(1.1);
}

/* ================= Doctors ================= */
.doctors-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
}

.doctor-image {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.doctor-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.doctor-image:hover img {
    transform: scale(1.05);
}

.doctor-info h2 {
    margin-bottom: 0.5rem;
    font-size: clamp(2rem, 4vw, 2.75rem);
}

.doctor-name {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
    font-weight: 700;
}

.doctor-info p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.doctor-highlights {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.doctor-highlights li {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 500;
    color: var(--primary);
}

.doctor-highlights i {
    color: var(--accent);
    font-size: 1.5rem;
}

/* ================= Journey ================= */
.journey-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    position: relative;
}

/* Line connecting steps */
.journey-grid::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 15%;
    right: 15%;
    height: 3px;
    background: var(--secondary);
    z-index: 0;
}

.journey-step {
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 80px;
    height: 80px;
    background: var(--white);
    border: 4px solid var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 auto 1.5rem;
    box-shadow: 0 0 20px rgba(91, 66, 243, 0.15);
    transition: var(--transition);
}

.journey-step:hover .step-number {
    background: var(--primary);
    color: var(--white);
    transform: scale(1.1);
}

/* ================= About Us ================= */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    margin-bottom: 2rem;
}

.about-text-card {
    background: var(--glass-bg);
    padding: 2rem;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2.5rem;
}

.about-text-card p {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    margin-top: 0;
}

.about-text-card p:last-child {
    margin-bottom: 0;
}

.highlights {
    display: flex;
    gap: 2rem;
}

.highlight-item {
    border-left: 4px solid var(--accent);
    padding-left: 1.5rem;
}

.highlight-stat {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.highlight-label {
    color: var(--text-muted);
    font-weight: 500;
}

.about-image img {
    width: 100%;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

/* ================= Gallery ================= */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(var(--columns, 3), 1fr);
    gap: 1.5rem;
}

.gallery-grid img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: center 20%;
    /* Prevents heads from being chopped off at top */
    border-radius: var(--border-radius-md);
    transition: var(--transition);
    cursor: pointer;
}

.gallery-grid img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.gallery-grid .gallery-img-bottom {
    object-position: center bottom;
}

/* ================= Testimonials ================= */
.testimonials-grid {
    overflow: hidden;
    /* Hide scrollbar completely */
    padding-bottom: 2rem;
    position: relative;
    width: 100%;
}

.testimonials-track {
    display: flex;
    gap: 2rem;
    width: max-content;
    animation: scrollTestimonials 60s linear infinite;
    /* Slower animation speed */
}

/* Pause on hover/touch */
.testimonials-track:hover,
.testimonials-track:active {
    animation-play-state: paused;
}

@keyframes scrollTestimonials {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
        /* Scroll exactly half to loop duplicate cards smoothly */
    }
}

.testimonial-card {
    min-width: 350px;
    width: 350px;
    /* Fixed width */
    flex-shrink: 0;
    /* Prevent shrinking */
    white-space: normal;
    /* Allow text wrapping */
    background: var(--glass-bg);
    padding: 2.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    scroll-snap-align: start;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(91, 66, 243, 0.2);
}

.stars i {
    color: #FFC107;
    font-size: 1.25rem;
    margin-right: 0.25rem;
}

.review-text {
    margin: 1.5rem 0;
    font-style: italic;
    font-size: 1.15rem;
    color: var(--text-dark);
    line-height: 1.6;
}

.reviewer {
    color: var(--primary);
    font-weight: 600;
}

/* ================= Footer ================= */
.footer {
    background: var(--glass-bg);
    border-top: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    color: var(--text-muted);
    /* Changed to dark text to match navbar context */
    padding: 5rem 0 2rem;
    position: relative;
    overflow: hidden;
}

.footer h3,
.footer h4 {
    color: var(--primary);
    /* Changed to primary to match navbar text logic */
    margin-bottom: 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-logo {
    height: 60px;
    margin-bottom: 1rem;
    padding: 0;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    /* Darkened button bg */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-muted);
    /* Dark icon */
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--accent);
    color: var(--white);
    transform: translateY(-3px);
}

.footer-contact p,
.footer-desc {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
    /* Match dark mode text */
}

.footer-contact i {
    color: var(--accent);
    font-size: 1.25rem;
    margin-top: 0.25rem;
}

.footer-hours ul li {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    /* Light border */
    padding: 0.75rem 0;
}

.footer-hours ul li span {
    font-weight: 500;
    color: var(--text-dark);
    /* Dark text */
}

.footer-map {
    margin-bottom: 3rem;
}

.map-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    font-weight: 500;
    margin-top: 1rem;
    transition: var(--transition);
}

.map-link:hover {
    color: var(--primary);
    /* match dark mode hover */
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    /* Light border */
    padding-top: 2rem;
    text-align: center;
    color: var(--text-muted);
    /* Dark text for copyright */
}

/* ================= Modal ================= */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 75, 90, 0.4);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    padding: 1rem;
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--white);
    padding: 3rem;
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    /* Prevent it from touching top/bottom edges perfectly */
    overflow-y: auto;
    /* Enable vertical scrolling internally */
    position: relative;
    transform: translateY(20px);
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

.modal.active .modal-content {
    transform: translateY(0);
}

.close-modal-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.close-modal-btn:hover {
    color: var(--primary);
}

.modal-content h2 {
    margin-bottom: 0.5rem;
}

.modal-content>p {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-sans);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
    background: var(--secondary);
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(232, 141, 57, 0.1);
    background: var(--white);
}

/* ================= Responsive Design ================= */
@media (max-width: 992px) {
    .nav-links {
        display: none;
    }

    .nav-container .btn {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    #navbar {
        padding: 1rem 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
    }

    .doctors-container,
    .about-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-text-card {
        padding: 1.5rem;
    }

    .doctor-image {
        max-width: 500px;
        margin: 0 auto;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .hero-content {
        text-align: center;
        order: 2;
        /* Reverted back so text is below */
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-image-wrapper {
        order: 1;
        /* Reverted back so image is top */
        margin-top: 0;
        max-height: 40vh;
        /* Compress the height so title fits below */
    }

    .hero-image-blob {
        height: 100%;
        /* Ensure blob respects wrapper constraints */
        max-height: 35vh;
        /* Keep aspect ratio tight */
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .journey-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .journey-grid::before {
        top: 0;
        bottom: 0;
        left: 50%;
        width: 3px;
        height: 80%;
        transform: translateX(-50%);
    }

    .gallery-grid {
        --columns: 2;
    }

    .text-center-mobile {
        text-align: center;
    }

    .highlights {
        flex-direction: column;
        gap: 1rem;
        justify-content: center;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .service-card {
        padding: 1.5rem 1rem;
    }

    .service-card i {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .service-card h3 {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 3rem 1rem;
        /* Drastically reduce mobile whitespace */
    }

    .gallery-grid {
        --columns: 1;
    }

    .testimonial-card {
        min-width: 280px;
        padding: 1.5rem;
    }

    .modal-content {
        padding: 2rem 1.5rem;
    }

    .footer {
        padding: 4rem 1rem 2rem;
    }

    .footer-grid {
        gap: 2.5rem;
        margin-bottom: 2rem;
    }
}