/* General Body and Reset Styles */
body {
    font-family: 'Poppins', sans-serif; /* A modern, clean font often used for school sites */
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: #3cc2cc; /* Light background for the overall page */
    color: #333;
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll due to sidebar animation */
}

/* Header Styling */
.main-header {
    background-color: #004d40; /* Dark green for a professional look */
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Pushes content to edges */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: sticky; /* Makes header stick to the top */
    top: 0;
    z-index: 1000; /* Ensures header is on top of other content */
}

.header-content {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between; /* Distributes items */
}

.school-branding {
    text-align: center;
    flex-grow: 1; /* Allows branding to take up available space */
}

.school-branding h1 {
    margin: 0;
    font-size: 2.2em;
    font-weight: 700;
}

.school-branding .tagline {
    margin: 5px 0 0;
    font-size: 0.9em;
    font-style: italic;
    opacity: 0.9;
}

/* Sidebar Toggle (Hamburger Button) */
.sidebar-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative; /* For absolute positioning of bars */
    z-index: 1001; /* Ensure button is above other elements */
    margin-right: 20px; /* Space between button and school name */
    display: block; /* Ensure it's always visible by default */
}

.sidebar-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px 0;
    transition: all 0.3s ease; /* Smooth transition for animation */
}

/* Close button for sidebar (cross icon) - initially hidden */
.close-sidebar-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1002; /* Above sidebar content */
    display: none; /* Hidden by default, shown by JS */
}

.close-sidebar-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white; /* Or a contrasting color */
    position: absolute;
    transition: all 0.3s ease;
}

.close-sidebar-toggle .bar.cross1 {
    transform: rotate(45deg);
}

.close-sidebar-toggle .bar.cross2 {
    transform: rotate(-45deg);
}


/* Tour Our Campus Button */
.tour-button {
    background-color: #f7931e; /* A vibrant orange/gold */
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9em;
    transition: background-color 0.3s ease, transform 0.2s ease;
    white-space: nowrap; /* Prevents text from wrapping */
    margin-left: 20px; /* Space between branding and button */
}

.tour-button:hover {
    background-color: #e08419;
    transform: translateY(-2px);
}


/* Sidebar Styling */
.sidebar {
    height: 100%;
    width: 0; /* Initially hidden */
    position: fixed;
    z-index: 1050; /* Higher than header to overlap */
    top: 0;
    left: 0;
    background-color: #1a5276; /* A slightly lighter blue-green */
    overflow-x: hidden;
    transition: 0.5s; /* Smooth slide-in effect */
    padding-top: 60px; /* Space for content below header */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    overflow-y: auto; /* Enable vertical scrolling if content overflows */
}

.sidebar.active {
    width: 280px; /* Width when open */
}

.sidebar-nav {
    padding: 20px;
    color: white;
}

.sidebar-nav h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.1em;
    color: #a7d9f7; /* Lighter color for section titles */
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 5px;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav ul li {
    margin-bottom: 10px;
}

.sidebar-nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 1em;
    display: block;
    padding: 8px 0;
    transition: background-color 0.3s ease, color 0.3s ease;
    border-radius: 4px;
}

.sidebar-nav ul li a:hover,
.sidebar-nav ul li a:focus {
    background-color: rgba(255, 255, 255, 0.1);
    color: #c9e8fb;
}

/* Main Content Area */
.content-area {
    margin-left: 0; /* No margin initially */
    padding: 20px;
    transition: margin-left 0.5s; /* Smooth transition when sidebar opens/closes */
}

/* When sidebar is active, push content to the right */
body.sidebar-open .content-area {
    margin-left: 280px; /* Same width as sidebar */
}

.page-section {
    background-color: #ffffff;
    padding: 30px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    display: none; /* Hide all sections by default, JS will show 'active' */
    position: relative; /* Needed for absolute positioning of gallery images if any */
}

.page-section.active {
    display: block; /* Show the active section */
}

.page-section h2 {
    color: #004d40;
    font-size: 1.8em;
    margin-bottom: 15px;
    border-bottom: 2px solid #a7d9f7;
    padding-bottom: 10px;
}

.page-section ul {
    list-style: disc; /* Use bullets for lists within content */
    margin-left: 20px;
    margin-bottom: 15px;
}

.page-section ol {
    list-style: decimal; /* Use numbers for ordered lists */
    margin-left: 20px;
    margin-bottom: 15px;
}

.page-section li {
    margin-bottom: 8px;
}

/* Mini Gallery Styling */
.mini-gallery-container {
    position: relative;
    width: 100%;
    max-width: 700px; /* Max width for consistency */
    height: 350px; /* Fixed height for gallery container */
    margin: 40px auto 20px auto; /* Center it with spacing */
    overflow: hidden; /* Hide overflowing images */
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background-color: #eee; /* Fallback background */
}

.gallery-image-box {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0; /* Initially hidden */
    transition: opacity 1s ease-in-out; /* Smooth fade effect */
    display: flex; /* For centering image */
    justify-content: center;
    align-items: center;
}

.gallery-image-box.active {
    opacity: 1; /* Show active image */
}

.gallery-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the box while maintaining aspect ratio */
    border-radius: 8px; /* Match container border-radius */
}

/* Tour Campus Overlay */
.tour-overlay {
    position: fixed; /* Fixed to viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Semi-transparent black overlay */
    z-index: 2000; /* Higher than everything else */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
    overflow-y: auto; /* Allow scrolling if content is long */
    visibility: hidden; /* Use visibility instead of display for smoother transition */
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tour-overlay.active {
    visibility: visible;
    opacity: 1;
}

.tour-overlay .close-tour-button {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    font-size: 2.5em;
    color: white;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 2001; /* Ensure close button is clickable */
}

.tour-overlay .close-tour-button:hover {
    color: #f7931e;
}

.tour-overlay h2 {
    color: white;
    margin-bottom: 20px;
    font-size: 2.5em;
    border-bottom: 2px solid #f7931e;
    padding-bottom: 10px;
    text-align: center;
}

.tour-content {
    background-color: #1a5276; /* Dark blue background for content box */
    padding: 30px;
    border-radius: 10px;
    max-width: 900px;
    width: 90%;
    color: white;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    margin-top: 50px; /* Space from top close button */
}

.tour-content h3 {
    color: #a7d9f7;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.5em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 8px;
}

.video-gallery, .audio-gallery {
    display: flex;
    flex-wrap: wrap; /* Allow items to wrap to next line */
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.video-item, .audio-item {
    background-color: #004d40; /* Darker background for individual items */
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    flex: 1 1 calc(33.33% - 40px); /* Approx 3 items per row on larger screens */
    max-width: 320px; /* Control size */
    box-sizing: border-box;
}

.video-item video {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 10px;
    background-color: black; /* Ensure video background is black */
}

.audio-item audio {
    width: 100%;
    margin-bottom: 10px;
}

.video-item p, .audio-item p {
    font-size: 0.9em;
    color: #e0e0e0;
    margin: 0;
}


/* Footer Styling */
.main-footer {
    background-color: #00332c; /* Darker green for footer */
    color: white;
    text-align: center;
    padding: 20px;
    font-size: 0.85em;
    margin-top: 40px;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .header-content {
        flex-wrap: wrap; /* Allow items to wrap on smaller screens */
        justify-content: center; /* Center items when wrapped */
    }
    .sidebar-toggle, .tour-button {
        margin: 10px; /* Adjust margin for wrapped items */
    }
    .school-branding {
        flex-basis: 100%; /* Branding takes full width */
        order: -1; /* Move branding above buttons */
        margin-bottom: 10px;
    }
    .tour-button {
        order: 1; /* Place tour button after sidebar toggle */
    }

    .video-item, .audio-item {
        flex: 1 1 calc(50% - 30px); /* 2 items per row on medium screens */
    }
}

@media (max-width: 768px) {
    .school-branding h1 {
        font-size: 1.8em;
    }

    .school-branding .tagline {
        font-size: 0.8em;
    }

    .sidebar.active {
        width: 250px; /* Slightly smaller sidebar on mobile */
    }

    body.sidebar-open .content-area {
        margin-left: 0; /* On smaller screens, sidebar overlays, doesn't push content */
    }

    /* Adjust main content padding for smaller screens if necessary */
    .content-area {
        padding: 15px;
    }

    .mini-gallery-container {
        height: 250px; /* Smaller height for mobile galleries */
    }

    .tour-overlay h2 {
        font-size: 2em;
    }

    .tour-content {
        padding: 20px;
    }

    .video-item, .audio-item {
        flex: 1 1 100%; /* 1 item per row on small screens */
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .main-header {
        padding: 10px 15px;
    }

    .school-branding h1 {
        font-size: 1.5em;
    }

    .sidebar-toggle, .tour-button {
        padding: 8px;
        font-size: 0.8em;
    }

    .sidebar-toggle .bar {
        width: 20px;
        height: 2px;
        margin: 4px 0;
    }
}

/* Contact form styling (from previous JavaScript generation) */
.contact-form {
    margin-top: 30px;
    text-align: left;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.contact-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #004d40;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box; /* Include padding and border in element's total width and height */
}

.contact-form textarea {
    resize: vertical; /* Allow vertical resizing */
}

.contact-form .submit-button {
    background-color: #004d40;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

.contact-form .submit-button:hover {
    background-color: #00332c;
}

/* Testimonial item styling (from previous JavaScript generation) */
.testimonial-item {
    background-color: #f9f9f9;
    border-left: 5px solid #004d40;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.testimonial-item blockquote {
    margin: 0 0 10px 0;
    font-style: italic;
    color: #555;
    font-size: 1.1em;
}

.testimonial-item .author {
    text-align: right;
    font-weight: 600;
    color: #004d40;
    margin-top: 10px;
}

/* FAQ item styling (from previous JavaScript generation) */
.faq-item {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 3px rgba(0,0,0,0.03);
}

.faq-item h3 {
    color: #004d40;
    font-size: 1.2em;
    margin-top: 0;
    margin-bottom: 10px;
    border-bottom: none; /* Override section h2 border */
    padding-bottom: 0;
}

.faq-item p {
    color: #666;
    margin-bottom: 0;
}
/* Tour Campus Video Styles */
.tour-overlay-content {
    /* Existing styles here... make sure position: relative; is set */
    position: relative; /* Ensure this is set for positioning inner elements */
    padding: 20px; /* Add some padding around content */
    box-sizing: border-box; /* Include padding in element's total width and height */
    overflow-y: auto; /* Allow scrolling if content is too long */
    display: flex; /* Use flexbox for layout */
    flex-direction: column; /* Stack children vertically */
    align-items: center; /* Center items horizontally */
    justify-content: flex-start; /* Align items to the start vertically */
}

.tour-overlay-content h2 {
    margin-top: 50px; /* Adjust based on close button position */
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 2.2em;
    text-align: center;
}

.tour-overlay-content .close-tour-button {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 40px;
    color: var(--dark-text-color);
    cursor: pointer;
    z-index: 1000; /* Ensure it's above other content */
    transition: color 0.3s ease;
}

.tour-overlay-content .close-tour-button:hover {
    color: var(--primary-color);
}

.video-container {
    position: relative;
    width: 90%; /* Adjust width as needed */
    max-width: 900px; /* Max width for the video */
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio (height / width = 9 / 16 = 0.5625) */
    height: 0;
    overflow: hidden;
    background-color: black; /* Placeholder background */
    margin: 20px auto; /* Center the video and add vertical spacing */
    border-radius: 8px; /* Slightly rounded corners */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.tour-description {
    width: 90%; /* Match video container width */
    max-width: 900px;
    text-align: center;
    margin-top: 20px;
    color: var(--dark-text-color);
    font-size: 1.1em;
    line-height: 1.6;
}

.tour-description p {
    margin-bottom: 15px;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .tour-overlay-content h2 {
        font-size: 1.8em;
    }
    .video-container, .tour-description {
        width: 95%; /* Make it wider on smaller screens */
    }
    .tour-overlay-content {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .tour-overlay-content h2 {
        font-size: 1.5em;
        margin-top: 40px;
    }
    .tour-overlay-content .close-tour-button {
        font-size: 30px;
        top: 10px;
        right: 15px;
    }
    .tour-description {
        font-size: 1em;
    }
}