/* =============================================
 * โรงเรียนบ้านหนองตะขบ - Custom Styles
 * Tailwind CSS Companion
 * ============================================= */

/* ── Boot Loader ── */
.boot-loader {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at top left, #1e3a8a 0%, #0f172a 50%, #020617 100%);
  transition: opacity .6s, visibility .6s;
}
.boot-loader.hide { opacity: 0; visibility: hidden; }
.boot-orbit { position: relative; width: 120px; height: 120px; margin: 0 auto 24px; }
.boot-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid transparent; }
.boot-ring-1 { border-top-color: rgba(251,191,36,.9); animation: spin 2.4s linear infinite; }
.boot-ring-2 { inset: 10px; border-bottom-color: rgba(96,165,250,.9); animation: spin 1.8s linear infinite reverse; }
.boot-ring-3 { inset: 20px; border-top-color: rgba(167,139,250,.9); animation: spin 1.4s linear infinite; }
.boot-glow { position: absolute; inset: 28px; border-radius: 50%; background: radial-gradient(circle, rgba(251,191,36,.4) 0%, transparent 70%); animation: pulse 2.5s ease-in-out infinite; }
.boot-logo-icon { position: absolute; inset: 32px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, #fde68a, #fbbf24, #f59e0b); box-shadow: 0 12px 30px rgba(251,191,36,.5); font-size: 28px; color: #1e3a8a; animation: logoPulse 2s ease-in-out infinite; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { transform: scale(.9); opacity: .6; } 50% { transform: scale(1.15); opacity: 1; } }
@keyframes logoPulse { 0%,100% { transform: scale(1) rotate(-2deg); } 50% { transform: scale(1.05) rotate(2deg); } }

.boot-title {
  font-family: 'Kanit'; font-size: 22px; font-weight: 800;
  background: linear-gradient(90deg, #fbbf24, #fde68a, #fff, #fbbf24);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 3s linear infinite;
}
@keyframes shine { to { background-position: 200% 0; } }

.boot-progress { width: 240px; height: 4px; background: rgba(255,255,255,.08); border-radius: 99px; overflow: hidden; margin: 16px auto; }
.boot-progress-bar { height: 100%; width: 30%; background: linear-gradient(90deg, transparent, #fbbf24 30%, #fde68a 50%, #fbbf24 70%, transparent); border-radius: 99px; animation: progressSlide 1.6s ease-in-out infinite; }
@keyframes progressSlide { 0% { transform: translateX(-120%); } 100% { transform: translateX(420%); } }

/* ── Hero Section ── */
.hero-section { position: relative; min-height: 400px; height: 400px; overflow: hidden; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease; }
.hero-slide.active { opacity: 1; }
.hero-slide-bg {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.08);
  animation: kenBurns 16s ease-in-out infinite alternate;
}
@keyframes kenBurns { 0% { transform: scale(1.08) translate(0,0); } 100% { transform: scale(1.18) translate(-1%,-1%); } }

.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(135deg, rgba(15,23,42,.78) 0%, rgba(30,64,175,.5) 50%, rgba(59,130,246,.3) 100%),
    linear-gradient(to top, rgba(0,0,0,.4) 0%, transparent 60%);
  display: flex; align-items: center;
}
.hero-mesh {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 20% 30%, rgba(99,102,241,.4), transparent 35%),
    radial-gradient(circle at 80% 70%, rgba(251,191,36,.25), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(139,92,246,.3), transparent 50%);
  animation: meshFloat 12s ease-in-out infinite;
}
@keyframes meshFloat { 0%,100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.05) rotate(2deg); } }

/* Hero Particles */
.hero-particles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero-particles span {
  position: absolute; width: 6px; height: 6px; border-radius: 50%;
  background: rgba(251,191,36,.8); box-shadow: 0 0 12px rgba(251,191,36,.8);
  animation: particleFloat 10s linear infinite;
}
.hero-particles span:nth-child(1) { left: 8%; bottom: -8px; animation-duration: 14s; }
.hero-particles span:nth-child(2) { left: 20%; bottom: -8px; animation-duration: 18s; animation-delay: -3s; background: rgba(96,165,250,.8); box-shadow: 0 0 12px rgba(96,165,250,.8); }
.hero-particles span:nth-child(3) { left: 32%; bottom: -8px; animation-duration: 16s; animation-delay: -6s; }
.hero-particles span:nth-child(4) { left: 44%; bottom: -8px; animation-duration: 20s; animation-delay: -2s; background: rgba(167,139,250,.8); box-shadow: 0 0 12px rgba(167,139,250,.8); }
.hero-particles span:nth-child(5) { left: 56%; bottom: -8px; animation-duration: 12s; animation-delay: -8s; width: 4px; height: 4px; }
.hero-particles span:nth-child(6) { left: 68%; bottom: -8px; animation-duration: 22s; animation-delay: -4s; }
.hero-particles span:nth-child(7) { left: 78%; bottom: -8px; animation-duration: 15s; animation-delay: -10s; }
.hero-particles span:nth-child(8) { left: 90%; bottom: -8px; animation-duration: 19s; animation-delay: -1s; background: rgba(96,165,250,.8); }

@keyframes particleFloat {
  0% { transform: translateY(0) scale(0); opacity: 0; }
  10% { transform: translateY(-15vh) scale(1); opacity: 1; }
  90% { transform: translateY(-100vh) scale(1); opacity: 1; }
  100% { transform: translateY(-120vh) scale(0); opacity: 0; }
}

/* Hero CTA Button shine */
.hero-cta { position: relative; overflow: hidden; }
.hero-cta::before {
  content: ''; position: absolute; top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent);
  transition: left .6s;
}
.hero-cta:hover::before { left: 100%; }

/* Hero Dots */
.hero-dots span.active { width: 30px; border-radius: 5px; }

/* ── News Ticker ── */
.ticker-track {
  display: flex; gap: 60px; white-space: nowrap;
  animation: tickerScroll 60s linear infinite;
}
@keyframes tickerScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── Stats Counter ── */
.stat-card { position: relative; overflow: hidden; }
.stat-card::before {
  content: ''; position: absolute; top: -30%; right: -10%;
  width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(59,130,246,.08), transparent);
  pointer-events: none;
}

/* ── Featured card hover ── */
.featured-card .featured-img img { transition: transform .8s ease; }
.featured-card:hover .featured-img img { transform: scale(1.05); }
.featured-card:hover .featured-cta-arrow { transform: translateX(6px); }
.featured-cta-arrow { transition: transform .3s; }

/* Home news and activities */
.home-board {
  background:
    radial-gradient(circle at 8% 10%, rgba(59,130,246,.08), transparent 32%),
    radial-gradient(circle at 92% 20%, rgba(251,191,36,.10), transparent 30%),
    #f8fafc;
}
.home-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.home-section-head h2 {
  margin: 4px 0 0;
  color: #07152f;
  font-size: 30px;
  font-weight: 900;
  line-height: 1.15;
}
.home-eyebrow {
  display: inline-flex;
  align-items: center;
  color: #1d4ed8;
  font-family: 'Kanit', sans-serif;
  font-size: 12px;
  font-weight: 800;
}
.home-eyebrow.is-amber { color: #b45309; }
.home-view-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #fff;
  color: #1d4ed8;
  font-family: 'Kanit', sans-serif;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(15,23,42,.05);
  transition: all .25s ease;
}
.home-view-all:hover {
  transform: translateY(-2px);
  border-color: #93c5fd;
  box-shadow: 0 16px 34px rgba(30,64,175,.12);
}
.home-news-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: 20px;
}
.home-news-layout.is-single,
.home-activity-layout.is-single {
  grid-template-columns: minmax(0, 760px);
}
.home-news-layout.is-single .home-news-feature,
.home-activity-layout.is-single .home-activity-feature {
  min-height: 300px;
}
.home-news-feature {
  min-height: 282px;
  display: grid;
  grid-template-columns: 44% 56%;
  overflow: hidden;
  border: 1px solid rgba(203,213,225,.9);
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 18px 45px rgba(15,23,42,.08);
  transition: all .28s ease;
}
.home-news-feature:hover,
.home-activity-feature:hover,
.home-news-mini:hover,
.home-activity-mini:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 46px rgba(15,23,42,.12);
}
.home-news-feature-mark {
  position: relative;
  min-height: 282px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 26px;
  text-align: center;
  color: #fff;
  background:
    linear-gradient(rgba(7,21,47,.92), rgba(7,21,47,.92)),
    linear-gradient(135deg, transparent 0 24%, rgba(255,255,255,.08) 24% 25%, transparent 25% 49%, rgba(255,255,255,.07) 49% 50%, transparent 50%),
    #07152f;
}
.home-news-feature-mark > span {
  position: absolute;
  left: 16px;
  top: 0;
  padding: 9px 12px;
  border-radius: 0 0 9px 9px;
  background: #f59e0b;
  font-family: 'Kanit', sans-serif;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
}
.home-school-crest {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  border: 4px solid rgba(255,255,255,.9);
  border-radius: 999px;
  color: #fff;
  font-size: 42px;
}
.home-news-feature-mark strong {
  display: block;
  font-size: 21px;
  line-height: 1.25;
}
.home-news-feature-mark small {
  display: block;
  margin-top: 5px;
  color: rgba(255,255,255,.78);
  font-size: 12px;
}
.home-news-feature-mark::after {
  content: '';
  width: 52px;
  height: 3px;
  margin-top: 18px;
  border-radius: 999px;
  background: #fbbf24;
}
.home-news-feature-body {
  padding: 28px 30px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.home-card-label {
  display: inline-flex;
  width: max-content;
  margin-bottom: 12px;
  color: #1d4ed8;
  font-family: 'Kanit', sans-serif;
  font-size: 12px;
  font-weight: 900;
}
.home-card-label.is-amber { color: #b45309; }
.home-news-feature-body h3,
.home-activity-feature-body h3 {
  margin: 0;
  color: #07152f;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.28;
}
.home-news-feature-body p,
.home-activity-feature-body p {
  margin: 12px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.75;
}
.home-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: auto;
  padding-top: 22px;
  color: #64748b;
  font-size: 12px;
}
.home-meta-row span,
.home-mini-meta small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.home-read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  margin-top: 24px;
  padding: 9px 14px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  color: #1d4ed8;
  font-family: 'Kanit', sans-serif;
  font-size: 13px;
  font-weight: 800;
}
.home-news-list,
.home-activity-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.home-news-mini {
  display: grid;
  grid-template-columns: 112px minmax(0,1fr) 18px;
  gap: 14px;
  min-height: 132px;
  padding: 14px;
  border: 1px solid rgba(203,213,225,.9);
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 14px 32px rgba(15,23,42,.06);
  transition: all .28s ease;
}
.home-mini-media {
  width: 112px;
  height: 104px;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(135deg, #0b1f47, #1d4ed8);
}
.home-mini-media img,
.home-activity-media img,
.home-activity-mini-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.home-news-mini:hover img,
.home-activity-feature:hover img,
.home-activity-mini:hover img {
  transform: scale(1.06);
}
.home-mini-media.is-icon {
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 40px;
}
.home-mini-body {
  min-width: 0;
  padding-top: 2px;
}
.home-mini-body span,
.home-activity-mini-body span {
  color: #1d4ed8;
  font-family: 'Kanit', sans-serif;
  font-size: 11px;
  font-weight: 900;
}
.home-mini-body h4,
.home-activity-mini-body h4 {
  margin: 5px 0 0;
  color: #07152f;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.35;
}
.home-mini-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  color: #64748b;
  font-size: 11px;
}
.home-mini-arrow {
  align-self: end;
  color: #94a3b8;
  transition: transform .25s ease;
}
.home-news-mini:hover .home-mini-arrow { transform: translateX(3px); color: #1d4ed8; }
.home-line-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-activity-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.15fr);
  gap: 20px;
}
.home-activity-feature,
.home-activity-mini {
  overflow: hidden;
  border: 1px solid rgba(203,213,225,.9);
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 16px 38px rgba(15,23,42,.08);
  transition: all .28s ease;
}
.home-activity-media {
  position: relative;
  height: 292px;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #fef3c7);
}
.home-activity-media.is-missing,
.home-activity-mini-media.is-missing {
  display: grid;
  place-items: center;
  color: #1d4ed8;
  font-size: 54px;
}
.home-date-badge {
  position: absolute;
  left: 18px;
  top: 18px;
  width: 68px;
  overflow: hidden;
  border-radius: 10px;
  background: #07152f;
  color: #fff;
  text-align: center;
  box-shadow: 0 14px 28px rgba(7,21,47,.28);
}
.home-date-badge strong {
  display: block;
  padding-top: 8px;
  font-family: 'Kanit', sans-serif;
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
}
.home-date-badge span {
  display: block;
  padding: 3px 3px 7px;
  font-family: 'Kanit', sans-serif;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
}
.home-date-badge::after {
  content: '';
  display: block;
  height: 22px;
  background: #fbbf24;
}
.home-date-badge.is-small {
  left: 12px;
  top: 12px;
  width: 54px;
  border-radius: 8px;
}
.home-date-badge.is-small strong { font-size: 20px; padding-top: 6px; }
.home-date-badge.is-small span { font-size: 9px; padding-bottom: 5px; }
.home-date-badge.is-small::after { height: 14px; }
.home-activity-feature-body {
  padding: 22px 24px 24px;
}
.home-activity-mini {
  display: grid;
  grid-template-columns: 44% minmax(0,1fr);
  min-height: 166px;
}
.home-activity-mini-media {
  position: relative;
  min-height: 166px;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #fef3c7);
}
.home-activity-mini-body {
  min-width: 0;
  padding: 18px;
}
.home-activity-mini-body span { color: #1d4ed8; }
.home-empty-state {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 28px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  color: #64748b;
  box-shadow: 0 14px 34px rgba(15,23,42,.05);
}
.home-empty-icon {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 34px;
}
.home-empty-icon.is-amber {
  background: #fffbeb;
  color: #d97706;
}
.home-empty-state h3 {
  margin: 0 0 3px;
  color: #07152f;
  font-size: 18px;
  font-weight: 900;
}
.home-empty-state p { margin: 0; font-size: 13px; }

/* ── Quick Access Card ── */
.qa-card::before {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #1e40af, #3b82f6, #60a5fa);
  transform: scaleX(0); transform-origin: left; transition: transform .35s;
}
.qa-card:hover::before { transform: scaleX(1); }
.qa-card:hover .qa-arrow { transform: translateX(4px); color: #1e40af; }
.qa-arrow { transition: all .3s; }

/* ── E-Service Cards ── */
.eservice-card {
  position: relative;
  overflow: hidden;
}
.eservice-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(59,130,246,.06), transparent 70%);
  opacity: 0; transition: opacity .4s;
  pointer-events: none;
}
.eservice-card:hover::before { opacity: 1; }
.eservice-card::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #3b82f6, #60a5fa, #93c5fd);
  transform: scaleX(0); transform-origin: center; transition: transform .35s;
}
.eservice-card:hover::after { transform: scaleX(1); }

/* Staggered entrance */
.eservice-grid .eservice-card { animation: eserviceFadeIn .6s ease backwards; }
.eservice-grid .eservice-card:nth-child(1) { animation-delay: .05s; }
.eservice-grid .eservice-card:nth-child(2) { animation-delay: .1s; }
.eservice-grid .eservice-card:nth-child(3) { animation-delay: .15s; }
.eservice-grid .eservice-card:nth-child(4) { animation-delay: .2s; }
.eservice-grid .eservice-card:nth-child(5) { animation-delay: .25s; }
.eservice-grid .eservice-card:nth-child(6) { animation-delay: .3s; }
.eservice-grid .eservice-card:nth-child(7) { animation-delay: .35s; }
.eservice-grid .eservice-card:nth-child(8) { animation-delay: .4s; }

@keyframes eserviceFadeIn {
  from { opacity: 0; transform: translateY(20px) scale(.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Gallery ── */
.gallery-item { position: relative; overflow: hidden; }
.gallery-item img { transition: transform .8s ease; }
.gallery-item:hover img { transform: scale(1.1); }
.gallery-overlay {
  position: absolute; inset: 0; padding: 14px;
  background: linear-gradient(to top, rgba(0,0,0,.85), transparent 60%);
  display: flex; flex-direction: column; justify-content: flex-end;
  opacity: 0; transition: opacity .3s;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }

/* ── Director Section ── */
.director-photo img { transition: transform .5s; }
.director-photo:hover img { transform: scale(1.03); }

/* ── CTA Section Mesh ── */
.cta-mesh {
  position: absolute; inset: -50%;
  background:
    radial-gradient(circle at 30% 40%, rgba(251,191,36,.3), transparent 35%),
    radial-gradient(circle at 70% 60%, rgba(167,139,250,.4), transparent 40%);
  animation: ctaMesh 12s ease-in-out infinite; pointer-events: none;
}
@keyframes ctaMesh { 0%,100% { transform: rotate(0); } 50% { transform: rotate(8deg); } }

.cta-icon-pulse { animation: ctaIconPulse 2.5s ease-in-out infinite; }
@keyframes ctaIconPulse { 0%,100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.06) rotate(2deg); } }

/* ── FAB ── */
.fab-actions {
  opacity: 0; pointer-events: none;
  transform: translateY(20px) scale(.5); transform-origin: bottom right;
  transition: all .35s cubic-bezier(.2,.9,.3,1.05);
}
.fab-cluster.open .fab-actions {
  opacity: 1; pointer-events: auto; transform: translateY(0) scale(1);
}
.fab-cluster.open .fab-toggle { transform: rotate(45deg); }

/* ── Scroll Reveal ── */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s ease; }
.reveal.revealed { opacity: 1; transform: translateY(0); }

/* ── Live Badge Pulse ── */
.live-dot { animation: livePulse 1.5s ease-in-out infinite; }
@keyframes livePulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .6; transform: scale(.85); } }

/* ── Nav dropdown ── */
.nav-dropdown { display: none; }
.nav-has-sub:hover .nav-dropdown { display: block; }

/* ── Mobile menu ── */
.mobile-menu { display: none; }
.mobile-menu.open { display: block; }

/* ── Custom scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero-section { min-height: 400px; height: 400px; }
  .hero-title-text { font-size: 26px !important; }
  .qa-grid { grid-template-columns: 1fr 1fr !important; }
  .stats-grid { grid-template-columns: 1fr 1fr !important; }
  .featured-grid { grid-template-columns: 1fr !important; }
  .three-col-grid { grid-template-columns: 1fr !important; }
  .home-section-head { align-items: flex-start; flex-direction: column; margin-bottom: 18px; }
  .home-section-head h2 { font-size: 24px; }
  .home-news-layout,
  .home-activity-layout,
  .home-news-feature,
  .home-news-list,
  .home-activity-list { grid-template-columns: 1fr; }
  .home-news-feature-mark { min-height: 210px; }
  .home-news-feature-body,
  .home-activity-feature-body { padding: 22px; }
  .home-news-feature-body h3,
  .home-activity-feature-body h3 { font-size: 20px; }
  .home-activity-media { height: 230px; }
  .gallery-grid { grid-template-columns: 1fr 1fr !important; }
  .eservice-grid { grid-template-columns: 1fr 1fr !important; }
  .director-grid { grid-template-columns: 1fr !important; text-align: center; }
  .footer-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 480px) {
  .qa-grid { grid-template-columns: 1fr !important; }
  .stats-grid { grid-template-columns: 1fr !important; }
  .gallery-grid { grid-template-columns: 1fr !important; }
  .home-board { padding-top: 42px; padding-bottom: 44px; }
  .home-view-all { width: 100%; justify-content: center; }
  .home-news-mini,
  .home-activity-mini { grid-template-columns: 1fr; }
  .home-mini-media {
    width: 100%;
    height: 160px;
  }
  .home-activity-mini-media { min-height: 170px; }
  .home-meta-row { gap: 10px; }
}

/* ── Print ── */
@media print {
  .top-bar, .nav-main, .hero-section, .fab-cluster, .ticker, .cta-section { display: none !important; }
}

/* ── Accessibility: High Contrast Mode ── */
/* ── Accessibility: Dark Mode ── */
html.dark-mode, 
html.dark-mode body {
  background-color: #0f172a !important; /* slate-900 */
  background-image: none !important;
  color: #f1f5f9 !important; /* slate-100 */
}

/* Base elements */
html.dark-mode div:not(.hero-overlay):not(.nav-dropdown):not(.mobile-menu):not(.fab-cluster):not(.boot-loader):not(.boot-logo-icon):not(.cta-mesh),
html.dark-mode section:not(.hero-section),
html.dark-mode article,
html.dark-mode aside,
html.dark-mode p {
  background-color: transparent !important;
  color: inherit;
}

/* Cards & Containers */
html.dark-mode .bg-white,
html.dark-mode .bg-slate-50,
html.dark-mode .bg-slate-100,
html.dark-mode .bg-gradient-to-b.from-slate-50,
html.dark-mode .bg-gradient-to-r.from-teal-50,
html.dark-mode .bg-emerald-50,
html.dark-mode .bg-rose-50,
html.dark-mode .bg-blue-50,
html.dark-mode .bg-amber-50,
html.dark-mode .bg-violet-50 {
  background-color: #1e293b !important; /* slate-800 */
  background-image: none !important;
  color: #f1f5f9 !important;
  border-color: #334155 !important; /* slate-700 */
}

/* Borders */
html.dark-mode .border-slate-200,
html.dark-mode .border-slate-300,
html.dark-mode .border-slate-100,
html.dark-mode .border-dashed {
  border-color: #334155 !important;
}

/* Text Colors */
html.dark-mode .text-ink,
html.dark-mode .text-slate-800,
html.dark-mode .text-slate-700 {
  color: #f8fafc !important; /* slate-50 */
}

html.dark-mode .text-ink-muted,
html.dark-mode .text-slate-500,
html.dark-mode .text-slate-400 {
  color: #94a3b8 !important; /* slate-400 */
}

/* Links & Accents (Keep some brand colors but adapt for dark mode) */
html.dark-mode a.text-brand-1,
html.dark-mode .text-brand-1 {
  color: #60a5fa !important; /* blue-400 */
}
html.dark-mode a:hover.text-brand-1 {
  color: #93c5fd !important; /* blue-300 */
}

/* Nav & Topbar (Keep dark blue/gradient, just adjust text if needed) */
html.dark-mode header#mainHeader {
  background-color: #0f172a !important;
  border-bottom-color: #1e293b !important;
}

/* Form Elements */
html.dark-mode input,
html.dark-mode textarea,
html.dark-mode select {
  background-color: #0f172a !important;
  color: #f1f5f9 !important;
  border-color: #334155 !important;
}
html.dark-mode input:focus,
html.dark-mode textarea:focus,
html.dark-mode select:focus {
  border-color: #60a5fa !important;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2) !important;
}

/* Shadows */
html.dark-mode .shadow-sm,
html.dark-mode .shadow-md,
html.dark-mode .shadow-lg,
html.dark-mode .shadow-xl,
html.dark-mode .shadow-2xl {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3) !important;
}

/* Footer & specific dark areas - keep them dark */
html.dark-mode footer {
  background-color: #020617 !important; /* slate-950 */
}

