/* ===== kv.school — Government School Portal Styles ===== */

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

::selection { background: #1e40af; color: white; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 3px; }

/* Skip to main */
.skip-link {
  position: absolute;
  top: -100px; left: 0;
  background: #1e40af; color: white;
  padding: 8px 16px; z-index: 10000;
  font-weight: 600;
}
.skip-link:focus { top: 0; }

/* Navbar */
#navbar { transition: all 0.3s ease; }
#navbar.navbar-scrolled {
  background: rgba(30, 64, 175, 0.97) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
}

/* Top bar */
.top-bar {
  background: linear-gradient(135deg, #1e3a8a, #1e40af);
  color: white;
  font-size: 0.8rem;
}
.top-bar a { color: rgba(255,255,255,0.8); transition: color 0.2s; }
.top-bar a:hover { color: white; }

/* Mobile menu */
#mobile-menu { transition: all 0.3s ease; }
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}
#mobile-menu:not(.hidden) { animation: slideDown 0.3s ease forwards; }

/* Hero stats */
.stat-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}
.stat-card .number { font-size: 2rem; font-weight: 800; color: #1e40af; }
.stat-card .label { font-size: 0.85rem; color: #64748b; margin-top: 0.25rem; }

/* News ticker */
.news-ticker {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}
.news-ticker .ticker-label {
  background: #1e40af;
  color: white;
  padding: 0.5rem 1rem;
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
}
.news-ticker .ticker-items { padding: 0.5rem 1rem; }
.news-ticker .ticker-items a {
  color: #334155;
  text-decoration: none;
  font-size: 0.9rem;
  display: block;
  padding: 0.25rem 0;
  transition: color 0.2s;
}
.news-ticker .ticker-items a:hover { color: #1e40af; }

/* Section titles */
.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1e3a8a;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid #1e40af;
  margin-bottom: 1.5rem;
}

/* Card styles */
.info-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}
.info-card:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

/* Gallery grid */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.gallery-item {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
  cursor: pointer;
}
.gallery-item:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.1); transform: scale(1.02); }
.gallery-item img { width: 100%; height: 160px; object-fit: cover; display: block; }

/* Dropdown menu */
.dropdown { position: relative; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  min-width: 220px;
  z-index: 100;
  padding: 0.5rem 0;
}
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block;
  padding: 0.6rem 1rem;
  color: #334155;
  font-size: 0.9rem;
  transition: all 0.2s;
}
.dropdown-menu a:hover { background: #eff6ff; color: #1e40af; }

/* Footer */
footer {
  background: linear-gradient(135deg, #1e3a8a, #1e40af);
  color: rgba(255,255,255,0.9);
}
footer a { color: rgba(255,255,255,0.7); transition: color 0.2s; }
footer a:hover { color: white; }

/* Responsive */
@media (max-width: 768px) {
  .stat-card .number { font-size: 1.5rem; }
  .section-title { font-size: 1.25rem; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

/* Print */
@media print {
  .top-bar, footer, .nav-menu, #mobile-menu-btn { display: none !important; }
}
