/* ============================================================
   KOLHAPUR DISTRICT AGRICULTURE OFFICE PORTAL
   Design System v2.0 — Maharashtra Government Standards
   Phases 1–9: Full UI/UX Modernization
============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;500;600;700&family=Noto+Sans+Devanagari:wght@400;500;600;700&display=swap');

/* ── CSS Custom Properties ── */
:root {
  /* Primary — Maharashtra Government Blue */
  --c-primary:       #003082;
  --c-primary-dark:  #002060;
  --c-primary-mid:   #1a4a9e;
  --c-primary-light: #e8eef8;
  --c-primary-pale:  #f0f4fb;

  /* Agriculture Accent — Green */
  --c-green:         #1b6e2a;
  --c-green-mid:     #2e7d32;
  --c-green-light:   #e8f5e9;

  /* Saffron accent */
  --c-gold:          #c8860a;
  --c-gold-light:    #fff8e1;

  /* Status */
  --c-danger:        #c62828;
  --c-danger-dark:   #b71c1c;
  --c-danger-light:  #ffebee;
  --c-success:       #1b5e20;
  --c-success-light: #e8f5e9;
  --c-warning:       #e65100;
  --c-warning-light: #fff3e0;

  /* Neutrals */
  --c-bg:            #f4f6fb;
  --c-surface:       #ffffff;
  --c-border:        #cdd5e4;
  --c-border-light:  #e4e9f4;

  /* Text */
  --c-text:          #1a2744;
  --c-text-secondary:#4a5568;
  --c-text-muted:    #718096;
  --c-text-inverse:  #ffffff;

  /* Typography */
  --font:            'Noto Sans', 'Noto Sans Devanagari', Arial, sans-serif;
  --fs-xs:    0.75rem;
  --fs-sm:    0.875rem;
  --fs-base:  1rem;
  --fs-lg:    1.125rem;
  --fs-xl:    1.25rem;
  --fs-2xl:   1.5rem;
  --fs-3xl:   1.875rem;
  --fs-4xl:   2.25rem;
  --fw-normal:  400;
  --fw-medium:  500;
  --fw-semi:    600;
  --fw-bold:    700;
  --lh-tight:   1.3;
  --lh-base:    1.6;
  --lh-relaxed: 1.8;

  /* Spacing (8px base) */
  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-5:  1.25rem;
  --sp-6:  1.5rem;
  --sp-8:  2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;

  /* Radius */
  --r-sm:   4px;
  --r-md:   8px;
  --r-lg:   12px;
  --r-xl:   16px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,32,96,.07);
  --shadow-md: 0 4px 12px rgba(0,32,96,.09);
  --shadow-lg: 0 8px 24px rgba(0,32,96,.12);

  /* Transitions */
  --t-fast: .15s ease;
  --t-base: .25s ease;

  --max-w: 1200px;
}

/* ── Reset ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--c-text);
  background: var(--c-bg);
}

img { max-width: 100%; display: block; }
a  { color: var(--c-primary); }
a:hover { text-decoration: underline; }

/* ── Skip Link ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--sp-4);
  background: var(--c-primary);
  color: var(--c-text-inverse);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-md);
  font-weight: var(--fw-semi);
  z-index: 9999;
  text-decoration: none;
  transition: top var(--t-fast);
}
.skip-link:focus {
  top: var(--sp-4);
}

/* ── Focus Styles ── */
:focus-visible {
  outline: 3px solid var(--c-gold);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* ── Government Utility Bar ── */
.utility-bar {
  background: var(--c-primary-dark);
  color: rgba(255,255,255,.8);
  font-size: var(--fs-xs);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-1) var(--sp-6);
  gap: var(--sp-4);
}
.utility-bar a {
  color: rgba(255,255,255,.8);
  text-decoration: none;
}
.utility-bar a:hover { color: #fff; }
/* ── Language buttons — inside right header logo column ── */
.header-logo--right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
}
.header-lang {
  display: flex;
  gap: var(--sp-2);
}
.header-lang button {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.35);
  color: #fff;
  font-size: var(--fs-xs);
  font-family: var(--font);
  padding: 3px 12px;
  border-radius: var(--r-full);
  cursor: pointer;
  transition: background var(--t-fast);
  white-space: nowrap;
}
.header-lang button:hover,
.header-lang button[aria-pressed="true"] {
  background: rgba(255,255,255,.35);
  font-weight: var(--fw-semi);
}

/* ── Google Translate: suppress injected banner and logo ── */
.goog-te-banner-frame,
.goog-te-menu-frame { display: none !important; }
.goog-te-gadget    { display: none !important; }
#google_translate_element {
  position: absolute;
  top: -9999px;
  left: -9999px;
  overflow: hidden;
}
body { top: 0 !important; }

/* ── Header ── */
header {
  background: var(--c-primary);
  color: var(--c-text-inverse);
  border-bottom: 4px solid var(--c-gold);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--sp-4) var(--sp-6);
  display: flex;
  align-items: flex-start;  /* both logo divs start at the same top edge so their imgs align */
  gap: var(--sp-6);
}
.header-logo img {
  height: 80px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}
.header-title {
  flex: 1;
  text-align: center;
  align-self: center;  /* keep the text block vertically centered while logos align by their tops */
}
.header-title__sub {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: rgba(255,255,255,.8);
  letter-spacing: .5px;
  margin-bottom: var(--sp-1);
}
.header-title__dept {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semi);
  color: rgba(255,255,255,.9);
  margin-bottom: var(--sp-1);
}
.header-title__main {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  color: #fff;
  line-height: var(--lh-tight);
}
.header-title__tagline {
  font-size: var(--fs-sm);
  color: rgba(255,255,255,.7);
  margin-top: var(--sp-2);
  letter-spacing: .3px;
}

/* ── Navigation ── */
.site-nav {
  background: var(--c-primary-mid);
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.site-nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-nav__links {
  display: flex;
  list-style: none;
  gap: 0;
  flex-wrap: wrap;
}
.site-nav__links li a {
  display: block;
  color: rgba(255,255,255,.88);
  text-decoration: none;
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  border-bottom: 3px solid transparent;
  transition: color var(--t-fast), border-color var(--t-fast);
  white-space: nowrap;
}
.site-nav__links li a:hover,
.site-nav__links li a.active {
  color: #fff;
  border-bottom-color: var(--c-gold);
  background: rgba(0,0,0,.15);
}
/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: var(--sp-3);
  margin-left: auto;
}
.nav-toggle svg { display: block; }

/* ── Main content wrapper ── */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--sp-8) var(--sp-6);
}

/* ── Footer ── */
footer {
  background: var(--c-primary-dark);
  color: rgba(255,255,255,.8);
  margin-top: var(--sp-16);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--sp-10) var(--sp-6) var(--sp-6);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap: var(--sp-8);
}
.footer-section h3 {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--c-gold);
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid rgba(255,255,255,.15);
}
.footer-section p,
.footer-section li {
  font-size: var(--fs-sm);
  color: rgba(255,255,255,.75);
  margin-bottom: var(--sp-2);
  line-height: var(--lh-relaxed);
}
.footer-section ul { list-style: none; }
.footer-section a {
  color: rgba(255,255,255,.75);
  text-decoration: none;
  font-size: var(--fs-sm);
}
.footer-section a:hover { color: #fff; text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: var(--sp-4) var(--sp-6);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: rgba(255,255,255,.55);
  max-width: var(--max-w);
  margin: 0 auto;
}
.footer-bottom a {
  color: rgba(255,255,255,.6);
  text-decoration: none;
}
.footer-bottom a:hover { color: #fff; }
.footer-bottom__links { display: flex; gap: var(--sp-4); flex-wrap: wrap; }

/* ── Footer info — website attribution block ── */
.footer-info {
  border-top: 1px solid rgba(255,255,255,.07);
  padding: var(--sp-3) var(--sp-6) var(--sp-5);
  text-align: center;
  max-width: var(--max-w);
  margin: 0 auto;
}
.footer-info__heading {
  font-size: 0.7rem;
  font-weight: var(--fw-semi);
  color: rgba(255,255,255,.35);
  text-transform: uppercase;
  letter-spacing: .7px;
  margin-bottom: var(--sp-2);
}
.footer-info p {
  font-size: 0.7rem;
  color: rgba(255,255,255,.3);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--sp-1);
}
.footer-info p:last-child { margin-bottom: 0; }

/* ── Page header (within main) ── */
.page-header {
  margin-bottom: var(--sp-8);
  padding-bottom: var(--sp-4);
  border-bottom: 2px solid var(--c-border-light);
}
.page-header h1 {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-bold);
  color: var(--c-primary);
  line-height: var(--lh-tight);
  margin-bottom: var(--sp-2);
}
.page-header p {
  color: var(--c-text-secondary);
  font-size: var(--fs-lg);
}

/* ── Cards ── */
.card {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--c-border-light);
  padding: var(--sp-6);
  transition: box-shadow var(--t-base), transform var(--t-base);
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.card h3 {
  color: var(--c-primary);
  font-size: var(--fs-lg);
  font-weight: var(--fw-semi);
  margin-bottom: var(--sp-3);
}
.card p { color: var(--c-text-secondary); }

/* Card link wrapper */
.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
.card-link:hover { text-decoration: none; }

/* ── Grid layouts ── */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
  gap: var(--sp-6);
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px,1fr));
  gap: var(--sp-6);
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: var(--sp-5);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--r-md);
  font-family: var(--font);
  font-size: var(--fs-base);
  font-weight: var(--fw-semi);
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--c-primary);
  color: #fff;
}
.btn-primary:hover { background: var(--c-primary-dark); box-shadow: var(--shadow-sm); }

.btn-secondary {
  background: var(--c-green-mid);
  color: #fff;
}
.btn-secondary:hover { background: var(--c-green); }

.btn-outline {
  background: transparent;
  color: var(--c-primary);
  border: 2px solid var(--c-primary);
}
.btn-outline:hover { background: var(--c-primary-light); }

.btn-danger {
  background: var(--c-danger);
  color: #fff;
}
.btn-danger:hover { background: var(--c-danger-dark); }

.btn-ghost {
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,.3);
}
.btn-ghost:hover { background: rgba(255,255,255,.25); }

.btn-sm {
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-sm);
}
.btn-lg {
  padding: var(--sp-4) var(--sp-8);
  font-size: var(--fs-lg);
}

/* ── Badge ── */
.badge {
  display: inline-block;
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  line-height: 1.4;
}
.badge-primary { background: var(--c-primary-light); color: var(--c-primary); }
.badge-green   { background: var(--c-green-light);  color: var(--c-green);   }
.badge-gold    { background: var(--c-gold-light);   color: var(--c-gold);    }

/* ── Announcement Ticker ── */
.announcement-ticker {
  display: flex;
  align-items: center;
  background: var(--c-primary-dark);
  color: #fff;
  overflow: hidden;
  height: 48px;
  margin-bottom: var(--sp-8);
  border-radius: var(--r-md);
}
.ticker-label {
  background: var(--c-gold);
  color: var(--c-primary-dark);
  padding: 0 var(--sp-5);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: .5px;
  flex-shrink: 0;
}
.ticker-wrapper { overflow: hidden; flex: 1; }
.ticker-content {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  animation: ticker-scroll 25s linear infinite;
  font-size: var(--fs-sm);
}
.ticker-content span { margin-right: var(--sp-10); }
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ── Hero Section ── */
.hero {
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-mid) 100%);
  color: #fff;
  padding: var(--sp-16) var(--sp-8);
  border-radius: var(--r-xl);
  text-align: center;
  margin-bottom: var(--sp-10);
}
.hero h2 {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-bold);
  margin-bottom: var(--sp-4);
  line-height: var(--lh-tight);
}
.hero p {
  font-size: var(--fs-lg);
  color: rgba(255,255,255,.88);
  max-width: 700px;
  margin: 0 auto var(--sp-8);
  line-height: var(--lh-relaxed);
}
.hero-buttons { display: flex; gap: var(--sp-4); justify-content: center; flex-wrap: wrap; }

/* ── Stats Grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px,1fr));
  gap: var(--sp-5);
}
.stat-card {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  padding: var(--sp-6) var(--sp-4);
  text-align: center;
  border: 1px solid var(--c-border-light);
  box-shadow: var(--shadow-sm);
}
.stat-card__number {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-bold);
  color: var(--c-primary);
  line-height: 1;
  margin-bottom: var(--sp-2);
}
.stat-card__label {
  font-size: var(--fs-sm);
  color: var(--c-text-secondary);
  font-weight: var(--fw-medium);
}

/* ── Section headers ── */
.section-title {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  color: var(--c-primary);
  margin-bottom: var(--sp-6);
}
.section-title--green { color: var(--c-green-mid); }

/* ── Info Sections (Home) ── */
.info-section {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  padding: var(--sp-8);
  margin-bottom: var(--sp-8);
  border: 1px solid var(--c-border-light);
  box-shadow: var(--shadow-sm);
}

/* Announcements */
.home-announcements { margin-bottom: var(--sp-8); }
.announcement-card {
  background: var(--c-surface);
  border-left: 4px solid var(--c-gold);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: var(--sp-5);
  margin-bottom: var(--sp-4);
  box-shadow: var(--shadow-sm);
}
.announcement-card h3 {
  color: var(--c-primary);
  font-size: var(--fs-base);
  font-weight: var(--fw-semi);
  margin-bottom: var(--sp-2);
}
.announcement-card p { color: var(--c-text-secondary); font-size: var(--fs-sm); }

/* Events */
.home-events { margin-bottom: var(--sp-8); }
.home-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px,1fr));
  gap: var(--sp-6);
}
.home-event-card {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--c-border-light);
  transition: box-shadow var(--t-base), transform var(--t-base);
}
.home-event-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.home-event-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.home-event-card__body { padding: var(--sp-5); }
.home-event-card h3 {
  color: var(--c-primary);
  font-size: var(--fs-base);
  font-weight: var(--fw-semi);
  margin-bottom: var(--sp-3);
}
.home-event-card p {
  font-size: var(--fs-sm);
  color: var(--c-text-secondary);
  margin-bottom: var(--sp-2);
}
.home-event-card .btn { margin-top: var(--sp-3); }

/* News Slider */
.home-news { margin-bottom: var(--sp-8); }
.news-slide {
  display: none;
  gap: var(--sp-6);
  align-items: center;
  background: var(--c-surface);
  padding: var(--sp-6);
  border-radius: var(--r-lg);
  border: 1px solid var(--c-border-light);
  box-shadow: var(--shadow-sm);
  max-width: 900px;
  margin: 0 auto;
}
.news-slide.active { display: flex; }
.news-slide img {
  width: 260px;
  height: 200px;
  object-fit: contain;
  background: var(--c-bg);
  border-radius: var(--r-md);
  padding: var(--sp-3);
  flex-shrink: 0;
}
.news-content h3 {
  color: var(--c-primary);
  font-size: var(--fs-lg);
  font-weight: var(--fw-semi);
  margin-bottom: var(--sp-3);
}
.news-content p {
  font-size: var(--fs-sm);
  color: var(--c-text-secondary);
  margin-bottom: var(--sp-2);
}

/* Useful Links */
.useful-links { margin-bottom: var(--sp-8); }
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap: var(--sp-4);
}
.link-card {
  background: var(--c-surface);
  padding: var(--sp-5) var(--sp-6);
  text-align: center;
  border-radius: var(--r-lg);
  text-decoration: none;
  color: var(--c-primary);
  font-weight: var(--fw-semi);
  font-size: var(--fs-sm);
  border: 1px solid var(--c-border-light);
  box-shadow: var(--shadow-sm);
  transition: all var(--t-base);
}
.link-card:hover {
  background: var(--c-primary-light);
  border-color: var(--c-primary);
  transform: translateY(-2px);
  text-decoration: none;
}

/* Contact Summary */
.contact-summary { margin-bottom: var(--sp-8); }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: var(--sp-5);
}
.contact-item {
  background: var(--c-surface);
  padding: var(--sp-5);
  border-radius: var(--r-lg);
  border: 1px solid var(--c-border-light);
}
.contact-item h3 {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  color: var(--c-primary);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: var(--sp-2);
}
.contact-item p,
.contact-item a {
  font-size: var(--fs-base);
  color: var(--c-text-secondary);
  text-decoration: none;
  overflow-wrap: break-word;
  word-break: break-word;
  display: block;
}
.contact-item a:hover { color: var(--c-primary); }

/* Portal Stats section */
.portal-stats { margin-bottom: var(--sp-8); }

/* ── Activity Slider (Gallery) ── */
.activity-slider {
  background: var(--c-surface);
  border-radius: var(--r-xl);
  padding: var(--sp-8);
  margin-bottom: var(--sp-8);
  border: 1px solid var(--c-border-light);
  box-shadow: var(--shadow-sm);
}
.slider-container {
  position: relative;
  max-width: 900px;
  margin: var(--sp-6) auto 0;
}
.slide { display: none; }
.slide.active { display: block; }
.slide img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--r-lg);
}
.slide-caption {
  background: var(--c-primary);
  color: #fff;
  padding: var(--sp-4) var(--sp-5);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.slide-caption h3 { font-size: var(--fs-base); font-weight: var(--fw-semi); margin-bottom: var(--sp-1); }
.slide-caption p  { font-size: var(--fs-sm); color: rgba(255,255,255,.8); }
.prev-btn, .next-btn {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.55);
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: var(--r-full);
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background var(--t-fast);
}
.prev-btn { left: var(--sp-3); }
.next-btn { right: var(--sp-3); }
.prev-btn:hover, .next-btn:hover { background: rgba(0,0,0,.8); }

/* ── Schemes Page ── */
.schemes-header { margin-bottom: var(--sp-6); }
.scheme-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px,1fr));
  gap: var(--sp-5);
  margin-bottom: var(--sp-8);
}
.stat-box {
  background: var(--c-surface);
  text-align: center;
  padding: var(--sp-6) var(--sp-4);
  border-radius: var(--r-lg);
  border: 1px solid var(--c-border-light);
  box-shadow: var(--shadow-sm);
}
.stat-box h3 {
  color: var(--c-primary);
  font-size: var(--fs-3xl);
  font-weight: var(--fw-bold);
  margin-bottom: var(--sp-2);
}
.stat-box p { color: var(--c-text-secondary); font-size: var(--fs-sm); }

/* Filter buttons */
.filter-container { margin-bottom: var(--sp-5); display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.filter-btn {
  background: var(--c-surface);
  color: var(--c-primary);
  border: 1px solid var(--c-border);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-full);
  font-family: var(--font);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  cursor: pointer;
  transition: all var(--t-fast);
}
.filter-btn:hover {
  background: var(--c-primary-light);
  border-color: var(--c-primary);
}
.filter-btn.active {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}

/* Search */
.search-box {
  position: relative;
  max-width: 600px;
  margin: 0 auto var(--sp-6);
}
.search-box input {
  width: 100%;
  padding: var(--sp-3) var(--sp-5);
  border: 2px solid var(--c-border);
  border-radius: var(--r-full);
  font-family: var(--font);
  font-size: var(--fs-base);
  outline: none;
  transition: border-color var(--t-fast);
}
.search-box input:focus { border-color: var(--c-primary); }
#suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  background: var(--c-surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  overflow: hidden;
  border: 1px solid var(--c-border-light);
}
.suggestion-item {
  padding: var(--sp-3) var(--sp-5);
  cursor: pointer;
  font-size: var(--fs-sm);
  color: var(--c-text);
  border-bottom: 1px solid var(--c-border-light);
  transition: background var(--t-fast);
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover { background: var(--c-primary-pale); }

#schemeCount {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  color: var(--c-text-secondary);
  margin-bottom: var(--sp-5);
}
mark {
  background: #fff3cd;
  color: var(--c-primary-dark);
  font-weight: var(--fw-semi);
  padding: 1px 3px;
  border-radius: 3px;
}
.schemes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px,1fr));
  gap: var(--sp-6);
}
.scheme-card {
  background: var(--c-surface);
  padding: var(--sp-6);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--c-border-light);
  border-top: 4px solid var(--c-primary);
  transition: box-shadow var(--t-base), transform var(--t-base);
}
.scheme-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.scheme-card.central { border-top-color: var(--c-primary); }
.scheme-card.mh      { border-top-color: var(--c-green-mid); }

.scheme-badge {
  display: inline-block;
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  margin-bottom: var(--sp-3);
}
.scheme-card.central .scheme-badge { background: var(--c-primary-light); color: var(--c-primary); }
.scheme-card.mh      .scheme-badge { background: var(--c-green-light);   color: var(--c-green);   }

.scheme-card h4 {
  color: var(--c-primary);
  font-size: var(--fs-lg);
  font-weight: var(--fw-semi);
  margin-bottom: var(--sp-4);
  line-height: var(--lh-tight);
}
.scheme-card p { font-size: var(--fs-sm); color: var(--c-text-secondary); margin-bottom: var(--sp-3); line-height: var(--lh-relaxed); }
.scheme-card strong { color: var(--c-text); }
.scheme-card a {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  margin-top: var(--sp-3);
  color: var(--c-primary);
  font-weight: var(--fw-semi);
  font-size: var(--fs-sm);
  text-decoration: none;
}
.scheme-card a:hover { text-decoration: underline; }
.highlight-card {
  animation: glow .6s ease;
}
@keyframes glow {
  0%  { box-shadow: 0 0 0 rgba(0,48,130,0); }
  50% { box-shadow: 0 0 20px rgba(0,48,130,.4); }
  100%{ box-shadow: 0 0 0 rgba(0,48,130,0); }
}

/* ── Staff Page ── */
.staff-page { }
.staff-intro { color: var(--c-text-secondary); margin-bottom: var(--sp-6); }
.staff-filter {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-8);
}
.staff-filter select {
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  font-family: var(--font);
  font-size: var(--fs-sm);
  color: var(--c-text);
  background: var(--c-surface);
  min-width: 220px;
  cursor: pointer;
}
.staff-filter select:focus { outline: none; border-color: var(--c-primary); }
.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px,1fr));
  gap: var(--sp-6);
}
.staff-card {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  text-align: center;
  border: 1px solid var(--c-border-light);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t-base), transform var(--t-base);
}
.staff-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.staff-photo {
  width: 100px;
  height: 100px;
  border-radius: var(--r-full);
  object-fit: cover;
  border: 3px solid var(--c-primary-light);
  margin: 0 auto var(--sp-4);
}
.staff-card h3 {
  color: var(--c-primary);
  font-size: var(--fs-base);
  font-weight: var(--fw-semi);
  margin-bottom: var(--sp-2);
}
.staff-card p {
  font-size: var(--fs-sm);
  color: var(--c-text-secondary);
  margin-bottom: var(--sp-1);
}

/* ── Events Page ── */
.events-intro { color: var(--c-text-secondary); margin-bottom: var(--sp-6); }
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px,1fr));
  gap: var(--sp-6);
}
.event-public-card {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--c-border-light);
  transition: box-shadow var(--t-base), transform var(--t-base);
}
.event-public-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.event-banner {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.event-public-card__body { padding: var(--sp-5); }
.event-public-card h2 {
  color: var(--c-primary);
  font-size: var(--fs-lg);
  font-weight: var(--fw-semi);
  margin-bottom: var(--sp-3);
}
.event-public-card p {
  font-size: var(--fs-sm);
  color: var(--c-text-secondary);
  margin-bottom: var(--sp-2);
}

/* ── Gallery ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px,1fr));
  gap: var(--sp-6);
}
.gallery-card {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--c-border-light);
  transition: box-shadow var(--t-base), transform var(--t-base);
}
.gallery-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.gallery-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.gallery-info { padding: var(--sp-4); }
.gallery-info h3 { color: var(--c-primary); font-size: var(--fs-base); font-weight: var(--fw-semi); margin-bottom: var(--sp-1); }
.gallery-info p  { font-size: var(--fs-sm); color: var(--c-text-secondary); }

/* ── News Page ── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px,1fr));
  gap: var(--sp-6);
}
.news-card {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--c-border-light);
}
.news-card img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: var(--c-bg);
  padding: var(--sp-3);
}
.news-info { padding: var(--sp-5); }
.news-info h3 { color: var(--c-primary); font-size: var(--fs-base); font-weight: var(--fw-semi); margin-bottom: var(--sp-3); }
.news-info p  { font-size: var(--fs-sm); color: var(--c-text-secondary); margin-bottom: var(--sp-2); }

/* ── Downloads Page ── */
.public-download-card {
  background: var(--c-surface);
  border-left: 4px solid var(--c-primary);
  padding: var(--sp-5) var(--sp-6);
  margin-bottom: var(--sp-4);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
  gap: var(--sp-4);
  transition: box-shadow var(--t-base);
}
.public-download-card:hover { box-shadow: var(--shadow-md); }
.public-download-card h3 {
  color: var(--c-text);
  font-size: var(--fs-base);
  font-weight: var(--fw-semi);
  margin: 0;
}
.public-download-card a {
  background: var(--c-primary);
  color: #fff;
  text-decoration: none;
  padding: var(--sp-2) var(--sp-5);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  white-space: nowrap;
  transition: background var(--t-fast);
}
.public-download-card a:hover { background: var(--c-primary-dark); text-decoration: none; }

/* ── About Page ── */
.about-header { text-align: center; margin-bottom: var(--sp-12); }
.about-header h1 { color: var(--c-primary); font-size: var(--fs-4xl); font-weight: var(--fw-bold); margin-bottom: var(--sp-4); }
.about-header p  { font-size: var(--fs-lg); color: var(--c-text-secondary); max-width: 800px; margin: 0 auto; line-height: var(--lh-relaxed); }
.about-section { margin-bottom: var(--sp-10); }
.about-section h2 {
  color: var(--c-primary);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 2px solid var(--c-border-light);
}
.about-section p { line-height: var(--lh-relaxed); color: var(--c-text-secondary); margin-bottom: var(--sp-4); }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
  gap: var(--sp-5);
  margin-top: var(--sp-5);
}
.feature-box {
  background: var(--c-surface);
  padding: var(--sp-6);
  border-radius: var(--r-lg);
  border: 1px solid var(--c-border-light);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t-base), transform var(--t-base);
}
.feature-box:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.feature-box h3 { color: var(--c-primary); font-weight: var(--fw-semi); margin-bottom: var(--sp-2); }
.feature-box p  { font-size: var(--fs-sm); color: var(--c-text-secondary); }
.feature-list { list-style: none; }
.feature-list li {
  background: var(--c-surface);
  margin-bottom: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-left: 4px solid var(--c-primary);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: var(--fs-sm);
  color: var(--c-text-secondary);
  box-shadow: var(--shadow-sm);
}
.disclaimer {
  background: var(--c-gold-light);
  padding: var(--sp-6);
  border-left: 5px solid var(--c-gold);
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
}
.disclaimer h2 { color: var(--c-warning); border: none; padding: 0; }

/* ── FAQ ── */
.faq-intro { text-align: center; color: var(--c-text-secondary); max-width: 750px; margin: 0 auto var(--sp-8); line-height: var(--lh-relaxed); }
.faq-container { display: flex; flex-direction: column; gap: var(--sp-3); }
.faq-item {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--c-border-light);
  box-shadow: var(--shadow-sm);
}
.faq-question {
  width: 100%;
  padding: var(--sp-5) var(--sp-6);
  border: none;
  background: var(--c-surface);
  cursor: pointer;
  text-align: left;
  font-family: var(--font);
  font-size: var(--fs-base);
  font-weight: var(--fw-semi);
  color: var(--c-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background var(--t-fast);
}
.faq-question:hover { background: var(--c-primary-pale); }
.faq-question::after {
  content: '+';
  font-size: var(--fs-xl);
  font-weight: var(--fw-normal);
  flex-shrink: 0;
  margin-left: var(--sp-4);
  color: var(--c-primary);
  transition: transform var(--t-base);
}
.faq-item.open .faq-question::after { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease;
}
.faq-answer.active { max-height: 1500px; }
.faq-answer p {
  padding: var(--sp-5) var(--sp-6) var(--sp-3);
  color: var(--c-text-secondary);
  line-height: var(--lh-relaxed);
}
.faq-answer ul  { padding: 0 var(--sp-8) var(--sp-5); }
.faq-answer li  { margin-bottom: var(--sp-3); color: var(--c-text-secondary); line-height: var(--lh-relaxed); font-size: var(--fs-sm); }
.faq-answer strong { color: var(--c-text); }

/* ── Contact Page ── */
.contact-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px,1fr));
  gap: var(--sp-6);
  margin-top: var(--sp-5);
}
.contact-card {
  background: var(--c-surface);
  padding: var(--sp-6);
  border-radius: var(--r-lg);
  border: 1px solid var(--c-border-light);
  box-shadow: var(--shadow-sm);
}
.contact-card h3 {
  color: var(--c-primary);
  font-size: var(--fs-lg);
  font-weight: var(--fw-semi);
  margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-3);
  border-bottom: 2px solid var(--c-border-light);
}
.contact-card p { margin-bottom: var(--sp-3); font-size: var(--fs-sm); color: var(--c-text-secondary); line-height: var(--lh-relaxed); overflow-wrap: anywhere; }
.contact-card a { color: var(--c-primary); overflow-wrap: break-word; word-break: break-word; }

/* ── Forms ── */
.form-card {
  background: var(--c-surface);
  padding: var(--sp-8);
  border-radius: var(--r-lg);
  border: 1px solid var(--c-border-light);
  box-shadow: var(--shadow-sm);
  max-width: 700px;
  margin: 0 auto var(--sp-8);
}
.form-card h2 {
  color: var(--c-primary);
  font-size: var(--fs-xl);
  font-weight: var(--fw-semi);
  margin-bottom: var(--sp-6);
  padding-bottom: var(--sp-4);
  border-bottom: 2px solid var(--c-border-light);
}
.form-group {
  margin-bottom: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.form-group label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  color: var(--c-text);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  font-family: var(--font);
  font-size: var(--fs-base);
  color: var(--c-text);
  background: var(--c-surface);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(0,48,130,.1);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-group input[type="file"] {
  padding: var(--sp-4);
  border: 2px dashed var(--c-border);
  background: var(--c-bg);
  cursor: pointer;
}
.form-group input[type="file"]:focus { border-color: var(--c-primary); }
.form-hint { font-size: var(--fs-xs); color: var(--c-text-muted); }

/* Login form */
.admin-login {
  max-width: 440px;
  margin: var(--sp-12) auto;
  background: var(--c-surface);
  border-radius: var(--r-xl);
  padding: var(--sp-10);
  border: 1px solid var(--c-border-light);
  box-shadow: var(--shadow-lg);
}
.admin-login h1 {
  color: var(--c-primary);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  text-align: center;
  margin-bottom: var(--sp-2);
}
.admin-login__subtitle {
  text-align: center;
  color: var(--c-text-muted);
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-8);
}
.admin-login form { display: flex; flex-direction: column; gap: var(--sp-4); }

/* Password form */
.password-form {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

/* ── Admin Panel ── */
.admin-page { }
.admin-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-bottom: var(--sp-8);
  padding-bottom: var(--sp-4);
  border-bottom: 2px solid var(--c-border-light);
}
.admin-page-header h1 {
  color: var(--c-primary);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
}
.admin-topbar {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-8);
}
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px,1fr));
  gap: var(--sp-5);
  margin-bottom: var(--sp-6);
}
.admin-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  background: var(--c-surface);
  padding: var(--sp-6);
  border-radius: var(--r-lg);
  text-align: center;
  font-weight: var(--fw-semi);
  color: var(--c-primary);
  border: 1px solid var(--c-border-light);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: all var(--t-base);
}
.admin-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  background: var(--c-primary-pale);
  text-decoration: none;
}
.admin-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  background: var(--c-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-3);
}
.admin-card__icon svg { color: var(--c-primary); }
.admin-card h3 { font-size: var(--fs-base); color: var(--c-primary); margin: 0; }
.admin-card p  { font-size: var(--fs-sm); color: var(--c-text-secondary); font-weight: var(--fw-normal); margin: 0; }

/* Admin item cards */
.item-card {
  background: var(--c-surface);
  padding: var(--sp-5);
  margin-bottom: var(--sp-4);
  border-radius: var(--r-lg);
  border: 1px solid var(--c-border-light);
  border-left: 4px solid var(--c-primary);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
}
.item-card__content { flex: 1; }
.item-card__content h3 {
  color: var(--c-primary);
  font-size: var(--fs-base);
  font-weight: var(--fw-semi);
  margin-bottom: var(--sp-2);
}
.item-card__content p { font-size: var(--fs-sm); color: var(--c-text-secondary); margin-bottom: var(--sp-1); }
.item-card__actions { display: flex; gap: var(--sp-2); flex-shrink: 0; align-items: flex-start; }
.staff-row {
  background: var(--c-surface);
  padding: var(--sp-5);
  margin-bottom: var(--sp-4);
  border-radius: var(--r-lg);
  border-left: 4px solid var(--c-primary);
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.announcement-card {
  background: var(--c-surface);
  border-left: 4px solid var(--c-gold);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: var(--sp-5);
  margin-bottom: var(--sp-4);
  box-shadow: var(--shadow-sm);
}
.announcement-card h3 { color: var(--c-primary); font-weight: var(--fw-semi); margin-bottom: var(--sp-2); }
.event-card {
  background: var(--c-surface);
  padding: var(--sp-5);
  margin-bottom: var(--sp-4);
  border-radius: var(--r-lg);
  border-left: 4px solid var(--c-green-mid);
  box-shadow: var(--shadow-sm);
}
.download-card {
  background: var(--c-surface);
  padding: var(--sp-5);
  margin-bottom: var(--sp-4);
  border-left: 4px solid var(--c-primary);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  box-shadow: var(--shadow-sm);
}
.download-card h3 { color: var(--c-text); font-weight: var(--fw-semi); margin-bottom: var(--sp-3); }
.download-card a { color: var(--c-primary); font-size: var(--fs-sm); }
.admin-news-card {
  display: flex;
  gap: var(--sp-6);
  align-items: flex-start;
  background: var(--c-surface);
  margin-bottom: var(--sp-5);
  padding: var(--sp-5);
  border-radius: var(--r-lg);
  border: 1px solid var(--c-border-light);
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}
.admin-news-image { width: 200px; flex-shrink: 0; }
.admin-news-image img {
  width: 100%;
  height: 150px;
  object-fit: contain;
  border-radius: var(--r-md);
  background: var(--c-bg);
  padding: var(--sp-2);
}
.admin-news-content { flex: 1; }
.admin-news-content h3 { color: var(--c-primary); font-size: var(--fs-lg); font-weight: var(--fw-semi); margin-bottom: var(--sp-3); }
.admin-news-content p { font-size: var(--fs-sm); color: var(--c-text-secondary); margin-bottom: var(--sp-2); }
.gallery-row {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  background: var(--c-surface);
  padding: var(--sp-4);
  border-radius: var(--r-lg);
  border: 1px solid var(--c-border-light);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
}
.gallery-row img { width: 120px; height: 90px; object-fit: cover; border-radius: var(--r-md); flex-shrink: 0; }
.gallery-row h3 { color: var(--c-primary); font-size: var(--fs-base); font-weight: var(--fw-semi); flex: 1; }
.gallery-row p  { font-size: var(--fs-sm); color: var(--c-text-secondary); }

/* Delete button */
.delete-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  background: var(--c-danger);
  color: #fff;
  text-decoration: none;
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  transition: background var(--t-fast);
}
.delete-btn:hover { background: var(--c-danger-dark); text-decoration: none; }
.logout-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--c-danger);
  color: #fff;
  text-decoration: none;
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  transition: background var(--t-fast);
}
.logout-btn:hover { background: var(--c-danger-dark); text-decoration: none; }

/* ── Logs / Tables ── */
.logs-page { }
.logs-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}
.table-wrapper { overflow-x: auto; border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.logs-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--c-surface);
  min-width: 500px;
}
.logs-table th {
  background: var(--c-primary);
  color: #fff;
  padding: var(--sp-4) var(--sp-5);
  text-align: left;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  white-space: nowrap;
}
.logs-table td {
  padding: var(--sp-3) var(--sp-5);
  border-bottom: 1px solid var(--c-border-light);
  font-size: var(--fs-sm);
  color: var(--c-text-secondary);
  vertical-align: middle;
}
.logs-table tr:nth-child(even) { background: var(--c-primary-pale); }
.logs-table tr:hover { background: var(--c-primary-light); }
.logs-table td:first-child { font-weight: var(--fw-semi); color: var(--c-primary); }
.export-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--c-green-mid);
  color: #fff;
  padding: var(--sp-2) var(--sp-5);
  border-radius: var(--r-md);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  transition: background var(--t-fast);
}
.export-btn:hover { background: var(--c-green); text-decoration: none; }

/* ── Alert messages ── */
.alert {
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-5);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
}
.alert-success { background: var(--c-success-light); color: var(--c-success); border-left: 4px solid var(--c-success); }
.alert-danger   { background: var(--c-danger-light);  color: var(--c-danger);  border-left: 4px solid var(--c-danger);  }
.alert-warning  { background: var(--c-warning-light); color: var(--c-warning); border-left: 4px solid var(--c-warning); }

/* ── Language bar ── */

/* ── Divider ── */
hr {
  border: none;
  border-top: 1px solid var(--c-border-light);
  margin: var(--sp-8) 0;
}

/* ── Section spacing ── */
section { margin-bottom: var(--sp-8); }

/* ── Mobile Responsive ── */
@media (max-width: 768px) {
  main { padding: var(--sp-6) var(--sp-4); }

  .header-inner {
    flex-direction: column;
    align-items: center;  /* restore centering: in column direction this controls horizontal alignment */
    text-align: center;
    gap: var(--sp-4);
    padding: var(--sp-5) var(--sp-4);
  }
  .header-logo img { height: 60px; }
  .header-title__main { font-size: var(--fs-xl); }
  .header-title__dept { font-size: var(--fs-base); }

  .site-nav__inner { flex-wrap: wrap; }
  .site-nav__links {
    display: none;
    flex-direction: column;
    width: 100%;
    background: var(--c-primary-mid);
  }
  .site-nav__links.open { display: flex; }
  .site-nav__links li a {
    padding: var(--sp-4) var(--sp-5);
    border-bottom: 1px solid rgba(255,255,255,.1);
    border-left: none;
  }
  .nav-toggle { display: flex; }

  .hero { padding: var(--sp-10) var(--sp-5); }
  .hero h2 { font-size: var(--fs-2xl); }
  .hero-buttons { flex-direction: column; align-items: center; }

  .schemes-grid { grid-template-columns: 1fr; }
  .news-slide { flex-direction: column; }
  .news-slide.active { flex-direction: column; }
  .news-slide img { width: 100%; }
  .admin-news-card { flex-direction: column; }
  .admin-news-image { width: 100%; }
  .admin-news-image img { width: 100%; height: auto; }
  .public-download-card { flex-direction: column; align-items: flex-start; }
  .staff-filter { flex-direction: column; }
  .staff-filter select { width: 100%; }
  .footer-inner { grid-template-columns: 1fr; }
  .about-header h1 { font-size: var(--fs-3xl); }
  .faq-page { padding: var(--sp-8) var(--sp-4); }
  .form-card { padding: var(--sp-6) var(--sp-4); }
  .utility-bar { flex-direction: column; gap: var(--sp-2); padding: var(--sp-2) var(--sp-4); text-align: center; }
  .logs-actions { flex-direction: column; align-items: flex-start; }
  .admin-page-header { flex-direction: column; align-items: flex-start; }
  .gallery-row { flex-direction: column; }
}

@media (max-width: 480px) {
  .header-title__main  { font-size: var(--fs-lg); }
  .schemes-grid        { grid-template-columns: 1fr; }
  .events-grid         { grid-template-columns: 1fr; }
  .stats-grid          { grid-template-columns: repeat(2, 1fr); }
  .home-events-grid    { grid-template-columns: 1fr; }
  .gallery-grid        { grid-template-columns: 1fr; }
  .news-grid           { grid-template-columns: 1fr; }
  .admin-grid          { grid-template-columns: 1fr 1fr; }
}

/* Very small phones (≤360px — older Android, iPhone SE) */
@media (max-width: 360px) {
  .admin-grid          { grid-template-columns: 1fr; }
  .stats-grid          { grid-template-columns: 1fr 1fr; }
  .form-card           { padding: var(--sp-4) var(--sp-3); }
  .btn                 { font-size: var(--fs-xs); padding: var(--sp-2) var(--sp-3); }
  main                 { padding: var(--sp-4) var(--sp-3); }
}

/* Ensure admin tables always scroll horizontally on mobile — prevents layout break */
.admin-page table,
.table-wrapper table { min-width: 480px; }

/* Touch-friendly tap targets — minimum 44px height on mobile */
@media (max-width: 768px) {
  .btn, .delete-btn, .btn-sm { min-height: 40px; }
  .site-nav__links li a      { min-height: 44px; display: flex; align-items: center; }
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="date"],
  input[type="time"],
  input[type="search"],
  select,
  textarea               { font-size: 16px; } /* prevents iOS auto-zoom on focus */
}

@media (min-width: 1024px) {
  .schemes-grid { grid-template-columns: repeat(2,1fr); }
}

/* ── Notice / Alert Banner (Urgent Announcements) ── */
.notice-banner {
  border-left: 5px solid var(--c-gold);
  background: var(--c-gold-light);
  padding: var(--sp-3) var(--sp-5);
  margin-bottom: var(--sp-5);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
}
.notice-banner--emergency {
  border-left-color: var(--c-danger);
  background: var(--c-danger-light);
}
.notice-banner__label {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: .6px;
  white-space: nowrap;
  padding: 2px var(--sp-2);
  border-radius: var(--r-sm);
  background: var(--c-gold);
  color: var(--c-primary-dark);
  flex-shrink: 0;
}
.notice-banner--emergency .notice-banner__label {
  background: var(--c-danger);
  color: #fff;
}
.notice-banner__text { flex: 1; }
.notice-banner__text strong {
  display: block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  color: var(--c-text);
  margin-bottom: var(--sp-1);
}
.notice-banner__text p {
  font-size: var(--fs-sm);
  color: var(--c-text-secondary);
  margin: 0;
}

/* ── Complaint Form ── */
.complaint-intro {
  max-width: 800px;
  margin: 0 auto var(--sp-8);
  text-align: center;
}
.complaint-intro p {
  color: var(--c-text-secondary);
  font-size: var(--fs-lg);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--sp-4);
}
.complaint-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: var(--sp-5);
  margin-bottom: var(--sp-10);
}
.complaint-step {
  background: var(--c-surface);
  border: 1px solid var(--c-border-light);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  text-align: center;
}
.complaint-step__num {
  width: 40px; height: 40px;
  border-radius: var(--r-full);
  background: var(--c-primary);
  color: #fff;
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--sp-3);
}
.complaint-step h3 {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  color: var(--c-primary);
  margin-bottom: var(--sp-2);
}
.complaint-step p { font-size: var(--fs-sm); color: var(--c-text-secondary); margin: 0; }

/* ── Complaint Admin Table ── */
.complaints-filter-bar {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: var(--sp-6);
}
.complaints-filter-bar select {
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  font-family: var(--font);
  font-size: var(--fs-sm);
  color: var(--c-text);
  background: var(--c-surface);
}
.complaint-row {
  background: var(--c-surface);
  border: 1px solid var(--c-border-light);
  border-left: 4px solid var(--c-primary);
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
  padding: var(--sp-5) var(--sp-6);
  margin-bottom: var(--sp-4);
  box-shadow: var(--shadow-sm);
}
.complaint-row--in_review  { border-left-color: var(--c-gold); }
.complaint-row--resolved   { border-left-color: var(--c-green-mid); }
.complaint-row--closed     { border-left-color: var(--c-text-muted); }
.complaint-row__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.complaint-row__id {
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  font-weight: var(--fw-medium);
}
.complaint-row h3 {
  color: var(--c-primary);
  font-size: var(--fs-base);
  font-weight: var(--fw-semi);
  margin-bottom: var(--sp-2);
}
.complaint-row p { font-size: var(--fs-sm); color: var(--c-text-secondary); margin-bottom: var(--sp-1); }
.complaint-status-badge {
  display: inline-block;
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  text-transform: capitalize;
}
.badge-pending    { background: #fff3e0; color: #e65100; }
.badge-in_review  { background: var(--c-gold-light); color: var(--c-gold); }
.badge-resolved   { background: var(--c-green-light); color: var(--c-green); }
.badge-closed     { background: #f5f5f5; color: #757575; }

.complaint-update-form {
  border-top: 1px solid var(--c-border-light);
  padding-top: var(--sp-4);
  margin-top: var(--sp-4);
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
  align-items: flex-start;
}
.complaint-update-form select,
.complaint-update-form textarea {
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  font-family: var(--font);
  font-size: var(--fs-sm);
  color: var(--c-text);
}
.complaint-update-form select { flex-shrink: 0; }
.complaint-update-form textarea { flex: 1; min-width: 200px; min-height: 60px; resize: vertical; }
.complaint-counts {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-6);
}
.count-pill {
  background: var(--c-surface);
  border: 1px solid var(--c-border-light);
  border-radius: var(--r-full);
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  color: var(--c-primary);
  text-decoration: none;
  transition: all var(--t-fast);
}
.count-pill:hover { background: var(--c-primary-light); text-decoration: none; }
.count-pill.active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

/* ── Flash messages (global) ── */
.flash-messages { margin-bottom: var(--sp-5); }

/* ── Priority badge in announcements admin ── */
.priority-badge {
  display: inline-block;
  padding: 2px var(--sp-2);
  border-radius: var(--r-sm);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-left: var(--sp-2);
}
.priority-normal    { background: var(--c-primary-light); color: var(--c-primary); }
.priority-urgent    { background: var(--c-gold-light); color: var(--c-gold); }
.priority-emergency { background: var(--c-danger-light); color: var(--c-danger); }


@media (max-width: 768px) {
  .complaint-steps { grid-template-columns: 1fr 1fr; }
  .complaint-update-form { flex-direction: column; }
  .complaint-update-form textarea { width: 100%; }
}

/* ══════════════════════════════════════════════════════
   News Image Viewer Modal
   ══════════════════════════════════════════════════════ */

/* Clickable news items — hover cues */
[data-news-item] {
  cursor: pointer;
  outline: none;
}
[data-news-item]:focus-visible {
  outline: 3px solid var(--c-primary);
  outline-offset: 4px;
  border-radius: var(--r-md);
}

.news-card[data-news-item] {
  position: relative;
  transition: transform var(--t-base), box-shadow var(--t-base);
}
.news-card[data-news-item]:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
/* "View Larger" chip that appears on the image corner on hover */
.news-card[data-news-item]::before {
  content: '⊕  View Larger';
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
  background: var(--c-primary);
  color: #fff;
  font-size: 11px;
  font-weight: var(--fw-semi);
  padding: 3px 10px;
  border-radius: var(--r-full);
  opacity: 0;
  transition: opacity var(--t-base);
  pointer-events: none;
  letter-spacing: 0.3px;
  z-index: 2;
}
.news-card[data-news-item]:hover::before { opacity: 1; }

.news-slide[data-news-item] {
  transition: transform var(--t-base), box-shadow var(--t-base);
}
.news-slide[data-news-item]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 48, 130, .14);
}

/* ── Overlay wrapper ── */
.news-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}
.news-modal.is-open {
  opacity: 1;
  visibility: visible;
}

/* ── Dark backdrop ── */
.news-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 14, 28, 0.87);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* ── White panel ── */
.news-modal__panel {
  position: relative;
  z-index: 1;
  background: var(--c-surface);
  border-radius: var(--r-lg);
  width: min(96vw, 1100px);
  height: min(92vh, 840px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255,255,255,.06);
  transform: scale(0.93) translateY(16px);
  transition: transform 0.26s cubic-bezier(.22, .68, 0, 1.18);
}
.news-modal.is-open .news-modal__panel {
  transform: scale(1) translateY(0);
}

/* ── Header bar (blue) ── */
.news-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5);
  background: var(--c-primary);
  flex-shrink: 0;
}
.news-modal__header-meta {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, .9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  font-weight: var(--fw-medium);
}
.news-modal__close {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .24);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast);
  line-height: 1;
}
.news-modal__close:hover { background: rgba(255, 255, 255, .3); }

/* ── Image viewing area ── */
.news-modal__imgarea {
  flex: 1;
  min-height: 0;
  background: #0c1018;
  position: relative;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
#modal-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  transition: opacity 0.18s ease;
}
/* Zoomed state: scrollable panning */
.news-modal__imgarea.is-zoomed {
  align-items: flex-start;
  justify-content: flex-start;
  cursor: grab;
}
.news-modal__imgarea.is-zoomed:active { cursor: grabbing; }
.news-modal__imgarea.is-zoomed #modal-img { cursor: inherit; }

/* ── Prev / Next navigation arrows ── */
.news-modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: var(--r-full);
  background: rgba(0, 0, 0, .52);
  border: 1px solid rgba(255, 255, 255, .2);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast), transform var(--t-fast);
  user-select: none;
}
.news-modal__nav:hover:not(:disabled) {
  background: rgba(0, 0, 0, .8);
  transform: translateY(-50%) scale(1.08);
}
.news-modal__nav:disabled { opacity: 0.22; pointer-events: none; }
.news-modal__nav--prev { left: var(--sp-3); }
.news-modal__nav--next { right: var(--sp-3); }

/* ── Loading spinner ── */
.news-modal__loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0c1018;
  z-index: 4;
}
.news-modal__loading::after {
  content: '';
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, .1);
  border-top-color: rgba(255, 255, 255, .72);
  border-radius: 50%;
  animation: modal-spin 0.62s linear infinite;
}
@keyframes modal-spin { to { transform: rotate(360deg); } }

/* ── Footer bar ── */
.news-modal__footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-3) var(--sp-5);
  border-top: 1px solid var(--c-border-light);
  background: var(--c-surface);
  flex-wrap: wrap;
}
.news-modal__title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  color: var(--c-primary);
  margin: 0;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.news-modal__tools {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
}
.news-modal__counter {
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  white-space: nowrap;
  min-width: 40px;
  text-align: right;
  padding-right: var(--sp-2);
}
/* Zoom +/−/⊙ buttons */
.news-modal__zoom-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  color: var(--c-text);
  font-size: var(--fs-base);
  font-weight: var(--fw-semi);
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.news-modal__zoom-btn:hover:not(:disabled) {
  background: var(--c-primary-light);
  border-color: var(--c-primary);
  color: var(--c-primary);
}
.news-modal__zoom-btn:disabled { opacity: 0.32; pointer-events: none; }

/* ── Keyboard shortcut hint ── */
.news-modal__hint {
  font-size: 10px;
  color: var(--c-text-muted);
  white-space: nowrap;
  display: none;
}
@media (hover: hover) { .news-modal__hint { display: block; } }

/* ── Mobile: bottom-sheet style ── */
@media (max-width: 600px) {
  .news-modal {
    padding: 0;
    align-items: flex-end;
  }
  .news-modal__panel {
    width: 100vw;
    height: 96svh;
    max-width: none;
    max-height: none;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    transform: translateY(22px);
  }
  .news-modal.is-open .news-modal__panel { transform: translateY(0); }
  .news-modal__nav { width: 36px; height: 36px; font-size: 22px; }
  .news-modal__header-meta { font-size: var(--fs-xs); }
  .news-modal__footer { padding: var(--sp-2) var(--sp-4); }
  .news-modal__title { font-size: var(--fs-xs); }
}

/* ════════════════════════════════════════════════════════════════
   Language Selection Modal + Loading Overlay
   ════════════════════════════════════════════════════════════════ */

/* ── First-visit language selection modal ── */
#lang-select-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
}
#lang-select-modal.is-open {
  display: flex;
}
.lang-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  animation: langFadeIn 0.3s ease forwards;
}
.lang-modal__card {
  position: relative;
  background: #fff;
  border-radius: 16px;
  width: min(94vw, 500px);
  overflow: hidden;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.32);
  animation: langSlideUp 0.36s cubic-bezier(0.22, 0.68, 0, 1.18) forwards;
}

/* Modal header — green, both logos, bilingual welcome heading */
.lang-modal__header {
  background: var(--c-primary);
  color: #fff;
  padding: 28px 28px 24px;
  text-align: center;
}
.lang-modal__logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
}
.lang-modal__logos img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}
.lang-modal__welcome-en {
  font-size: 1.05rem;
  font-weight: var(--fw-bold);
  color: #fff;
  margin: 0 0 10px;
  line-height: 1.35;
  letter-spacing: 0.15px;
}
.lang-modal__welcome-mr {
  font-size: 1rem;
  font-weight: var(--fw-semi);
  color: rgba(255, 255, 255, 0.92);
  margin: 0;
  line-height: 1.5;
}
.lang-modal__divider {
  width: 44px;
  height: 2px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 2px;
  margin: 18px auto 12px;
}
.lang-modal__prompt {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

/* Option buttons */
.lang-modal__options {
  padding: 22px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.lang-modal__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 20px;
  border: 2px solid var(--c-border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: border-color var(--t-fast), background var(--t-fast), transform 0.12s;
  gap: var(--sp-3);
}
.lang-modal__btn:hover,
.lang-modal__btn:focus-visible {
  border-color: var(--c-primary);
  background: #f0f8f0;
  transform: translateY(-2px);
  outline: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.lang-modal__btn:active { transform: translateY(0); }
.lang-modal__btn-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.lang-modal__btn-primary {
  font-size: 1.2rem;
  font-weight: var(--fw-bold);
  color: var(--c-text);
  line-height: 1.2;
}
.lang-modal__btn-secondary {
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
}
.lang-modal__btn-arrow {
  flex-shrink: 0;
  color: var(--c-primary);
  opacity: 0.55;
  transition: opacity var(--t-fast), transform var(--t-fast);
}
.lang-modal__btn:hover .lang-modal__btn-arrow,
.lang-modal__btn:focus-visible .lang-modal__btn-arrow {
  opacity: 1;
  transform: translateX(4px);
}

/* ── Language loading overlay ──────────────────────────────────
   Full-screen white overlay with spinner. Stays visible until
   _waitForTranslation() detects that DOM mutations have settled.
   ───────────────────────────────────────────────────────────── */
#lang-loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  /* Solid white — no blur — to completely block partially-translated content */
  background: rgba(255, 255, 255, 0.97);
  align-items: center;
  justify-content: center;
}
#lang-loading-overlay.is-visible {
  display: flex;
  animation: langFadeIn 0.18s ease forwards;
}
.lang-loading__card {
  background: #fff;
  border-radius: 18px;
  padding: 44px 60px;
  text-align: center;
  box-shadow: 0 10px 48px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--c-border);
}
.lang-loading__spinner {
  width: 54px;
  height: 54px;
  border: 5px solid #e8f0e8;
  border-top-color: var(--c-primary);
  border-radius: 50%;
  animation: langSpin 0.85s linear infinite;
  margin: 0 auto 22px;
}
.lang-loading__msg {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semi);
  color: var(--c-primary);
  margin: 0 0 14px;
  line-height: 1.4;
}
.lang-loading__quote {
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
  font-weight: var(--fw-normal);
  font-style: italic;
  margin: 0;
  line-height: 1.55;
  max-width: 300px;
  text-align: center;
}

/* ── Keyframes (lang- prefix avoids conflicts with news modal, etc.) ── */
@keyframes langFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes langSlideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}
@keyframes langSpin {
  to { transform: rotate(360deg); }
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .lang-modal__card        { border-radius: 12px; }
  .lang-modal__header      { padding: 22px 18px 20px; }
  .lang-modal__logos img   { width: 40px; height: 40px; }
  .lang-modal__welcome-en  { font-size: 0.95rem; }
  .lang-modal__welcome-mr  { font-size: 0.9rem; }
  .lang-modal__options     { padding: 16px 16px 22px; }
  .lang-modal__btn-primary { font-size: 1.05rem; }
  .lang-loading__card      { padding: 36px 24px; }
  .lang-loading__spinner   { width: 44px; height: 44px; }
  .lang-loading__msg       { font-size: var(--fs-base); }
  .lang-loading__quote     { font-size: var(--fs-xs); max-width: 260px; }
}

/* ── Homepage Event Popup ──────────────────────────────────────────────────── */
.event-popup {
  position: fixed;
  inset: 0;
  z-index: 9200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
}
.event-popup[hidden] { display: none; }

.event-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .58);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.event-popup__panel {
  position: relative;
  z-index: 1;
  background: var(--c-surface);
  border-radius: 14px;
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .38);
  transform: scale(.91) translateY(24px);
  opacity: 0;
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), opacity .22s ease;
}
.event-popup.is-open .event-popup__panel {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.event-popup__close {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .4);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .18s;
  flex-shrink: 0;
}
.event-popup__close:hover,
.event-popup__close:focus-visible {
  background: rgba(0, 0, 0, .65);
  outline: 2px solid rgba(255,255,255,.5);
  outline-offset: 2px;
}

.event-popup__img-wrap {
  border-radius: 14px 14px 0 0;
  overflow: hidden;
  line-height: 0;
}
.event-popup__img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.event-popup__body {
  padding: var(--sp-6);
}

.event-popup__tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: var(--fw-semi);
  color: var(--c-green);
  background: var(--c-green-light);
  padding: 3px 10px;
  border-radius: var(--r-sm);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: var(--sp-3);
}

.event-popup__title {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--c-primary);
  line-height: var(--lh-tight);
  margin: 0 0 var(--sp-4);
}

.event-popup__meta {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  background: var(--c-primary-pale);
  border-radius: var(--r-md);
  border-left: 3px solid var(--c-primary);
}
.event-popup__meta-item {
  font-size: var(--fs-sm);
  color: var(--c-text-secondary);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.event-popup__desc {
  font-size: var(--fs-sm);
  color: var(--c-text-secondary);
  line-height: var(--lh-base);
  margin-bottom: var(--sp-5);
}

.event-popup__actions {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
}
.event-popup__actions .btn {
  flex: 1;
  min-width: 130px;
  justify-content: center;
  text-align: center;
}

/* Mobile */
@media (max-width: 520px) {
  .event-popup__img  { height: 170px; }
  .event-popup__body { padding: var(--sp-4); }
  .event-popup__title { font-size: var(--fs-lg); }
  .event-popup__actions { flex-direction: column; }
  .event-popup__actions .btn { width: 100%; }
}
/* Tablet */
@media (min-width: 521px) and (max-width: 768px) {
  .event-popup__panel { max-width: 480px; }
}
