/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&family=Open+Sans:wght@400;600&display=swap');

/* General Resets and Base Styles */
:root {
    --primary-color: #007bff; /* Bright Blue */
    --primary-dark: #0056b3;  /* Darker Blue */
    --secondary-color: #28a745; /* Green */
    --secondary-dark: #218838; /* Darker Green */
    --accent-color: #ffc107; /* Yellow Accent */
    --dark-color: #343a40; /* Dark Gray */
    --light-gray: #f8f9fa; /* Very Light Gray */
    --medium-gray: #e9ecef; /* Medium Light Gray */
    --text-color: #495057; /* Slightly softer dark text */
    --light-text: #6c757d; /* Muted text */
    --border-color: #ced4da; /* Light border */
    --header-height: 90px; /* Default header height */
    --header-height-scrolled: 70px; /* Shorter header height on scroll */
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--light-gray);
    overflow-x: hidden; /* Prevent horizontal scroll */
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

ul {
    list-style: none;
}

section {
    padding: 100px 20px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

/* Section Title Styling */
h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    color: var(--dark-color);
    margin-bottom: 25px;
}

h2 {
    font-size: 3em;
    text-align: center;
    color: var(--primary-dark);
    margin-bottom: 60px;
    position: relative;
    padding-bottom: 15px;
    font-weight: 700;
}

h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100px;
    height: 5px;
    background-color: var(--secondary-color);
    border-radius: 3px;
}

/* Header */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 0 20px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
    height: var(--header-height);
    display: flex;
    align-items: center;
    transition: height 0.3s ease, background-color 0.3s ease;
}

header.scrolled {
    height: var(--header-height-scrolled);
    background-color: var(--primary-dark);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    height: 100%;
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 2em;
    font-weight: 700;
    color: white;
    transition: font-size 0.3s ease;
}

header.scrolled .logo {
    font-size: 1.6em;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: white;
    font-weight: 600;
    font-size: 1.1em;
    transition: color 0.3s ease, transform 0.2s ease;
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    display: block;
    margin-top: 5px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.hamburger {
    display: none; /* Hidden by default */
    background: none;
    border: none;
    color: white;
    font-size: 2.2em;
    cursor: pointer;
    z-index: 1001;
}

/* Main Content Padding Adjustments */
main {
    padding-top: var(--header-height);
}
body.scrolled main {
    padding-top: var(--header-height-scrolled);
}
body.no-scroll { /* For mobile menu overlay */
    overflow: hidden;
}


/* Hero Section */
#hero {
    padding: 0;
    height: 50vh; /* Reduced slider size */
    min-height: 400px; /* Reduced slider min-height */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    color: white;
    text-align: center;
}

.slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0; /* Initial state for slider images */
    transition: opacity 1.2s ease-in-out;
}

.slide::before { /* Overlay for better text readability */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.slide.active {
    opacity: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.65);
    padding: 50px 40px;
    border-radius: 12px;
    max-width: 900px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    animation: fadeIn 1.2s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-content h1 {
    font-size: 3.5em; /* Reduced hero text size */
    margin-bottom: 15px;
    color: white;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.6);
    font-weight: 700;
}

.hero-content p {
    font-size: 1.3em; /* Reduced hero text size */
    margin-bottom: 25px;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 300;
}

.cta-button {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 15px 30px; /* Reduced button size */
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1em; /* Reduced button font size */
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
    letter-spacing: 0.5px;
}

.cta-button:hover {
    background-color: var(--secondary-dark);
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.35);
}

.slider-nav {
    position: absolute;
    top: 50%; /* Vertically center them */
    right: 30px; /* Position them 30px from the right edge */
    transform: translateY(-50%); /* Adjust for vertical centering */
    z-index: 10;
    display: flex;
    flex-direction: column; /* Stack buttons vertically */
    gap: 10px; /* Space between buttons */
}

.slider-nav button {
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    border: 2px solid white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.4em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.2s ease, border-color 0.3s ease;
}

.slider-nav button:hover {
    background-color: rgba(0, 0, 0, 0.7);
    border-color: var(--accent-color);
    transform: scale(1.1);
}

/* About Section */
#about {
    background-color: white;
}

.about-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 60px;
}

.about-image {
    flex: 1;
    min-width: 350px;
    text-align: center;
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.about-image::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    border: 4px solid var(--primary-color);
    border-radius: 25px;
    z-index: -1;
    opacity: 0.7;
}

.about-image img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 15px;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.about-image img:hover {
    transform: scale(1.05);
}

.about-content {
    flex: 2;
    min-width: 300px;
}

.about-content h2 {
    text-align: left;
    font-size: 2.8em;
    margin-bottom: 25px;
    padding-bottom: 15px;
}

.about-content h2::after {
    left: 0;
    transform: none;
}

.about-content h3 {
    color: var(--primary-dark);
    margin-top: 40px;
    margin-bottom: 15px;
    font-size: 1.8em;
    font-weight: 600;
}

.about-content p {
    margin-bottom: 20px;
    color: var(--text-color);
}

.about-content ul {
    list-style: disc;
    margin-left: 25px;
    color: var(--light-text);
}

.about-content ul li {
    margin-bottom: 10px;
    font-size: 1.05em;
}

.about-content ul li strong {
    color: var(--dark-color);
}


/* Services Section - Beautiful & Responsive Grid with Transitions */
#services {
    background-color: var(--medium-gray);
}

#services .service-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    padding: 30px 0;
}

#services .card {
    background-color: white;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.5s ease;
    cursor: pointer;
    overflow: hidden;
}

#services .card:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

#services .card h3 {
    color: var(--primary-color);
    font-size: 2em;
    margin-bottom: 20px;
    font-weight: 600;
}

#services .card p {
    color: var(--light-text);
    font-size: 1.1em;
    line-height: 1.7;
}

/* General Fade-in-up (kept for potential future use) */
.fade-in-up {
    opacity: 1;
    transform: translateY(0);
}

/* Doctors, Lab & Imaging, Contact Info Sections */
.info-section {
    background-color: white;
    padding: 100px 20px;
    margin-top: 60px;
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.doctors-grid, .services-grid, .contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.doctor-card, .service-detail-card, .contact-item {
    background-color: var(--light-gray);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.4s ease;
}

.doctor-card:hover, .service-detail-card:hover, .contact-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.doctor-card h3, .service-detail-card h3, .contact-item h3 {
    color: var(--primary-color);
    margin-top: 0;
    font-size: 1.8em;
    margin-bottom: 18px;
    font-weight: 600;
}

.doctor-card p, .service-detail-card ul, .contact-item p, .contact-item ul {
    color: var(--light-text);
    font-size: 1em;
    line-height: 1.6;
}

.service-detail-card ul {
    list-style: disc;
    margin-left: 25px;
    margin-top: 15px;
}

.service-detail-card ul li {
    margin-bottom: 8px;
}

.contact-item ul {
    list-style: none;
    margin-top: 15px;
}

.contact-item ul li strong {
    color: var(--dark-color);
}

/* Appointment Section */
#appointment {
    background-color: var(--primary-dark);
    color: white;
    text-align: center;
}

#appointment h2 {
    color: white;
}

#appointment h2::after {
    background-color: var(--accent-color);
}

#appointment-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
    max-width: 650px;
    margin: 0 auto;
    background-color: white;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.25);
}

#appointment-form input,
#appointment-form textarea {
    padding: 18px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 1.1em;
    color: var(--text-color);
    background-color: var(--medium-gray);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#appointment-form input::placeholder,
#appointment-form textarea::placeholder {
    color: var(--light-text);
}

#appointment-form input:focus,
#appointment-form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.2);
    outline: none;
}

#appointment-form button {
    background-color: var(--secondary-color);
    color: white;
    padding: 18px 35px;
    border: none;
    border-radius: 50px;
    font-size: 1.3em;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

#appointment-form button:hover {
    background-color: var(--secondary-dark);
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
    font-size: 0.95em;
}

footer p {
    margin: 10px 0;
    color: rgba(255, 255, 255, 0.85);
}

#contact {
    margin-bottom: 20px;
}

#contact strong {
    color: white;
}

/* Responsive Design */
@media (max-width: 1024px) {
    h2 {
        font-size: 2.5em;
    }
    .hero-content h1 {
        font-size: 3.5em;
    }
    .hero-content p {
        font-size: 1.3em;
    }
    #about .about-container {
        gap: 40px;
    }
    .about-image {
        min-width: 300px;
    }
    .about-content h2 {
        font-size: 2.5em;
    }
    .about-content h2::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .about-content ul {
        margin-left: 15px;
    }
    #services .card {
        padding: 30px;
    }
    #services .card h3 {
        font-size: 1.8em;
    }
    .doctor-card, .service-detail-card, .contact-item {
        padding: 25px;
    }
}

@media (max-width: 768px) {
    /* Header (Mobile Navigation) */
    .hamburger {
        display: block; /* Show the hamburger menu */
    }

    .nav-links {
        display: none; /* Hide navigation links by default on mobile */
        flex-direction: column; /* Stack them vertically */
        position: fixed; /* Use fixed for full screen overlay */
        top: 0;
        right: 0; /* Start from right edge */
        width: 70%; /* Occupy 70% of screen */
        max-width: 300px; /* Limit width for very large phones/small tablets */
        height: 100vh; /* Full viewport height */
        background-color: var(--primary-dark); /* Darker background for menu */
        padding-top: var(--header-height); /* Space from top */
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
        transform: translateX(100%); /* Start off-screen to the right */
        transition: transform 0.4s ease-in-out; /* Smooth slide-in effect */
        justify-content: flex-start; /* Align items to top */
        overflow-y: auto; /* Enable scrolling for long menus */
        gap: 0; /* No gap between stacked links */
    }

    .nav-links.active {
        display: flex; /* Show when active */
        transform: translateX(0); /* Slide into view */
    }

    .nav-links li {
        margin: 0; /* No margin on li */
        border-bottom: 1px solid rgba(255,255,255,0.1); /* Subtle separator */
    }
    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links a {
        padding: 18px 25px; /* Larger hit area for mobile links */
        display: block; /* Make links fill their width */
        font-size: 1.2em; /* Larger font size for mobile links */
        color: white;
        text-align: left; /* Align text to the left */
    }

    .nav-links a::after {
        display: none; /* Hide the underline for mobile menu links */
    }

    nav {
        flex-wrap: nowrap; /* Prevent logo/hamburger from wrapping */
        justify-content: space-between; /* Space between logo and hamburger */
        padding: 0; /* Remove extra padding on nav for mobile */
    }
    .logo {
        font-size: 2em; /* Restore original logo size for 768px+ mobile */
        margin-right: 0; /* Remove margin */
    }

    /* Hero Section */
    #hero {
        height: 45vh;
        min-height: 350px;
    }
    .hero-content h1 {
        font-size: 2.5em;
    }
    .hero-content p {
        font-size: 1.1em;
    }
    .cta-button {
        padding: 15px 30px;
        font-size: 1.1em;
    }

    /* Sections */
    section {
        padding: 70px 20px;
    }
    h2 {
        font-size: 2.2em;
        margin-bottom: 40px;
    }

    /* About Section */
    .about-container {
        flex-direction: column;
    }
    .about-image {
        width: 100%;
        max-width: 450px;
    }
    .about-content h2 {
        text-align: center;
        font-size: 2.2em;
    }
    .about-content h2::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .about-content ul {
        margin-left: 15px;
    }

    /* Grids */
    #services .service-cards,
    .doctors-grid,
    .services-grid,
    .contact-grid {
        grid-template-columns: 1fr; /* Single column layout */
    }

    /* Forms */
    #appointment-form {
        padding: 35px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.6em; /* Slightly smaller logo for very small phones */
    }
    /* Header (480px) */
    .nav-links {
        width: 80%; /* Wider menu for very small screens */
        max-width: 100%; /* No max width for very small screens */
    }
    .nav-links a {
        font-size: 1.1em; /* Slightly smaller mobile link font for very small screens */
        padding: 15px 20px;
    }
    .slider-nav {
        right: 15px; /* Move buttons slightly closer to the edge on small screens */
        gap: 8px; /* Slightly less space between buttons */
    }
    .slider-nav button {
        width: 35px; /* Make buttons slightly smaller */
        height: 35px;
        font-size: 1.2em;
    }

    /* Hero */
    #hero {
        height: 40vh;
        min-height: 300px;
    }
    .hero-content h1 {
        font-size: 2em;
    }
    .hero-content p {
        font-size: 0.9em;
    }
    .cta-button {
        padding: 10px 20px;
        font-size: 0.9em;
    }
    /* General */
    section {
        padding: 50px 15px;
    }
    h2 {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    h2::after {
        width: 80px;
    }
    .about-content h3 {
        font-size: 1.5em;
    }
    #services .card h3 {
        font-size: 1.6em;
    }
    .doctor-card h3, .service-detail-card h3, .contact-item h3 {
        font-size: 1.5em;
    }
    #appointment-form {
        padding: 25px;
        gap: 20px;
    }
    #appointment-form input,
    #appointment-form textarea {
        padding: 15px;
        font-size: 1em;
    }
    #appointment-form button {
        padding: 15px 25px;
        font-size: 1.1em;
    }
    footer {
        padding: 25px 15px;
    }
    .appointment {
  display:none;
}
}