/* ═══════════════════════════════════════════════════════════
   PM SHRI KASTURBA GANDHI BALIKA VIDYALAYA – Main Stylesheet
═══════════════════════════════════════════════════════════ */
*{margin:0;padding:0;box-sizing:border-box}
:root{
  --pc:#1e3a8a; --sc:#2563eb; --ac:#f59e0b;
  --td:#1f2937; --tl:#6b7280; --wh:#ffffff;
  --lb:#ffffff; --lb-alt:#f9fafb; --db:#1f2937;
  --bg-blue:#1e3a8a; --nav-blue:#1e3a8a;
}
html{scroll-behavior:smooth}
img{max-width:100%;height:auto;display:block}
body{font-family:'Poppins',sans-serif;line-height:1.6;color:var(--td);background:#fff;overflow-x:hidden}
body.admin-mode{padding-top:60px}

/* ── Admin Toolbar ── */
.admin-toolbar{background:#1e3a8a;color:#fff;padding:0 15px;height:60px;display:flex;justify-content:space-between;align-items:center;font-size:.82rem;position:fixed;top:0;left:0;right:0;z-index:2000;box-sizing:border-box}
.atb-left{display:flex;align-items:center;gap:8px}
.atb-left i{color:#f59e0b}
.atb-right{display:flex;align-items:center;gap:6px;flex-wrap:nowrap}
.atb-btn{background:rgba(255,255,255,.15);color:#fff;border:none;padding:6px 14px;border-radius:6px;font-size:.8rem;font-weight:600;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;gap:5px;transition:background .2s;white-space:nowrap;flex-shrink:0}
.atb-btn:hover{background:rgba(255,255,255,.28)}
.atb-btn.red{background:rgba(220,38,38,.7)}
.atb-btn.red:hover{background:rgba(220,38,38,.9)}

/* ── Header ── */
header{background:#fff;box-shadow:0 2px 10px rgba(0,0,0,.1);position:fixed;width:100%;top:0;left:0;right:0;z-index:1000;transition:top .3s}
body.admin-mode header{top:60px}
.container{width:100%;margin:0 auto;padding:0 1.25rem;max-width:100%}
nav{display:flex;justify-content:space-between;align-items:center;padding:1rem 0;flex-wrap:wrap;gap:0.5rem;position:relative}
.logo{font-size:1.5rem;font-weight:700;color:#1e3a8a;display:flex;align-items:center;gap:10px;text-decoration:none;flex-shrink:0}
.logo i{color:#f59e0b}
.nav-links{display:flex;list-style:none;gap:1.5rem;align-items:center;flex-wrap:wrap}
.nav-links a{text-decoration:none;color:var(--td);font-weight:500;transition:color .3s;font-size:.95rem}
.nav-links a:hover{color:#3b82f6}
.mobile-menu-btn{display:none;font-size:1.5rem;cursor:pointer;padding:8px;min-width:44px;min-height:44px;align-items:center;justify-content:center;border:none;background:transparent;color:#1e3a8a}
.nav-dropdown{position:relative}
.nav-dropdown-content{display:none;position:absolute;background:#fff;min-width:200px;box-shadow:0 8px 16px rgba(0,0,0,.1);border-radius:5px;z-index:1000;top:100%;left:50%;transform:translateX(-50%);padding:.5rem 0}
.nav-dropdown:hover .nav-dropdown-content{display:block}
.nav-dropdown-content a{color:var(--td);padding:.75rem 1rem;text-decoration:none;display:block;font-size:.9rem;transition:background .3s}
.nav-dropdown-content a:hover{background:#f3f4f6;color:#3b82f6}
.nav-dropdown>a::after{content:" \f107";font-family:"Font Awesome 6 Free";font-weight:900;margin-left:5px}
.nav-login-btn{background:#1e3a8a;color:#fff;padding:7px 18px;border-radius:20px;font-size:.85rem;font-weight:600;cursor:pointer;border:none;font-family:inherit;transition:background .2s}
.nav-login-btn:hover{background:#3b82f6}

/* ── Hero ── (solid blue / image with overlay, white text, orange + outline buttons) */
.hero{min-height:100vh;height:auto;background:linear-gradient(135deg,#1e3a8a 0%,#2563eb 100%);background-size:cover;background-position:center;background-repeat:no-repeat;display:flex;align-items:center;justify-content:center;text-align:center;color:#fff;padding:100px 0 80px}
.hero[style*="background:"]{background-size:cover;background-position:center}
.hero-content{display:flex;flex-direction:column;align-items:center;text-align:center;width:100%;max-width:100%}
.hero-content h1{font-size:3.5rem;margin-bottom:1rem;color:var(--wh);animation:fadeInUp 1s ease;text-shadow:2px 2px 4px rgba(0,0,0,0.5);word-wrap:break-word;hyphens:auto}
.hero-content p{font-size:1.25rem;margin-bottom:3rem;text-align:center;animation:fadeInUp 1s ease .2s both;text-shadow:1px 1px 3px rgba(0,0,0,0.5);max-width:100%}
.hero-btns{display:flex;flex-direction:row;gap:1.5rem;flex-wrap:wrap;justify-content:center;padding:20px 0;border-radius:50px;margin-top:1rem}
.btn{display:inline-block;padding:12px 30px;border-radius:30px;text-decoration:none;font-weight:600;transition:all .3s;cursor:pointer;border:none}
.btn-primary{background:#f59e0b;color:#fff}
.btn-primary:hover{background:#d97706;transform:translateY(-2px)}
.btn-secondary{background:transparent;color:#fff;border:2px solid #fff}
.btn-secondary:hover{background:#fff;color:#1e3a8a}
@keyframes fadeInUp{from{opacity:0;transform:translateY(30px)}to{opacity:1;transform:translateY(0)}}

/* ── Sections ── (block layout, no overlap) */
section{display:block;width:100%;position:relative;padding:80px 0;scroll-margin-top:140px;margin:0;overflow:visible;min-height:0}
section:not(.hero){background-clip:padding-box}
.section-title{text-align:center;margin-bottom:1rem}
section:not(.hero):not(.contact) .section-title{margin-bottom:2.5rem}
.section-title h2{font-size:2.5rem;color:#1e3a8a;margin-bottom:1rem;font-weight:700}
.section-title p{color:var(--tl);max-width:600px;margin:0 auto;font-size:1.1rem;font-weight:500}
.st-row{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:10px;margin-bottom:1rem}
.st-row h2{margin-bottom:0}
.edit-btn{background:#f59e0b;color:#fff;border:none;padding:6px 16px;border-radius:20px;font-size:.78rem;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:5px;transition:background .2s}
.edit-btn:hover{background:#d97706}

/* ── About ── (white section, light cards, blue icons) */
.about{background:#fff}
.about-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:1.5rem}
.about-card{padding:2rem;color:#6b7280;border-radius:10px;background:#fff;text-align:center;transition:transform .3s;box-shadow:0 2px 12px rgba(0,0,0,.06);border:1px solid #e5e7eb}
.about-card:hover{transform:translateY(-5px);box-shadow:0 8px 24px rgba(0,0,0,.08)}
.about-card i{font-size:3rem;color:#1e3a8a;margin-bottom:1rem}
.about-card h3{margin-bottom:1rem;color:#1e3a8a;font-weight:700}

/* ── Notifications ── (light section like About, cards with orange left border) */
.notifications{background:var(--lb-alt)}
.notifications .section-title h2{color:#1e3a8a}
.notifications .section-title p{color:var(--tl)}
.notifications-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:1.5rem}
.notification-card{background:#fff;padding:1.5rem;border-radius:10px;border-left:4px solid #f59e0b;box-shadow:0 2px 12px rgba(0,0,0,.06);transition:transform .3s;border-right:1px solid #e5e7eb;border-top:1px solid #e5e7eb;border-bottom:1px solid #e5e7eb}
.notification-card:hover{transform:translateY(-3px);box-shadow:0 8px 24px rgba(0,0,0,.08)}
.notification-date{font-size:.85rem;color:#1e3a8a;font-weight:500;margin-bottom:.5rem}
.notification-card h3{color:#1e3a8a;margin-bottom:.5rem;font-size:1.1rem}
.notification-card p{color:#6b7280;font-size:.9rem;margin-bottom:.8rem}
.notification-tag{display:inline-block;padding:4px 12px;border-radius:20px;font-size:.75rem;font-weight:500;background:#fef3c7;color:#92400e}

/* ── Aim & Objectives ── (white/light section, two columns, blue box + rocket) */
.aim-objectives{background:#fff}
.aim-content{display:grid;grid-template-columns:1fr 1fr;gap:3rem;align-items:center}
.aim-text h3{font-size:1.8rem;color:#1e3a8a;margin-bottom:1rem;font-weight:700}
.aim-text ul{list-style:none;color:#6b7280}
.aim-text li{padding:.6rem 0;display:flex;align-items:flex-start;gap:1rem}
.aim-text li i{color:#f59e0b;margin-top:4px;font-size:1rem}
.aim-image{background:#1e3a8a;border-radius:12px;height:420px;max-height:420px;display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative}
.aim-image img{width:100%;height:100%;object-fit:cover;object-position:center;display:block;border-radius:12px}
.aim-image i{font-size:8rem;color:#fff;opacity:.9}

/* ── Principal ── (white section, blue photo box, orange title) */
.principal{background:var(--lb-alt)}
.principal-content{display:grid;grid-template-columns:minmax(250px,320px) 1fr;gap:3rem;align-items:center}
.principal-image{background:#1e3a8a;border-radius:12px;height:350px;display:flex;align-items:center;justify-content:center;overflow:hidden}
.principal-image img{width:100%;height:100%;object-fit:cover}
.principal-image i{font-size:10rem;color:#fff;opacity:.9}
.principal-message h3{font-size:1.8rem;color:#1e3a8a;margin-bottom:.5rem;font-weight:700}
.principal-message .title{color:#f59e0b;font-weight:600;margin-bottom:1.5rem}
.principal-message p{color:#6b7280;margin-bottom:1rem}

/* ── Academics ── (light grey section, cards: blue top + white bottom) */
.academics{background:var(--lb-alt)}
.academics-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:2rem;align-items:stretch;margin-bottom:2rem}
.academic-card{background:#fff;border-radius:10px;overflow:hidden;box-shadow:0 2px 12px rgba(0,0,0,.08);transition:transform .3s;display:flex;flex-direction:column;height:100%;border:1px solid #e5e7eb}
.academic-card:hover{transform:translateY(-5px);box-shadow:0 8px 24px rgba(0,0,0,.12)}
.academic-img{height:200px;width:100%;background:#1e3a8a;display:flex;align-items:center;justify-content:center;overflow:hidden}
.academic-img img{width:100%;height:100%;object-fit:cover;object-position:center}
.academic-img i{font-size:4rem;color:#fff;opacity:.95}
.academic-img i::before{content:none !important}
.academic-content{padding:1.5rem;flex-grow:1;display:flex;flex-direction:column}
.academic-content h3{color:#1e3a8a;margin-bottom:.5rem;font-weight:700}
.academic-content p{color:#6b7280;font-size:.9rem;margin:0}

/* ── Curriculum ── (white section, cards with gold icon) */
.curriculum{background:#fff}
.curriculum-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:2rem}
.curriculum-card{border:1px solid #e5e7eb;border-radius:10px;padding:2rem;background:#fff;box-shadow:0 2px 8px rgba(0,0,0,.04)}
.curriculum-card h3{color:#1e3a8a;margin-bottom:1rem;display:flex;align-items:center;gap:10px;font-weight:700}
.curriculum-card h3 i{color:#f59e0b}
.curriculum-card ul{list-style:none}
.curriculum-card li{padding:.5rem 0;border-bottom:1px solid #f3f4f6;display:flex;justify-content:space-between}
.curriculum-card li:last-child{border-bottom:none}

/* ── Syllabus / Tables ── (dark blue header, white rows) */
.syllabus{background:var(--lb-alt)}
.syllabus-table,.exam-table,.holidays-table{overflow-x:auto;-webkit-overflow-scrolling:touch}
.syllabus-table table,.exam-table table,.holidays-table table{width:100%;min-width:480px;border-collapse:collapse;background:#fff;border-radius:10px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.06)}
.syllabus-table th,.syllabus-table td,.exam-table th,.exam-table td,.holidays-table th,.holidays-table td{padding:1rem;text-align:left;border-bottom:1px solid #e5e7eb}
.syllabus-table td,.exam-table td,.holidays-table td{color:#374151}
.syllabus-table th,.exam-table th,.holidays-table th{background:#1e3a8a;color:#fff;font-weight:600}
.syllabus-table tr:hover,.exam-table tr:hover,.holidays-table tr:hover{background:#f9fafb}

/* ── Rules & Regulations ── (white section, white cards, blue left border, gold bullets) */
.rules{background:#fff}
.rules-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:2rem}
.rule-card{padding:1.5rem;border-radius:10px;background:#fff;border-left:4px solid #1e3a8a;box-shadow:0 2px 12px rgba(0,0,0,.06);border-right:1px solid #e5e7eb;border-top:1px solid #e5e7eb;border-bottom:1px solid #e5e7eb}
.rule-card h3{color:#1e3a8a;margin-bottom:1rem;display:flex;align-items:center;gap:10px;font-weight:700}
.rule-card ul{list-style:none;color:#6b7280}
.rule-card li{padding:.5rem 0;position:relative;padding-left:1.5rem}
.rule-card li::before{content:"•";color:#f59e0b;position:absolute;left:0;font-weight:bold;font-size:1.2em}

/* ── Our Achievements ── (light grey section, white cards, gold icons) */
.achievements{background:var(--lb-alt)}
.achievements-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:2rem}
.achievement-card{background:#fff;padding:2rem;border-radius:10px;text-align:center;box-shadow:0 2px 12px rgba(0,0,0,.06);border:1px solid #e5e7eb;transition:transform .3s}
.achievement-card:hover{transform:translateY(-3px);box-shadow:0 8px 24px rgba(0,0,0,.08)}
.achievement-card i{font-size:3rem;color:#f59e0b;margin-bottom:1rem}
.achievement-card .number{font-size:2.5rem;font-weight:700;color:#1e3a8a;margin-bottom:.5rem}
.achievement-card p{color:#6b7280;font-size:.95rem}

/* ── Prizes & Awards ── (white section, gradient cards) */
.prizes{background:#fff}
.prizes-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:2rem}
.prize-card{padding:2rem;border-radius:12px;text-align:center;color:#fff;position:relative;box-shadow:0 4px 16px rgba(0,0,0,.15);transition:transform .3s}
.prize-card:hover{transform:translateY(-3px)}
.prize-card.gold{background:linear-gradient(135deg,#f59e0b,#fbbf24)}
.prize-card.silver{background:linear-gradient(135deg,#6b7280,#9ca3af)}
.prize-card.bronze{background:linear-gradient(135deg,#b45309,#d97706)}
.prize-card i{font-size:3rem;margin-bottom:1rem;opacity:.95}
.prize-card h3{margin-bottom:.5rem;font-weight:700}
/* Prize Images */
.prize-images{position:relative;width:100%;height:150px;margin-bottom:1rem;border-radius:8px;overflow:hidden}
.prize-img{width:100%;height:100%;object-fit:cover}
.prize-img-count{position:absolute;bottom:5px;right:5px;background:rgba(0,0,0,0.7);color:#fff;padding:3px 8px;border-radius:12px;font-size:0.75rem;display:flex;align-items:center;gap:5px}

/* ── Exam Schedule ── (light grey, table with dark blue header) */
.exam{background:var(--lb-alt)}
.exam .holidays-table table,.exam-table table{background:#fff;border-radius:10px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.06)}
.status{padding:4px 12px;border-radius:20px;font-size:.85rem;font-weight:500}
.status.upcoming{background:#dbeafe;color:#1e40af}
.status.completed{background:#d1fae5;color:#065f46}

/* ── Holidays ── (theme: light grey section, table with theme blue & accent) */
.holidays{background:var(--lb-alt)}
.holidays .section-title h2{color:var(--pc)}
.holidays .section-title p{color:var(--tl)}
.holidays .holidays-table table{width:100%;min-width:480px;border-collapse:collapse;background:#fff;border-radius:10px;overflow:hidden;box-shadow:0 2px 12px rgba(30,58,138,.08);border:1px solid rgba(30,58,138,.12)}
.holidays .holidays-table th{background:var(--pc);color:#fff;font-weight:600;padding:1rem;text-align:left;border-bottom:2px solid var(--ac)}
.holidays .holidays-table td{padding:1rem;text-align:left;border-bottom:1px solid #e5e7eb;color:var(--td)}
.holidays .holidays-table tbody tr:nth-child(odd){background:#fff}
.holidays .holidays-table tbody tr:nth-child(even){background:#f8fafc}
.holidays .holidays-table tbody tr:hover{background:#eff6ff}
.holidays .holidays-table tbody tr:last-child td{border-bottom:none}

/* ── Our Teachers ── (light grey section, blue circle photo, orange subject) */
.teachers{background:var(--lb-alt)}
.teachers-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:1.5rem}
.teacher-card{background:#fff;border-radius:10px;overflow:hidden;text-align:center;box-shadow:0 2px 12px rgba(0,0,0,.06);border:1px solid #e5e7eb;transition:transform .3s}
.teacher-card:hover{transform:translateY(-3px);box-shadow:0 8px 24px rgba(0,0,0,.08)}
.teacher-img{width:150px;height:150px;margin:20px auto 0;border-radius:50%;overflow:hidden;background:#1e3a8a;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 12px rgba(0,0,0,.12);border:4px solid #fff}
.teacher-img img{width:100%;height:100%;object-fit:cover;object-position:center top}
.teacher-img i{font-size:4rem;color:#fff;opacity:.9}
.teacher-info{padding:1.5rem}
.teacher-info h3{color:#1e3a8a;margin-bottom:.3rem;font-size:1.1rem;font-weight:700}
.teacher-info .subject{color:#f59e0b;font-weight:600;font-size:.9rem}
.teacher-info .qualification{color:#6b7280;font-size:.85rem;margin-top:.5rem}
.staff-type-badge{display:inline-block;padding:4px 12px;border-radius:20px;font-size:.75rem;font-weight:500;margin-top:.5rem}
.staff-type-badge.teaching{background:#dbeafe;color:#1e40af}
.staff-type-badge.non-teaching{background:#e5e7eb;color:#4b5563}


/* ── Gallery ── (white/light section, blue cards or images) */
.gallery{background:#fff}
.gallery-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:1.5rem}
.gallery-item{height:230px;border-radius:10px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.75rem;cursor:pointer;transition:transform .3s;overflow:hidden;position:relative;box-shadow:0 2px 12px rgba(0,0,0,.1)}
.gallery-item:hover{transform:scale(1.02);box-shadow:0 8px 24px rgba(0,0,0,.15)}
.gallery-item img{width:100%;height:100%;object-fit:cover;position:absolute;top:0;left:0}
.gallery-item .gallery-overlay{position:absolute;bottom:0;left:0;right:0;background:rgba(30,58,138,.75);padding:.5rem;text-align:center}
.gallery-item .gallery-overlay span{color:#fff;font-weight:500}
.gallery-item i{font-size:3rem;color:#fff;position:relative;z-index:1}
.gallery-item span{color:#fff;font-size:.9rem;font-weight:500;opacity:.95;letter-spacing:.5px;position:relative;z-index:1}
.gallery-item .gallery-count{position:absolute;top:10px;right:10px;background:rgba(0,0,0,0.6);color:#fff;padding:4px 8px;border-radius:20px;font-size:.75rem;display:flex;align-items:center;gap:4px;z-index:2}
.gallery-item .gallery-count i{font-size:.75rem;margin:0}

/* ── Admissions ── (light grey section, gold bullets, white form card) */
.admissions{background:var(--lb-alt)}
.admissions-content{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:3rem;align-items:center}
.admissions-info h3{font-size:1.8rem;color:#1e3a8a;margin-bottom:1.5rem;font-weight:700}
.admissions-info ul{list-style:none}
.admissions-info li{padding:1rem 0;border-bottom:1px solid #e5e7eb;display:flex;align-items:center;gap:1rem}
.admissions-info li i{color:#f59e0b}
.admissions-form{background:#fff;padding:2rem;border-radius:10px;box-shadow:0 2px 12px rgba(0,0,0,.08);border:1px solid #e5e7eb}
.admissions-form h3{margin-bottom:1.5rem;color:#1e3a8a;font-weight:700}
.form-group{margin-bottom:1rem}
.form-group label{display:block;margin-bottom:.5rem;font-weight:500}
.form-group input,.form-group select,.form-group textarea{width:100%;padding:12px;border:1px solid #d1d5db;border-radius:5px;font-family:inherit;font-size:1rem}
.form-group input:focus,.form-group select:focus,.form-group textarea:focus{outline:none;border-color:#3b82f6}

/* ── Contact Us ── (dark blue-grey section, yellow/orange icons) */
.contact{padding-top:2.5rem;background:var(--pc);color:#fff}
.contact .section-title h2{color:#fff;font-weight:700}
.contact .section-title p{color:rgba(255,255,255,.75)}
.contact-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:2rem}
.contact-info{background:rgba(255,255,255,.08);padding:2rem;border-radius:10px;text-align:center;border:1px solid rgba(255,255,255,.1)}
.contact-info i{font-size:2.5rem;color:#f59e0b;margin-bottom:1rem}
.contact-info h3{color:#fff;margin-bottom:.5rem;font-weight:600}
.contact-info p{color:rgba(255,255,255,.8);line-height:1.6}

/* ── Footer ── (dark, white/grey text, orange hover on social) */
footer{background:var(--pc);color:#fff;padding:2rem 0 1rem}
.footer-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:2rem;margin-bottom:1.5rem}
.footer-section h3{margin-bottom:1rem;font-weight:600;color:#fff}
.footer-section p{margin-bottom:.5rem;opacity:.85;color:rgba(255,255,255,.85)}
.footer-section a{color:rgba(255,255,255,.85);text-decoration:none;display:block;margin-bottom:.5rem;transition:opacity .3s}
.footer-section a:hover{opacity:1;color:#fff}
.social-links{display:flex;gap:.75rem}
.social-links a{width:40px;height:40px;background:rgba(255,255,255,.1);border-radius:50%;display:flex;align-items:center;justify-content:center;transition:background .3s, color .3s}
.social-links a:hover{background:#f59e0b;color:#fff}
.footer-bottom{text-align:center;padding-top:2rem;border-top:1px solid rgba(255,255,255,.12);color:rgba(255,255,255,.7);font-size:.9rem}

/* ── Responsive ── */
@media(min-width:576px){.container{max-width:540px}}
@media(min-width:768px){.container{max-width:720px}}
@media(min-width:992px){.container{max-width:960px}}
@media(min-width:1200px){.container{max-width:1140px}}
@media(min-width:1400px){.container{max-width:1320px}}
@media(min-width:1600px){.container{max-width:1500px}}
@media(min-width:1920px){.container{max-width:1800px}}

/* Prevent section overlap: ensure stacking and scroll offset */
@media(max-width:768px){
  section{scroll-margin-top:120px}
}
body.admin-mode section{scroll-margin-top:160px}

/* Extra small devices (phones in portrait) */
@media(max-width:480px){
  .container{padding:0 1rem}
  section{padding:48px 0}
  .section-title h2{font-size:1.5rem;line-height:1.3}
  .section-title p{font-size:0.95rem}
  .hero{padding:90px 0 60px}
  .hero-content h1{font-size:1.75rem;margin-bottom:0.75rem}
  .hero-content p{font-size:1rem;margin-bottom:1.5rem}
  .hero-btns{padding:14px 0;gap:1rem}
  .btn{padding:10px 20px;font-size:0.9rem}
  .about-grid,.notifications-grid{grid-template-columns:1fr;gap:1.25rem}
  .academics-grid{grid-template-columns:1fr}
  .rules-grid,.achievements-grid{grid-template-columns:1fr}
  .prizes-grid{grid-template-columns:1fr}
  .teachers-grid{grid-template-columns:1fr}
  .gallery-grid{grid-template-columns:repeat(2,1fr);gap:1rem}
  .gallery-item{height:180px;min-height:180px}
  .contact-grid,.footer-grid{grid-template-columns:1fr}
  .footer-section a{margin-bottom:0.6rem}
  .syllabus-table table,.exam-table table,.holidays-table table{min-width:320px;font-size:0.85rem}
  .syllabus-table th,.syllabus-table td,.exam-table th,.exam-table td,.holidays-table th,.holidays-table td{padding:0.6rem 0.5rem}
  .aim-text h3,.principal-message h3{font-size:1.4rem}
  .principal-image{height:220px}
  .aim-image{height:280px;max-height:280px}
  .edit-btn{font-size:0.7rem;padding:5px 12px}
}

/* Tablets and small laptops */
@media(max-width:991px){
  .aim-content,.principal-content{grid-template-columns:1fr}
  .aim-image{max-height:300px;height:300px}
  .principal-image{max-width:100%;height:280px;margin:0 auto}
  .hero-content h1{font-size:2.75rem}
  .section-title h2{font-size:2.1rem}
}

/* Mobile: nav and layout */
@media(max-width:768px){
  .hero-content h1{font-size:2.25rem}
  .nav-links{display:none;position:absolute;top:100%;left:0;width:100%;background:#fff;flex-direction:column;padding:1rem;gap:0.5rem;box-shadow:0 4px 12px rgba(0,0,0,.12);z-index:999;max-height:80vh;overflow-y:auto}
  .nav-links.active{display:flex}
  .mobile-menu-btn{display:flex;align-items:center;justify-content:center}
  .btn-secondary{margin-left:0;margin-top:0.5rem}
  .admissions-content,.aim-content,.principal-content{grid-template-columns:1fr}
  .aim-image{max-height:280px;height:280px}
  .principal-image{width:100%;max-width:280px;height:250px;margin:0 auto}
  .curriculum-grid{grid-template-columns:1fr}
  section{padding:56px 0}
  .section-title h2{font-size:1.85rem}
  .section-title p{font-size:1rem}
  .nav-dropdown-content{position:static;display:none;box-shadow:none;transform:none;min-width:100%;padding:.25rem 0 .25rem 1rem;background:#f3f4f6;border-radius:5px;margin-top:.25rem}
  .nav-dropdown.open .nav-dropdown-content{display:block}
  .nav-dropdown>a::after{float:right}
  .mr2,.mr3{grid-template-columns:1fr}
  .about-grid{grid-template-columns:1fr}
  .notifications-grid{grid-template-columns:1fr}
  .academics-grid{grid-template-columns:1fr}
  .rules-grid,.achievements-grid{grid-template-columns:1fr}
  .prizes-grid{grid-template-columns:1fr}
  .teachers-grid{grid-template-columns:1fr}
  .gallery-grid{grid-template-columns:repeat(2,1fr);gap:1.25rem}
  .gallery-item{height:200px}
  .contact-grid{grid-template-columns:1fr}
  .footer-grid{grid-template-columns:1fr}
  .logo{font-size:1.25rem}
}

/* ═══════════════════════════════════════════════════════════
   MODAL SYSTEM
═══════════════════════════════════════════════════════════ */
.modal-overlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.6);z-index:5000;overflow-y:auto;padding:20px 10px}
.modal-overlay.active{display:flex;align-items:flex-start;justify-content:center}
.modal-box{background:#fff;border-radius:14px;width:100%;max-width:740px;margin:20px auto;box-shadow:0 25px 80px rgba(0,0,0,.35);animation:modalIn .25s ease}
.modal-box.sm{max-width:460px}
@keyframes modalIn{from{opacity:0;transform:translateY(-20px)}to{opacity:1;transform:translateY(0)}}
.modal-hdr{background:#1e3a8a;color:#fff;padding:1rem 1.5rem;border-radius:14px 14px 0 0;display:flex;justify-content:space-between;align-items:center}
.modal-hdr h3{font-size:1.05rem;font-weight:600;display:flex;align-items:center;gap:8px}
.modal-x{background:none;border:none;color:#fff;font-size:1.5rem;cursor:pointer;line-height:1;padding:0;opacity:.8;transition:opacity .2s}
.modal-x:hover{opacity:1}
.modal-bdy{padding:1.5rem;max-height:68vh;overflow-y:auto}
.modal-ftr{padding:1rem 1.5rem;border-top:1px solid #e5e7eb;display:flex;justify-content:flex-end;gap:10px;background:#f9fafb;border-radius:0 0 14px 14px}
/* Modal Forms */
.mg{margin-bottom:1rem}
.mg label{display:block;margin-bottom:.4rem;font-size:.88rem;font-weight:600;color:#374151}
.mc{width:100%;padding:.6rem .85rem;border:1.5px solid #d1d5db;border-radius:7px;font-family:inherit;font-size:.9rem;transition:border-color .2s;background:#fff}
.mc:focus{outline:none;border-color:#3b82f6;box-shadow:0 0 0 3px rgba(59,130,246,.12)}
textarea.mc{resize:vertical;min-height:90px}
select.mc{background:#fff}
.mr2{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
.mr3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:.75rem}
.mhint{font-size:.78rem;color:#6b7280;margin-top:.3rem}
/* Modal Buttons */
.mb{display:inline-flex;align-items:center;gap:5px;padding:.5rem 1.1rem;border-radius:7px;font-size:.85rem;font-weight:600;border:none;cursor:pointer;transition:all .2s;font-family:inherit}
.mb-p{background:#1e3a8a;color:#fff}.mb-p:hover{background:#1e40af}
.mb-a{background:#f59e0b;color:#fff}.mb-a:hover{background:#d97706}
.mb-d{background:#dc2626;color:#fff}.mb-d:hover{background:#b91c1c}
.mb-s{background:#e5e7eb;color:#374151}.mb-s:hover{background:#d1d5db}
.mb-g{background:#059669;color:#fff}.mb-g:hover{background:#047857}
.mb-sm{padding:.3rem .7rem;font-size:.78rem}
/* Item List */
.item-tbl{width:100%;border-collapse:collapse;font-size:.88rem;margin-bottom:1rem}
.item-tbl th{background:#f3f4f6;padding:.6rem .85rem;text-align:left;font-weight:600;color:#374151;border-bottom:2px solid #e5e7eb}
.item-tbl td{padding:.6rem .85rem;border-bottom:1px solid #f3f4f6;vertical-align:middle}
.item-tbl tr:hover td{background:#fafafa}
.item-tbl .acts{display:flex;gap:5px;white-space:nowrap}
.no-items{text-align:center;padding:2rem;color:#6b7280;font-size:.9rem}
/* Divider */
.modal-divider{border:none;border-top:2px dashed #e5e7eb;margin:1.25rem 0}
/* Sub-form panel */
.sub-form{background:#f9fafb;border:1.5px solid #e5e7eb;border-radius:10px;padding:1.25rem;margin-top:1rem}
.sub-form-title{font-size:.9rem;font-weight:700;color:#1e3a8a;margin-bottom:1rem;display:flex;align-items:center;gap:6px}
/* Dynamic list rows */
.dyn-row{display:flex;gap:8px;align-items:center;margin-bottom:.5rem}
.dyn-row input{flex:1}
.dyn-row button{flex-shrink:0}
/* Image preview */
.img-preview{width:80px;height:80px;object-fit:cover;border-radius:8px;border:2px solid #e5e7eb;margin-top:.5rem;display:none}
.img-preview.show{display:block}
/* Toast */
.toast{position:fixed;bottom:24px;right:24px;background:#1e3a8a;color:#fff;padding:.85rem 1.4rem;border-radius:10px;font-size:.88rem;font-weight:500;z-index:9999;transform:translateY(80px);opacity:0;transition:all .3s;max-width:340px;box-shadow:0 8px 24px rgba(0,0,0,.2)}
.toast.show{transform:translateY(0);opacity:1}
.toast.success{background:#059669}
.toast.error{background:#dc2626}
.toast.warning{background:#d97706}
/* Loading spinner */
.spin{display:inline-block;width:14px;height:14px;border:2px solid rgba(255,255,255,.4);border-top-color:#fff;border-radius:50%;animation:spin .6s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
/* Section add-new bar */
.add-new-bar{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem;padding-bottom:.75rem;border-bottom:1px solid #e5e7eb}
.add-new-bar span{font-size:.88rem;color:#6b7280}
/* Current photo */
.cur-photo{display:flex;align-items:center;gap:10px;margin-top:.5rem}
.cur-photo img{width:60px;height:60px;object-fit:cover;border-radius:8px;border:2px solid #e5e7eb}
.cur-photo span{font-size:.8rem;color:#6b7280}

/* ── Lightbox ── */
.lightbox{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.95);z-index:99999;align-items:center;justify-content:center}
.lightbox.active{display:flex}
.lightbox-content{position:relative;max-width:90%;max-height:90%}
.lightbox-image{max-width:100%;max-height:85vh;object-fit:contain;border-radius:4px}
.lightbox-close{position:absolute;top:20px;right:30px;color:#fff;font-size:40px;cursor:pointer;z-index:100001;opacity:.8;transition:opacity .2s;background:none;border:none}
.lightbox-close:hover{opacity:1}
.lightbox-nav{position:absolute;top:50%;transform:translateY(-50%);background:rgba(255,255,255,.15);color:#fff;border:none;width:50px;height:50px;border-radius:50%;font-size:24px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .2s;z-index:100001}
.lightbox-nav:hover{background:rgba(255,255,255,.3)}
.lightbox-prev{left:20px}
.lightbox-next{right:20px}
.lightbox-counter{position:absolute;bottom:20px;left:50%;transform:translateX(-50%);color:#fff;font-size:14px;background:rgba(0,0,0,.5);padding:8px 16px;border-radius:20px}
.lightbox-title{position:absolute;top:20px;left:50%;transform:translateX(-50%);color:#fff;font-size:16px;background:rgba(0,0,0,.5);padding:8px 20px;border-radius:20px;max-width:80%;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}

/* Holiday table data color - #6b7280 */
.holidays .table-wrap table tbody td {
  color: #6b7280;
}
.holidays .table-wrap table tbody td strong {
  color: #1f2937;
}
