/* Base Variables & Design System */
:root {
    /* Colors derived from Logo */
    --primary: #1F4591;
    /* Deep Medical Blue */
    --primary-light: #2A5AC0;
    --secondary: #F0F4FA;
    /* Soft Blue Background */
    --accent: #4CAF50;
    /* Vibrant Medical Green from Logo */
    --accent-hover: #43A047;

    --text-dark: #1A2024;
    --text-muted: #546670;
    --white: #FFFFFF;

    --border-color: rgba(31, 69, 145, 0.1);

    /* Typography */
    --font-sans: 'Outfit', sans-serif;

    /* Spacing & Layout */
    --section-padding: 6rem 2rem;
    --container-width: 1200px;
    --border-radius-lg: 24px;
    --border-radius-md: 16px;
    --border-radius-sm: 8px;

    /* Transitions & Shadows */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(11, 75, 90, 0.08);
    --shadow-lg: 0 20px 40px rgba(11, 75, 90, 0.12);
}

/* 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: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 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);
}

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.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
    font-family: var(--font-sans);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(232, 141, 57, 0.3);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 141, 57, 0.4);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary);
}

/* ================= Navbar ================= */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    transition: var(--transition);
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

#navbar.scrolled {
    padding: 0.8rem 0;
}

.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: 2px;
    background-color: var(--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-color: var(--white);
    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 ================= */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(rgba(11, 75, 90, 0.6), rgba(11, 75, 90, 0.4)), url('../Atlantis Hero Image.webp') center/cover no-repeat;
    padding-top: 5rem;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    color: var(--white);
    padding: 0 2rem;
    animation: fadeIn 1s ease-out;
}

.hero-content h1 {
    color: var(--white);
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.tagline {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================= Section Headers ================= */
.section-header {
    margin-bottom: 4rem;
}

.section-header h2 {
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--accent);
    border-radius: 3px;
}

/* ================= Features Grid (Why Us) ================= */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.feature-card {
    background: var(--white);
    padding: 3rem 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    background: var(--secondary);
    border-radius: 50%;
    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(--primary);
    color: var(--white);
}

.feature-card h3 {
    margin-bottom: 1rem;
}

/* ================= Services ================= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.service-card {
    background: var(--secondary);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius-md);
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.service-card i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: block;
}

.service-card h3 {
    font-size: 1.25rem;
}

.service-card:hover {
    background: var(--primary);
    color: var(--white);
    transform: scale(1.03);
    box-shadow: var(--shadow-md);
}

.service-card:hover h3,
.service-card:hover i {
    color: var(--white);
}

/* ================= 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;
}

.doctor-name {
    color: var(--accent);
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
}

.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);
    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: var(--shadow-sm);
    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 p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    margin-top: 1rem;
}

.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(--white);
    padding: 2.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    scroll-snap-align: start;
    border: 1px solid var(--border-color);
}

.stars i {
    color: #FFC107;
    font-size: 1.25rem;
    margin-right: 0.25rem;
}

.review-text {
    margin: 1.5rem 0;
    font-style: italic;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.reviewer {
    color: var(--primary);
}

/* ================= Footer ================= */
.footer {
    background: var(--primary);
    color: var(--white);
    /* Bright white text */
    padding: 5rem 0 2rem;
    position: relative;
    overflow: hidden;
}

.footer h3,
.footer h4 {
    color: var(--white);
    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(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    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(--white);
    /* Ensure pure white */
}

.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 rgba(255, 255, 255, 0.1);
    padding: 0.75rem 0;
}

.footer-hours ul li span {
    font-weight: 500;
    color: var(--white);
}

.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(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
}

/* ================= 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;
    }

    .doctor-image {
        max-width: 500px;
        margin: 0 auto;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .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;
    }
}