/* Color Palette */
:root {
    --primary-dark: #2F2963;      /* Dark purple/navy */
    --primary: #454372;           /* Medium purple */
    --accent: #7FB069;            /* Green */
    --light-bg: #E9F5FF;          /* Light blue background */
    --highlight: #5DA9E9;         /* Sky blue accent */
    --text-dark: #333;            /* Dark text color */
    --text-light: #fff;           /* Light text color */
    --neutral-light: #f9f9f9;     /* Very light gray */
    --neutral-medium: #ccc;       /* Medium gray */
}

/* General Styles */
body {
    font-family: 'Lexend', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--neutral-light);
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    width: 85%;
    margin: auto;
    overflow: hidden;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: var(--highlight);
}

a:hover {
    color: var(--primary-dark);
}

h1, h2, h3 {
    color: var(--primary-dark);
    margin-bottom: 0.7em;
}

/* Header & Navigation */
header {
    background: var(--text-light);
    color: var(--text-dark);
    padding: 1rem 0;
    border-bottom: 1px solid var(--neutral-medium);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header nav ul {
    padding: 0;
    list-style: none;
    float: right;
    margin-top: 5px; /* Adjust as needed */
}

header nav ul li {
    display: inline;
    padding: 0 15px;
}

header nav ul li a {
    color: var(--text-dark);
    font-weight: 500;
}

/* Navigation Toggle Button (Burger) */
.nav-toggle {
    display: none; /* Hidden by default, shown in media query */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    position: absolute; /* Or relative to header, adjust as needed */
    right: 20px; /* Adjust as needed */
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001; /* Above other header elements */
}

.hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-dark);
    position: relative;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-dark);
    transition: transform 0.3s ease, top 0.3s ease, bottom 0.3s ease;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

/* Active state for burger icon (transform to X) */
.nav-toggle.active .hamburger {
    background-color: transparent; /* Middle bar disappears */
}

.nav-toggle.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.nav-toggle.active .hamburger::after {
    transform: rotate(-45deg);
    bottom: 0;
}


header .logo {
    float: left;
    font-size: 1.5em;
    font-weight: bold;
    color: var(--primary);
    display: flex;
    align-items: center;
}

header .nav-logo {
    height: 30px;
    margin-right: 10px;
}

/* Hero Section */
.hero {
    background: var(--light-bg);
    color: var(--text-dark);
    padding: 60px 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.8em;
    margin-bottom: 0.5em;
    color: var(--primary-dark);
}

.hero p {
    font-size: 1.2em;
    margin-bottom: 1.5em;
}

.btn {
    display: inline-block;
    background: var(--highlight);
    color: var(--text-light);
    padding: 12px 25px;
    border-radius: 5px;
    font-size: 1em;
    transition: background-color 0.3s ease;
    display: flex; /* Add this */
    align-items: center; /* Add this */
    justify-content: center; /* Add this */
}

.btn-icon {
    width: 1em; /* Adjust as needed */
    height: 1em; /* Adjust as needed */
    margin-right: 8px; /* Adjust as needed */
    fill: currentColor; /* To match button text color */
}

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

.btn-primary {
    background: var(--primary);
}

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

/* Services Section */
.services-section {
    padding: 40px 0;
    text-align: center;
    background-color: var(--text-light);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.service-item {
    background: var(--neutral-light);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative; /* Added for positioning the background image */
    overflow: hidden; /* Added to contain the pseudo-element or image */
}

.service-item-bg {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 70%; /* Adjust width as needed */
    object-fit: cover;
    object-position: center right; /* Anchor to the right, crop from left */
    z-index: 0; /* Behind the content but above the background color */
    opacity: 0.5; /* Adjust base opacity as needed */
    mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 100%);
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 100%);
}

.service-item h3, .service-item p {
    position: relative; /* Ensure text is above the image */
    z-index: 1; /* Ensure text is above the image */
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.service-item h3 {
    color: var(--highlight);
    margin-top: 0.5em;
    text-shadow: 1px 1px 2px var(--text-light), -1px -1px 2px var(--text-light), 1px -1px 2px var(--text-light), -1px 1px 2px var(--text-light); /* Added white drop shadow */
}

.service-icon {
    width: 60px; /* Adjust as needed */
    height: 60px; /* Adjust as needed */
    margin-bottom: 15px;
    /* In a real project, you'd use actual SVG or image files */
    /* background-color: var(--highlight); /* Placeholder color */
    /* border-radius: 50%; /* For a circular icon background */
}

/* About Section */
.about-section {
    padding: 40px 0;
    background-color: var(--light-bg);
}

.about-columns {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 30px;
}

.about-text-column {
    flex: 1;
    min-width: 300px;
}

.about-image-column {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.team-image {
    max-width: 70%;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Two-Column Layout for Fee Calculator and Contact */
.info-columns-section {
    padding: 40px 0;
    background-color: var(--text-light);
}

.columns-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.column {
    flex: 1;
    min-width: 300px;
}

.column-content {
    height: 100%;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    background-color: var(--neutral-light);
}

.contact-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

.contact-buttons .btn {
    flex: 1;
    max-width: 150px;
}

.fee-calculator-column h2,
.contact-column h2 {
    text-align: center;
    margin-bottom: 20px;
}

.fee-calculator-column p,
.contact-column p {
    text-align: center;
    margin-bottom: 20px;
}

/* Fee Calculator Section */
.fee-calculator-section {
    padding: 40px 0;
    background-color: var(--text-light); /* Or a slightly different light shade */
    text-align: left; /* Align form elements to the left */
}

.fee-calculator-section h2 {
    text-align: center;
    margin-bottom: 30px;
}

.fee-calculator-section p {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.1em;
}

#feeCalculatorForm .form-group {
    margin-bottom: 20px;
}

#feeCalculatorForm label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--primary-dark);
}

#feeCalculatorForm select,
#feeCalculatorForm input[type="radio"] + label {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box; /* Ensures padding doesn't affect overall width */
    font-size: 1em;
}

#feeCalculatorForm input[type="radio"] {
    margin-right: 5px;
}

#feeCalculatorForm .radio-label {
    font-weight: normal;
    display: inline-block; /* Align radio button and label nicely */
    width: auto; /* Override the 100% width for radio labels */
    padding: 0;
    border: none;
}

#feeCalculatorForm .estimated-fee {
    margin-top: 30px;
    padding: 15px;
    background-color: #e9f5ff;
    border-left: 5px solid #007bff;
    text-align: center;
}

#feeCalculatorForm .estimated-fee h3 {
    margin: 0;
    color: #0056b3;
    font-size: 1.3em;
}

#feeCalculatorForm .disclaimer {
    font-size: 0.9em;
    color: #555;
    text-align: center;
    margin-top: 15px;
}

/* Contact Section */
.contact-section {
    padding: 40px 0;
    text-align: center;
    background-color: #fff;
}

.contact-info {
    margin: 30px 0;
}

.contact-info p {
    margin: 0.5em 0;
    font-size: 1.1em;
    text-align: left;
}

.contact-info strong {
    color: var(--primary-dark);
}

.contact-column .btn {
    display: inline-block;
    margin-top: 20px;
    margin-bottom: 20px; /* Add some space below the button */
}

.map-embed {
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    width: 100%; /* Make it responsive within its column */
    max-width: 700px; /* Maintain the user-specified width as a max - increased from 400px */
    height: 300px; /* Maintain the user-specified height */
    display: block; /* Ensure it takes up its own line */
    margin: 0 auto; /* Center it if the column is wider */
    border: 0; /* Added from inline style */
}

/* Added styles from index.html */
.form-group-flex-align-center {
    display: flex;
    align-items: center;
}

#studentDiscount {
    margin-right: 8px;
}

.radio-option-container {
    display: flex;
    align-items: center;
}

#newPatientYes {
    margin-right: 5px;
}

.new-patient-no-option-container {
    margin-left: 15px;
    display: flex;
    align-items: center;
}

#newPatientNo {
    margin-right: 5px;
}

.radio-label-min-width-250 {
    min-width: 15vw;
}

#examinationPackageLink {
    text-decoration: underline;
    color: inherit;
}

/* Responsive Design */
@media(max-width: 768px) {
    header nav ul {
    /* float: none; Remove this or override */
    /* text-align: center; Remove this or override */
    /* margin-top: 10px; Remove this or override */
        display: none; /* Hide by default on mobile */
        flex-direction: column;
        position: absolute;
        top: 100%; /* Position below the header */
        left: 0;
        width: 100%;
        background-color: var(--text-light);
        padding: 10px 0;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        z-index: 1000;
    }

    header nav ul.nav-active {
        display: flex; /* Show when active */
    }

    header nav ul li {
        display: block;
        padding: 10px 0;
        text-align: center; /* Center nav items */
    }

    header .logo {
        /* float: none; text-align: center; display: block; margin-bottom: 10px; */ /* Original mobile styles, adjusted */
        display: flex; /* Keep flex for logo image and text alignment */
        justify-content: center; /* Center logo content if it's a block */
        margin-bottom: 10px;
        font-size: 1.2em; /* Reduced font size for mobile */
    }

    .hero h1 {
        font-size: 2.2em;
    }

    .hero p {
        font-size: 1em;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-toggle {
        display: block; /* Show burger button on mobile */
    }

    .columns-wrapper {
        flex-direction: column;
    }
    
    .column {
        width: 100%;
    }

    .team-image {
        max-width: 90%; /* Increase max-width on smaller screens */
    }
}
