/* Custom CSS Variables for easy theming */
:root {
    --teal-color: #008d80; /* Primary clinic color */
    --teal-dark: #006b5f; /* Darker teal for hover states */
    --blue-main: #004aad; /* Main blue for specific elements (e.g., header, certain buttons) */
    --blue-accent: #0d6efd; /* Bootstrap's default primary blue for general headings */
    --light-bg: #f8f9fa; /* Lighter background for sections */
    --white-bg: #ffffff; /* White background for cards, forms etc. */
    --dark-text: #212529; /* Darker text for readability */
    --secondary-text: #6c757d; /* Lighter text for paragraphs */
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.2);
    --shadow-strong: rgba(0, 0, 0, 0.3);
    /* Hero Overlay: Gradient from teal to darker black */
    --hero-overlay-start: rgba(0, 141, 128, 0.4); /* Teal with transparency */
    --hero-overlay-end: rgba(0, 0, 0, 0.7); /* Darker, more opaque black */
}

/* --- Base Body & Typography Styles --- */
body {
    font-family: 'Open Sans', sans-serif; /* Consistent font-family from Google Fonts */
    color: var(--dark-text);
    line-height: 1.7;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Prevent horizontal scroll from animations */
    background-color: var(--light-bg); /* General background color for the page */
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif; /* Consistent font-family for headings */
    font-weight: 700; /* Bold by default for headings */
}

/* --- Global Section Padding --- */
section {
    padding: 80px 0; /* Consistent vertical spacing for all major sections */
}

/* --- Custom Text Colors (using variables for consistency) --- */
.text-teal {
    color: var(--teal-color) !important;
}

.text-blue { /* Refers to --blue-accent for general elements */
    color: var(--blue-accent) !important;
}

.text-main-blue { /* For specific elements that need the --blue-main color */
    color: var(--blue-main) !important;
}

.text-secondary {
    color: var(--secondary-text) !important;
}

.text-black {
    color: #000 !important; /* Specific black, though dark-text might cover most cases */
}

.text-orange { /* If used for specific highlights */
    color: #ff8c00 !important;
}

/* --- Hero Section (from 'infrastructure' page) --- */
.hero-section {
    background: url('../images/infrastructure/hero-bg.jpg') no-repeat center center/cover fixed;
    min-height: 600px;
    position: relative;
    padding: 120px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white-bg); /* Use white-bg variable */
    text-shadow: 0 3px 6px var(--shadow-strong);
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom right, var(--hero-overlay-start), var(--hero-overlay-end));
    z-index: 0;
}

.hero-section .container {
    z-index: 1;
    position: relative;
}

.hero-section h1 {
    font-size: 4.2rem;
    margin-bottom: 25px;
    line-height: 1.1;
    letter-spacing: -1px;
}

.hero-section p.lead {
    font-size: 1.8rem;
    max-width: 950px;
    margin-left: auto;
    margin-right: auto;
    color: rgba(255, 255, 255, 0.98);
}

.hero-tagline {
    font-weight: 700;
    text-shadow: 0 4px 8px var(--shadow-strong);
}

.hero-cta {
    background-color: var(--white-bg);
    color: var(--teal-color);
    border: none;
    padding: 18px 40px;
    font-size: 1.4rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-weight: 700;
    box-shadow: 0 8px 20px var(--shadow-strong);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-cta:hover {
    background-color: var(--teal-color);
    color: var(--white-bg);
    transform: translateY(-8px);
    box-shadow: 0 12px 30px var(--shadow-strong);
    border: 1px solid var(--white-bg);
}

/* --- General Content Section Styles --- */

/* Enhancements for Images in detail sections */
.img-fluid {
    border-radius: 0.75rem;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    aspect-ratio: 16 / 9; /* Consistent aspect ratio for images */
    object-fit: cover; /* Ensures image covers area without distortion */
}

.img-fluid.hover-scale:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 25px var(--shadow-light);
}

/* Feature Row Spacing */
.gx-md-5 {
    --bs-gutter-x: 3.5rem; /* Increased gutter for more space between image and text */
}

/* Lead Paragraphs for main content */
.lead {
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--secondary-text);
    max-width: 800px;
    margin: 0 auto 3rem auto;
}

/* --- About Section (from 'about' page) --- */
#about {
    background-color: var(--light-bg);
}

#about h2 {
    color: var(--teal-color);
    font-size: 2rem;
    margin-bottom: 10px;
}

#about h4 {
    color: var(--blue-main); /* Using the specific blue for this h4 */
    font-size: 1.5rem;
    margin-bottom: 20px;
}

#about ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-top: 15px;
}

#about ul li {
    margin-bottom: 10px;
    font-size: 1rem;
    color: var(--dark-text); /* Using dark-text variable */
}

#about img {
    object-fit: cover;
    height: 400px; /* Consistent height for about images */
    border-radius: 10px;
}

/* --- About Dr. Kunal Kamthe Section --- */
#about-doctor {
    background-color: var(--light-bg);
}

#about-doctor h2 {
    color: var(--teal-color);
    font-size: 2rem;
    margin-bottom: 20px;
}

#about-doctor p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--dark-text);
}

#about-doctor .btn-primary {
    background-color: var(--blue-main);
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    text-transform: uppercase;
    transition: background-color 0.3s ease;
}

#about-doctor .btn-primary:hover {
    background-color: var(--blue-accent); /* A slightly different blue on hover */
}

#about-doctor img {
    width: 100%;
    height: auto;
    max-width: 400px;
    border-radius: 10px;
    box-shadow: 0 4px 8px var(--shadow-medium);
}

/* --- Profile Section Styling --- */
#profile {
    background-color: var(--light-bg);
}

#profile h2 {
    color: var(--teal-color);
    font-size: 2rem;
    margin-bottom: 20px;
}

#profile h4 {
    color: var(--blue-main);
    font-size: 1.5rem;
    margin-top: 20px;
}

#profile p, #profile ul {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--dark-text);
}

#profile ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-top: 10px;
}

#profile img {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px var(--shadow-medium);
}

/* --- Speciality Section --- */
#speciality {
    background-color: var(--light-bg);
}

#speciality h2 {
    color: var(--teal-color);
    font-size: 2.5rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 30px;
}

.speciality-card {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    border: 4px solid var(--blue-main); /* Blue border around images */
    background-color: var(--white-bg); /* Card background */
    box-shadow: 0 4px 15px var(--shadow-light); /* Subtle card shadow */
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.speciality-card:hover {
    transform: translateY(-5px); /* Lift card on hover */
    box-shadow: 0 10px 25px var(--shadow-medium); /* More pronounced shadow */
}

.speciality-card img {
    width: 100%;
    height: 250px; /* Fixed height for consistent layout */
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s ease-in-out;
}

.speciality-card:hover img {
    transform: scale(1.1); /* Slight zoom on hover */
}

.speciality-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9); /* White overlay with transparency */
    color: var(--dark-text);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    padding: 20px;
    text-align: center;
    border-radius: 10px;
}

.speciality-card:hover .speciality-overlay {
    opacity: 1;
}

.speciality-overlay h4 {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--teal-color);
    text-transform: uppercase;
}

.speciality-overlay p {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--dark-text);
}

/* --- Must Watch Videos Section --- */
#videos {
    background-color: var(--light-bg);
}

#videos h2 {
    color: var(--teal-color);
    font-size: 2.5rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 30px;
}

.video-card iframe {
    border: 4px solid var(--blue-main);
    border-radius: 10px;
    box-shadow: 0 4px 8px var(--shadow-medium);
}

/* --- Appointment Booking Section --- */
#book-appointment {
    background-color: var(--light-bg);
    padding: 60px 0; /* Consistent padding */
}

#book-appointment h2 {
    color: var(--teal-color);
    font-size: 2.5rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 30px;
}

#book-appointment .form-label {
    font-weight: bold;
    color: var(--blue-main); /* Blue for labels */
}

#book-appointment .btn-success {
    background-color: var(--teal-color);
    border: none;
    padding: 12px 25px; /* Larger padding for button */
    font-size: 1.2rem;
    text-transform: uppercase;
    color: var(--white-bg);
    border-radius: 0.5rem; /* Match other buttons */
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-weight: 600;
}

#book-appointment .btn-success:hover {
    background-color: var(--teal-dark) !important;
    transform: translateY(-3px);
}

/* Form Specific Styles */
#book-appointment form {
    background-color: var(--white-bg);
    border: 1px solid #e0e0e0;
    box-shadow: 0 0.75rem 1.5rem var(--shadow-light);
    transition: all 0.3s ease-in-out;
}

#book-appointment form:hover {
    box-shadow: 0 1.25rem 2.5rem var(--shadow-medium);
}

.form-control-lg {
    border-radius: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 1.1rem;
    border: 1px solid #ced4da;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.form-control-lg:focus {
    border-color: var(--teal-color);
    box-shadow: 0 0 0 0.25rem rgba(0, 141, 128, 0.25); /* Teal focus glow */
}

.form-control-lg::placeholder {
    color: #a0a0a0;
}

/* Validation Feedback */
.form-control.is-valid, .was-validated .form-control:valid {
    border-color: #28a745;
}
.form-control.is-invalid, .was-validated .form-control:invalid {
    border-color: #dc3545;
}

.invalid-feedback {
    font-size: 0.875rem;
}

.form-text {
    font-size: 0.875rem;
    color: var(--secondary-text);
}

/* Submit Button (generic, can be used elsewhere if needed) */
.submit-button {
    background-color: var(--teal-color);
    border: none;
    font-size: 1.3rem;
    padding: 12px 30px;
    border-radius: 0.5rem;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    font-weight: 600;
    color: var(--white-bg); /* Ensure text color is white */
}

.submit-button:hover {
    background-color: var(--teal-dark) !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 15px var(--shadow-medium);
}

/* --- Header Styles (from 'header' include) --- */
.header {
    background-color: var(--blue-main); /* Dark navy background */
    padding: 10px 0; /* Add some padding */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); /* Subtle shadow for depth */
}

.header img {
    height: 50px; /* Slightly larger logo */
    transition: transform 0.3s ease;
}

.header img:hover {
    transform: scale(1.05); /* Slight scale on hover */
}

.header .location-selector select {
    border: 1px solid rgba(255,255,255,0.4); /* Subtle white border */
    background-color: rgba(255,255,255,0.1); /* Slight transparent background */
    color: var(--white-bg);
    border-radius: 5px;
    padding: 5px 10px;
    appearance: none; /* Remove default arrow */
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%20viewBox%3D%220%200%20292.4%20292.4%22%3E%3Cpath%20fill%3D%22white%22%20d%3D%22M287%20197.387L146.2%2056.607%205.4%20197.387c-7.2%207.2-18.9%207.2-26.1%200-7.2-7.2-7.2-18.9%200-26.1L133.1%2017.387c3.6-3.6%208.3-5.4%2013-5.4s9.4%201.8%2013%205.4l140.7%20140.7c7.2%207.2%207.2%2018.9%200%2026.1-7.2%207.1-18.9%207.1-26.1-.1z%22%2F%3E%3C%2Fsvg%3E'); /* Custom arrow */
    background-repeat: no-repeat;
    background-position: right 0.7em top 50%, 0 0;
    background-size: 0.65em auto, 100%;
}

.header .location-selector select option {
    color: var(--dark-text); /* Options text color */
    background-color: var(--white-bg);
}

.header .search-bar input {
    border: none;
    border-radius: 20px; /* Pill shape for search */
    background-color: var(--white-bg);
    padding: 8px 15px; /* More padding */
    font-size: 0.95rem;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.header .btn-outline-light {
    border-color: var(--white-bg);
    color: var(--white-bg);
    border-radius: 5px;
    padding: 8px 15px;
    transition: all 0.3s ease;
}

.header .btn-outline-light:hover {
    background-color: var(--blue-accent); /* Use blue-accent for hover */
    color: var(--white-bg);
    border-color: var(--blue-accent);
}

.header .navbar-nav .nav-link {
    font-size: 1rem; /* Slightly larger nav links */
    font-weight: 500;
    margin-right: 20px; /* More spacing */
    color: var(--white-bg) !important;
    transition: color 0.3s ease;
}

.header .navbar-nav .nav-link:hover {
    color: #00d1b2 !important; /* Specific hover color */
}

.header .dropdown-menu {
    background-color: var(--blue-main); /* Match header background */
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.header .dropdown-item {
    color: var(--white-bg);
    padding: 10px 20px;
    transition: background-color 0.3s ease;
}

.header .dropdown-item:hover {
    background-color: var(--blue-accent);
    color: var(--white-bg);
}

/* --- Footer Styles --- */
footer {
    background-color: var(--dark-text); /* Darker footer */
    color: var(--white-bg);
    padding: 30px 0; /* More padding */
    font-size: 0.9rem;
}

footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--teal-color);
}

/* --- Carousel Specific Styles (if you have one on index/home) --- */
/* The hero section uses `hero-section` directly, but if you have
   a separate Bootstrap carousel, these styles apply. */
.carousel-item img {
    width: 100%;
    height: 450px; /* Consistent height for carousel images */
    object-fit: cover;
}

.carousel-caption {
    position: absolute;
    bottom: 15%; /* Adjust as needed */
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    background: rgba(0, 0, 0, 0.6); /* Slightly more opaque background */
    padding: 25px;
    border-radius: 10px;
    color: var(--white-bg);
    max-width: 700px; /* Limit caption width */
}

.carousel-caption h1, .carousel-caption h2 { /* Both h1 and h2 for flexibility */
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--white-bg); /* Ensure heading is white */
}

.carousel-caption p {
    font-size: 1.2rem;
    margin-top: 10px;
}

.carousel-caption .btn {
    margin-top: 20px;
    background-color: var(--blue-main);
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.carousel-caption .btn:hover {
    background-color: var(--blue-accent);
    transform: translateY(-2px);
}

/* Custom Carousel Caption for specific usage if needed (e.g., blur effect) */
.carousel-caption.custom-caption {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px); /* Adds a subtle blur behind the caption */
    border-radius: 15px;
    padding: 30px;
    max-width: 650px;
    margin: auto;
}
.carousel-caption.custom-caption h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--white-bg);
}
.carousel-caption.custom-caption p {
    font-size: 1.2rem;
    margin-top: 10px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: invert(1); /* Makes controls white */
}

/* --- Review Card Styles --- */
.review-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: var(--white-bg);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px; /* Spacing between cards in a column */
    box-shadow: 0 5px 15px var(--shadow-light);
}
.review-card:hover {
    transform: translateY(-8px); /* More pronounced lift */
    box-shadow: 0 15px 30px var(--shadow-medium); /* Stronger shadow */
}

/* --- Responsive Adjustments --- */
@media (max-width: 991.98px) { /* Tablets and smaller desktops */
    /* Hero Section */
    .hero-section {
        min-height: 450px;
        padding: 80px 0;
    }
    .hero-section h1 {
        font-size: 3rem;
    }
    .hero-section p.lead {
        font-size: 1.4rem;
    }
    .hero-tagline {
        font-size: 1.6rem;
    }
    .hero-cta {
        font-size: 1.15rem;
        padding: 12px 30px;
    }

    /* General Sections */
    section {
        padding: 60px 0;
    }
    .lead {
        font-size: 1.1rem;
    }

    /* Alternating layout for detail sections */
    .row.align-items-center .col-md-6 {
        margin-bottom: 2rem; /* Add spacing between stacked columns */
    }
    .row.align-items-center .col-md-6:last-child {
        margin-bottom: 0;
    }
    /* Revert order-md-1 and order-md-2 on smaller screens for stacking */
    .row.align-items-center > .col-md-6.order-md-1 { order: 1 !important; }
    .row.align-items-center > .col-md-6.order-md-2 { order: 2 !important; }

    /* Forms */
    #book-appointment form {
        padding: 30px;
    }
    .form-control-lg {
        font-size: 1rem;
    }
    .submit-button {
        font-size: 1.1rem;
        padding: 10px 25px;
    }

    /* Header */
    .header .navbar-nav .nav-link {
        margin-right: 15px;
        font-size: 0.9rem;
    }
    .header .search-bar, .header .location-selector {
        margin-top: 10px; /* Space out elements when stacked */
    }

    /* Carousel (if present) */
    .carousel-caption {
        padding: 20px;
        bottom: 10%;
    }
    .carousel-caption h1, .carousel-caption h2 {
        font-size: 2rem;
    }
    .carousel-caption p {
        font-size: 1rem;
    }
    .carousel-caption .btn {
        font-size: 0.9rem;
        padding: 8px 15px;
    }
}

@media (max-width: 767.98px) { /* Mobile devices */
    /* Hero Section */
    .hero-section {
        min-height: 400px;
        padding: 60px 0;
    }
    .hero-section h1 {
        font-size: 2.2rem;
        margin-bottom: 15px;
    }
    .hero-section p.lead {
        font-size: 1.1rem;
        margin-bottom: 2.5rem;
    }
    .hero-tagline {
        font-size: 1.3rem;
    }
    .hero-cta {
        font-size: 1rem;
        padding: 10px 20px;
    }

    /* General Sections */
    section {
        padding: 40px 0;
    }
    .img-fluid {
        margin-bottom: 1.5rem;
    }
    .gx-md-5 {
        --bs-gutter-x: 1.5rem;
    }

    /* Review Carousel */
    #reviewCarousel .col-lg-4 { /* Targets direct children in this context */
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Specific elements */
    #about img {
        height: 250px; /* Adjust about image height for mobile */
    }
    #speciality-cards .speciality-card img { /* If this is the ID for the container of specialty cards */
        height: 200px;
    }
    .speciality-overlay h4 {
        font-size: 1.4rem;
    }
    .speciality-overlay p {
        font-size: 0.9rem;
    }

    /* Header */
    .header .navbar-toggler {
        padding: 0.25rem 0.75rem;
        font-size: 1.25rem;
        line-height: 1;
        background-color: transparent;
        border: 1px solid rgba(255,255,255,.5);
        border-radius: 0.25rem;
        color: white;
    }
    .header .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }

    /* Carousel (if present) */
    .carousel-item img {
        height: 300px;
    }
    .carousel-caption {
        bottom: 5%;
        padding: 15px;
        width: 90%; /* Make caption narrower on small screens */
    }
    .carousel-caption h1, .carousel-caption h2 {
        font-size: 1.5rem;
    }
    .carousel-caption p {
        font-size: 1rem;
    }
    .carousel-caption .btn {
        font-size: 0.9rem;
        padding: 8px 15px;
    }
    .carousel-caption.custom-caption {
        padding: 15px;
    }
    .carousel-caption.custom-caption h2 {
        font-size: 1.5rem;
    }
    .carousel-caption.custom-caption p {
        font-size: 1rem;
    }
}