/*
  style.css - Shree Sagarmatha Secondary School & Sagarmatha EMS
  Design Palette: Navy & Deep Slate with Emerald, Amber, and Gold accents
*/

:root {
  --primary: #1e3a8a;
  --primary-hover: #1e40af;
  --primary-light: #eff6ff;
  --secondary: #0f766e;
  --secondary-light: #f0fdfa;
  --accent: #d97706;
  --accent-light: #fef3c7;
  --success: #16a34a;
  --success-light: #f0fdf4;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --warning: #ea580c;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --border-focus: #3b82f6;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius: 10px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Mukta", "Kalimati", sans-serif;
  color: var(--text-main);
  background-color: var(--bg-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: 0.95rem;
}

/* Navigation Dropdowns & Institutional Masthead (Aadarsha Mavi Clean Style) */
.nav-item-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-item-dropdown:hover .dropdown-menu {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 250px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  border: 1px solid #e2e8f0;
  padding: 0.5rem 0;
  list-style: none;
  z-index: 1000;
}

.dropdown-menu li {
  padding: 0;
}

.dropdown-menu li a {
  display: block;
  padding: 0.65rem 1.25rem;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
  border-bottom: 1px solid #f8fafc;
}

.dropdown-menu li:last-child a {
  border-bottom: none;
}

.dropdown-menu li a:hover {
  background: #f1f5f9;
  color: #1e3a8a;
  padding-left: 1.5rem;
}

/* School Masthead */
.school-masthead {
  background: #ffffff;
  border-bottom: 3px solid #1e3a8a;
  padding: 1.15rem 1.5rem;
}

.masthead-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.masthead-branding {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  cursor: pointer;
}

.masthead-crest {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0f3d6b, #1e3a8a);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 800;
  border: 3px solid #d97706;
  box-shadow: 0 4px 10px rgba(15, 61, 107, 0.25);
  flex-shrink: 0;
}

.masthead-titles .school-np-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: #1e3a8a;
  line-height: 1.2;
  margin: 0;
  font-family: 'Mukta', sans-serif;
}

.masthead-titles .school-en-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0.2rem 0;
}

.masthead-titles .school-sub-desc {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
  font-weight: 500;
}

.masthead-gov-side {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border-left: 2px solid #e2e8f0;
  padding-left: 1.5rem;
}

@media (max-width: 768px) {
  .masthead-gov-side {
    display: none;
  }
}

/* Principal's Dedicated Showcase (Aadarsha Style) */
.principal-section-wrapper {
  background: #ffffff;
  padding: 4.5rem 1.5rem;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.principal-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 3.5rem;
  align-items: center;
}

@media (max-width: 900px) {
  .principal-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.principal-photo-card {
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 1.75rem 1.5rem;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.principal-photo-box {
  width: 190px;
  height: 220px;
  border-radius: 8px;
  margin: 0 auto 1.25rem;
  border: 3px solid #1e3a8a;
  background: #e2e8f0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: #1e3a8a;
}

.principal-name-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.2rem;
}

.principal-designation-tag {
  color: #0f766e;
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
}

.principal-speech-text {
  font-size: 1.02rem;
  line-height: 1.85;
  color: #334155;
  margin-bottom: 1.25rem;
}

/* Features Grid (4 Pillars) */
.school-pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.pillar-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.75rem 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.pillar-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  border-color: #cbd5e1;
}

.pillar-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.pillar-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #1e3a8a;
  margin-bottom: 0.5rem;
}

.pillar-desc {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.6;
}

/* App Header & Navigation */
.header-topbar {
  background: #0f172a;
  color: #cbd5e1;
  font-size: 0.82rem;
  padding: 0.4rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #1e293b;
}

.topbar-info {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.topbar-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.navbar-public {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
}

.school-emblem {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #1e3a8a, #0f766e);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  box-shadow: 0 2px 4px rgba(30, 58, 138, 0.25);
  border: 2px solid #e0e7ff;
}

.brand-text h1 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #1e3a8a;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.brand-text .brand-nepali {
  font-size: 0.85rem;
  color: #0f766e;
  font-weight: 600;
}

.brand-text p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  list-style: none;
}

.nav-links a {
  font-weight: 600;
  font-size: 0.92rem;
  color: #334155;
  transition: color 0.2s;
  cursor: pointer;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 10px rgba(30, 58, 138, 0.25);
}

.btn-secondary {
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}
.btn-secondary:hover {
  background: #e2e8f0;
}

.btn-accent {
  background: var(--accent);
  color: white;
}
.btn-accent:hover {
  background: #b45309;
}

.btn-success {
  background: var(--success);
  color: white;
}
.btn-success:hover {
  background: #15803d;
}

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

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  border-radius: 6px;
}

/* Badge Pills */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-success { background: #dcfce7; color: #15803d; }
.badge-danger { background: #fee2e2; color: #b91c1c; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-info { background: #e0f2fe; color: #0369a1; }
.badge-neutral { background: #f1f5f9; color: #475569; }

/* Main Section Containers */
.main-content {
  min-height: calc(100vh - 140px);
}

/* Public Website Sections */
.hero-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #0f766e 100%);
  color: white;
  padding: 4.5rem 1.5rem 5rem;
  position: relative;
  overflow: hidden;
}

.hero-banner::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: #e2e8f0;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-stats-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

.hero-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.stat-item h3 {
  font-size: 2rem;
  font-weight: 800;
  color: #fbbf24;
}

.stat-item p {
  font-size: 0.85rem;
  color: #cbd5e1;
}

/* Feature & Academics Cards */
.section-wrapper {
  max-width: 1240px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}

.section-badge {
  color: var(--secondary);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.75rem;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
}

.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
}

.card-grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.feature-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: #1e293b;
}

.feature-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Notice Board */
.notice-card {
  border-left: 4px solid var(--primary);
  background: white;
  padding: 1.25rem;
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.notice-card.pinned {
  border-left-color: var(--accent);
  background: #fffdfa;
}

/* EMS Dashboard App Layout */
.ems-container {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 80px);
}

.ems-sidebar {
  background: #0f172a;
  color: #94a3b8;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid #1e293b;
}

.ems-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #1e293b;
  margin-bottom: 1.5rem;
}

.ems-sidebar-brand h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  color: #94a3b8;
  transition: all 0.15s ease;
}

.sidebar-item:hover {
  background: #1e293b;
  color: #f8fafc;
}

.sidebar-item.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(30, 58, 138, 0.4);
}

.sidebar-item .icon {
  font-size: 1.15rem;
}

.ems-main-view {
  padding: 2rem;
  background: #f8fafc;
  overflow-y: auto;
  max-height: calc(100vh - 80px);
}

.view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.75rem;
}

.view-title h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #0f172a;
}

.view-title p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Dashboard Summary Cards */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.metric-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric-card .meta h4 {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.metric-card .meta .val {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
}

.metric-card .icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

/* Tables */
.table-container {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.data-table th {
  background: #f8fafc;
  padding: 0.85rem 1rem;
  font-weight: 700;
  color: #475569;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
}

.data-table tbody tr:hover {
  background: #f8fafc;
}

/* Forms & Filter Bars */
.filter-bar {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
  min-width: 160px;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
}

.form-control {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.55rem 0.75rem;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  transition: border-color 0.15s;
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Modal Windows */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  padding: 1rem;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background: white;
  border-radius: 14px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #94a3b8;
}
.modal-close-btn:hover { color: #0f172a; }

.modal-body {
  padding: 1.75rem;
}

.modal-footer {
  padding: 1rem 1.75rem;
  background: #f8fafc;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: #0f172a;
  color: white;
  padding: 0.85rem 1.25rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: slideIn 0.25s ease-out;
}

.toast.success { background: #15803d; }
.toast.error { background: #b91c1c; }

@keyframes slideIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Gallery Styles */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.gallery-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.gallery-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border-color: #93c5fd;
}

.gallery-card-thumb {
  position: relative;
  overflow: hidden;
  height: 210px;
  background: #0f172a;
}

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

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

.gallery-card-body {
  padding: 1.15rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.gallery-card-category {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.35rem;
  letter-spacing: 0.05em;
}

.gallery-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
  line-height: 1.35;
}

.gallery-card-title-np {
  font-size: 0.85rem;
  color: #0f766e;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.gallery-card-caption {
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.5;
  margin-top: auto;
}

.gallery-overlay-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(15, 23, 42, 0.75);
  color: white;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
}


/* Responsive Breakpoints */
@media (max-width: 960px) {
  .ems-container {
    grid-template-columns: 1fr;
  }
  .ems-sidebar {
    display: none;
  }
  .hero-container {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
}

/* ==========================================================================
   Nirmanlahar-Inspired Clean CMS Styles (sagarmathamavi.edu.np)
   ========================================================================== */

/* Top Breaking News Ticker */
.cms-ticker-bar {
  background: #0f172a;
  color: #f8fafc;
  display: flex;
  align-items: center;
  padding: 0.45rem 1.5rem;
  font-size: 0.85rem;
  border-bottom: 2px solid #b91c1c;
  overflow: hidden;
}

.ticker-badge {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 0.2rem 0.65rem;
  border-radius: 4px;
  margin-right: 1rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.ticker-marquee {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #e2e8f0;
}

.ticker-marquee a {
  color: #f1f5f9;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s;
}

.ticker-marquee a:hover {
  color: #38bdf8;
  text-decoration: underline;
}

/* Nirmanlahar CMS Hero News Grid */
.cms-hero-section {
  max-width: 1280px;
  margin: 1.5rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1.8fr 1.2fr;
  gap: 1.5rem;
}

@media (max-width: 992px) {
  .cms-hero-section {
    grid-template-columns: 1fr;
  }
}

.cms-lead-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.04);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.cms-lead-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.cms-lead-thumb {
  width: 100%;
  height: 290px;
  background: #f1f5f9;
  overflow: hidden;
  position: relative;
}

.cms-lead-thumb img, .cms-lead-thumb svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cms-lead-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.cms-meta-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 0.6rem;
}

.cms-category-pill {
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.cms-lead-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.cms-lead-summary {
  font-size: 0.92rem;
  color: #475569;
  line-height: 1.55;
  margin-bottom: 1rem;
  flex: 1;
}

/* Secondary News & Circulars Column */
.cms-secondary-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cms-sidebar-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.cms-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0.6rem;
  margin-bottom: 1rem;
}

.cms-box-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1e3a8a;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.cms-mini-article-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.cms-mini-article-item {
  display: flex;
  gap: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
}

.cms-mini-article-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.cms-mini-thumb {
  width: 80px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: #e2e8f0;
}

.cms-mini-thumb img, .cms-mini-thumb svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cms-mini-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.35;
  margin-bottom: 0.25rem;
}

.cms-mini-title:hover {
  color: #1e40af;
}

.cms-mini-date {
  font-size: 0.75rem;
  color: #94a3b8;
}

/* About Us Section with SMC & PTA Tabs */
.about-tabs-nav {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.about-tab-btn {
  background: transparent;
  border: none;
  padding: 0.75rem 1.25rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: #64748b;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.about-tab-btn:hover {
  color: #1e3a8a;
}

.about-tab-btn.active {
  color: #1e3a8a;
  border-bottom-color: #1e3a8a;
  background: rgba(30, 58, 138, 0.04);
  border-radius: 6px 6px 0 0;
}

/* Committee Card Grid (SMC / PTA) */
.committee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.committee-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  padding: 1.5rem 1.25rem;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.committee-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
  border-color: #cbd5e1;
}

.committee-photo {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: #eff6ff;
  border: 3px solid #3b82f6;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  overflow: hidden;
  color: #1e3a8a;
}

.committee-name-np {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.15rem;
}

.committee-name-en {
  font-size: 0.82rem;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.committee-designation-badge {
  background: #dbeafe;
  color: #1e40af;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  margin-bottom: 0.5rem;
  display: inline-block;
}

.committee-rep {
  font-size: 0.8rem;
  color: #475569;
  background: #f8fafc;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  border: 1px solid #f1f5f9;
  width: 100%;
}

.committee-contact {
  font-size: 0.78rem;
  color: #0f766e;
  margin-top: 0.5rem;
  font-weight: 600;
}

/* Downloads Center Table & Cards */
.downloads-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.downloads-table th {
  background: #f8fafc;
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #475569;
  text-align: left;
  border-bottom: 2px solid #e2e8f0;
}

.downloads-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.88rem;
}

.downloads-table tr:hover td {
  background: #f8fafc;
}

.pdf-icon-badge {
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 800;
  font-size: 0.72rem;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  margin-right: 0.5rem;
}
