/**
 * Shaikumari Ma Vi Rokajakhet - Custom Stylesheet
 * Location: Rukumkot, Aathbiskot Municipality, Rukum West, Nepal
 * Developer: Siddhanta Gahatraj | IT Engineer
 */

:root {
  --primary: #10428d;
  --primary-dark: #0a2958;
  --primary-light: #2563eb;
  --accent: #f59e0b;
  --accent-hover: #d97706;
  --secondary: #0284c7;
  --bg-light: #f8fafc;
  --surface: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 15px 35px rgba(16, 66, 141, 0.12);
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Global Reset & Typography */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Noto Sans Devanagari', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-light);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-light);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Top Announcement Bar */
.top-announcement {
  background: linear-gradient(90deg, #0a2958 0%, #10428d 100%);
  color: #ffffff;
  font-size: 0.9rem;
  padding: 8px 0;
  border-bottom: 2px solid var(--accent);
}

.top-announcement .badge-notice {
  background-color: var(--accent);
  color: #0f172a;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.78rem;
  margin-right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.announcement-text {
  font-weight: 500;
}

/* Main Navigation Header */
.main-header {
  background: var(--surface);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  max-width: 1280px;
  margin: 0 auto;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
}

.school-logo-img {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
  background: #ffffff;
  padding: 2px;
  box-shadow: var(--shadow-sm);
}

.logo-fallback-badge {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 2px solid #ffffff;
}

.school-title-wrap {
  display: flex;
  flex-direction: column;
}

.school-title-np {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.2;
}

.school-title-en {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.2px;
}

.school-location-tag {
  font-size: 0.75rem;
  color: #d97706;
  font-weight: 600;
}

/* Navigation Links */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.nav-link {
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background-color: #eff6ff;
}

.nav-contact-btn {
  background-color: var(--primary);
  color: #ffffff !important;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  margin-left: 8px;
  box-shadow: var(--shadow-sm);
}

.nav-contact-btn:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
}

/* Mobile Toggle */
.mobile-toggle-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary-dark);
  cursor: pointer;
  padding: 8px;
}

/* Hero Section */
.hero-section {
  position: relative;
  background: linear-gradient(135deg, rgba(10, 41, 88, 0.92) 0%, rgba(16, 66, 141, 0.88) 100%),
              url('https://images.unsplash.com/photo-1580582932707-520aed937b7b?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
  color: #ffffff;
  padding: 80px 24px;
  text-align: center;
  border-bottom: 5px solid var(--accent);
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
}

.hero-crest {
  width: 90px;
  height: 90px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: #ffffff;
  padding: 4px;
  border: 3px solid var(--accent);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: 1.1rem;
  letter-spacing: 1px;
  color: #fde047;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.hero-title-np {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 6px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-title-en {
  font-size: 1.5rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 16px;
}

.hero-tagline {
  font-size: 1.2rem;
  font-style: italic;
  color: #f1f5f9;
  max-width: 720px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

.hero-cta-group {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-primary-custom {
  background: var(--accent);
  color: #0f172a;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
  border: none;
  cursor: pointer;
}

.btn-primary-custom:hover {
  background: var(--accent-hover);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-outline-custom {
  background: transparent;
  color: #ffffff;
  border: 2px solid #ffffff;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-outline-custom:hover {
  background: #ffffff;
  color: var(--primary-dark);
}

/* Quick Statistics Grid */
.stats-section {
  margin-top: -45px;
  position: relative;
  z-index: 10;
  padding: 0 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  box-shadow: var(--shadow-md);
  border-top: 4px solid var(--primary);
  display: flex;
  align-items: center;
  gap: 18px;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: #eff6ff;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.1;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Section Header Component */
.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-badge {
  display: inline-block;
  background: #eff6ff;
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 650px;
  margin: 8px auto 0;
}

/* Cards & Layout Containers */
.container-custom {
  max-width: 1240px;
  margin: 0 auto;
  padding: 60px 20px;
}

.card-custom {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: var(--transition);
}

.card-custom:hover {
  box-shadow: var(--shadow-md);
}

/* Principal Message Section */
.principal-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  display: grid;
  grid-template-columns: 320px 1fr;
}

.principal-photo-col {
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  text-align: center;
  border-right: 1px solid var(--border-color);
}

.principal-img {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #ffffff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  margin-bottom: 16px;
}

.principal-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.principal-title {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}

.principal-content-col {
  padding: 36px 40px;
  position: relative;
}

.quote-icon {
  font-size: 2.5rem;
  color: #bfdbfe;
  line-height: 1;
  margin-bottom: 12px;
}

.principal-message-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #334155;
  white-space: pre-line;
}

/* Notices List Styling */
.notice-item {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-left: 5px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 18px 24px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transition: var(--transition);
}

.notice-item.important {
  border-left-color: #dc2626;
  background-color: #fffaf0;
}

.notice-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.notice-date-badge {
  background: #eff6ff;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 6px;
  text-align: center;
  min-width: 90px;
  border: 1px solid #bfdbfe;
}

.badge-urgent {
  background: #fee2e2;
  color: #dc2626;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  margin-left: 8px;
}

/* News & Events Grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.news-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background-color: #e2e8f0;
}

.news-body {
  padding: 20px;
}

.news-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.news-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 10px;
  line-height: 1.4;
}

/* Gallery Grid & Lightbox */
.gallery-filter-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
}

.filter-btn {
  background: var(--surface);
  border: 1px solid var(--border-color);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.gallery-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 230px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-card:hover .gallery-img {
  transform: scale(1.06);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(10, 41, 88, 0.9) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  color: #ffffff;
  opacity: 0.95;
  transition: var(--transition);
}

.gallery-card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.gallery-card-cat {
  font-size: 0.75rem;
  color: #fde047;
  font-weight: 600;
}

/* Lightbox Modal */
.lightbox-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-content {
  max-width: 900px;
  width: 100%;
  background: #ffffff;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
}

.lightbox-img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  background: #000000;
}

.lightbox-info {
  padding: 16px 24px;
}

.lightbox-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
}

/* Teachers Card */
.teacher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.teacher-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  padding: 24px;
  text-align: center;
  transition: var(--transition);
}

.teacher-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.teacher-photo {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 16px;
  border: 3px solid var(--primary);
  background: #f1f5f9;
}

.teacher-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.teacher-position {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 6px;
}

.teacher-subject {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: #f8fafc;
  padding: 4px 10px;
  border-radius: 12px;
  display: inline-block;
  margin-bottom: 12px;
}

/* Footer */
.main-footer {
  background: #081d3d;
  color: #e2e8f0;
  padding-top: 60px;
  border-top: 4px solid var(--accent);
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px 50px;
}

.footer-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 8px;
}

.footer-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 36px;
  height: 3px;
  background: var(--accent);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #cbd5e1;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-links a:hover {
  color: var(--accent);
  padding-left: 4px;
}

.footer-contact-info {
  list-style: none;
  font-size: 0.92rem;
}

.footer-contact-info li {
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: #cbd5e1;
}

.footer-bottom {
  background: #040e1f;
  padding: 20px;
  text-align: center;
  font-size: 0.88rem;
  color: #94a3b8;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.developer-credit-tag {
  color: #f59e0b;
  font-weight: 600;
  margin-top: 6px;
  display: inline-block;
}

/* Admin Dashboard Styling */
.admin-layout {
  display: flex;
  min-height: 100vh;
  background: #f1f5f9;
}

.admin-sidebar {
  width: 260px;
  background: #0d2852;
  color: #ffffff;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.admin-brand {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-nav-list {
  list-style: none;
  padding: 16px 12px;
  flex: 1;
}

.admin-nav-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #cbd5e1;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
}

.admin-nav-item a:hover,
.admin-nav-item.active a {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.admin-content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.admin-topbar {
  background: #ffffff;
  padding: 16px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.admin-page-container {
  padding: 30px;
  flex: 1;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .principal-box {
    grid-template-columns: 1fr;
  }
  .principal-photo-col {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
}

@media (max-width: 768px) {
  .mobile-toggle-btn {
    display: block;
  }
  .nav-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    padding: 16px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  }
  .nav-menu.open {
    display: flex;
  }
  .hero-title-np {
    font-size: 1.9rem;
  }
  .hero-title-en {
    font-size: 1.15rem;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
  .admin-layout {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
  }
}
