/* =========================================
   1. GLOBAL RESET & BASE
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-image: linear-gradient(to top, #fcc5e4 0%, #fda34b 15%, #ff7882 35%, #c8699e 52%, #7046aa 71%, #0c1db8 87%, #020f75 100%);
    background-attachment: fixed;
    font-family: 'Roboto Slab', serif;
    color: #333;
    overflow-x: hidden;
}

.container {
    width: 90%;
    margin: 0 auto;
}

/* =========================================
   2. NAVIGATION BAR
   ========================================= */
.nav_bar {
    width: 95%;
    height: 80px;
    margin: 10px auto;
    background: white;
    border-radius: 20px;
    position: sticky;
    top: 10px;
    z-index: 1000;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.nav-container {
    width: 100%;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-family: 'Impact', sans-serif;
    transition: 0.3s;
}

.nav-links a:hover {
    color: royalblue;
}

.menu-toggle, .hamburger {
    display: none;
}

/* =========================================
   3. HERO SLIDESHOW
   ========================================= */
.slideshow-container {
    width: 90%;
    margin: 20px auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.slides-wrapper {
    display: flex;
    width: 400%;
    animation: slide-animation 16s infinite;
}

.slide { width: 100%; }

.slide img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;
}

@keyframes slide-animation {
    0%, 20% { transform: translateX(0); }
    25%, 45% { transform: translateX(-25%); }
    50%, 70% { transform: translateX(-50%); }
    75%, 95% { transform: translateX(-75%); }
    100% { transform: translateX(0); }
}

/* =========================================
   4. SECTION STYLES
   ========================================= */
.director_desk {
    padding: 60px 0;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('/photos/5765789.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    color: white;
    margin-bottom: 20px;
}

.flex-row { display: flex; gap: 40px; align-items: center; }

.dirimg img {
    width: 350px;
    height: 350px;
    border-radius: 20px;
    object-fit: cover;
    border: 5px solid white;
}

.dirwrite h1 {
    font-family: 'Bungee', cursive;
    color: royalblue;
    margin-bottom: 15px;
}

/* Grid Layout for Mission/Vision */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 20px auto;
}

.card {
    padding: 30px;
    height: 400px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    color: white;
    background-size: cover;
    background-position: center;
}

.card h1 { font-family: 'Bungee', cursive; margin-bottom: 15px; color: royalblue; }

.mission-card { background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('/missvissvalues/22f82931.jfif'); }
.vision-card { background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('/missvissvalues/7b0eb49b.jfif'); }
.values-card { background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('/missvissvalues/cc9ac584.jfif'); }

.whyus {
    background: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8)), url('/missvissvalues/cc9ac584.jfif');
    background-size: cover;
    padding: 50px;
    border-radius: 20px;
    color: white;
    margin-bottom: 20px;
}

.whyus h1 { font-family: 'Bungee', cursive; margin-bottom: 20px; }
.styled-list { list-style: square; padding-left: 20px; line-height: 2; }

/* =========================================
   5. FOOTER
   ========================================= */
.contact-footer {
    background: #111;
    color: #eee;
    padding: 60px 0 20px 0;
    border-radius: 20px 20px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-title {
    font-size: 1.4rem;
    margin-bottom: 25px;
    border-bottom: 2px solid royalblue;
    display: inline-block;
}

.info-item { display: flex; gap: 15px; margin-bottom: 15px; }
.info-item i { color: royalblue; font-size: 1.2rem; }

.message-form input, .message-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    background: #222;
    border: 1px solid #444;
    color: white;
    border-radius: 5px;
}

.send-btn {
    background: royalblue;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}

.send-btn:hover { background: #d9534f; }

.social-list { list-style: none; }
.social-list li { margin-bottom: 15px; }
.social-list a { color: #ccc; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.social-list a:hover { color: white; }

.footer-bottom {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #333;
    font-size: 0.8rem;
}

/* =========================================
   6. MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 992px) {
    .flex-row { flex-direction: column; text-align: center; }
    .grid-3 { grid-template-columns: 1fr; }
    .card { height: auto; padding: 60px 20px; }
    .dirimg img { width: 100%; height: auto; }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
        cursor: pointer;
    }
    .hamburger span {
        display: block;
        width: 25px;
        height: 3px;
        background: #333;
        margin: 5px 0;
        transition: 0.3s;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: white;
        padding: 30px;
        text-align: center;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        border-radius: 0 0 20px 20px;
    }

    .menu-toggle:checked ~ .nav-links { display: flex; }
    .slide img { height: 300px; }
}
/* =========================================
   7. ANNOUNCEMENTS & NOTICE BOARD
   ========================================= */
.announcements {
    padding: 40px 0;
    margin-bottom: 20px;
}

.flex-row-reverse {
    display: flex;
    flex-direction: row-reverse; /* Puts Notice Board on the right */
    gap: 40px;
    align-items: flex-start;
}

/* Notice Board Styling */
.notice-board {
    flex: 1;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.3);
}

.notice-header {
    background: royalblue;
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.notice-header h2 {
    font-family: 'Bungee', cursive;
    font-size: 1.2rem;
}

.notice-content {
    padding: 20px;
    height: 250px;
}

.notice-content ul {
    list-style: none;
}

.notice-content li {
    padding: 12px 0;
    border-bottom: 1px dashed #ddd;
    font-size: 0.95rem;
    line-height: 1.4;
}

.new-tag {
    background: #d9534f;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 8px;
    text-transform: uppercase;
    font-weight: bold;
}

.date {
    font-weight: bold;
    color: royalblue;
    margin-right: 5px;
}

.view-all-btn {
    display: block;
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    color: royalblue;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    transition: 0.3s;
}

.view-all-btn:hover {
    background: #eee;
}

/* Featured Event Styling */
.featured-news {
    flex: 1.5;
}

.event-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 25px;
    border-radius: 15px;
    display: flex;
    gap: 20px;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.event-date {
    background: royalblue;
    color: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    min-width: 80px;
}

.event-date .day {
    display: block;
    font-size: 1.8rem;
    font-weight: bold;
}

.event-date .month {
    font-size: 0.9rem;
}

.event-info h3 {
    margin-bottom: 10px;
    color: #333;
}

/* Responsive adjustment */
@media (max-width: 992px) {
    .flex-row-reverse {
        flex-direction: column; /* Stack vertically on mobile */
    }
    .featured-news { order: 1; }
    .notice-board { order: 2; width: 100%; }
}
/* --- PROGRESS SECTION --- */
.progress {
    background-color: rgba(0,0,0,0.5);
    color: white;
    width: 95%;
    margin: 10px auto;
    padding: 20px;
    border-radius: 20px;
    min-height: 200px; /* Changed from height to min-height for responsiveness */
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.progress h1 {
    font-family: "bungee", cursive;
    font-weight: 300;
    margin-bottom: 10px;
}

.progress p {
    font-family: "roboto slab", sans-serif;
    line-height: 1.6; /* Improved readability */
}

/* --- ABOUT SITAMARHI PUBLIC SCHOOL --- */
.aboutus {
    width: 95%;
    margin: 20px auto;
    border-radius: 20px;
    /* Change 'height' to 'min-height' to prevent squashing on desktop */
    min-height: 500px; 
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centers content vertically */
    gap: 20px;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    padding: 40px 30px; /* Added more horizontal padding for desktop */
}

.aboutus h1 {
    color: white;
    font-family: "bungee", cursive;
    font-weight: 300;
    margin-bottom: 20px;
    text-align: center;
}

.imgpara {
    display: flex;
    flex-direction: row; /* Side-by-side on desktop */
    gap: 40px; /* More space between image and text */
    align-items: center;
    max-width: 1100px; /* Keeps the content from spreading too wide */
}

.spsimg img {
    /* Your original desktop dimensions */
    width: 400px; 
    height: 400px;
    border-radius: 20px;
    object-fit: cover;
    flex-shrink: 0; /* Prevents the image from getting squished by the text */
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.spspara {
    color: white;
    font-family: "roboto slab", sans-serif;
    line-height: 1.8; /* Better spacing for readability */
    font-size: 1.05rem;
}

/* --- MOBILE VIEW (Best View Kept Intact) --- */
@media (max-width: 992px) {
    .aboutus {
        height: auto;
        padding: 30px 15px;
    }

    .imgpara {
        flex-direction: column; /* Stack vertically as you liked */
        gap: 20px;
        text-align: center;
    }

    .spsimg img {
        width: 100%;
        max-width: 350px; /* Controlled size for mobile */
        height: auto;
    }

    .spspara {
        text-align: center;
    }
}
/* --- MOTTO SECTION --- */
.motto {
    width: 95%;
    min-height: 300px; /* Changed from height to min-height */
    margin: 0 auto;
    color: white;
    background-color: rgba(0,0,0,0.5);
    margin-top: 10px;
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* --- RESPONSIVE FIX (Crucial for Hosting) --- */
@media (max-width: 992px) {
    .imgpara {
        flex-direction: column; /* Stacks image on top of text on phones */
        text-align: center;
    }

    .aboutus, .motto, .progress {
        height: auto; /* Allows boxes to grow with text on small screens */
        padding: 40px 15px;
    }

    .spsimg img {
        max-width: 100%;
    }
}
/* =========================================
   10. FACILITIES SECTION STYLES
   ========================================= */
.school-facilities {
    width: 95%;
    margin: 0 auto;
    border-radius: 20px;
    margin-top: 10px;
    padding: 80px 0;
    background-color: rgba(0,0,0,0.5);
    margin-bottom: 10px;
}
.center-title{
    color: white;
    font-family: "bungee" , cursive;
    font-weight: 300;
    text-align: center;
    padding: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid white;
}

.facility-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.facility-card {
    background: #fdfdfd;
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid #eee;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

/* Hover Effect: Card lifts up and border changes color */
.facility-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0, 128, 128, 0.1);
    border-color: #008080; /* Teal from your footer */
}

.facility-icon {
    width: 80px;
    height: 80px;
    background: rgba(0, 128, 128, 0.1); /* Light Teal tint */
    color: #008080;
    font-size: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    border-radius: 50%;
    transition: 0.4s;
}

.facility-card:hover .facility-icon {
    background: #008080;
    color: white;
    transform: rotateY(360deg);
}

.facility-card h3 {
    font-family: 'Roboto Slab', serif;
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #333;
}

.facility-card p {
    color: #777;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 600px) {
    .facility-grid {
        grid-template-columns: 1fr;
    }
}
/* --- Admission Specific Styles --- */
.dual-section {
    display: flex;
    width: 95%;
    margin: 10px auto;
    gap: 20px;
}

.info-box {
    flex: 1; /* Makes both boxes equal width on desktop */
    margin: 0 !important; /* Overriding your margin for the grid look */
    text-align: left !important;
    align-items: flex-start !important;
}

.step-list {
    padding-left: 20px;
}

.step-list li {
    margin-bottom: 15px;
    color: white;
}

.doc-list {
    list-style: none;
    padding: 0;
}

.doc-list li {
    margin-bottom: 10px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.doc-list i {
    color: #ffd700; /* Gold icons for documents */
}

.test-details p {
    margin-bottom: 10px;
    border-left: 3px solid #008080;
    padding-left: 10px;
}

/* --- Responsive Fix for Admission Page --- */
@media (max-width: 992px) {
    .dual-section {
        flex-direction: column; /* Stacks the Doc and Test boxes on mobile */
    }
    
    .info-box {
        width: 100% !important;
    }
}
/* --- Syllabus Specific Styling --- */

.no-test-box {
    min-height: 300px !important;
    text-align: center;
}

/* --- Dedicated Syllabus Page Styles --- */
.syllabus-section {
    width: 95%;
    margin: 20px auto;
    background-color: rgba(0,0,0,0.5);
    border-radius: 20px;
    padding: 40px 20px;
}

.syllabus-grid {
    display: grid;
    /* Forces 5 columns on Desktop */
    grid-template-columns: repeat(5, 1fr); 
    gap: 15px;
    margin-top: 30px;
}

.syllabus-card-mini {
    background: #fdfdfd;
    padding: 20px 10px; /* Smaller padding for mini look */
    border-radius: 15px;
    text-align: center;
    border: 2px solid transparent;
    transition: 0.3s ease;
}

.syllabus-card-mini:hover {
    transform: translateY(-5px);
    border-color: #008080;
}

.syllabus-card-mini i {
    font-size: 1.5rem; /* Smaller icon */
    color: #ff4757;
    margin-bottom: 10px;
}

.syllabus-card-mini h3 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 10px;
    font-family: 'Roboto Slab', serif;
}

.mini-btn {
    display: inline-block;
    padding: 5px 15px;
    background: #008080;
    color: white !important;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* --- Responsive Adjustments --- */
@media (max-width: 1024px) {
    .syllabus-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 per row on tablets */
    }
}

@media (max-width: 600px) {
    .syllabus-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 per row on phones */
    }
}
/* --- Academic Page Specific Styling --- */
.academic-section {
    width: 95%;
    margin: 20px auto;
    background-color: rgba(0,0,0,0.6);
    border-radius: 20px;
    padding: 40px 20px;
    color: white;
}

/* Holiday Table Styles */
.table-wrapper {
    overflow-x: auto; /* Makes table scrollable on small phones */
    margin-top: 20px;
}

.holiday-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    color: #333;
    border-radius: 10px;
    overflow: hidden;
}

.holiday-table th {
    background-color: #008080;
    color: white;
    padding: 15px;
    text-align: left;
    font-family: 'Bungee', cursive;
}

.holiday-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    font-family: 'Roboto Slab', serif;
}

.holiday-table tr:hover {
    background-color: #f9f9f9;
}

/* Book List Grid Styles */
.row-label {
    font-family: 'Bungee', cursive;
    color: #ffd700;
    margin: 30px 0 15px 0;
    font-size: 1.2rem;
    border-left: 4px solid #ffd700;
    padding-left: 10px;
}

.book-grid {
    display: flex;
    flex-wrap: nowrap; /* Forces one row on desktop */
    gap: 15px;
    margin-bottom: 20px;
}

.book-card {
    flex: 1; /* Makes all cards equal width */
    background: #fdfdfd;
    padding: 20px 10px;
    border-radius: 15px;
    text-align: center;
    color: #333;
    border: 2px solid transparent;
    transition: 0.3s;
}

.book-card:hover {
    transform: translateY(-5px);
    border-color: #ffd700;
}

.book-card h4 {
    font-family: 'Bungee', cursive;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .book-grid {
        flex-wrap: wrap; /* Allows wrapping on tablets/phones */
    }
    
    .book-card {
        flex: 1 1 150px; /* Cards will stack 2 or 3 per row on mobile */
    }
}
.download-btn1{
    color: royalblue;
    background-color: white;
    padding: 10px;
    font-family: "roboto slab" , sans-serif;
    text-decoration: none;
    border-radius: 5px;
}
.download-btn1:hover{
    color: #fda34b;
}
/* --- Gallery Specific Styles --- */
.gallery-section {
    width: 95%;
    margin: 20px auto;
    background-color: rgba(0,0,0,0.6);
    border-radius: 20px;
    padding: 40px 20px;
}

.gallery-grid {
    display: grid;
    /* This creates exactly 3 columns on Desktop */
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px;
    margin-top: 30px;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden; /* Keeps the zoom effect inside the box */
    height: 300px; /* Uniform height for all gallery boxes */
    cursor: pointer;
    border: 2px solid rgba(255,255,255,0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures images don't look stretched */
    transition: transform 0.5s ease;
}

/* Zoom effect on hover */
.gallery-item:hover img {
    transform: scale(1.1);
}

/* Hover Overlay Text */
.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 128, 128, 0.7); /* Teal tint on hover */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.4s;
}

.gallery-overlay span {
    color: white;
    font-family: 'Bungee', cursive;
    font-size: 1.2rem;
    text-align: center;
    padding: 10px;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* --- Responsive Adjustments --- */
@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 images for tablets */
    }
}

@media (max-width: 600px) {
    .gallery-grid {
        /* This creates exactly 1 image per row on Mobile */
        grid-template-columns: 1fr; 
    }
    
    .gallery-item {
        height: 250px; /* Slightly shorter for mobile screens */
    }
}
/* --- Contact Page Specific Styles --- */
.map-section {
    width: 95%;
    margin: 20px auto;
    border-radius: 20px;
    overflow: hidden;
    border: 5px solid rgba(255, 255, 255, 0.1);
}

.dual-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* Address is smaller, Form is wider */
    gap: 30px;
    margin-top: 30px;
    margin-bottom: 50px;
}

.info-card, .form-card {
    background: rgba(0, 0, 0, 0.6);
    padding: 40px;
    border-radius: 20px;
    color: white;
}

.info-card h2, .form-card h2 {
    font-family: 'Bungee', cursive;
    color: #ffd700;
    margin-bottom: 25px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-item i {
    color: #008080;
    font-size: 1.5rem;
    margin-top: 5px;
}

.social-links-contact {
    margin-top: 30px;
    display: flex;
    gap: 20px;
}

.social-links-contact a i {
    font-size: 2rem;
    color: white;
    transition: 0.3s;
}

.social-links-contact a:hover i {
    color: #008080;
    transform: translateY(-5px);
}

/* Form Styling */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input, .contact-form textarea {
    padding: 15px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    font-family: 'Roboto Slab', serif;
}

.contact-form button {
    cursor: pointer;
    border: none;
    transition: 0.4s;
}

/* --- Responsive Adjustments --- */
@media (max-width: 992px) {
    .dual-grid {
        grid-template-columns: 1fr; /* Stack vertically on mobile */
    }
    
    .info-card, .form-card {
        padding: 25px;
    }
}