/* style.css */
:root {
    --primary-color: #800000; /* Deep Maroon */
    --secondary-color: #D4AF37; /* Metallic Gold */
    --accent-color: #FDF8E7; /* Light Cream for backgrounds */
    --text-color: #333333;
    --light-bg: #F9FAFC;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Open Sans', sans-serif; }

body { 
    color: var(--text-color); 
    background-color: var(--accent-color); 
    line-height: 1.6; 
}

/* Top Bar */
.top-bar { 
    background: var(--primary-color); 
    color: #fff; 
    padding: 8px 20px; 
    font-size: 13px; 
    display: flex; 
    justify-content: space-between; 
    flex-wrap: wrap; 
}
.top-bar a { color: var(--secondary-color); text-decoration: none; font-weight: 600; }

/* Main Header with Logos */
.main-header { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 15px 5%; 
    background: var(--accent-color); 
    border-bottom: 3px solid var(--secondary-color); 
}
.header-left, .header-right { flex: 1; display: flex; justify-content: center; }
.school-logo, .cbse-logo { max-height: 80px; width: auto; }

.header-center { flex: 3; text-align: center; }
.header-center h1 { 
    color: var(--primary-color); 
    font-size: 32px; 
    font-weight: 700; 
    text-transform: uppercase; 
    margin-bottom: 5px; 
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1); 
}
.header-center p { 
    color: var(--primary-color); /* Dark Maroon for visibility */
    font-size: 16px; 
    font-weight: 600; 
    letter-spacing: 1px; 
}

/* Navigation */
.navbar { background: var(--primary-color); box-shadow: 0 4px 6px rgba(0,0,0,0.1); position: relative; z-index: 1000; }
.nav-menu { list-style: none; display: flex; justify-content: center; margin: 0; padding: 0; }
.nav-menu li { position: relative; }
.nav-menu a { display: block; color: #fff; text-decoration: none; padding: 15px 25px; font-weight: 600; transition: 0.3s; font-size: 15px; }
.nav-menu a:hover { background: var(--secondary-color); color: var(--primary-color); }

/* Mobile Toggle Button */
.mobile-toggle { display: none; background: none; border: none; color: #fff; font-size: 20px; padding: 12px 20px; cursor: pointer; width: 100%; text-align: left; font-weight: bold; }

/* Dropdowns */
.nav-menu ul { position: absolute; left: 0; top: 100%; background: var(--primary-color); list-style: none; min-width: 220px; display: none; box-shadow: 0 4px 10px rgba(0,0,0,0.2); border-top: 3px solid var(--secondary-color); }
.nav-menu li:hover > ul { display: block; }
.nav-menu ul li { border-bottom: 1px solid rgba(255,255,255,0.05); }
.nav-menu ul ul { left: 100%; top: -3px; }

/* Image Slider */
.slider-container { position: relative; width: 100%; max-height: 500px; overflow: hidden; background: #000; }
.slide { display: none; width: 100%; }
.slide img { width: 100%; height: 500px; object-fit: cover; opacity: 0.7; }
.slide.active { display: block; animation: fade 1.5s; }
.slide-content { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; color: #fff; width: 90%; }
.slide-content h2 { font-size: 45px; text-shadow: 2px 2px 5px rgba(0,0,0,0.8); margin-bottom: 10px; color: var(--secondary-color); }
.slide-content p { font-size: 20px; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
@keyframes fade { from { opacity: 0.4; } to { opacity: 1; } }
.slider-nav { position: absolute; bottom: 20px; width: 100%; text-align: center; }
.dot { height: 12px; width: 12px; margin: 0 5px; background-color: #bbb; border-radius: 50%; display: inline-block; cursor: pointer; transition: background-color 0.3s ease; }
.dot.active, .dot:hover { background-color: var(--secondary-color); }

/* Main Content Layout */
.content-wrapper { max-width: 1200px; margin: 40px auto; padding: 0 20px; display: grid; gap: 30px; }
.grid-row-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; }
.grid-row-half { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }

/* Styled Cards (Desks, Vision, Mission, News) */
.card { background: #fff; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); padding: 30px; border-top: 4px solid var(--primary-color); transition: transform 0.3s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); }
.card h2, .card h3 { color: var(--primary-color); margin-bottom: 15px; display: flex; align-items: center; gap: 10px; }
.card h2::after, .card h3::after { content: ''; flex: 1; height: 2px; background: var(--accent-color); margin-left: 10px; }

/* News & Notice Board */
.news-list { list-style: none; }
.news-list li { margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px solid #eee; }
.news-date { color: var(--secondary-color); font-weight: bold; font-size: 12px; display: block; margin-bottom: 5px; }

/* Achievements Section */
.achievements-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-top: 20px; }
.achievement-box { background: var(--accent-color); border-radius: 8px; border: 1px solid #e8dfc1; }
.achievement-box h4 { color: var(--primary-color); margin-bottom: 10px; font-size: 18px; }

/* Footer */
.site-footer { background: var(--primary-color); color: #fff; padding: 50px 20px 20px; margin-top: 50px; }
.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.footer-col h3 { border-bottom: 2px solid var(--secondary-color); padding-bottom: 10px; margin-bottom: 20px; color: var(--secondary-color); }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a { color: #ddd; text-decoration: none; transition: 0.3s; }
.footer-col ul a:hover { color: var(--secondary-color); padding-left: 5px; }
.footer-bottom { text-align: center; padding-top: 20px; margin-top: 40px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 14px; color: #ccc; }

/* =========================================
   RESPONSIVE LAYOUT (MEDIA QUERIES)
   ========================================= */

/* Tablets, Half-Screens & Mobile (1050px and below) */
@media (max-width: 1050px) {
    /* 1. Fix Body Grids (Stacks Notice Board below Left Column) */
    .grid-row-2, .grid-row-half { 
        grid-template-columns: 1fr; 
    }
    
    /* 2. Header Folding Order & Alignment */
    .main-header { 
        flex-direction: column; 
        text-align: center; 
        gap: 15px; 
    }
    .header-left { order: 1; }   /* 1st: School Logo */
    .header-center { order: 2; } /* 2nd: School Name & Address */
    .header-right { order: 3; }  /* 3rd: CBSE Logo */
    
    /* 3. Mobile Menu Setup */
    .mobile-toggle { display: block; }
    .nav-menu { display: none; flex-direction: column; }
    .nav-menu ul { position: static; display: none; padding-left: 20px; border-top: none; box-shadow: none; }
    .nav-menu ul ul { position: static; }
    
    /* 4. Top Bar Adjustments */
    .top-bar { flex-direction: column; text-align: center; gap: 10px; }
    
    /* 5. Slider Adjustments for smaller screens */
    .slide-content h2 { font-size: 30px; }
    .slide-content p { font-size: 16px; }
    .slide img { height: 350px; }
    .slider-container { max-height: 350px; }
}

/* Small Mobile sizing for fonts (screens smaller than 768px) */
@media (max-width: 768px) {
    .header-center h1 { font-size: 22px; line-height: 1.3; margin-bottom: 8px; }
    .header-center p { font-size: 13px; letter-spacing: 0; }
}