/* ==========================================================================
   OFFICIAL SCHOOL WEBSITE DESIGN SYSTEM
   Theme: M M RAJPURA PRIMARY SCHOOL (SAVGADH)
   Color Scheme: Building Terracotta Crimson Red, Warm Architectural Sandstone & Golden Amber
   ========================================================================== */

:root {
  /* School Building Terracotta / Crimson Red Oxide Palette */
  --primary-950: #4a100a;
  --primary-900: #70190f;
  --primary-800: #882014;
  --primary-700: #9e281b;
  --primary-600: #b83324;
  --primary-500: #cf3e2e;
  --primary-100: #fce8e5;
  --primary-50:  #fdf4f2;

  /* Architectural Golden Amber Accents (from School Facade Signboard) */
  --accent-700: #8d4004;
  --accent-600: #b45309;
  --accent-500: #d97706;
  --accent-400: #f59e0b;
  --accent-200: #fde68a;
  --accent-100: #fef3c7;
  --accent-50:  #fffbeb;

  /* State / Feedback Colors */
  --success-700: #047857;
  --success-600: #059669;
  --success-50:  #ecfdf5;
  --danger-700:  #b91c1c;
  --danger-600:  #dc2626;
  --danger-50:   #fef2f2;
  --info-700:    #1d4ed8;
  --info-600:    #2563eb;
  --info-50:     #eff6ff;

  /* Architectural Sandstone / Charcoal Neutrals */
  --neutral-950: #14100f;
  --neutral-900: #221c1a;
  --neutral-800: #332b28;
  --neutral-700: #4a3f3b;
  --neutral-600: #665853;
  --neutral-500: #82726b;
  --neutral-400: #a3938c;
  --neutral-300: #c9bcaf;
  --neutral-200: #e2d9cd;
  --neutral-100: #f2ece4;
  --neutral-50:  #faf7f2;
  --white:       #ffffff;

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(74, 16, 10, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(74, 16, 10, 0.08), 0 2px 4px -2px rgba(74, 16, 10, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(74, 16, 10, 0.1), 0 4px 6px -4px rgba(74, 16, 10, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(74, 16, 10, 0.12), 0 8px 10px -6px rgba(74, 16, 10, 0.05);

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

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --container-max: 1260px;
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--neutral-800);
  background-color: var(--neutral-50);
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
}

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

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

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--neutral-900);
  font-weight: 700;
  line-height: 1.25;
}

p {
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

ul, ol {
  list-style-position: inside;
  margin-bottom: 1rem;
}

/* Accessible Focus States */
:focus-visible {
  outline: 3px solid var(--accent-500);
  outline-offset: 3px;
}

/* Skip Navigation Link for Screen Readers */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--primary-800);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  z-index: 9999;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 1rem;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* ==========================================================================
   TOP BAR & NAVIGATION HEADER
   ========================================================================== */
.top-bar {
  background-color: var(--primary-950);
  color: var(--neutral-200);
  font-size: 0.82rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.top-bar-left, .top-bar-right {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.top-bar a {
  color: var(--neutral-200);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.top-bar a:hover {
  color: var(--accent-400);
}

.badge-portal {
  background-color: var(--accent-500);
  color: var(--white);
  padding: 0.18rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* Main Header */
.main-header {
  position: sticky;
  top: 0;
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(74, 16, 10, 0.08);
  border-bottom: 2px solid var(--primary-700);
  transition: all var(--transition-normal);
}

.main-header.scrolled {
  box-shadow: 0 4px 14px rgba(74, 16, 10, 0.14);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 80px;
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
  gap: 1rem;
}

/* Brand / School Logo */
.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.12));
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.brand:hover .brand-logo-img {
  transform: scale(1.05);
}

.brand-crest {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-900) 100%);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--white);
  box-shadow: 0 2px 6px rgba(112, 25, 15, 0.3);
  border: 2px solid var(--accent-400);
  flex-shrink: 0;
}

.brand-crest-code {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--accent-400);
  line-height: 1;
}

.brand-crest-sub {
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.06em;
  margin-top: 2px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-900);
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-family: var(--font-heading);
}

.brand-meta {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent-600);
  letter-spacing: 0.04em;
  margin-top: 2px;
}

/* Navigation Links */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-wrap: nowrap;
}

.nav-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--neutral-700);
  padding: 0.45rem 0.55rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

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

.nav-cta {
  margin-left: 0.4rem;
  flex-shrink: 0;
}

/* Hamburger Menu Button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  color: var(--primary-900);
}

.menu-toggle:hover {
  background-color: var(--neutral-100);
}

/* Mobile Drawer */
.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(34, 28, 26, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.mobile-drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 84%;
  max-width: 340px;
  background-color: var(--white);
  z-index: 1100;
  transform: translateX(100%);
  transition: transform var(--transition-smooth);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
}

.mobile-drawer.active {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.15rem 1.35rem;
  border-bottom: 2px solid var(--primary-100);
  background-color: var(--primary-50);
}

.drawer-body {
  padding: 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.drawer-link {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--neutral-700);
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  display: block;
}

.drawer-link:hover, .drawer-link.active {
  background-color: var(--primary-50);
  color: var(--primary-800);
}

/* ==========================================================================
   BUTTONS & BADGES
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  line-height: 1.4;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary-700);
  color: var(--white);
  box-shadow: 0 2px 5px rgba(158, 40, 27, 0.25);
}

.btn-primary:hover {
  background-color: var(--primary-800);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(158, 40, 27, 0.35);
}

.btn-accent {
  background-color: var(--accent-500);
  color: var(--white);
  box-shadow: 0 2px 5px rgba(217, 119, 6, 0.25);
}

.btn-accent:hover {
  background-color: var(--accent-600);
  color: var(--white);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--neutral-800);
  color: var(--white);
}

.btn-secondary:hover {
  background-color: var(--neutral-900);
  color: var(--white);
  transform: translateY(-1px);
}

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

.btn-outline:hover {
  border-color: var(--primary-800);
  background-color: var(--primary-50);
  color: var(--primary-900);
}

.btn-outline-white {
  background-color: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.45);
}

.btn-outline-white:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: var(--white);
  color: var(--white);
}

.btn-sm {
  font-size: 0.82rem;
  padding: 0.4rem 0.8rem;
}

.btn-lg {
  font-size: 1rem;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-lg);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-important {
  background-color: var(--danger-50);
  color: var(--danger-700);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.badge-info {
  background-color: var(--info-50);
  color: var(--info-700);
}

.badge-gold {
  background-color: var(--accent-100);
  color: var(--accent-700);
  border: 1px solid rgba(217, 119, 6, 0.2);
}

.badge-primary {
  background-color: var(--primary-50);
  color: var(--primary-700);
  border: 1px solid rgba(158, 40, 27, 0.2);
}

/* ==========================================================================
   PAGE HERO & SECTION HEADINGS
   ========================================================================== */
.hero {
  background: linear-gradient(135deg, var(--primary-950) 0%, var(--primary-900) 45%, var(--primary-800) 100%);
  color: var(--white);
  padding: 4.5rem 0;
  position: relative;
  overflow: hidden;
  border-bottom: 4px solid var(--accent-400);
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(245, 158, 11, 0.15) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-400);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.12rem;
  color: var(--neutral-100);
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 680px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.25rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-400);
  font-family: var(--font-heading);
}

.stat-label {
  font-size: 0.82rem;
  color: var(--neutral-200);
}

/* Internal Page Banner */
.page-banner {
  background: linear-gradient(135deg, var(--primary-950) 0%, var(--primary-800) 100%);
  color: var(--white);
  padding: 3rem 0;
  border-bottom: 4px solid var(--accent-500);
}

.banner-content {
  max-width: 780px;
}

.banner-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.banner-desc {
  font-size: 1.05rem;
  color: var(--neutral-100);
  margin-bottom: 1rem;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--neutral-300);
  margin-bottom: 0.5rem;
}

.breadcrumbs a {
  color: var(--accent-400);
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

/* Section Header Component */
.section-header {
  text-align: center;
  max-width: 740px;
  margin: 0 auto 3rem auto;
}

.section-header.text-left {
  text-align: left;
  margin-left: 0;
}

.section-tag {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-700);
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  font-weight: 800;
  color: var(--neutral-950);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-size: 1.02rem;
  color: var(--neutral-600);
}

.section {
  padding: 4.5rem 0;
}

.section-alt {
  background-color: var(--neutral-100);
}

/* ==========================================================================
   CARDS & GRID LAYOUTS
   ========================================================================== */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 2rem;
}

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

/* Card Base */
.card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--neutral-200);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-100);
}

.card-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-icon {
  width: 52px;
  height: 52px;
  background-color: var(--primary-50);
  color: var(--primary-700);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--primary-100);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--neutral-900);
}

.card-text {
  color: var(--neutral-600);
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

/* Placeholder Note Banner */
.placeholder-callout {
  background-color: var(--primary-50);
  border-left: 4px solid var(--primary-700);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  color: var(--neutral-800);
}

.placeholder-callout strong {
  color: var(--primary-800);
}

/* ==========================================================================
   PRINCIPAL'S DESK COMPONENT
   ========================================================================== */
.principal-card {
  background-color: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2.5rem;
  align-items: center;
}

.principal-avatar-wrap {
  text-align: center;
}

.principal-avatar {
  width: 210px;
  height: 290px;
  margin: 0 auto 1.25rem auto;
  border-radius: var(--radius-lg);
  background-color: var(--primary-50);
  border: 3px solid var(--accent-400);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.principal-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.principal-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--neutral-900);
  margin-bottom: 0.2rem;
}

.principal-title {
  font-size: 0.88rem;
  color: var(--accent-600);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.principal-qual {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary-800);
  background: var(--primary-50);
  border: 1px solid var(--primary-200);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  margin-top: 0.2rem;
}

.principal-quote {
  font-size: 1.15rem;
  font-style: italic;
  color: var(--primary-800);
  font-weight: 600;
  margin-bottom: 1.25rem;
  border-left: 3px solid var(--accent-500);
  padding-left: 1rem;
}

.principal-body {
  color: var(--neutral-700);
  line-height: 1.7;
}

.teacher-card {
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

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

.teacher-card img {
  transition: transform var(--transition-slow);
}

.teacher-card:hover img {
  transform: scale(1.04);
}

/* ==========================================================================
   ACADEMIC LEVELS & GRADE EXPLORER
   ========================================================================== */
.grade-tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  background-color: var(--neutral-200);
  padding: 0.4rem;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
}

.grade-tab-btn {
  flex: 1;
  min-width: 140px;
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--neutral-700);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.grade-tab-btn.active {
  background-color: var(--primary-700);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.academic-level-section {
  display: none;
}

.academic-level-section.active {
  display: block;
}

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

.grade-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--neutral-200);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.grade-badge-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.grade-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-900);
}

.grade-age {
  font-size: 0.82rem;
  color: var(--neutral-700);
  background-color: var(--primary-50);
  border: 1px solid var(--primary-100);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.grade-subjects-list {
  list-style: none;
  margin: 0.75rem 0 1.25rem 0;
}

.grade-subjects-list li {
  font-size: 0.88rem;
  color: var(--neutral-700);
  padding: 0.35rem 0;
  border-bottom: 1px dashed var(--neutral-200);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.grade-subjects-list li:last-child {
  border-bottom: none;
}

/* ==========================================================================
   NOTICE BOARD & ANNOUNCEMENTS
   ========================================================================== */
.notice-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-pill {
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid var(--neutral-300);
  background-color: var(--white);
  color: var(--neutral-700);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-pill:hover, .filter-pill.active {
  background-color: var(--primary-700);
  color: var(--white);
  border-color: var(--primary-700);
}

.search-box {
  display: flex;
  align-items: center;
  background-color: var(--white);
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-md);
  padding: 0.3rem 0.75rem;
  min-width: 260px;
}

.search-input {
  border: none;
  outline: none;
  font-size: 0.9rem;
  width: 100%;
  padding: 0.35rem 0.5rem;
}

.notice-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.notice-item {
  background-color: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 1.5rem;
  transition: all var(--transition-fast);
}

.notice-item:hover {
  border-color: var(--primary-200);
  box-shadow: var(--shadow-md);
}

.notice-date-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 75px;
  height: 75px;
  background-color: var(--primary-50);
  border: 1px solid var(--primary-100);
  border-radius: var(--radius-md);
  text-align: center;
  flex-shrink: 0;
}

.notice-day {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-800);
  line-height: 1;
}

.notice-month {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-600);
}

.notice-content {
  flex-grow: 1;
}

.notice-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}

.notice-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--neutral-900);
  margin-bottom: 0.5rem;
}

.notice-desc {
  color: var(--neutral-600);
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.notice-attachment {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-700);
  background-color: var(--primary-50);
  border: 1px solid var(--primary-100);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
}

.notice-attachment:hover {
  background-color: var(--primary-100);
  color: var(--primary-900);
}

/* ==========================================================================
   GALLERY & LIGHTBOX
   ========================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.gallery-card {
  position: relative;
  background-color: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--neutral-200);
  cursor: pointer;
  transition: all var(--transition-normal);
  aspect-ratio: 4 / 3;
}

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

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

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

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(74, 16, 10, 0.9) 0%, rgba(74, 16, 10, 0.2) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem;
  color: var(--white);
}

.gallery-category-badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-400);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.gallery-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.25;
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background-color: rgba(34, 28, 26, 0.95);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.lightbox-modal.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-dialog {
  max-width: 920px;
  width: 100%;
  background-color: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-xl);
}

.lightbox-img-wrap {
  width: 100%;
  max-height: 540px;
  background-color: var(--neutral-950);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 540px;
  object-fit: contain;
}

.lightbox-info {
  padding: 1.5rem;
}

.lightbox-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(34, 28, 26, 0.75);
  color: var(--white);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}

.lightbox-close-btn:hover {
  background: var(--primary-700);
}

/* ==========================================================================
   FORMS & INPUTS (ADMISSION & CONTACT)
   ========================================================================== */
.form-card {
  background-color: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 1.35rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--neutral-800);
  margin-bottom: 0.4rem;
}

.form-label .required {
  color: var(--danger-600);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-family: var(--font-body);
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-md);
  background-color: var(--white);
  color: var(--neutral-800);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-700);
  box-shadow: 0 0 0 3px rgba(158, 40, 27, 0.15);
}

.form-control.is-invalid {
  border-color: var(--danger-600);
  background-color: var(--danger-50);
}

textarea.form-control {
  resize: vertical;
  min-height: 110px;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--neutral-500);
  margin-top: 0.35rem;
}

.form-error-feedback {
  font-size: 0.8rem;
  color: var(--danger-600);
  margin-top: 0.35rem;
  display: none;
}

.form-control.is-invalid ~ .form-error-feedback {
  display: block;
}

/* Honeypot anti-bot trap */
.hp-field-wrap {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  tabindex: -1 !important;
}

/* Captcha Block */
.captcha-box {
  background-color: var(--neutral-100);
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.captcha-challenge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.captcha-badge {
  background-color: var(--primary-800);
  color: var(--white);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-md);
  font-family: monospace;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.captcha-refresh-btn {
  background: transparent;
  border: none;
  color: var(--primary-700);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: underline;
}

.captcha-input-wrap {
  flex: 1;
  min-width: 140px;
}

/* Toast Alerts */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 420px;
  width: calc(100% - 3rem);
}

.toast {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border-left: 5px solid var(--primary-700);
  animation: slideInRight 0.3s ease forwards;
}

.toast-success {
  border-left-color: var(--success-600);
}

.toast-error {
  border-left-color: var(--danger-600);
}

.toast-content {
  flex-grow: 1;
}

.toast-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--neutral-900);
  margin-bottom: 0.2rem;
}

.toast-message {
  font-size: 0.85rem;
  color: var(--neutral-700);
}

.toast-close {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--neutral-400);
  font-size: 1rem;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ==========================================================================
   FOOTER COMPONENT
   ========================================================================== */
.site-footer {
  background-color: var(--primary-950);
  color: var(--neutral-200);
  padding-top: 4.5rem;
  border-top: 4px solid var(--accent-400);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2.5rem;
  margin-bottom: 3.5rem;
}

.footer-col-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-col-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 2px;
  background-color: var(--accent-400);
}

.footer-desc {
  font-size: 0.9rem;
  color: var(--neutral-300);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

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

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: var(--neutral-200);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

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

.footer-contact-item {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  font-size: 0.9rem;
  color: var(--neutral-200);
}

.footer-bottom {
  background-color: #0b0706;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  color: var(--neutral-400);
}

.footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-legal-links {
  display: flex;
  gap: 1.25rem;
}

.footer-legal-links a {
  color: var(--neutral-400);
}

.footer-legal-links a:hover {
  color: var(--accent-400);
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 1100px) {
  .nav-desktop {
    gap: 0.05rem;
  }
  .nav-link {
    font-size: 0.82rem;
    padding: 0.4rem 0.45rem;
  }
  .brand-name {
    font-size: 1.05rem;
  }
}

@media (max-width: 992px) {
  .nav-desktop {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
  .principal-card {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 2rem;
  }
  .principal-quote {
    border-left: none;
    border-top: 3px solid var(--accent-400);
    padding-top: 1rem;
    padding-left: 0;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .top-bar {
    display: none;
  }
  .section {
    padding: 3rem 0;
  }
  .hero {
    padding: 3rem 0;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
  }
  .form-card {
    padding: 1.5rem;
  }
}

/* Print Stylesheet */
@media print {
  .top-bar, .main-header, .site-footer, .btn, .grade-tabs-nav, .notice-controls, .toast-container {
    display: none !important;
  }
  body {
    background: white;
    color: black;
  }
  .container {
    max-width: 100%;
    padding: 0;
  }
}
