/* ========================================================
   NCC WEBSITE - Government Polytechnic Hamirpur (HP)
   Main Stylesheet
   ======================================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── CSS Variables ─────────────────────────────────────── */
:root {
  /* Primary Colors */
  --navy:        #0D2B5E;
  --navy-light:  #1a3d7c;
  --red:         #C0392B;
  --red-light:   #e74c3c;
  --sky:         #3498db;
  --sky-light:   #5dade2;

  /* Neutrals */
  --white:       #FFFFFF;
  --off-white:   #F8F9FC;
  --light-gray:  #EEF1F7;
  --mid-gray:    #D1D9E6;
  --text-dark:   #1a2340;
  --text-mid:    #4a5568;
  --text-light:  #718096;

  /* Shadows */
  --shadow-sm:   0 2px 12px rgba(13,43,94,0.07);
  --shadow-md:   0 8px 30px rgba(13,43,94,0.12);
  --shadow-lg:   0 20px 60px rgba(13,43,94,0.15);
  --shadow-xl:   0 30px 80px rgba(13,43,94,0.20);

  /* Radius */
  --radius-sm:   8px;
  --radius-md:   16px;
  --radius-lg:   24px;
  --radius-xl:   32px;
  --radius-full: 9999px;

  /* Transitions */
  --trans-fast:  0.2s ease;
  --trans-mid:   0.35s ease;
  --trans-slow:  0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* Navbar */
  --navbar-h:    72px;
  --navbar-h-sm: 60px;
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Poppins', 'Inter', sans-serif;
  background: var(--off-white);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ── Page Loader ───────────────────────────────────────── */
#page-loader {
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 24px;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#page-loader.loaded { opacity: 0; visibility: hidden; }
.loader-badge {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--sky));
  display: flex; align-items: center; justify-content: center;
  animation: loaderPulse 1.2s infinite ease-in-out;
}
.loader-badge svg { width: 48px; height: 48px; fill: white; }
.loader-bar {
  width: 200px; height: 4px;
  background: var(--light-gray);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.loader-bar::after {
  content: '';
  display: block;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, var(--navy), var(--sky), var(--red));
  border-radius: var(--radius-full);
  animation: loaderSlide 1.2s infinite ease-in-out;
}
@keyframes loaderPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(13,43,94,.3); }
  50% { transform: scale(1.08); box-shadow: 0 0 0 16px rgba(13,43,94,0); }
}
@keyframes loaderSlide {
  0% { transform: translateX(-150%); }
  100% { transform: translateX(350%); }
}
.loader-text {
  font-size: 0.85rem;
  color: var(--text-light);
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 500;
}

/* ── Navbar ────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--navbar-h);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(13,43,94,0.08);
  transition: height var(--trans-mid), box-shadow var(--trans-mid), background var(--trans-mid);
}
#navbar.scrolled {
  height: var(--navbar-h-sm);
  box-shadow: var(--shadow-md);
  background: rgba(255,255,255,0.98);
}
.navbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.brand-logo {
  width: 44px; height: 44px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--navy);
  transition: transform var(--trans-mid);
}
#navbar.scrolled .brand-logo { width: 38px; height: 38px; }
.brand-logo img { width: 100%; height: 100%; object-fit: cover; }
.brand-text { line-height: 1.2; }
.brand-text strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.3px;
}
.brand-text span {
  font-size: 0.7rem;
  color: var(--text-light);
  font-weight: 400;
  letter-spacing: 0.5px;
}
.navbar-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  position: relative;
  padding: 8px 14px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-dark);
  border-radius: var(--radius-sm);
  transition: color var(--trans-fast), background var(--trans-fast);
  white-space: nowrap;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 14px; right: 14px;
  height: 2px;
  background: var(--red);
  border-radius: var(--radius-full);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--trans-mid);
}
.nav-link:hover, .nav-link.active { color: var(--navy); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.btn-nav-login {
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  border: 2px solid var(--navy);
  border-radius: var(--radius-full);
  transition: all var(--trans-fast);
}
.btn-nav-login:hover {
  background: var(--navy);
  color: white;
}
.btn-nav-enroll {
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, var(--red), var(--red-light));
  border-radius: var(--radius-full);
  transition: all var(--trans-fast);
  box-shadow: 0 4px 15px rgba(192,57,43,0.3);
}
.btn-nav-enroll:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(192,57,43,0.4);
}
.btn-nav-signup {
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, var(--sky), var(--sky-light));
  border-radius: var(--radius-full);
  transition: all var(--trans-fast);
  box-shadow: 0 4px 15px rgba(52,152,219,0.3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-nav-signup:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(52,152,219,0.4);
}
.btn-nav-login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: background var(--trans-fast);
}
.hamburger:hover { background: var(--light-gray); }
.hamburger span {
  display: block;
  height: 2px;
  background: var(--navy);
  border-radius: var(--radius-full);
  transition: all var(--trans-mid);
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* Mobile Nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--navbar-h);
  left: 0; right: 0;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--mid-gray);
  padding: 16px 24px 24px;
  z-index: 999;
  flex-direction: column;
  gap: 4px;
  transform: translateY(-20px);
  opacity: 0;
  transition: all var(--trans-mid);
  box-shadow: var(--shadow-lg);
}
.mobile-nav.open {
  display: flex;
  transform: translateY(0);
  opacity: 1;
}
.mobile-nav .nav-link {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}
.mobile-nav .nav-link:hover { background: var(--light-gray); }
.mobile-nav-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--mid-gray);
}
.mobile-nav-actions a { flex: 1; text-align: center; }

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all var(--trans-mid);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.3px;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--trans-mid);
}
.btn:hover::before { transform: scaleX(1); }
.btn-primary {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: white;
  box-shadow: 0 6px 20px rgba(13,43,94,0.3);
}
.btn-primary:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 15px 35px rgba(13,43,94,0.4);
}
.btn-danger {
  background: linear-gradient(135deg, var(--red), var(--red-light));
  color: white;
  box-shadow: 0 6px 20px rgba(192,57,43,0.3);
}
.btn-danger:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 15px 35px rgba(192,57,43,0.4);
}
.btn-outline {
  border: 2px solid var(--navy);
  color: var(--navy);
  background: transparent;
}
.btn-outline:hover {
  background: var(--navy);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(13,43,94,0.25);
}
.btn-sky {
  background: linear-gradient(135deg, var(--sky), var(--sky-light));
  color: white;
  box-shadow: 0 6px 20px rgba(52,152,219,0.3);
}
.btn-sky:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(52,152,219,0.4);
}
/* Ripple */
.btn .ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: rippleAnim 0.6s linear;
  background: rgba(255,255,255,0.3);
  pointer-events: none;
}
@keyframes rippleAnim {
  to { transform: scale(4); opacity: 0; }
}

/* ── Section Layout ────────────────────────────────────── */
.section { padding: 100px 0; }
.section-sm { padding: 60px 0; }
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
.section-header { text-align: center; margin-bottom: 64px; }
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  background: linear-gradient(135deg, rgba(13,43,94,0.08), rgba(52,152,219,0.08));
  border: 1px solid rgba(13,43,94,0.12);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
}
.section-label::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--red);
}
.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
  letter-spacing: -0.5px;
}
.section-title span { color: var(--red); }
.section-subtitle {
  font-size: 1rem;
  color: var(--text-mid);
  margin-top: 12px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Cards ─────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--mid-gray);
  overflow: hidden;
  transition: transform var(--trans-mid), box-shadow var(--trans-mid);
}
.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-xl);
}
.card-body { padding: 28px; }
.card-icon {
  width: 56px; height: 56px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  font-size: 1.6rem;
  background: linear-gradient(135deg, rgba(13,43,94,0.08), rgba(52,152,219,0.08));
}
.card-icon.red { background: linear-gradient(135deg, rgba(192,57,43,0.1), rgba(231,76,60,0.1)); }
.card-icon.navy { background: linear-gradient(135deg, rgba(13,43,94,0.1), rgba(26,61,124,0.1)); }
.card-icon.sky { background: linear-gradient(135deg, rgba(52,152,219,0.1), rgba(93,173,226,0.1)); }
.card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 10px;
}
.card p {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.7;
}

/* ── Stat Cards ────────────────────────────────────────── */
.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--mid-gray);
  transition: all var(--trans-mid);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--navy), var(--sky));
}
.stat-card.red::before { background: linear-gradient(90deg, var(--red), var(--red-light)); }
.stat-card.sky::before { background: linear-gradient(90deg, var(--sky), var(--sky-light)); }
.stat-card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: var(--shadow-xl);
}
.stat-number {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
  display: block;
}
.stat-card.red .stat-number { color: var(--red); }
.stat-card.sky .stat-number { color: var(--sky); }
.stat-label {
  font-size: 0.88rem;
  color: var(--text-light);
  font-weight: 500;
  margin-top: 8px;
  letter-spacing: 0.5px;
}
.stat-icon {
  font-size: 2rem;
  margin-bottom: 16px;
  display: block;
}

/* ── Glassmorphism ─────────────────────────────────────── */
.glass {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.8);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-lg);
}
.glass-dark {
  background: rgba(13,43,94,0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
  color: white;
}

/* ── Forms ─────────────────────────────────────────────── */
.form-group {
  position: relative;
  margin-bottom: 24px;
}
.form-label {
  position: absolute;
  top: 16px; left: 16px;
  font-size: 0.9rem;
  color: var(--text-light);
  transition: all var(--trans-fast);
  pointer-events: none;
  background: white;
  padding: 0 4px;
}
.form-control {
  width: 100%;
  padding: 16px;
  border: 2px solid var(--mid-gray);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  color: var(--text-dark);
  background: white;
  transition: border-color var(--trans-fast), box-shadow var(--trans-fast);
  outline: none;
}
.form-control:focus {
  border-color: var(--sky);
  box-shadow: 0 0 0 4px rgba(52,152,219,0.12);
}
.form-control:focus + .form-label,
.form-control:not(:placeholder-shown) + .form-label {
  top: -10px;
  font-size: 0.75rem;
  color: var(--sky);
  font-weight: 600;
}
.form-control::placeholder { color: transparent; }
.form-control.error { border-color: var(--red); }
.form-error {
  font-size: 0.78rem;
  color: var(--red);
  margin-top: 6px;
  display: none;
}
.form-group.invalid .form-error { display: block; }
.form-group.invalid .form-control { border-color: var(--red); }
textarea.form-control { resize: vertical; min-height: 140px; padding-top: 16px; }
select.form-control { appearance: none; cursor: pointer; }

/* ── Footer ────────────────────────────────────────────── */
#footer {
  background: var(--navy);
  color: rgba(255,255,255,0.85);
  padding: 64px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand .brand-logo { border-color: rgba(255,255,255,0.3); margin-bottom: 16px; }
.footer-brand .brand-text strong { color: white; font-size: 1.1rem; }
.footer-brand .brand-text span { color: rgba(255,255,255,0.6); }
.footer-desc {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  margin-top: 12px;
  line-height: 1.8;
}
.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: white;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--red);
  display: inline-block;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  transition: color var(--trans-fast), padding-left var(--trans-fast);
}
.footer-links a:hover { color: var(--sky-light); padding-left: 6px; }
.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
}
.footer-contact-item .fc-icon {
  width: 32px; height: 32px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 0.9rem;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-copy { font-size: 0.82rem; color: rgba(255,255,255,0.45); }
.footer-social { display: flex; gap: 10px; }
.social-btn {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  transition: all var(--trans-fast);
}
.social-btn:hover { background: var(--sky); color: white; transform: translateY(-3px); }

/* ── Back to Top ───────────────────────────────────────── */
#back-to-top {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: white;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--trans-mid);
  font-size: 1.1rem;
}
#back-to-top.visible {
  opacity: 1; visibility: visible; transform: translateY(0);
}
#back-to-top:hover {
  background: linear-gradient(135deg, var(--red), var(--red-light));
  transform: translateY(-4px);
}

/* ── Utilities ─────────────────────────────────────────── */
.text-center { text-align: center; }
.text-navy { color: var(--navy); }
.text-red { color: var(--red); }
.text-sky { color: var(--sky); }
.text-light-gray { color: var(--text-light); }
.bg-white { background: var(--white); }
.bg-offwhite { background: var(--off-white); }
.bg-navy { background: var(--navy); }
.bg-light { background: var(--light-gray); }
.bg-gradient { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 50%, var(--sky) 100%); }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-16 { gap: 16px; } .gap-24 { gap: 24px; } .gap-32 { gap: 32px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; } .mb-48 { margin-bottom: 48px; }
.tag {
  display: inline-flex; align-items: center;
  padding: 4px 12px;
  background: rgba(13,43,94,0.08);
  color: var(--navy);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.tag.red { background: rgba(192,57,43,0.1); color: var(--red); }
.tag.sky { background: rgba(52,152,219,0.1); color: var(--sky); }
.tag.green { background: rgba(39,174,96,0.1); color: #27ae60; }
.divider {
  height: 1px;
  background: var(--mid-gray);
  margin: 40px 0;
}

/* ── Advanced Animations ───────────────────────────────── */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
  100% { transform: translateY(0px); }
}
@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(52,152,219,0.5); }
  70% { box-shadow: 0 0 0 20px rgba(52,152,219,0); }
  100% { box-shadow: 0 0 0 0 rgba(52,152,219,0); }
}
.float-anim {
  animation: float 4s ease-in-out infinite;
}
.pulse-anim {
  animation: pulseGlow 2s infinite;
  border-radius: 50%;
}
.card-icon { transition: transform var(--trans-mid); }
.card:hover .card-icon { transform: scale(1.1) rotate(5deg); }
.stat-card:hover .stat-icon { animation: float 2s ease-in-out infinite; }


/* ── Page Hero ─────────────────────────────────────────── */
.page-hero {
  padding: calc(var(--navbar-h) + 60px) 0 80px;
  background: linear-gradient(160deg, #f0f4ff 0%, #e8edf8 50%, #f5f7fd 100%);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -50%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(52,152,219,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero::after {
  content: '';
  position: absolute;
  bottom: -20%; left: -5%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(192,57,43,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero-content { position: relative; z-index: 1; }
.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}
.page-hero h1 span { color: var(--red); }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-light);
}
.breadcrumb a { color: var(--sky); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--mid-gray); }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 768px) {
  .navbar-links, .navbar-actions { display: none; }
  .hamburger { display: flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .btn { padding: 12px 24px; font-size: 0.88rem; }
}

/* ── AOS Custom Overrides ──────────────────────────────── */
[data-aos] { pointer-events: none; }
[data-aos].aos-animate { pointer-events: auto; }

/* ── Tilt Effect ───────────────────────────────────────── */
.tilt-card { transform-style: preserve-3d; perspective: 1000px; }
.tilt-card .tilt-inner { transform-style: preserve-3d; }

/* ══════════════════════════════════════════════════════
   PRO-LEVEL DESIGN SYSTEM UPGRADE
   ══════════════════════════════════════════════════════ */

/* ── Extended Token Set ────────────────────────────────── */
:root {
  --gold:          #f0b429;
  --gold-light:    #ffd166;
  --glow-navy:     0 0 40px rgba(13,43,94,0.4), 0 0 80px rgba(13,43,94,0.2);
  --glow-red:      0 0 40px rgba(192,57,43,0.4), 0 0 80px rgba(192,57,43,0.2);
  --glow-sky:      0 0 40px rgba(52,152,219,0.4), 0 0 80px rgba(52,152,219,0.2);
  --glow-gold:     0 0 30px rgba(240,180,41,0.5);
  --shadow-glow:   0 8px 32px rgba(13,43,94,0.18), 0 1px 0 rgba(255,255,255,0.6) inset;
  --gradient-hero: linear-gradient(135deg, #0a1f4a 0%, #0d2b5e 40%, #1a3d7c 70%, #1e4b9e 100%);
  --mesh-pattern:  url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%230d2b5e' fill-opacity='0.04'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ── Custom Scrollbar ──────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--off-white); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--navy), var(--sky));
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--red); }

/* ── Scroll Progress Bar ───────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--navy) 0%, var(--sky) 50%, var(--red) 100%);
  z-index: 9999;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(52,152,219,0.7);
}

/* ── Custom Cursor ─────────────────────────────────────── */
#cursor-dot {
  width: 8px; height: 8px;
  background: var(--red);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%,-50%);
  transition: transform 0.08s ease, width 0.2s ease, height 0.2s ease, background 0.2s ease;
  mix-blend-mode: multiply;
}
#cursor-ring {
  width: 32px; height: 32px;
  border: 2px solid rgba(13,43,94,0.3);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%,-50%);
  transition: transform 0.18s ease, width 0.3s ease, height 0.3s ease, border-color 0.2s ease;
}
body.cursor-hover #cursor-dot { width: 12px; height: 12px; background: var(--sky); }
body.cursor-hover #cursor-ring { width: 48px; height: 48px; border-color: rgba(52,152,219,0.5); }
@media (pointer: coarse) { #cursor-dot, #cursor-ring { display: none; } }

/* ── Glassmorphism 2.0 ─────────────────────────────────── */
.glass-2 {
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.75);
  box-shadow: 0 8px 32px rgba(13,43,94,0.1), 0 1px 0 rgba(255,255,255,0.9) inset, 0 -1px 0 rgba(13,43,94,0.05) inset;
  border-radius: var(--radius-lg);
}
.glass-navy {
  background: rgba(13,43,94,0.75);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 8px 40px rgba(0,0,0,0.3), 0 1px 0 rgba(255,255,255,0.1) inset;
  border-radius: var(--radius-lg);
  color: white;
}

/* ── Micro-interaction Utilities ───────────────────────── */
.hover-lift {
  transition: transform var(--trans-mid), box-shadow var(--trans-mid);
}
.hover-lift:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-xl);
}
.hover-glow:hover {
  box-shadow: var(--glow-sky);
}
.hover-shine {
  position: relative;
  overflow: hidden;
}
.hover-shine::after {
  content: '';
  position: absolute;
  top: -50%; left: -75%;
  width: 50%; height: 200%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}
.hover-shine:hover::after { left: 125%; }

/* ── Animated Gradient Border ──────────────────────────── */
.gradient-border {
  position: relative;
  border-radius: var(--radius-lg);
  background: white;
}
.gradient-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, var(--navy), var(--sky), var(--red), var(--navy));
  background-size: 300% 300%;
  border-radius: inherit;
  z-index: -1;
  animation: gradientShift 4s ease infinite;
}
@keyframes gradientShift {
  0%   { background-position: 0%   50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}

/* ── Glow CTA Button ───────────────────────────────────── */
.btn-glow {
  position: relative;
  animation: ctaGlowPulse 2.5s ease-in-out infinite;
}
@keyframes ctaGlowPulse {
  0%, 100% { box-shadow: 0 6px 20px rgba(192,57,43,0.4), 0 0 0 0 rgba(192,57,43,0.4); }
  50%       { box-shadow: 0 6px 30px rgba(192,57,43,0.6), 0 0 0 12px rgba(192,57,43,0); }
}

/* ── Particle Hero Background ──────────────────────────── */
#particle-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

/* ── Scroll Reveal Additions ───────────────────────────── */
@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(40px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}
@keyframes slideLeftFade {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideRightFade {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}
.reveal-up   { animation: slideUpFade    0.7s ease both; }
.reveal-left { animation: slideLeftFade  0.7s ease both; }
.reveal-right{ animation: slideRightFade 0.7s ease both; }

/* ── Stats Dark Glass Overrides ────────────────────────── */
.stats-dark-section {
  background: var(--gradient-hero);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}
.stats-dark-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--mesh-pattern);
  opacity: 0.5;
}
.stat-card-dark {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all var(--trans-mid);
  box-shadow: 0 4px 24px rgba(0,0,0,0.2), 0 1px 0 rgba(255,255,255,0.08) inset;
}
.stat-card-dark:hover {
  transform: translateY(-10px) scale(1.03);
  background: rgba(255,255,255,0.1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3), var(--glow-sky);
  border-color: rgba(52,152,219,0.4);
}
.stat-card-dark::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--sky), var(--gold));
}
.stat-card-dark .stat-number { color: var(--gold); text-shadow: 0 0 20px rgba(240,180,41,0.5); }
.stat-card-dark .stat-label  { color: rgba(255,255,255,0.65); }
.stat-card-dark .stat-icon   { opacity: 0.9; filter: drop-shadow(0 0 8px rgba(240,180,41,0.6)); }
.stat-card-dark.red::before  { background: linear-gradient(90deg, var(--red), var(--gold)); }
.stat-card-dark.sky::before  { background: linear-gradient(90deg, var(--sky-light), white); }

/* ── Timeline Notices ──────────────────────────────────── */
.timeline-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.timeline-list::before {
  content: '';
  position: absolute;
  left: 36px;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--sky), var(--mid-gray) 80%, transparent);
}
.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 0 0 32px 0;
  position: relative;
}
.timeline-pin {
  width: 72px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 1;
}
.timeline-dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--sky);
  border: 3px solid white;
  box-shadow: 0 0 0 3px var(--sky);
  transition: transform var(--trans-mid);
}
.timeline-item:hover .timeline-dot { transform: scale(1.4); }
.timeline-dot.urgent {
  background: var(--red);
  box-shadow: 0 0 0 3px var(--red);
  animation: urgentPulse 1.8s ease-in-out infinite;
}
@keyframes urgentPulse {
  0%,100% { box-shadow: 0 0 0 3px var(--red); }
  50%     { box-shadow: 0 0 0 8px rgba(192,57,43,0); }
}
.timeline-date {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-light);
  text-align: center;
  letter-spacing: 0.5px;
  line-height: 1.3;
}
.timeline-card {
  flex: 1;
  background: white;
  border-radius: var(--radius-md);
  padding: 20px 24px;
  border: 1px solid var(--mid-gray);
  box-shadow: var(--shadow-sm);
  transition: all var(--trans-mid);
  margin-bottom: 0;
}
.timeline-card:hover {
  border-color: var(--sky);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(52,152,219,0.15);
  transform: translateX(4px);
}
.timeline-card h4 { font-size: 0.95rem; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.timeline-card p  { font-size: 0.83rem; color: var(--text-mid); line-height: 1.6; }
.timeline-tag-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }

/* ── Activity Card Magazine Style ──────────────────────── */
.activity-card-pro {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: white;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--mid-gray);
  transition: all var(--trans-mid);
  position: relative;
}
.activity-card-pro:hover {
  transform: translateY(-12px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}
.activity-img-pro {
  height: 220px;
  overflow: hidden;
  position: relative;
}
.activity-img-pro img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
}
.activity-card-pro:hover .activity-img-pro img { transform: scale(1.1); }
.activity-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(13,43,94,0.95) 0%, rgba(13,43,94,0.5) 60%, transparent);
  padding: 40px 20px 20px;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
  color: white;
}
.activity-card-pro:hover .activity-caption { transform: translateY(0); }
.activity-caption p { font-size: 0.82rem; opacity: 0.85; line-height: 1.5; }
.activity-img-overlay-2 {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13,43,94,0.55) 0%, transparent 60%);
}
.activity-tag-2 {
  position: absolute;
  top: 14px; left: 14px;
  background: rgba(192,57,43,0.9);
  backdrop-filter: blur(8px);
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.activity-body-pro {
  padding: 22px 24px;
}
.activity-body-pro h3 { font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.activity-link-pro {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--sky);
  transition: gap var(--trans-fast), color var(--trans-fast);
}
.activity-link-pro:hover { gap: 12px; color: var(--navy); }

/* ── Typewriter ────────────────────────────────────────── */
.typewriter-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: var(--red);
  margin-left: 4px;
  vertical-align: middle;
  animation: blinkCaret 0.75s step-end infinite;
}
@keyframes blinkCaret {
  0%,100% { opacity: 1; } 50% { opacity: 0; }
}

/* ── Scroll Indicator ──────────────────────────────────── */
.scroll-indicator {
  position: absolute;
  bottom: 32px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.6;
  transition: opacity var(--trans-mid);
  z-index: 3;
}
.scroll-indicator:hover { opacity: 1; }
.scroll-mouse {
  width: 24px; height: 38px;
  border: 2px solid var(--navy);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}
.scroll-wheel {
  width: 3px; height: 8px;
  background: var(--navy);
  border-radius: var(--radius-full);
  animation: scrollWheel 1.8s ease-in-out infinite;
}
@keyframes scrollWheel {
  0%  { opacity: 1; transform: translateY(0); }
  100%{ opacity: 0; transform: translateY(12px); }
}
.scroll-indicator span {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--navy);
}

/* ── Mesh background ───────────────────────────────────── */
.bg-mesh { background-image: var(--mesh-pattern); }
.activities-section-pro {
  padding: 100px 0;
  background: #f5f7fd;
  background-image: var(--mesh-pattern);
}

/* ══════════════════════════════════════════════════════════
   DARK MODE THEME
   ══════════════════════════════════════════════════════════ */
[data-theme="dark"] {
  --off-white:   #0f1724;
  --white:       #1a2540;
  --light-gray:  #1e2d48;
  --mid-gray:    #2a3a58;
  --text-dark:   #e8ecf4;
  --text-mid:    #a8b8d0;
  --text-light:  #6b84a8;
  --shadow-sm:   0 2px 12px rgba(0,0,0,0.4);
  --shadow-md:   0 8px 30px rgba(0,0,0,0.5);
  --shadow-lg:   0 20px 60px rgba(0,0,0,0.6);
  --shadow-xl:   0 30px 80px rgba(0,0,0,0.7);
}
[data-theme="dark"] body { background: #0f1724; color: #e8ecf4; }
[data-theme="dark"] #navbar {
  background: rgba(15,23,36,0.97);
  border-bottom-color: rgba(255,255,255,0.06);
}
[data-theme="dark"] #navbar.scrolled { background: rgba(15,23,36,0.99); }
[data-theme="dark"] .mobile-nav { background: rgba(15,23,36,0.99); border-color: rgba(255,255,255,0.06); }
[data-theme="dark"] .brand-text strong { color: #e8ecf4; }
[data-theme="dark"] .nav-link { color: #a8b8d0; }
[data-theme="dark"] .nav-link:hover, [data-theme="dark"] .nav-link.active { color: #e8ecf4; }
[data-theme="dark"] .btn-nav-login { color: #e8ecf4; border-color: rgba(255,255,255,0.3); }
[data-theme="dark"] .btn-nav-login:hover { background: rgba(255,255,255,0.1); }
[data-theme="dark"] .card { background: #1a2540; border-color: #2a3a58; }
[data-theme="dark"] .card h3 { color: #e8ecf4; }
[data-theme="dark"] .card p { color: #a8b8d0; }
[data-theme="dark"] .stat-card { background: #1a2540; border-color: #2a3a58; }
[data-theme="dark"] .section-title { color: #e8ecf4; }
[data-theme="dark"] .bg-white { background: #1a2540; }
[data-theme="dark"] .bg-offwhite { background: #0f1724; }
[data-theme="dark"] .form-control {
  background: #1a2540; color: #e8ecf4;
  border-color: #2a3a58;
}
[data-theme="dark"] .form-control:focus { border-color: var(--sky); }
[data-theme="dark"] .form-label { background: #1a2540; color: #6b84a8; }
[data-theme="dark"] .page-hero {
  background: linear-gradient(160deg, #0e1929 0%, #0f1f3d 60%, #101e3a 100%);
}
[data-theme="dark"] .page-hero h1 { color: #e8ecf4; }
[data-theme="dark"] .timeline-card { background: #1a2540; border-color: #2a3a58; }
[data-theme="dark"] .timeline-card h4 { color: #e8ecf4; }
[data-theme="dark"] .notice-card { background: #1a2540; border-color: #2a3a58; }
[data-theme="dark"] .activity-card-pro { background: #1a2540; border-color: #2a3a58; }
[data-theme="dark"] .activity-body-pro h3 { color: #e8ecf4; }
[data-theme="dark"] .search-input { background: #1a2540; color: #e8ecf4; border-color: #2a3a58; }
[data-theme="dark"] .notice-filter-btn { background: #1a2540; color: #a8b8d0; border-color: #2a3a58; }
[data-theme="dark"] .notice-filter-btn:hover,
[data-theme="dark"] .notice-filter-btn.active { background: var(--navy); color: white; }
[data-theme="dark"] #page-loader { background: #0f1724; }
[data-theme="dark"] ::-webkit-scrollbar-track { background: #0f1724; }
[data-theme="dark"] select.form-control option { background: #1a2540; }

/* Smooth dark mode transitions */
body, #navbar, .card, .stat-card, .form-control, .mobile-nav, .timeline-card, .notice-card {
  transition-property: background, border-color, color, box-shadow;
  transition-duration: 0.3s;
  transition-timing-function: ease;
}

/* ── Dark Mode Toggle Button ──────────────────────────── */
#dark-mode-btn {
  width: 38px; height: 38px;
  border-radius: var(--radius-full);
  border: 2px solid var(--mid-gray);
  background: var(--off-white);
  color: var(--text-mid);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--trans-fast);
  flex-shrink: 0;
}
#dark-mode-btn:hover { background: var(--navy); color: white; border-color: var(--navy); }
[data-theme="dark"] #dark-mode-btn { background: #1a2540; border-color: #2a3a58; color: var(--gold); }
[data-theme="dark"] #dark-mode-btn:hover { background: var(--sky); color: white; }

/* ── PWA Install Banner ───────────────────────────────── */
#pwa-banner {
  position: fixed;
  bottom: 80px; left: 50%; transform: translateX(-50%);
  background: var(--navy);
  color: white;
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: var(--shadow-xl);
  z-index: 800;
  min-width: 300px;
  animation: slideUpFade 0.4s ease;
}
#pwa-banner p { font-size: 0.9rem; flex: 1; }
#pwa-banner button { padding: 8px 18px; border-radius: var(--radius-full); font-size: 0.82rem; font-weight: 700; cursor: pointer; }
#pwa-install-btn { background: white; color: var(--navy); border: none; }
#pwa-dismiss-btn { background: transparent; color: rgba(255,255,255,0.6); border: none; font-size: 1.2rem; padding: 4px 8px; }

/* ── Gallery Masonry + Lightbox ──────────────────────── */
.masonry-grid {
  columns: 3;
  column-gap: 20px;
}
.masonry-item {
  break-inside: avoid;
  margin-bottom: 20px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  position: relative;
}
.masonry-item img {
  width: 100%; display: block;
  transition: transform 0.4s ease;
}
.masonry-item:hover img { transform: scale(1.05); }
.masonry-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(13,43,94,0.8), transparent);
  opacity: 0; transition: opacity 0.3s ease;
  display: flex; align-items: flex-end; padding: 16px;
  color: white; font-size: 0.85rem; font-weight: 600;
}
.masonry-item:hover .masonry-overlay { opacity: 1; }
@media (max-width: 768px) { .masonry-grid { columns: 2; } }
@media (max-width: 480px) { .masonry-grid { columns: 1; } }

/* Lightbox */
#lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 10000;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
#lightbox.active { display: flex; }
#lightbox img {
  max-width: 90vw; max-height: 85vh;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  object-fit: contain;
}
#lb-close, #lb-prev, #lb-next {
  position: fixed; background: rgba(255,255,255,0.15); color: white;
  border: none; border-radius: var(--radius-full); cursor: pointer;
  font-size: 1.4rem; display: flex; align-items: center; justify-content: center;
  transition: background var(--trans-fast);
}
#lb-close { top: 20px; right: 20px; width: 48px; height: 48px; }
#lb-prev   { left: 16px; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; }
#lb-next   { right: 16px; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; }
#lb-close:hover, #lb-prev:hover, #lb-next:hover { background: rgba(255,255,255,0.3); }
#lb-caption {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  color: white; font-size: 0.9rem; font-weight: 600;
  background: rgba(0,0,0,0.5); padding: 8px 20px;
  border-radius: var(--radius-full); backdrop-filter: blur(10px);
}

/* ── Multi-Step Enrollment Wizard ────────────────────── */
.wizard-steps {
  display: flex; align-items: center; gap: 0;
  margin-bottom: 48px; position: relative;
}
.wizard-step {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; flex: 1; position: relative; cursor: default;
}
.wizard-step:not(:last-child)::after {
  content: '';
  position: absolute; top: 18px; left: 50%; width: 100%;
  height: 2px; background: var(--mid-gray);
  transition: background 0.4s ease;
}
.wizard-step.done:not(:last-child)::after { background: var(--sky); }
.ws-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-full);
  border: 2px solid var(--mid-gray);
  background: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; font-weight: 700; color: var(--text-light);
  transition: all 0.3s ease; z-index: 1; position: relative;
}
.wizard-step.active .ws-icon { border-color: var(--sky); background: var(--sky); color: white; box-shadow: 0 0 0 4px rgba(52,152,219,0.2); }
.wizard-step.done .ws-icon { border-color: var(--sky); background: var(--sky); color: white; }
.ws-label { font-size: 0.7rem; font-weight: 600; color: var(--text-light); text-align: center; white-space: nowrap; }
.wizard-step.active .ws-label, .wizard-step.done .ws-label { color: var(--sky); }
.wizard-panel { display: none; animation: slideUpFade 0.4s ease; }
.wizard-panel.active { display: block; }
.wizard-nav { display: flex; gap: 12px; justify-content: flex-end; margin-top: 32px; }

/* ── Cadet Portal ─────────────────────────────────────── */
.portal-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px; align-items: start;
}
.portal-sidebar {
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  color: white; text-align: center;
  position: sticky; top: calc(var(--navbar-h) + 24px);
}
.portal-avatar {
  width: 90px; height: 90px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--sky), var(--navy-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; font-weight: 800; color: white;
  margin: 0 auto 16px;
}
.portal-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.portal-role {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase; color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.1); padding: 4px 14px;
  border-radius: var(--radius-full); display: inline-block; margin-bottom: 24px;
}
.portal-stat-row { display: flex; gap: 16px; margin-bottom: 24px; }
.portal-mini-stat { flex: 1; background: rgba(255,255,255,0.1); border-radius: var(--radius-md); padding: 12px 8px; text-align: center; }
.portal-mini-stat strong { font-size: 1.4rem; font-weight: 800; display: block; color: var(--gold); }
.portal-mini-stat span { font-size: 0.68rem; color: rgba(255,255,255,0.6); }
.portal-nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: var(--radius-md);
  color: rgba(255,255,255,0.7); font-size: 0.875rem; font-weight: 500;
  transition: all var(--trans-fast); text-align: left; width: 100%;
}
.portal-nav-link:hover, .portal-nav-link.active { background: rgba(255,255,255,0.12); color: white; }
.portal-content .portal-section { display: none; }
.portal-content .portal-section.active { display: block; }
.cert-card {
  display: flex; align-items: center; gap: 20px;
  background: white; border-radius: var(--radius-lg);
  padding: 24px; border: 1px solid var(--mid-gray);
  box-shadow: var(--shadow-sm); margin-bottom: 16px;
}
.cert-icon { font-size: 2.5rem; flex-shrink: 0; }
.cert-info { flex: 1; }
.cert-info h4 { font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.cert-info p { font-size: 0.82rem; color: var(--text-mid); }
.status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 16px; border-radius: var(--radius-full);
  font-size: 0.78rem; font-weight: 700;
}
.status-badge.pending  { background: rgba(243,156,18,0.12); color: #f39c12; }
.status-badge.approved { background: rgba(39,174,96,0.12);  color: #27ae60; }
.status-badge.rejected { background: rgba(192,57,43,0.12);  color: var(--red); }
@media (max-width: 768px) { .portal-grid { grid-template-columns: 1fr; } .portal-sidebar { position: static; } }

/* ── Event Calendar ────────────────────────────────────── */
.calendar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.calendar-nav-btn {
  width: 40px; height: 40px; border-radius: var(--radius-full);
  border: 2px solid var(--mid-gray); background: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; cursor: pointer; transition: all var(--trans-fast);
}
.calendar-nav-btn:hover { background: var(--navy); color: white; border-color: var(--navy); }
.calendar-grid {
  display: grid; grid-template-columns: repeat(7,1fr); gap: 4px;
}
.cal-day-label {
  text-align: center; font-size: 0.72rem; font-weight: 700;
  color: var(--text-light); text-transform: uppercase; padding: 8px 0;
}
.cal-day {
  min-height: 80px; border-radius: var(--radius-sm);
  border: 1px solid var(--mid-gray);
  padding: 6px;
  cursor: pointer; transition: all var(--trans-fast);
  background: white;
}
.cal-day:hover { background: var(--off-white); border-color: var(--sky); }
.cal-day.other-month { opacity: 0.35; }
.cal-day.today { border-color: var(--sky); background: rgba(52,152,219,0.05); }
.cal-day .day-num { font-size: 0.85rem; font-weight: 600; color: var(--navy); margin-bottom: 4px; }
.cal-event-dot {
  font-size: 0.62rem; font-weight: 600;
  padding: 2px 6px; border-radius: 4px;
  margin-bottom: 2px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.cal-event-dot.Camp   { background: rgba(192,57,43,0.12); color: var(--red); }
.cal-event-dot.Parade { background: rgba(13,43,94,0.12);  color: var(--navy); }
.cal-event-dot.Social { background: rgba(39,174,96,0.12); color: #27ae60; }
.cal-event-dot.Exam   { background: rgba(243,156,18,0.12); color: #f39c12; }
.cal-event-dot.Other  { background: rgba(52,152,219,0.12); color: var(--sky); }
[data-theme="dark"] .cal-day { background: #1a2540; border-color: #2a3a58; }
[data-theme="dark"] .cal-day:hover { background: #223060; }
[data-theme="dark"] .cal-day .day-num { color: #e8ecf4; }

/* ── Loading Skeleton ─────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--light-gray) 25%, var(--mid-gray) 50%, var(--light-gray) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-card { border-radius: var(--radius-lg); height: 120px; margin-bottom: 16px; }
.skeleton-text { height: 14px; margin-bottom: 10px; border-radius: 4px; }



/* ══════════════════════════════════════════════════════
   COMPREHENSIVE MOBILE RESPONSIVE FIXES
   ══════════════════════════════════════════════════════ */

/* ── Tablet (max 768px) ──────────────────────────────── */
@media (max-width: 768px) {

  /* Navbar */
  .navbar-inner { padding: 0 16px; }
  .brand-text strong { font-size: 0.9rem; }
  .brand-text span { font-size: 0.65rem; }

  /* Hero Section */
  #hero { min-height: 100svh; padding: 120px 0 60px; }
  .hero-content { text-align: center; padding: 0 16px; }
  .hero-badge { font-size: 0.68rem; }
  .hero-cta { flex-direction: column; align-items: center; gap: 12px; }
  .hero-cta .btn { width: 100%; max-width: 280px; justify-content: center; }
  .hero-stats { flex-wrap: wrap; justify-content: center; gap: 12px; }
  .hero-stat { min-width: 90px; }

  /* Section spacing */
  .section { padding: 56px 0; }
  .section-title { font-size: clamp(1.6rem, 5vw, 2.2rem); }
  .section-sub { font-size: 0.88rem; }

  /* Cards & Grids */
  .card-body { padding: 20px; }
  .stat-card { padding: 24px 18px; }

  /* Wizard Steps */
  .wizard-steps { gap: 0; overflow-x: auto; padding-bottom: 8px; }
  .ws-label { display: none; }
  .wizard-nav { flex-direction: column; }
  .wizard-nav .btn { width: 100%; justify-content: center; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-col { text-align: center; }
  .footer-links { align-items: center; }
  .footer-contact-item { justify-content: center; }
  .footer-bottom { flex-direction: column; align-items: center; text-align: center; }

  /* Calendar - make cells smaller */
  .cal-day { min-height: 52px; padding: 4px; }
  .cal-day .day-num { font-size: 0.75rem; }
  .cal-event-dot { display: none; }
  .cal-day-label { font-size: 0.62rem; padding: 4px 0; }

  /* Admin Dashboard */
  .admin-sidebar {
    position: fixed !important;
    left: -280px;
    top: 0; bottom: 0;
    width: 260px !important;
    z-index: 1000;
    transition: left 0.3s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,0.3);
  }
  .admin-sidebar.mobile-open { left: 0 !important; }
  .admin-main { margin-left: 0 !important; padding: 16px !important; }
  .admin-topbar { padding: 0 16px !important; }
  .admin-topbar-left { gap: 8px; }
  .stat-cards-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
  .charts-grid { grid-template-columns: 1fr !important; }
  .admin-table { font-size: 0.78rem; }
  .admin-table th, .admin-table td { padding: 10px 8px !important; }
  .chart-card { padding: 16px !important; }
  .table-card { padding: 0 !important; overflow-x: auto; }
  .admin-tab-content { padding: 16px !important; }

  /* Cadet Portal */
  .portal-grid { grid-template-columns: 1fr !important; gap: 20px; }
  .portal-sidebar { position: static !important; border-radius: var(--radius-lg); }
  .portal-stat-row { justify-content: center; }
  .portal-nav-link { font-size: 0.8rem; padding: 8px 12px; }

  /* Tables - horizontal scroll */
  .admin-table-wrap, .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Page Hero */
  .page-hero { padding: calc(var(--navbar-h) + 32px) 0 48px; }
  .page-hero h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); }

  /* Enrollment Form */
  .form-row { grid-template-columns: 1fr !important; }

  /* Notices Timeline */
  .timeline-list::before { left: 20px; }
  .timeline-pin { width: 42px; }
  .timeline-date { font-size: 0.58rem; }
}

/* ── Phone (max 480px) ───────────────────────────────── */
@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .btn { padding: 11px 20px; font-size: 0.85rem; }

  /* Stats grid - 1 column on very small screens */
  .stat-cards-grid { grid-template-columns: 1fr !important; }

  /* Admin table - hide less important columns */
  .admin-table .hide-mobile { display: none; }

  /* Hide scroll indicator on small screens */
  .scroll-indicator { display: none; }

  /* Admin topbar */
  .admin-topbar-right { gap: 6px !important; }
  .admin-topbar-right .btn { display: none; }
  #todayDate { display: none; }

  /* Charts */
  .chart-card canvas { max-height: 220px; }

  /* Cadet portal mini stats */
  .portal-mini-stat strong { font-size: 1.1rem; }
  .portal-mini-stat span { font-size: 0.62rem; }

  /* Cert cards */
  .cert-card { flex-direction: column; text-align: center; gap: 12px; }

  /* Page hero */
  .page-hero h1 { font-size: 1.5rem; }

  /* Quick action buttons in dashboard */
  .quick-actions-grid { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }

  /* Footer */
  #footer { padding: 40px 0 20px; }
  .footer-grid { gap: 20px; }
}

/* ── Mobile Sidebar Overlay ──────────────────────────── */
#mobile-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 999;
  backdrop-filter: blur(2px);
}
#mobile-sidebar-overlay.active { display: block; }

/* ── Mobile Menu Toggle Button ───────────────────────── */
#mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  background: rgba(13,43,94,0.08);
  border-radius: var(--radius-md);
  color: var(--navy);
  font-size: 1.1rem;
  cursor: pointer;
  border: none;
  transition: background var(--trans-fast);
}
@media (max-width: 768px) {
  #mobile-menu-toggle { display: flex; }
}
#mobile-menu-toggle:hover { background: rgba(13,43,94,0.15); }
