/* =====================================================================
   DEWDHAR KHAP — shared stylesheet (css/style.css)
   Sections: 1 Colours · 2 Global · 3 Header/Nav · 4 Hero · 5 Buttons
             6 Carousel · 7 Content · 8 Side menu · 9 Search · 10 Phones
             11 Student Corner
   ===================================================================== */

/* ---------- 1. COLOURS ---------- */
/* LIGHT (default): fresh sage-cream */
:root {
  color-scheme: light;
  --paper: #F1F4EA; --paper-2: #E6ECDC; --card: #FBFCF6;
  --ink: #2B2118; --ink-soft: #55483A;
  --indigo: #2C3F66; --vermillion: #A83A2E; --turmeric: #C68A28; --paddy: #45592F;
  --rule: rgba(43,33,24,0.15); --hero-dark: #120E17;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* DARK: warm espresso brown. Applied when the visitor clicks the ☀︎ / ☾ button
   (script sets data-theme="dark" on <html> and remembers the choice). */
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #1E1611; --paper-2: #281D16; --card: #2A2019;
  --ink: #F1E6D0; --ink-soft: #C9B79A;
  --indigo: #94ABDA; --vermillion: #E08672; --turmeric: #E8B45A; --paddy: #94B873;
  --rule: rgba(241,230,208,0.18);
}

/* ---------- 2. GLOBAL ---------- */
* { box-sizing: border-box; }
html { scroll-padding-top: env(safe-area-inset-top, 0px); scroll-behavior: smooth; }
/* PERFORMANCE: the dotted texture scrolls with the page, while the big colour glows
   live on their own fixed layer (body::before below). This looks the same as before
   but scrolling no longer forces the browser to repaint the whole page. */
body {
  margin: 0; color: var(--ink);
  font-family: 'Work Sans', system-ui, -apple-system, sans-serif; font-weight: 400; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  background-color: var(--paper);
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 7%, transparent) 1px, transparent 1.5px);
  background-size: 26px 26px;
  background-attachment: scroll;
  transition: background-color 0.3s ease, color 0.3s ease;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(60% 45% at 12% 0%, color-mix(in srgb, var(--indigo) 18%, transparent), transparent 70%),
    radial-gradient(50% 40% at 100% 28%, color-mix(in srgb, var(--turmeric) 11%, transparent), transparent 70%),
    radial-gradient(55% 40% at 0% 78%, color-mix(in srgb, var(--paddy) 10%, transparent), transparent 70%);
  transform: translateZ(0);
}
h1, h2, h3 { font-family: 'Frank Ruhl Libre', Georgia, serif; font-weight: 700; margin: 0; color: var(--ink); text-wrap: balance; }
p { text-wrap: pretty; }
.hindi { font-family: 'Noto Serif Devanagari', serif; }
a { color: var(--indigo); text-decoration: none; }
img, svg { max-width: 100%; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.wrap-wide { max-width: 1300px; margin: 0 auto; }
:focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; }

/* ---------- 3. TOP BAR ---------- */
/* The bar is wide and sits above the ☰ and ☀︎ buttons, so only the menu itself catches clicks. */
.navbar { position: relative; z-index: 50; display: flex; align-items: center; justify-content: flex-end; padding: 26px 24px 0; background: none; border-bottom: none; pointer-events: none; }
.nav-links { display: flex; align-items: center; gap: 16px; pointer-events: auto; }
.nav-links a { position: relative; padding-bottom: 4px; color: rgba(255,255,255,0.95); font-size: 0.92rem; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; text-shadow: 0 2px 10px rgba(0,0,0,0.75), 0 1px 4px rgba(0,0,0,0.65); }
.nav-links a:hover { color: var(--turmeric); }

.weather { display: inline-flex; align-items: center; gap: 6px; padding-left: 14px; border-left: 1px solid rgba(255,255,255,0.45); cursor: pointer; }
.weather .w-emoji { font-size: 1.25rem; line-height: 1; }

.theme-toggle { position: absolute; top: 22px; left: 84px; z-index: 30; width: 44px; height: 44px; background: none; border: none; padding: 0; color: #fff; font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "Apple Symbols", sans-serif; font-variant-emoji: text; font-size: 1.7rem; line-height: 1; cursor: pointer; text-shadow: 0 2px 8px rgba(0,0,0,0.6); transition: color 0.2s ease, transform 0.3s ease; }
.theme-toggle:hover { color: var(--turmeric); transform: rotate(20deg); }

/* dim the hero photo in dark mode (fades smoothly) */
.hero-bg::after { content: ""; position: absolute; inset: 0; background: #000; opacity: 0; transition: opacity 0.35s ease; pointer-events: none; }
:root[data-theme="dark"] .hero-bg::after { opacity: 0.5; }

/* ---------- 4. HERO ---------- */
.hero { position: relative; background: var(--hero-dark); color: #F3EEE6; padding-bottom: 90px; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,0.35); }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, transparent, transparent 60%, rgba(18,14,23,0.25)); }

.hero-inner { position: relative; z-index: 2; text-align: center; padding: 70px 24px 40px; }
.hero .kicker { display: inline-flex; align-items: center; justify-content: center; max-width: 100%; margin-bottom: 22px; font-size: 0.9rem; letter-spacing: 0.06em; color: rgba(243,238,230,0.9); text-shadow: 0 2px 10px rgba(0,0,0,0.6), 0 1px 3px rgba(0,0,0,0.5); }
.kicker-icon { width: 18px; height: 18px; object-fit: contain; vertical-align: -3px; margin-right: 6px; filter: drop-shadow(0 1px 4px rgba(0,0,0,0.6)); }
.hero h1.display { margin: 0; font-family: 'Work Sans', sans-serif; font-weight: 800; font-size: clamp(2.4rem, 7vw, 4.2rem); line-height: 1.08; color: #F8F4EC; text-shadow: 0 3px 16px rgba(0,0,0,0.65), 0 1px 4px rgba(0,0,0,0.55); }
.hero .accent { color: var(--turmeric); }
.hero-rule { width: 120px; margin: 30px auto; border: none; border-top: 1px solid rgba(243,238,230,0.5); }
.hero-text { max-width: 560px; margin: 0 auto; font-size: 1.05rem; color: rgba(243,238,230,0.95); text-shadow: 0 2px 10px rgba(20,19,3,0.9), 0 1px 3px rgba(0,0,0,0.5); }
.cta-row { display: flex; justify-content: center; align-items: center; gap: 28px; margin-top: 38px; flex-wrap: wrap; }

/* ---------- 5. BUTTONS ---------- */
.btn-outline { padding: 13px 30px; border: 1.5px solid rgba(243,238,230,0.85); border-radius: 2px; background: rgba(18,14,23,0.25); color: #F8F4EC; font-weight: 600; font-size: 0.95rem; text-shadow: 0 2px 8px rgba(0,0,0,0.5); transition: background 0.15s ease, color 0.15s ease; }
.btn-outline:hover { background: var(--turmeric); border-color: var(--turmeric); color: #201404; text-shadow: none; }
.btn-outline.dark { border-color: var(--rule); color: var(--indigo); background: none; text-shadow: none; }
.btn-outline.dark:hover { background: var(--turmeric); border-color: var(--turmeric); color: #201404; }
.btn-text { display: inline-flex; align-items: center; gap: 8px; color: #F8F4EC; font-weight: 600; font-size: 0.95rem; text-shadow: 0 2px 8px rgba(0,0,0,0.5); }
.btn-text .play { color: var(--turmeric); font-size: 0.8rem; }
.btn-text:hover .play { color: #F8F4EC; }

/* ---------- 6. CAROUSEL + MINI SLIDESHOWS ---------- */
.carousel { position: relative; z-index: 2; display: flex; align-items: center; gap: 14px; margin-top: 40px; }
/* margin:auto on the first/last card centres the row when it fits and lets it scroll from the first card when it doesn't */
.car-track { display: flex; gap: 18px; flex: 1; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 6px 6px 0 0; }
.car-track::-webkit-scrollbar { display: none; }
.car-item:first-child { margin-left: auto; }
.car-item:last-child { margin-right: auto; }
.car-item { position: relative; flex: 0 0 min(280px, 80vw); scroll-snap-align: start; border-radius: 6px 6px 0 0; overflow: hidden; box-shadow: 0 18px 34px rgba(0,0,0,0.35); transition: transform 0.25s ease, box-shadow 0.25s ease; }
.car-item[data-href] { cursor: pointer; }
.car-item[data-href]:hover { transform: translateY(-4px); box-shadow: 0 22px 38px rgba(0,0,0,0.4); }
.car-cap { position: absolute; bottom: 0; left: 0; right: 0; z-index: 2; padding: 10px 12px; font-size: 0.8rem; color: #fff; background: linear-gradient(to top, rgba(0,0,0,0.65), transparent); }

.slide-track { position: relative; width: 100%; height: 190px; overflow: hidden; }
.slide-track img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.6s ease; }
.slide-track img.active { opacity: 1; }
.slide-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 28px; height: 28px; border: none; border-radius: 50%; background: rgba(0,0,0,0.45); color: #fff; font-size: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.slide-btn.prev { left: 8px; }
.slide-btn.next { right: 8px; }
.slide-btn:hover { background: var(--turmeric); color: #201404; }

/* ---------- 7. CONTENT SECTIONS ---------- */
/* vertical spacing for the front-page sections (.wrap alone would set it to 0) */
main > section.wrap { padding-top: 84px; padding-bottom: 72px; }
main > section.wrap#about { padding-top: 60px; border-top: 4px solid var(--turmeric); }
.rule-top { border-top: 1px solid var(--rule); }
.h2 { font-size: 1.9rem; margin-bottom: 18px; }
.label { display: block; margin-bottom: 10px; font-family: 'Frank Ruhl Libre', serif; font-style: italic; font-size: 0.85rem; color: var(--vermillion); }

/* Proud Moments */
.proud-heading { text-align: center; margin: 0 0 16px; }
.proud-heading .label { text-align: center; margin-bottom: 4px; }
.proud-tab { position: relative; width: 100%; max-width: 540px; margin: 0 auto 30px; padding: 16px 30px 12px; text-align: center; background: var(--card); border: 1px solid var(--rule); border-radius: 3px; transition: background 0.3s ease, border-color 0.3s ease; }
.proud-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 44px; height: 44px; padding: 0 0 4px; border: none; border-radius: 50%; background: transparent; color: var(--ink); font-size: 2rem; line-height: 1; cursor: pointer; opacity: 0.45; display: flex; align-items: center; justify-content: center; transition: opacity 0.2s ease, background 0.2s ease; }
.proud-btn.prev { left: 4px; }
.proud-btn.next { right: 4px; }
.proud-btn:hover { opacity: 1; background: color-mix(in srgb, var(--turmeric) 20%, transparent); }
.proud-slides { display: grid; }
.proud-slide { grid-area: 1 / 1; display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity 0.9s ease, visibility 0.9s ease; }
.proud-slide.active { opacity: 1; visibility: visible; }
.proud-slide img { width: 92px; max-width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; border-radius: 3px; margin-bottom: 12px; }
.proud-slide h3 { font-size: 1.12rem; margin-bottom: 5px; }
.proud-slide p { max-width: 440px; margin: 0 auto; font-size: 0.92rem; line-height: 1.5; color: var(--ink-soft); }
.proud-dots { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.proud-dots button { width: 9px; height: 9px; padding: 0; border: none; border-radius: 50%; background: var(--rule); cursor: pointer; }
.proud-dots button.active { background: var(--turmeric); }

/* Village figures */
.figures-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 40px; margin-bottom: 36px; padding-bottom: 28px; border-bottom: 1px solid var(--rule); }
.figure { padding-left: 16px; border-left: 3px solid var(--turmeric); }
.figure .num { font-family: 'Frank Ruhl Libre', serif; font-size: 2.1rem; font-weight: 700; line-height: 1; color: var(--indigo); }
.figure .cap { margin-top: 4px; font-size: 0.9rem; color: var(--ink-soft); }

/* Land + Governance */
.land, .gov { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.land .art { justify-self: center; }

/* Visit & contact */
.visit { display: block; width: 100%; }
.visit > div:first-child { width: 100%; margin-bottom: 42px; }
.visit > div:first-child p { max-width: 760px; }
.visit .btn-outline { display: inline-block; margin-top: 24px; }
.visit .card { width: 100%; margin-top: 0; padding: 32px 36px; background: var(--card); border: 1px solid var(--rule); border-radius: 3px; transition: background 0.3s ease, border-color 0.3s ease; }
.visit .card dl { width: 100%; margin: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 80px; align-items: start; }
.visit .card dt { margin: 0; font-family: 'Frank Ruhl Libre', serif; font-size: 0.95rem; color: var(--indigo); }
.visit .card dd { margin: 5px 0 0; font-size: 1rem; }
.visit .card dt:nth-of-type(1) { grid-column: 1; grid-row: 1; }
.visit .card dd:nth-of-type(1) { grid-column: 1; grid-row: 2; }
.visit .card dt:nth-of-type(2) { grid-column: 2; grid-row: 1; }
.visit .card dd:nth-of-type(2) { grid-column: 2; grid-row: 2; }
.visit .card a { color: var(--indigo); transition: color 0.2s ease; }
.visit .card a:hover { color: var(--turmeric); text-decoration: underline; }

footer { padding: 40px 24px 48px; text-align: center; font-size: 0.85rem; color: var(--ink-soft); }
footer .hindi { color: var(--vermillion); }

@media (min-width: 721px) {
  .visit .card dl { grid-template-columns: repeat(3, 1fr) !important; column-gap: 40px !important; }
  .visit .card dt:nth-of-type(3) { grid-column: 3; grid-row: 1; }
  .visit .card dd:nth-of-type(3) { grid-column: 3; grid-row: 2; }
}
.made-by { margin-top: 12px; font-weight: 700; font-size: 0.95rem; color: var(--ink); }

/* ---------- 8. SIDE MENU (☰ → ×) ---------- */
.menu-btn { position: absolute; top: 22px; left: 24px; z-index: 5; width: 44px; height: 44px; padding: 0; border: none; border-radius: 4px; background: transparent; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.menu-btn span { width: 22px; height: 2px; border-radius: 2px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.45); transition: transform 0.35s cubic-bezier(.2,.8,.2,1), opacity 0.2s ease, background 0.2s ease; }
.menu-btn:hover span { background: var(--turmeric); }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.side-overlay { position: fixed; inset: 0; z-index: 90; background: transparent; opacity: 0; visibility: hidden; }
.side-overlay.open { opacity: 1; visibility: visible; }

/* smoked glass: readable over the photo AND over light pages */
.sidebar { position: fixed; top: 76px; left: 24px; z-index: 100; width: 230px; max-width: calc(100vw - 36px); padding: 8px 0; border-radius: 16px; border: 1px solid rgba(255,255,255,0.28); background: rgba(20,16,24,0.58); -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%); box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 12px 32px rgba(0,0,0,0.3);
  opacity: 0; visibility: hidden; transform: translateY(-10px) scale(0.92); transform-origin: top left;
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.45s cubic-bezier(.2,.9,.3,1.25); }
.sidebar.open { opacity: 1; visibility: visible; transform: none; }
.side-head { display: none; }
.side-links { display: flex; flex-direction: column; padding: 0; }
.side-links a { position: relative; margin: 2px 8px; padding: 11px 16px; border-radius: 10px; color: #fff; font-weight: 600; font-size: 0.88rem; letter-spacing: 0.03em; text-transform: uppercase; text-shadow: 0 2px 8px rgba(0,0,0,0.65), 0 1px 3px rgba(0,0,0,0.55); transition: transform 0.25s cubic-bezier(.2,.8,.2,1), background 0.25s ease, color 0.2s ease; }
.side-links a::after { content: "→"; position: absolute; right: 14px; top: 50%; opacity: 0; transform: translate(-8px, -50%); transition: opacity 0.25s ease, transform 0.25s ease; }
.side-links a:hover { transform: translateX(6px); background: rgba(255,255,255,0.2); color: var(--turmeric); }
.side-links a:hover::after { opacity: 1; transform: translate(0, -50%); }
.side-links a:active { transform: translateX(6px) scale(0.97); }

@keyframes linkIn { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
.sidebar.open .side-links a { animation: linkIn 0.45s cubic-bezier(.2,.8,.2,1) backwards; }
.sidebar.open .side-links a:nth-child(1) { animation-delay: 0.10s; }
.sidebar.open .side-links a:nth-child(2) { animation-delay: 0.16s; }
.sidebar.open .side-links a:nth-child(3) { animation-delay: 0.22s; }
.sidebar.open .side-links a:nth-child(4) { animation-delay: 0.28s; }
.sidebar.open .side-links a:nth-child(5) { animation-delay: 0.34s; }
.sidebar.open .side-links a:nth-child(6) { animation-delay: 0.40s; }
.sidebar.open .side-links a:nth-child(7) { animation-delay: 0.46s; }
.sidebar.open .side-links a:nth-child(8) { animation-delay: 0.52s; }

/* ---------- 9. SEARCH ---------- */
/* smoked-glass pill: round icon when closed, expands when open */
.nav-links .site-search { position: relative; display: flex; align-items: center; width: 42px; height: 42px; border-radius: 999px; background: rgba(20,16,24,0.38); border: 1px solid rgba(255,255,255,0.5); -webkit-backdrop-filter: blur(10px) saturate(140%); backdrop-filter: blur(10px) saturate(140%); box-shadow: 0 4px 18px rgba(0,0,0,0.22); transition: width .35s cubic-bezier(.2,.8,.2,1), background .25s ease, border-color .25s ease, box-shadow .25s ease; }
.nav-links .site-search:hover { background: rgba(20,16,24,0.5); border-color: rgba(255,255,255,0.8); }
.nav-links .site-search.open { width: 272px; background: rgba(20,16,24,0.5); border-color: rgba(255,255,255,0.85); }
.nav-links .site-search:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--turmeric) 45%, transparent), 0 4px 18px rgba(0,0,0,0.22); }

.nav-links .search-toggle { flex: 0 0 auto; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: color .2s ease, transform .2s ease; }
.nav-links .search-toggle:hover { color: var(--turmeric); transform: scale(1.08); }
.nav-links .search-toggle svg { filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5)); }

.nav-links .search-input { flex: 1; min-width: 0; width: 0; padding: 0; opacity: 0; border: 0; outline: 0; background: transparent; color: #fff; font: 500 .92rem/1 'Work Sans', system-ui, sans-serif; text-shadow: 0 1px 6px rgba(0,0,0,0.45); -webkit-appearance: none; appearance: none; transition: opacity .25s ease .1s; }
.nav-links .site-search.open .search-input { opacity: 1; padding: 0 16px 0 0; }
.nav-links .search-input::placeholder { color: rgba(255,255,255,0.82); }
.nav-links .search-input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* results panel: readable in light and dark mode */
.nav-links .search-results { position: absolute; top: calc(100% + 12px); left: 0; z-index: 60; width: 400px; max-width: calc(100vw - 36px); max-height: min(70vh, 460px); overflow-y: auto; padding: 6px 0 0; text-align: left; color: var(--ink); background: color-mix(in srgb, var(--card) 96%, transparent); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%); border: 1px solid var(--rule); border-radius: 18px; box-shadow: 0 28px 60px rgba(18,14,23,0.38), 0 3px 10px rgba(18,14,23,0.14); transform-origin: top left; }
.nav-links .search-results[hidden] { display: none; }
.nav-links .search-results:not([hidden]) { animation: srIn .26s cubic-bezier(.2,.9,.3,1.15); }
@keyframes srIn { from { opacity: 0; transform: translateY(-8px) scale(.96); } to { opacity: 1; transform: none; } }

/* undo the top-menu link look (uppercase + glow) inside the panel */
.nav-links .search-results, .nav-links .search-results * { text-shadow: none; text-transform: none; letter-spacing: normal; }

.nav-links .search-results .sr-head { padding: 12px 20px 6px; font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.nav-links .search-results .sr-item { position: relative; display: block; margin: 2px 8px; padding: 10px 14px; border-radius: 12px; color: var(--ink); font-size: 1rem; font-weight: 400; line-height: 1.4; cursor: pointer; transition: background .15s ease, box-shadow .15s ease; }
.nav-links .search-results .sr-item:hover,
.nav-links .search-results .sr-item.active { background: color-mix(in srgb, var(--turmeric) 18%, transparent); box-shadow: inset 3px 0 0 var(--turmeric); }
.nav-links .search-results .sr-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nav-links .search-results .sr-title { font-family: 'Frank Ruhl Libre', Georgia, serif; font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.nav-links .search-results .sr-tag { flex: 0 0 auto; padding: 3px 10px; border-radius: 999px; font-size: .64rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--vermillion); background: color-mix(in srgb, var(--vermillion) 13%, transparent); }
.nav-links .search-results .sr-snip { margin-top: 3px; font-size: .84rem; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nav-links .search-results mark { padding: 0 2px; border-radius: 3px; color: inherit; background: color-mix(in srgb, var(--turmeric) 40%, transparent); }
.nav-links .search-results .sr-empty { padding: 26px 20px; text-align: center; font-size: .9rem; color: var(--ink-soft); }
.nav-links .search-results .sr-foot { margin-top: 6px; padding: 10px 18px; border-top: 1px solid var(--rule); font-size: .72rem; color: var(--ink-soft); background: rgba(127,127,127,0.06); }

/* gold pulse on the section you jumped to */
@keyframes searchPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--turmeric) 55%, transparent); } 70% { box-shadow: 0 0 0 18px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.search-flash { border-radius: 6px; animation: searchPulse 1.6s ease-out; }

/* ---------- 10. PHONES ---------- */
@media (max-width: 720px) {
  main > section.wrap { padding-top: 44px; padding-bottom: 36px; }
  .land, .gov { grid-template-columns: 1fr; }
  .land .art { order: -1; }
  .figures-row { gap: 24px; }
  .theme-toggle { left: 70px; top: 18px; }

  .visit .card { padding: 24px 20px; }
  .visit .card dl { display: block; }
  .visit .card dt { margin-top: 20px; }
  .visit .card dt:first-of-type { margin-top: 0; }
  .visit .card dd { margin-top: 5px; margin-bottom: 25px; }

  .navbar { padding-left: 18px; padding-right: 18px; }
  .hero-inner { padding-left: 18px; padding-right: 18px; }
  .hero h1.display { font-size: clamp(2.1rem, 10vw, 3.2rem); }
  .hero-text { font-size: 0.92rem; line-height: 1.5; }
  .cta-row { gap: 18px; }
  .btn-outline { padding: 12px 22px; }
  .car-item { flex-basis: min(300px, 82vw); }

  /* top links stay visible on phones: compact, close together, on the right,
     in a row under the ☰ and ☀︎ buttons (wraps to a 2nd line only if the screen is very narrow) */
  .navbar { padding-top: 66px; }
  .nav-links { flex-wrap: wrap; justify-content: flex-end; gap: 6px 9px; }
  .nav-links a { font-size: 0.7rem; letter-spacing: 0.01em; padding-bottom: 0; }
  .nav-links .site-search { width: 36px; height: 36px; }
  .nav-links .search-toggle { width: 34px; height: 34px; }
  .weather { padding-left: 0; border-left: none; gap: 4px; }
  .weather .w-label { display: none; }
  .weather .w-emoji { font-size: 1.05rem; }
  .nav-links .site-search.open { width: min(272px, calc(100vw - 36px)); }
  /* search results: smaller, and centred in the middle of the phone screen.
     (backdrop-filter would make the fixed panel position itself inside the small search pill, so it is switched off here) */
  .nav-links .site-search { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(20,16,24,0.62); }
  .nav-links .search-results { position: fixed; top: 172px; left: 0; right: 0; margin: 0 auto; width: calc(100vw - 28px); max-width: 420px; max-height: 58vh; border-radius: 16px; padding-top: 2px; }
  .nav-links .search-results .sr-head { padding: 8px 14px 4px; font-size: .6rem; }
  .nav-links .search-results .sr-item { margin: 1px 6px; padding: 7px 10px; border-radius: 10px; }
  .nav-links .search-results .sr-title { font-size: .88rem; }
  .nav-links .search-results .sr-tag { padding: 2px 8px; font-size: .56rem; }
  .nav-links .search-results .sr-snip { font-size: .72rem; margin-top: 1px; -webkit-line-clamp: 1; }
  .nav-links .search-results .sr-empty { padding: 16px 14px; font-size: .8rem; }
  .nav-links .search-results .sr-foot { display: none; }
}

@media (max-width: 480px) {
  .wrap { padding-left: 18px; padding-right: 18px; }
  .menu-btn { left: 18px; top: 18px; }
  .sidebar { left: 18px; top: 72px; }
  .hero { padding-bottom: 36px; }
  .hero-inner { padding-top: 34px; padding-bottom: 24px; }
  .hero .kicker { font-size: 0.75rem; line-height: 1.5; }
  .hero h1.display { font-size: 2.2rem; }
  .hero-rule { margin: 16px auto; }
  .cta-row { flex-direction: row; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
  .h2 { font-size: 1.45rem; margin-bottom: 12px; }
  body { font-size: 0.95rem; }
  .proud-slide p { font-size: 0.92rem; }
  .proud-slide h3 { font-size: 1.2rem; }
  .proud-tab { padding: 14px 12px 10px; margin-bottom: 22px; }
  .proud-btn { width: 36px; height: 36px; font-size: 1.6rem; left: 4px; }
  .proud-btn.next { left: auto; right: 4px; }
  .proud-slide img { height: 112px; width: 90px; margin-bottom: 10px; }
  .visit .card { padding: 22px 18px; }
  footer { padding-left: 18px; padding-right: 18px; }
}

/* ---------- TOUCH SCREENS (phones/tablets have no real hover) ---------- */
@media (hover: none) {
  .proud-btn { opacity: 0.7; }
  .proud-btn:hover { opacity: 0.7; background: transparent; transform: translateY(-50%); }
  .car-item[data-href]:hover { transform: none; }
  .side-links a:hover { transform: none; }
}

/* ---------- 11. STUDENT CORNER: results heading + table titles ---------- */
/* big centred heading above both tables; the small "Example data" note is hidden */
.results .results-head { display: flex; justify-content: center; text-align: center; margin-bottom: 18px; }
.results .results-head h2 { font-size: 1.6rem; line-height: 1.3; }
.results .results-head .eg { display: none; }

/* "कक्षा 10 · Class 10" and "कक्षा 12 (इंटर) · Class 12 (Inter)" centred over their own table */
.results .rt-title { justify-content: center; text-align: center; margin: 0 0 10px; font-size: 1.1rem; }

@media (max-width: 520px) {
  .results .results-head h2 { font-size: 1.3rem; }
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
/* Search bar: position the clear button inside the input */
.site-search {
  position: relative;
}

.search-input {
  padding-right: 42px;
}

/* Clear search cross */
.search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: rgba(128, 128, 128, 0.18);
  color: inherit;
  font-family: Arial, sans-serif;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
  transition: background 0.2s ease, transform 0.2s ease;
}

.search-clear:hover {
  background: rgba(220, 100, 80, 0.25);
  transform: translateY(-50%) scale(1.1);
}

/* Hide the cross when the input is empty */
.search-clear[hidden] {
  display: none !important;
}
  /* About photo on the right, text wraps around it */
  #about .about-photo {
    float: right;
    width: min(340px, 38%);
    aspect-ratio: 4 / 5;
    object-fit: cover;
    margin: 4px 0 18px 32px;
    border-radius: 22px;
    border: 1px solid var(--rule);
    box-shadow: 0 18px 44px color-mix(in srgb, var(--ink) 14%, transparent);
  }
  #about::after { content: ""; display: block; clear: both; }

  @media (max-width: 700px) {
    #about .about-photo {
      float: none;
      display: block;
      width: 100%;
      aspect-ratio: 16 / 10;
      margin: 0 0 20px;
    }
  }
  #about-village { scroll-margin-top: 90px; }


    .cr-extra{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:24px}
  .cr-extra-box{min-width:0;padding:17px;border:1px solid var(--rule);border-radius:16px;background:var(--card)}
  .cr-extra-box h3{margin:0 0 12px;font-size:1.02rem;line-height:1.4;color:var(--ink)}
  .cr-table{width:100%;border-collapse:collapse;font-size:.82rem;line-height:1.55}
  .cr-table th{text-align:left;padding:8px 10px;font-size:.7rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--ink-soft);background:color-mix(in srgb,var(--turmeric) 14%,var(--card))}
  .cr-table td{padding:9px 10px;border-top:1px solid var(--rule);vertical-align:top;color:var(--ink-soft)}
  .cr-table td:first-child{font-weight:700;color:var(--ink);white-space:nowrap}
  .cr-plan,.cr-docs{margin:0;padding-left:20px;font-size:.82rem;line-height:1.6;color:var(--ink-soft)}
  .cr-plan li,.cr-docs li{margin:0 0 7px}
  .cr-plan b{color:var(--ink)}
  .cr-extra-box details{padding:9px 0;border-top:1px solid var(--rule)}
  .cr-extra-box details:first-of-type{border-top:0}
  .cr-extra-box summary{cursor:pointer;font-weight:700;font-size:.86rem;color:var(--ink)}
  .cr-extra-box details p{margin:7px 0 0;font-size:.8rem;line-height:1.6;color:var(--ink-soft)}
  @media(max-width:950px){.cr-extra{grid-template-columns:1fr}}
  @media(max-width:600px){.cr-extra-box{padding:13px}.cr-table td:first-child{white-space:normal}}
  /* Hero background changes with the theme: top1 = light, top2 = dark */
.hero-bg .hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .6s ease; }
.hero-bg .hero-img-light { opacity: 1; }
.hero-bg .hero-img-dark { opacity: 0; }
:root[data-theme="dark"] .hero-bg .hero-img-light { opacity: 0; }
:root[data-theme="dark"] .hero-bg .hero-img-dark { opacity: 1; }

.nav-two-line {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
  text-align: center;
}
.nav-two-line small {
  font-size: .62em;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: none;
}

/* Home button: white in dark mode */
:root[data-theme="dark"] #homeBtn {
  color: #ffffff !important;
}

/* Home button: black in light mode, white in dark mode */
#homeBtn {
  color: #000000 !important;
}
:root[data-theme="dark"] #homeBtn {
  color: #ffffff !important;
}
footer {
  text-align: center;
  padding: 20px;
  background: #222;
  color: #fff;
}

#visitor-count {
  font-weight: bold;
  color: #4ade80;
}

@media (max-width: 700px) {
  .hero-bg img,
  .hero-overlay::after,
  .art svg,
  .art img {
    animation: none !important;
    will-change: auto !important;
  }
  .hero-overlay::after { display: none !important; }

  .kicker,
  .btn-text,
  .fp-top,
  .photo-card figcaption {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}

/* Lighter page: keeps the look, removes the heaviest effects */
.hero-bg img,
.hero-overlay::after,
.art svg,
.art img {
  animation: none !important;
  will-change: auto !important;
}
.hero-overlay::after { display: none !important; }

.kicker,
.btn-text,
.fp-top,
.proud-btn,
.photo-card figcaption {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

.src-note { margin: 18px 0 0; padding: 16px 22px; border: 1px solid var(--rule); border-radius: 14px; background: var(--card); font-size: .88rem; line-height: 1.7; color: var(--ink-soft); }
.src-note p { margin: 0 0 8px; }
.src-note p:last-child { margin-bottom: 0; }
.src-note strong { color: var(--ink); }
.src-note a { color: var(--indigo); font-weight: 600; }