/* Basic Reset & Body Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header & Navigation */
header {
    background-color: #004d40; /* Dark Teal */
    color: white;
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

header h1 {
    margin: 0;
    padding: 0 20px;
    font-size: 2em;
    text-align: center;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    text-align: center;
}

nav ul li {
    display: inline-block;
    margin: 0 15px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 5px 0;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #80cbc4; /* Light Teal */
}

/* Main Content Area */
main {
    padding: 20px 0;
}

section {
    background-color: white;
    padding: 30px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

h2, h3 {
    color: #004d40;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

p {
    line-height: 1.6;
}

/* Buttons */
.btn {
    display: inline-block;
    background-color: #007bff; /* Blue */
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1em;
}

.btn:hover {
    background-color: #0056b3;
}

.btn-primary { background-color: #28a745; } /* Green */
.btn-primary:hover { background-color: #218838; }

.btn-edit { background-color: #ffc107; color: #333; } /* Yellow */
.btn-edit:hover { background-color: #e0a800; }

.btn-delete { background-color: #dc3545; } /* Red */
.btn-delete:hover { background-color: #c82333; }

.btn-cancel { background-color: #6c757d; }
.btn-cancel:hover { background-color: #5a6268; }

/* Messages */
.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
}

/* Forms */
form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[type="date"],
form input[type="time"],
form select,
form textarea {
    width: 50%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Include padding in width */
}

form button {
    width: auto;
    padding: 12px 25px;
    background-color: #004d40;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
}

form button:hover {
    background-color: #00332c;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

table th, table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

table th {
    background-color: #004d40;
    color: white;
}

table tr:nth-child(even) {
    background-color: #f2f2f2;
}

/* Image Grid for Gallery */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.gallery-item img {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover; /* Cover the area, cropping if necessary */
    display: block;
}

.image-caption {
    padding: 10px;
    font-size: 0.9em;
    text-align: center;
    color: #555;
}

.image-grid-admin {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.gallery-item-admin {
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.gallery-item-admin img {
    max-width: 150px;
    height: auto;
    display: block;
    margin: 0 auto 10px;
}

/* Hero Slider (for index.php) */
/* Hero Slider Container - Ensures it takes up appropriate space */
.hero-slider {
    position: relative;
    width: 100%;
    max-width: 1200px; /* Or your desired max-width */
    margin: 0 auto;
    overflow: hidden; /* <-- THIS IS CRUCIAL to hide other slides */
    height: 400px; /* <-- THIS IS CRUCIAL for a consistent slider height */
    /* ... other styles ... */
}

/* Slider Inner Container - Manages the horizontal movement of slides */
.slider-container {
    display: flex;
    transition: transform 0.5s ease-in-out; /* <-- THIS IS CRUCIAL FOR SMOOTHNESS */
    height: 100%;
    flex-wrap: nowrap;
    /* width is set by JS, but if you have a width here, remove it. */
}

/* Individual Slide - Each image container */
.slide {
    flex-shrink: 0;
    width: 100%; /* <-- THIS IS CRUCIAL for each slide to occupy full visible width */
    height: 100%;
    box-sizing: border-box;
    position: relative;
}
/* Image within the Slide */
.slide img {
    width: 100%; /* Image fills the entire width of its .slide container */
    height: 100%; /* Image fills the entire height of its .slide container */
    object-fit: cover; /* IMPORTANT: Scales the image to cover the entire area, cropping if necessary, without distortion */
    display: block; /* Removes any extra space below the image (common for inline elements) */
}

/* Slide Caption */
.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Semi-transparent black background */
    color: white;
    padding: 15px; /* More padding for better appearance */
    text-align: center;
    font-size: 1.1em;
}

/* Navigation Buttons (Prev/Next) */
.slider-prev,
.slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%); /* Center vertically */
    background-color: rgba(0, 0, 0, 0.7); /* Darker background for better visibility */
    color: white;
    border: none;
    padding: 12px 18px;
    cursor: pointer;
    z-index: 10; /* Ensure buttons are above the images */
    font-size: 1.5em; /* Larger arrow icons */
    border-radius: 5px; /* Slightly rounded corners */
    user-select: none; /* Prevent text selection on buttons */
}

.slider-prev {
    left: 15px;
}

.slider-next {
    right: 15px;
}
/* Quick Links on Welcome Page */
.quick-links {
    text-align: center;
    margin-top: 30px;
}

.quick-links .btn {
    margin: 10px;
    padding: 12px 30px;
    font-size: 1.1em;
}


/* Footer */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 15px 0;
    margin-top: 30px;
}

footer p {
    margin: 0;
}

/* Responsive Design (Basic) */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }
    nav ul li {
        display: block;
        margin: 5px 0;
    }
    .quick-links .btn {
        display: block;
        margin: 10px auto;
        width: 80%;
    }
    .latest-updates .updates-column {
        width: 100%;
        margin-bottom: 20px;
    }
    .image-grid {
        grid-template-columns: 1fr; /* Single column on small screens */
    }
}

/* Specific styles for index.php sections */
.welcome-message {
    text-align: center;
}

.latest-updates {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
}

.updates-column {
    flex: 1;
    min-width: 300px; /* Ensures columns don't get too small */
    background-color: #e0f2f1; /* Light teal background */
    padding: 20px;
    border-radius: 8px;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.1);
}

.updates-column ul {
    list-style: none;
    padding: 0;
}

.updates-column li {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #b2dfdb;
}

.updates-column li:last-child {
    border-bottom: none;
}

.updates-column h3 {
    color: #00796b; /* Darker teal */
    border-bottom: 1px solid #80cbc4;
}

/* Admissions Page specific */
.admissions-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px dashed #e0e0e0;
    border-radius: 5px;
}

.admissions-section .note {
    font-size: 0.9em;
    color: #666;
    margin-top: 10px;
}

/* News & Events Page specific */
.event-item, .announcement-item {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 5px;
    background-color: #fafafa;
}

.event-item h4, .announcement-item h4 {
    margin-top: 0;
    color: #00796b;
    border-bottom: none;
}

.event-meta, .announcement-meta {
    font-size: 0.9em;
    color: #777;
    margin-bottom: 10px;
}

/* Contact Page specific */
.contact-info p {
    margin-bottom: 5px;
}

.contact-info a {
    color: #007bff;
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

.map-section iframe {
    border-radius: 8px;
}

.back-link {
    text-align: center;
    margin-top: 20px;
}
.back-link a {
    color: #004d40;
    text-decoration: none;
    font-weight: bold;
}
.back-link a:hover {
    text-decoration: underline;
}
/* Docked Social Media Links */
.docked-social-links {
    position: fixed;
    right: 0;
    top: 50%; /* Start at vertical center */
    transform: translateY(-50%); /* Adjust up by half its own height */
    /* This ensures it's truly centered regardless of its number of social icons */

    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 8px rgba(0,0,0,0.1);
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    overflow: hidden;
    z-index: 1000; /* Give it a high z-index to ensure it stays on top of other content */
}

.docked-social-links .social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    color: white;
    font-size: 1.5em;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

/* Specific colors for each social icon (optional, but good branding) */
.docked-social-links .whatsapp {
    background-color: #25D366; /* WhatsApp green */
}

.docked-social-links .facebook {
    background-color: #1877F2; /* Facebook blue */
}

.docked-social-links .twitter {
    background-color: #1DA1F2; /* Twitter blue */
}

.docked-social-links .social-icon:hover {
    transform: translateX(-5px); /* Slide slightly to the left on hover */
    box-shadow: inset 3px 0 10px rgba(0,0,0,0.2); /* Inner shadow on hover */
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .docked-social-links {
        /* You might want to move them to the bottom or make them smaller on mobile */
        right: 10px; /* Keep a small margin */
        bottom: 10px; /* Dock to bottom instead of side */
        top: auto; /* Remove top positioning */
        transform: none; /* Remove transform */
        flex-direction: row; /* Arrange horizontally on bottom */
        width: auto; /* Auto width */
        border-radius: 8px; /* Round corners normally */
        box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* Adjusted shadow */
    }
    .docked-social-links .social-icon {
        width: 45px; /* Slightly smaller */
        height: 45px; /* Slightly smaller */
        font-size: 1.3em;
        border-radius: 50%; /* Make icons circular on mobile */
        margin: 0 5px; /* Space between icons */
    }
    .docked-social-links .social-icon:hover {
        transform: translateY(-3px); /* Lift slightly on hover for mobile */
        box-shadow: none; /* No inner shadow */
    }
}
/* Basic styling for the main content container to avoid overlap */
body {
    margin: 0;
    font-family: Arial, sans-serif;
}
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

/* Hero Slider Styles */
.hero-slider {
    position: relative;
    width: 100%;
    height: 450px; /* Adjust height as needed */
    overflow: hidden; /* Hide parts of images outside the slider */
    margin-bottom: 30px; /* Space below the slider */
    background-color: #f0f0f0; /* Fallback background color */
}

.hero-slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover; /* Cover the entire area */
    background-position: center; /* Center the image */
    background-repeat: no-repeat;
    opacity: 0; /* All slides are hidden by default */
    animation-name: fadeSlider; /* Link to the keyframe animation */
    animation-timing-function: ease-in-out; /* Smooth transition */
    animation-iteration-count: infinite; /* Loop indefinitely */
    /* animation-duration and animation-delay are set inline by PHP */
}

/* Keyframe animation for fading slides */
@keyframes fadeSlider {
    0% { opacity: 0; } /* Start hidden */
    10% { opacity: 1; } /* Fade in */
    25% { opacity: 1; } /* Stay visible for a while */
    35% { opacity: 0; } /* Fade out */
    100% { opacity: 0; } /* Stay hidden until the next cycle */
}

/* Caption styling */
.hero-slider .slide-caption {
    position: absolute;
    bottom: 20%; /* Position from the bottom */
    left: 10%;
    right: 10%;
    background-color: rgba(0, 0, 0, 0.6); /* Semi-transparent black background */
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    max-width: 600px; /* Limit caption width */
    margin: 0 auto; /* Center the caption horizontally */
}

.hero-slider .slide-caption h2 {
    margin-top: 0;
    font-size: 2.5em; /* Large heading for impact */
    margin-bottom: 10px;
}
.hero-slider .slide-caption p {
    font-size: 1.2em;
    line-height: 1.5;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-slider {
        height: 300px; /* Shorter slider height on smaller screens */
    }
    .hero-slider .slide-caption h2 {
        font-size: 1.8em;
    }
    .hero-slider .slide-caption p {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .hero-slider {
        height: 250px;
    }
    .hero-slider .slide-caption {
        padding: 15px;
        bottom: 10%;
    }
    .hero-slider .slide-caption h2 {
        font-size: 1.5em;
    }
    .hero-slider .slide-caption p {
        font-size: 0.9em;
    }
}
/* News Ticker Styling */
.news-ticker-wrapper {
    background-color: #004d99; /* Darker blue background for the ticker */
    color: #fff;
    padding: 8px 20px; /* Padding for the ticker bar */
    display: flex; /* Use flexbox for alignment */
    align-items: center; /* Vertically center items */
    overflow: hidden; /* Hide overflowing text */
    white-space: nowrap; /* Keep text on a single line */
    font-size: 0.9em;
    position: relative; /* Needed for absolute positioning of elements inside */
    z-index: 100; /* Ensure it stays above other content */
    border-bottom: 1px solid rgba(255,255,255,0.1); /* Subtle separator */
}

.news-ticker-wrapper .ticker-label {
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0; /* Prevent label from shrinking */
    padding-right: 15px;
    border-right: 1px solid rgba(255,255,255,0.3); /* Separator for label */
}

.news-ticker-wrapper .ticker-date {
    margin-left: auto; /* Push date to the right */
    padding-left: 15px;
    border-left: 1px solid rgba(255,255,255,0.3); /* Separator for date */
    flex-shrink: 0; /* Prevent date from shrinking */
}

.news-ticker {
    display: inline-block;
    animation: ticker-scroll linear infinite;
    /* Adjust animation duration based on content length or desired speed */
    animation-duration: 30s; /* Default, will be overridden by JS for better control */
    animation-play-state: running; /* Keep it running by default */
}

.news-ticker:hover {
    animation-play-state: paused; /* Pause on hover */
}

.news-ticker .ticker-item {
    display: inline-block; /* Display items in a line */
    margin-right: 40px; /* Space between headlines */
    text-decoration: none; /* Remove underline if it were a link */
    color: inherit; /* Inherit color from parent */
}

/* Keyframe animation for horizontal scrolling */
@keyframes ticker-scroll {
    0% {
        transform: translateX(100%); /* Start off-screen to the right */
    }
    100% {
        transform: translateX(-100%); /* Move completely off-screen to the left */
    }
}

/* Ensure header content is pushed down */
header {
    width: 100%;
    /* No fixed height, allow content to dictate height */
}

header .container {
    padding-top: 15px; /* Add some padding to separate from ticker if needed */
    padding-bottom: 15px;
    /* Ensure there's space below the ticker if using fixed header styles */
}

/* If your main header has a background, ensure it doesn't cover the ticker */
header {
    background-color: #007bff; /* Example: Blue background for the main header */
    color: white;
}
/* Docked Apply Online Button */
.docked-apply-online {
    position: fixed; /* Keep it fixed on scroll */
    left: 0; /* Dock to the left side */
    top: 50%; /* Start at vertical center */
    transform: translateY(-50%); /* Adjust to truly center vertically */
    z-index: 1000; /* Higher z-index than social icons to ensure it's on top if any overlap */

    /* Button Styling */
    background-color: #007bff; /* A prominent blue color for the button */
    padding: 15px 20px;
    border-top-right-radius: 8px; /* Rounded corners on the right side */
    border-bottom-right-radius: 8px;
    box-shadow: 2px 0 8px rgba(0,0,0,0.1); /* Subtle shadow */
    transition: background-color 0.3s ease, transform 0.2s ease; /* Smooth transitions for hover */
}

.docked-apply-online a {
    color: white; /* White text color */
    text-decoration: none; /* Remove underline */
    font-weight: bold;
    font-size: 1.1em;
    display: block; /* Make the whole padding area clickable */
    white-space: nowrap; /* Keep text on one line */
}

.docked-apply-online:hover {
    background-color: #0056b3; /* Darker blue on hover */
    transform: translateY(-50%) translateX(5px); /* Slide slightly to the right on hover */
}

/* Ensure there's enough space for both docked elements on the sides, if content overlaps */
body {
    /* If your main content is too wide and overlaps these fixed elements,
       you might need to add padding to the body or main container.
       For example, if your apply button is ~100px wide and social icons ~50px: */
    /* padding-left: 120px; */ /* Example: button width + margin */
    /* padding-right: 70px; */ /* Example: social icons width + margin */
}


/* Responsive adjustments for smaller screens (also from previous instructions) */
@media (max-width: 768px) {
    .docked-apply-online {
        left: 10px; /* Small margin from left */
        bottom: 10px; /* Move to bottom of screen */
        top: auto; /* Remove top positioning */
        transform: none; /* Reset transform */
        padding: 10px 15px; /* Smaller padding for mobile */
        font-size: 0.9em;
        border-radius: 5px; /* More standard rounded corners */
        box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* Adjusted shadow */
    }
    .docked-apply-online:hover {
        transform: translateY(-3px); /* Lift slightly on hover for mobile */
    }

    /* Adjust social media icons to also move to bottom if they clash */
    .docked-social-links {
        right: 10px;
        bottom: 10px;
        top: auto;
        transform: none;
        flex-direction: row;
        width: auto;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    .docked-social-links .social-icon {
        width: 45px;
        height: 45px;
        font-size: 1.3em;
        border-radius: 50%;
        margin: 0 5px;
    }
    .docked-social-links .social-icon:hover {
        transform: translateY(-3px);
        box-shadow: none;
    }
}