/*
Theme Name: EMRS Jonai School Theme
Theme URI: https://jonaiemrs.com/
Author: Codex
Description: WordPress theme inspired by EMRS Jonai with editable notices, staff, events, gallery, facilities, courses, and public disclosures.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: emrsjonai
Tags: education, school, custom-colors, custom-logo, featured-images
*/

:root {
  --primary: #0b6b35;
  --primary-dark: #084d27;
  --accent: #f57c00;
  --accent-dark: #d96500;
  --ink: #1d2a22;
  --muted: #627066;
  --surface: #ffffff;
  --surface-alt: #f5f8f3;
  --border: #dfe7dd;
  --gold: #ffd54f;
  --font-head: "Poppins", Arial, sans-serif;
  --font-body: "Inter", Arial, sans-serif;
  --container: 1180px;
  --shadow: 0 12px 32px rgba(14, 55, 32, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1rem; color: var(--muted); }
h1, h2, h3, h4 { margin: 0 0 .75rem; font-family: var(--font-head); line-height: 1.18; color: var(--primary-dark); }
ul { margin-top: 0; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.screen-reader-text:focus { z-index: 999; width: auto; height: auto; padding: 10px 14px; clip: auto; background: var(--primary); color: #fff; }

.container { width: min(calc(100% - 32px), var(--container)); margin-inline: auto; }
.section { padding: clamp(52px, 7vw, 86px) 0; }
.section-alt { background: var(--surface-alt); }
.text-center { text-align: center; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.topbar { background: var(--primary-dark); color: #fff; font-size: .85rem; }
.topbar-inner { display: flex; min-height: 38px; align-items: center; justify-content: space-between; gap: 18px; }
.topbar-left, .topbar-right { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.topbar i, .footer-contact i { color: var(--gold); }
.admin-link { padding: 5px 10px; border-radius: 6px; background: rgba(255,255,255,.12); }

.site-header { background: #fff; border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 102px; gap: 18px; }
.header-logo { display: flex; align-items: center; gap: 16px; }
.school-logo, .custom-logo { width: auto; max-height: 80px; }
.logo-text { display: grid; gap: 1px; }
.logo-hindi { color: var(--accent); font-weight: 700; font-size: .95rem; }
.logo-main { font-family: var(--font-head); color: var(--primary); font-weight: 800; font-size: clamp(1.05rem, 2.6vw, 1.7rem); }
.logo-sub { color: var(--ink); font-weight: 700; }
.logo-location { color: var(--muted); font-size: .9rem; }

.hamburger { display: none; width: 42px; height: 42px; border: 0; border-radius: 8px; background: var(--primary); }
.hamburger span { display: block; width: 22px; height: 2px; margin: 5px auto; background: #fff; }
.main-nav { position: sticky; top: 0; z-index: 50; background: var(--primary); box-shadow: 0 4px 20px rgba(0,0,0,.12); }
.nav-list { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0; margin: 0; padding: 0; list-style: none; }
.nav-list a { display: flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 13px; color: #fff; font-weight: 700; font-size: .87rem; }
.nav-list a:hover, .nav-list .current-menu-item > a, .nav-list .active { background: rgba(0,0,0,.18); }
.nav-badge, .new-tag { display: inline-flex; align-items: center; border-radius: 999px; background: var(--accent); color: #fff; font-size: .68rem; font-weight: 800; padding: 2px 7px; margin-left: 7px; }

.notice-ticker { background: #fff8e1; border-bottom: 1px solid #ffe2a9; overflow: hidden; }
.ticker-wrap { display: flex; min-height: 45px; align-items: center; gap: 14px; }
.ticker-label { flex: 0 0 auto; background: var(--accent); color: #fff; border-radius: 6px; padding: 7px 12px; font-weight: 800; }
.ticker-content { overflow: hidden; white-space: nowrap; }
.ticker-inner { display: inline-flex; gap: 42px; animation: ticker 28s linear infinite; }
.ticker-item a { color: var(--primary-dark); font-weight: 700; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.image-slideshow { position: relative; height: clamp(280px, 42vw, 520px); overflow: hidden; background: #dfe7dd; }
.slideshow-container, .slide { position: absolute; inset: 0; }
.slide { opacity: 0; transition: opacity .6s ease; }
.slide.active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide-arrow { position: absolute; top: 50%; z-index: 2; transform: translateY(-50%); display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; color: #fff; background: rgba(0,0,0,.38); cursor: pointer; }
.slide-prev { left: 20px; }
.slide-next { right: 20px; }
.slide-dots { position: absolute; left: 0; right: 0; bottom: 18px; display: flex; justify-content: center; gap: 8px; }
.dot { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,.65); cursor: pointer; }
.dot.active { background: var(--gold); }

.hero { background: linear-gradient(135deg, var(--primary), #1a237e); color: #fff; }
.hero-content { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 34px; align-items: start; padding: clamp(42px, 6vw, 70px) 0; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.hero-badge { border: 1px solid rgba(255,255,255,.24); border-radius: 999px; padding: 8px 12px; background: rgba(255,255,255,.1); font-size: .82rem; font-weight: 700; }
.hero h1 { max-width: 760px; color: #fff; font-size: clamp(2.35rem, 5vw, 4.8rem); font-weight: 800; }
.hero h1 span, .section-title span { color: var(--accent); }
.hero p { max-width: 700px; color: rgba(255,255,255,.88); font-size: 1.06rem; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0; }
.btn, button, input[type="submit"] { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 8px; padding: 10px 18px; font-weight: 800; cursor: pointer; }
.btn-primary, input[type="submit"] { background: var(--primary); color: #fff; }
.btn-success { background: var(--primary); color: #fff; }
.btn-outline { border-color: currentColor; color: #fff; background: transparent; }
.btn-sm { min-height: 36px; padding: 8px 13px; font-size: .86rem; }
.hero .btn-primary { background: var(--accent); }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 560px; }
.stat-item { padding: 16px; border-radius: 10px; background: rgba(255,255,255,.12); text-align: center; }
.stat-num { color: var(--gold); font: 800 1.7rem/1 var(--font-head); }
.stat-label { color: rgba(255,255,255,.82); font-size: .85rem; }

.principal-card, .content-box, .card, .feature-card, .mv-card, .notice-item, .staff-card, .disclosure-item { background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); }
.principal-card { padding: 24px; border-top: 4px solid var(--gold); }
.principal-card h3 { color: #fff; }
.principal-card p { color: rgba(255,255,255,.84); }
.principal-card { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.22); }
.profile-img { width: 220px; height: 220px; border-radius: 8px; object-fit: cover; margin: 0 auto 16px; border: 2px solid var(--border); }
.principal-card .profile-img { width: 280px; height: 280px; border-color: rgba(255,213,79,.6); }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.grid-3, .features-grid, .gallery-grid, .staff-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.section-header { text-align: center; margin-bottom: 34px; }
.section-tag { display: inline-block; color: var(--accent); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; }
.section-title { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 800; }
.section-line { width: 72px; height: 4px; border-radius: 99px; margin: 10px auto 0; background: var(--accent); }
.content-box { padding: 26px; }
.feature-card { padding: 25px; text-align: center; border-top: 4px solid var(--primary); }
.feature-icon, .notice-icon, .disclosure-icon { width: 52px; height: 52px; border-radius: 10px; display: grid; place-items: center; background: #e8f5e9; color: var(--primary); font-size: 1.25rem; margin: 0 auto 14px; }
.notice-list { display: grid; gap: 14px; }
.notice-item, .disclosure-item { display: flex; gap: 15px; align-items: center; padding: 16px; }
.notice-icon, .disclosure-icon { flex: 0 0 52px; margin: 0; }
.notice-info h4 { font-size: 1rem; margin-bottom: 4px; }
.notice-info p { margin-bottom: 6px; font-size: .94rem; }
.notice-date, .card-date { color: var(--muted); font-size: .85rem; font-weight: 700; }
.info-box { padding: 16px; margin: 16px 0; border-left: 4px solid var(--accent); background: #fff8e1; border-radius: 6px; }

.card { overflow: hidden; }
.card-media { height: 200px; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary), #1a237e); color: rgba(255,255,255,.5); font-size: 2.5rem; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 20px; }
.card-tag { color: var(--primary); background: #e8f5e9; border-radius: 999px; padding: 4px 9px; font-weight: 800; font-size: .75rem; }
.card-title { margin-top: 12px; font-size: 1.2rem; }

.gallery-filter { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.filter-btn { background: #fff; color: var(--primary); border: 1px solid var(--border); }
.filter-btn.active { background: var(--primary); color: #fff; }
.gallery-item { position: relative; overflow: hidden; border-radius: 8px; min-height: 220px; background: var(--surface-alt); cursor: zoom-in; }
.gallery-item img { width: 100%; height: 100%; min-height: 220px; object-fit: cover; transition: transform .4s ease; }
.gallery-overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(8,77,39,.72); color: #fff; opacity: 0; transition: opacity .25s ease; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item:hover .gallery-overlay { opacity: 1; }
.lightbox { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(0,0,0,.86); }
.lightbox.active { display: flex; }
.lightbox img { max-height: 84vh; border-radius: 8px; }
.lightbox-close { position: absolute; top: 20px; right: 20px; width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--ink); font-size: 1.5rem; }

.mv-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px; }
.mv-card { padding: 26px; border-top: 4px solid var(--primary); }
.mv-card.vision { border-top-color: var(--accent); }
.page-hero { padding: 56px 0; background: linear-gradient(135deg, var(--primary), #1a237e); color: #fff; }
.page-hero h1 { color: #fff; font-size: clamp(2.2rem, 4vw, 3.7rem); }
.page-hero p, .breadcrumb { color: rgba(255,255,255,.84); }
.archive-grid { padding: 52px 0; }
.empty-state { padding: 40px; border: 1px dashed var(--border); border-radius: 8px; text-align: center; background: #fff; }

.site-footer { background: #102116; color: #fff; }
.footer-main { padding: 54px 0; }
.footer-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr 1.2fr; gap: 28px; }
.footer-heading { color: #fff; font-size: 1.1rem; }
.footer-col p, .footer-contact span, .footer-notices small { color: rgba(255,255,255,.74); }
.footer-links, .footer-contact, .footer-notices { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-links a, .footer-notices a { color: rgba(255,255,255,.82); }
.footer-contact li, .footer-notices a { display: flex; gap: 10px; align-items: flex-start; }
.footer-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.badge-gov { border-radius: 999px; padding: 5px 9px; background: rgba(255,255,255,.1); color: var(--gold); font-size: .75rem; font-weight: 800; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 18px 0; }
.footer-bottom-inner { display: grid; gap: 4px; text-align: center; }
.footer-bottom p { margin: 0; font-size: .86rem; }
.back-to-top { position: fixed; right: 18px; bottom: 18px; display: none; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff; z-index: 80; }
.back-to-top.visible { display: grid; place-items: center; }

@media (max-width: 900px) {
  .topbar-inner, .header-inner { align-items: flex-start; }
  .topbar-inner { flex-direction: column; padding: 8px 0; }
  .hamburger { display: block; flex: 0 0 auto; margin-top: 26px; }
  .main-nav { display: none; position: static; }
  .main-nav.open { display: block; }
  .nav-list { display: block; padding: 8px 0; }
  .nav-list a { justify-content: flex-start; }
  .hero-content, .grid-2, .mv-grid, .footer-grid { grid-template-columns: 1fr; }
  .grid-3, .features-grid, .gallery-grid, .staff-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 620px) {
  .header-logo { align-items: flex-start; }
  .school-logo, .custom-logo { max-height: 64px; }
  .hero-stats, .grid-3, .features-grid, .gallery-grid, .staff-grid { grid-template-columns: 1fr; }
  .principal-card .profile-img { width: 100%; height: auto; aspect-ratio: 1; }
  .slide-arrow { display: none; }
}
