/* ============================================
   Motijheel Model School & College - Admission System
   Modern, Mobile-Responsive Stylesheet
   ============================================ */

:root {
  --primary: #1e3a8a;
  --primary-light: #2563eb;
  --primary-dark: #1e293b;
  --accent: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --light: #f8fafc;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
  --shadow: 0 1px 2px rgba(15,23,42,0.06), 0 1px 3px rgba(15,23,42,0.08);
  --shadow-md: 0 2px 6px rgba(15,23,42,0.08);
  --shadow-lg: 0 8px 20px rgba(15,23,42,0.10);
  --shadow-xl: 0 16px 40px rgba(15,23,42,0.16);
  --radius-sm: 4px;
  --radius: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;
  --transition: all 0.2s ease;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --gold: #b08d2f;
  --gold-light: #d4af37;
  --gold-soft: #d6c07a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--white);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-light); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }

/* ============ Typography ============ */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.25; letter-spacing: -0.015em; color: var(--gray-900); }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.01em; }
h1 { font-size: clamp(1.85rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }
h4 { font-size: 1.125rem; }
.text-gradient {
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  -webkit-text-fill-color: currentColor;
  color: var(--gold-light);
}
.text-center { text-align: center; }

/* ============ Top Bar ============ */
.topbar {
  background: var(--primary-dark);
  color: var(--white);
  font-size: 0.85rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(212,175,55,0.35);
}
.topbar-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.topbar a { color: var(--gray-300); }
.topbar a:hover { color: var(--white); }
.topbar-info { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.topbar-info i { margin-right: 0.35rem; color: var(--gold-light); }

/* ============ Header / Navbar ============ */
.navbar {
  background: var(--white);
  box-shadow: var(--shadow);
  border-bottom: 1px solid var(--gold-soft);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 0.85rem 0; }
/* Wider header so the full nav fits on one line without wrapping */
.navbar .container { max-width: 1500px; }
.brand { display: flex; align-items: center; gap: 0.75rem; font-weight: 700; color: var(--primary); letter-spacing: -0.01em; }
.brand-logo {
  width: 44px; height: 44px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-size: 1.4rem;
}
.brand-text { line-height: 1.1; font-family: var(--font-display); font-size: 1.1rem; }
.brand-text small { display: block; font-size: 0.7rem; color: var(--gray-500); font-weight: 500; }

.nav-menu { display: flex; gap: 0.15rem; list-style: none; align-items: center; }
.nav-menu a {
  display: block;
  position: relative;
  padding: 0.55rem 0.7rem;
  color: var(--gray-700);
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: color 0.25s ease, background-color 0.25s ease;
  font-size: 0.92rem;
  white-space: nowrap;
}
/* Animated gold underline that grows from the center on hover */
.nav-menu a::after {
  content: '';
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.2rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-menu a:hover {
  color: var(--primary);
  background: linear-gradient(180deg, rgba(176, 141, 47, 0.05), rgba(176, 141, 47, 0.12));
}
.nav-menu a:hover::after { transform: scaleX(1); }
/* Active link keeps the gold underline visible */
.nav-menu a.active { color: var(--primary); font-weight: 600; }
.nav-menu a.active::after { transform: scaleX(1); }
/* Prominent "Pay Form Fee" nav item with red background + lift hover */
.nav-menu a.nav-pay {
  background: var(--danger);
  color: var(--white);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(239, 68, 68, 0.3);
  transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.nav-menu a.nav-pay::after { display: none; }
.nav-menu a.nav-pay:hover {
  background: #dc2626;
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(220, 38, 38, 0.35);
}

/* ============ Pay Form Fee / Gateway selection ============ */
.gateway-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.gateway-option { cursor: pointer; display: block; }
.gateway-option input { position: absolute; opacity: 0; pointer-events: none; }
.gateway-card {
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
  padding: 1.25rem 1rem; border: 2px solid var(--gray-100); border-radius: var(--radius);
  background: var(--white); transition: var(--transition); text-align: center;
}
.gateway-card i { font-size: 1.8rem; color: var(--gw-color, var(--primary)); }
.gateway-name { font-weight: 700; font-size: 1.05rem; color: var(--gray-800); }
.gateway-amt { font-size: 0.85rem; color: var(--gray-500); }
.gateway-option input:checked + .gateway-card {
  border-color: var(--gw-color, var(--primary));
  box-shadow: 0 0 0 4px rgba(0,0,0,0.05);
  background: rgba(239,68,68,0.04);
}
.gateway-option:hover .gateway-card { border-color: var(--gw-color, var(--primary)); }
@media (max-width: 480px) { .gateway-grid { grid-template-columns: 1fr; } }

.nav-toggle {
  display: none;
  background: none; border: none;
  font-size: 1.5rem; color: var(--primary);
  cursor: pointer; padding: 0.5rem;
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem; font-weight: 600;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
}
.btn:hover { box-shadow: var(--shadow-sm); }
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-light); color: var(--white); }
.btn-success { background: var(--success); color: var(--white); }
.btn-success:hover { background: #059669; color: var(--white); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-warning { background: var(--warning); color: var(--white); }
.btn-info { background: var(--info); color: var(--white); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-outline-light { background: transparent; color: var(--white); border-color: var(--white); }
.btn-outline-light:hover { background: var(--white); color: var(--primary); }
.btn-lg { padding: 0.7rem 1.3rem; font-size: 0.95rem; }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.8rem; }
.btn-block { width: 100%; }

/* ============ Hero ============ */
.hero { position: relative; overflow: hidden; }
.hero-slide {
  padding: 3.5rem 0 4rem;
  color: var(--white);
  position: relative;
}
.hero-content { position: relative; max-width: 720px; }
.hero-badge {
  display: inline-block;
  background: rgba(212,175,55,0.12);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(212,175,55,0.45);
  color: var(--gold-light);
  letter-spacing: 0.03em;
}
.hero-badge i { margin-right: 0.35rem; }
.hero h1 { color: var(--white); margin-bottom: 0.75rem; }
.hero p { font-size: 1.05rem; opacity: 0.92; margin-bottom: 1.5rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-actions .btn-primary { background: var(--gold-light); color: var(--primary-dark); }
.hero-actions .btn-primary:hover { background: #e3c565; color: var(--primary-dark); }

/* ============ Sections ============ */
.section { padding: 3rem 0; }
.section-alt { background: var(--gray-50); }
.section-header { text-align: center; max-width: 700px; margin: 0 auto 2.25rem; }
.section-eyebrow {
  display: inline-block;
  color: var(--gold);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.section-header h2 { margin-bottom: 0.6rem; }
.section-header h2::after {
  content: '';
  display: block;
  width: 56px; height: 1px;
  background: var(--gold);
  margin: 0.85rem auto 0;
}
.section-header p { color: var(--gray-600); font-size: 1rem; }

/* ============ Page Header ============ */
.page-header {
  /* Keep the header clear of the sticky navbar when scrolled into view (stepper navigation). */
  scroll-margin-top: 76px;
  background: var(--primary);
  color: var(--white);
  padding: 2.25rem 0;
  border-bottom: 3px double var(--gold-soft);
}
.page-header h1 { color: var(--white); margin-bottom: 0.5rem; position: relative; }
.page-header p { opacity: 0.95; font-size: 1.05rem; position: relative; }

/* ============ Stats ============ */
.stats-section { padding: 0; margin-top: -2.25rem; position: relative; z-index: 10; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--gray-200);
  border: 1px solid var(--gray-200);
  border-top: 2px solid var(--gold-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.stat-card {
  background: var(--white);
  text-align: center;
  padding: 1.25rem 1rem;
  transition: var(--transition);
}
.stat-card:hover { background: var(--gray-50); }
.stat-icon {
  width: 42px; height: 42px;
  margin: 0 auto 0.6rem;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-size: 1.1rem;
  transition: var(--transition);
}
.stat-value { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--gray-900); }
.stat-label { color: var(--gray-500); font-size: 0.85rem; }

/* --- Stat card color variants: distinct tinted backgrounds + hover flip --- */
.stat-card-blue   { background: #eff6ff; }
.stat-card-blue .stat-value { color: #1d4ed8; }
.stat-card-blue .stat-label { color: #1e40af; }
.stat-card-blue .stat-icon  { background: #1d4ed8; }

.stat-card-green  { background: #ecfdf5; }
.stat-card-green .stat-value { color: #047857; }
.stat-card-green .stat-label { color: #065f46; }
.stat-card-green .stat-icon  { background: #047857; }

.stat-card-amber  { background: #fffbeb; }
.stat-card-amber .stat-value { color: #b45309; }
.stat-card-amber .stat-label { color: #92400e; }
.stat-card-amber .stat-icon  { background: #b45309; }

.stat-card-purple { background: #f5f3ff; }
.stat-card-purple .stat-value { color: #6d28d9; }
.stat-card-purple .stat-label { color: #5b21b6; }
.stat-card-purple .stat-icon  { background: #6d28d9; }

/* Hover: tint deepens to solid accent, text flips to white, icon pops */
.stat-card-blue:hover   { background: #1d4ed8; }
.stat-card-green:hover  { background: #047857; }
.stat-card-amber:hover  { background: #b45309; }
.stat-card-purple:hover { background: #6d28d9; }

.stat-card-blue:hover .stat-value,
.stat-card-green:hover .stat-value,
.stat-card-amber:hover .stat-value,
.stat-card-purple:hover .stat-value,
.stat-card-blue:hover .stat-label,
.stat-card-green:hover .stat-label,
.stat-card-amber:hover .stat-label,
.stat-card-purple:hover .stat-label { color: var(--white); }

.stat-card-blue:hover .stat-icon,
.stat-card-green:hover .stat-icon,
.stat-card-amber:hover .stat-icon,
.stat-card-purple:hover .stat-icon {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.12);
}

/* ============ Cards ============ */
.card-modern {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--gray-200);
  border-top: 2px solid var(--gold-soft);
}
.card-modern:hover { box-shadow: var(--shadow); }
.card-icon {
  width: 44px; height: 44px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-size: 1.2rem;
  margin-bottom: 0.85rem;
}
.card-modern h3 { margin-bottom: 0.5rem; }
.card-modern p { color: var(--gray-600); }

/* ============ Grids ============ */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }

/* ============ Steps ============ */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.step-card {
  background: var(--white);
  padding: 1.5rem 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  border-top: 3px solid var(--gold);
  text-align: left;
  position: relative;
  transition: var(--transition);
}
.step-card:hover { box-shadow: var(--shadow-sm); }
.step-number {
  display: block;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}
.step-icon {
  font-size: 1.6rem;
  color: var(--primary-light);
  margin: 0.25rem 0 0.75rem;
  display: inline-block;
}
.step-card h4 { margin-bottom: 0.5rem; }
.step-card p { color: var(--gray-600); font-size: 0.95rem; }

/* ============ Tables ============ */
.table-wrapper { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--gray-200); box-shadow: var(--shadow-sm); background: var(--white); }
.table-modern { width: 100%; border-collapse: collapse; min-width: 600px; }
.table-modern th, .table-modern td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--gray-200); }
.table-modern thead { background: var(--primary); color: var(--white); border-bottom: 2px solid var(--gold); }
.table-modern thead th { font-weight: 600; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.5px; }
.table-modern tbody tr { transition: var(--transition); }
.table-modern tbody tr:hover { background: var(--gray-50); }

/* ============ Badges ============ */
.badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-success { background: rgba(16,185,129,0.15); color: #047857; }
.badge-warning { background: rgba(245,158,11,0.15); color: #b45309; }
.badge-danger { background: rgba(239,68,68,0.15); color: #b91c1c; }
.badge-info { background: rgba(59,130,246,0.15); color: #1d4ed8; }
.badge-secondary { background: rgba(107,114,128,0.15); color: #4b5563; }
.badge-lg { padding: 0.4rem 0.8rem; font-size: 0.85rem; }

/* ============ Forms ============ */
.form-modern { background: var(--white); padding: 1.5rem; border-radius: var(--radius-lg); border: 1px solid var(--gray-200); box-shadow: var(--shadow-sm); }
.form-group { margin-bottom: 1.1rem; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.5rem; color: var(--gray-700); font-size: 0.95rem; }
.req { color: var(--danger); }
.form-control {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
  background: var(--white);
  color: var(--gray-800);
}
.form-control:focus { outline: none; border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }
.form-control:invalid:not(:placeholder-shown) { border-color: var(--danger); }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-hint { display: block; color: var(--gray-500); font-size: 0.85rem; margin-top: 0.35rem; }
.form-actions { display: flex; gap: 1rem; justify-content: flex-end; margin-top: 1.5rem; flex-wrap: wrap; }

/* Stepper */
.stepper { display: flex; justify-content: space-between; margin-bottom: 2rem; position: relative; }
.stepper::before {
  content: ''; position: absolute;
  top: 18px; left: 5%; right: 5%;
  height: 2px; background: var(--gray-200);
  z-index: 0;
}
.step {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  font-size: 0.85rem; color: var(--gray-500);
  font-weight: 600;
}
.step span {
  width: 36px; height: 36px;
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 0.4rem;
  transition: var(--transition);
}
.step.active span { background: var(--primary); border-color: var(--primary); color: var(--white); }
.step.active { color: var(--primary); }

.form-step { display: none; border: none; padding: 0; }
.form-step.active { display: block; animation: fadeIn 0.4s ease; }
.form-step legend { font-size: 1.25rem; font-weight: 700; margin-bottom: 1.25rem; color: var(--primary); padding: 0; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* File Upload */
.file-upload { position: relative; }
.file-upload input[type=file] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 2;
}
.file-preview {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  color: var(--gray-500);
  transition: var(--transition);
  background: var(--gray-50);
}
.file-preview i { display: block; font-size: 2rem; margin-bottom: 0.5rem; color: var(--primary); }
.file-upload:hover .file-preview { border-color: var(--primary); background: rgba(37,99,235,0.05); }

/* Alerts */
.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  display: flex; align-items: flex-start; gap: 0.75rem;
  border-left: 4px solid;
  /* Never let alert content push the box wider than its container
     (long words / long <code> IDs on small screens). */
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}
.alert i { font-size: 1.25rem; flex-shrink: 0; }
.alert.alert-block { align-items: flex-start; gap: 0.75rem; }
.alert.alert-block .alert-icon { line-height: 1.4; }
.alert.alert-block .alert-body {
  flex: 1 1 auto;
  line-height: 1.5;
  min-width: 0;              /* allow the text column to shrink inside flex */
  overflow-wrap: break-word; /* wrap long words instead of overflowing */
  word-break: break-word;
}
.alert.alert-block .alert-body p { margin: 0 0 .5rem; }
.alert.alert-block .alert-body p:last-child { margin-bottom: 0; }
.alert.alert-block .alert-body strong { font-weight: 700; }
.alert.alert-block .alert-body code {
  background: rgba(0,0,0,.06);
  padding: .1rem .35rem;
  border-radius: 4px;
  font-size: .92em;
}
.alert-info { background: rgba(59,130,246,0.1); color: #1e40af; border-color: var(--info); }
.alert-success { background: rgba(16,185,129,0.1); color: #065f46; border-color: var(--success); }
.alert-warning { background: rgba(245,158,11,0.1); color: #92400e; border-color: var(--warning); }
.alert-danger { background: rgba(239,68,68,0.1); color: #991b1b; border-color: var(--danger); }
/* Dismissible alerts (manual close via × button) */
.alert-dismissible { position: relative; padding-right: 2.75rem; }
.alert-close {
  position: absolute;
  top: 0.5rem;
  right: 0.65rem;
  border: none;
  background: transparent;
  color: inherit;
  font-size: 1.4rem;
  line-height: 1;
  padding: 0.15rem 0.35rem;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.15s ease;
}
.alert-close:hover,
.alert-close:focus { opacity: 1; }

/* ============ Inline fixed info (non-dismissible, no close button) ============ */
.inline-info {
  margin-top: 1rem;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius);
  border-left: 4px solid var(--gray-300);
  background: var(--gray-50);
  font-size: 0.95rem;
  line-height: 1.5;
}
.inline-info i { margin-right: 0.35rem; }
.inline-info .inline-info-title { margin: 0; }
.inline-info .inline-info-meta {
  display: flex; flex-wrap: wrap; gap: 0.35rem 1.5rem;
  margin: 0.5rem 0;
}
.inline-info .inline-info-meta label { color: var(--gray-500); font-weight: 500; margin-right: 0.3rem; }
.inline-info .inline-info-note { margin: 0; color: var(--gray-600); }
.inline-info.inline-info-success { border-left-color: var(--success); background: rgba(16,185,129,0.07); }
.inline-info.inline-info-success i { color: var(--success); }
.inline-info.inline-info-info { border-left-color: var(--info); background: rgba(59,130,246,0.07); }
.inline-info.inline-info-info i { color: var(--info); }
.inline-info.inline-info-warning { border-left-color: var(--warning); background: rgba(245,158,11,0.09); }
.inline-info.inline-info-warning i { color: var(--warning); }
.inline-info.inline-info-danger { border-left-color: var(--danger); background: rgba(239,68,68,0.07); }
.inline-info.inline-info-danger i { color: var(--danger); }

/* ============ CTA ============ */
.cta-section { padding: 3rem 0; }
.cta-card {
  background: var(--primary);
  color: var(--white);
  padding: 2.25rem 1.75rem;
  border-radius: var(--radius-lg);
  border-top: 3px solid var(--gold);
  text-align: center;
  box-shadow: var(--shadow);
}
.cta-card h2 { color: var(--white); margin-bottom: 0.75rem; position: relative; }
.cta-card p { opacity: 0.95; margin-bottom: 1.5rem; position: relative; }
.cta-card .btn-primary { background: var(--gold-light); color: var(--primary-dark); }
.cta-card .btn-primary:hover { background: #e3c565; color: var(--primary-dark); }

/* ============ Footer ============ */
.footer {
  background: var(--primary-dark);
  color: var(--gray-300);
  padding: 2.5rem 0 1.25rem;
  margin-top: 3rem;
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer h4 { color: var(--gold-soft); margin-bottom: 1rem; font-size: 1.05rem; letter-spacing: 0.04em; }
.footer h4::after { content: ''; display: block; width: 28px; height: 1px; background: var(--gold); margin-top: 0.5rem; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 0.5rem; }
.footer a { color: var(--gray-300); font-size: 0.9rem; }
.footer a:hover { color: var(--gold-soft); }
.footer-brand { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; color: var(--white); font-weight: 700; }
.footer-brand .brand-logo { width: 40px; height: 40px; font-size: 1.2rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.25rem;
  text-align: center;
  font-size: 0.85rem;
}
.social-links { display: flex; gap: 0.75rem; margin-top: 1rem; }
.social-links a {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.social-links a:hover { background: var(--gold); color: var(--white); }

/* ============ Notice Cards ============ */
.notice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem; }
.notice-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  overflow: hidden;
  transition: var(--transition);
}
.notice-card:hover { box-shadow: var(--shadow); }
.notice-date {
  background: var(--primary);
  color: var(--white);
  padding: 1rem;
  text-align: center;
  min-width: 90px;
  display: flex; flex-direction: column; justify-content: center;
}
.notice-date .day { font-size: 1.75rem; font-weight: 800; line-height: 1; }
.notice-date .month { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; }
.notice-body { padding: 1rem 1.25rem; flex: 1; }
.notice-body h3 { font-size: 1.1rem; margin: 0.5rem 0; }
.notice-body p { color: var(--gray-600); font-size: 0.9rem; margin-bottom: 1rem; }
.notice-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ============ FAQ ============ */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
  background: var(--white);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  overflow: hidden;
  transition: var(--transition);
}
.faq-item:hover { box-shadow: var(--shadow); }
.faq-item summary {
  padding: 0.85rem 1rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--gray-800);
  display: flex; align-items: center; gap: 0.75rem;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary i { color: var(--primary); font-size: 1.2rem; }
.faq-item[open] summary { background: var(--gray-50); color: var(--primary); }
.faq-body { padding: 0 1rem 1rem 2.75rem; color: var(--gray-600); }

/* --- Bilingual (English + Bangla) FAQ layout --- */
.faq-q { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.faq-q .faq-q-bn { font-weight: 500; font-size: 0.9em; color: var(--gray-500); }
.faq-item[open] .faq-q .faq-q-bn { color: var(--primary); opacity: 0.8; }
.faq-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.25rem;
}
.faq-col {
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem;
}
.faq-col p { margin: 0; }
.faq-col p + p { margin-top: 0.5rem; }
.faq-lang-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.4rem;
}
.faq-col-bn { font-size: 1.02rem; line-height: 1.95; }
@media (max-width: 640px) {
  .faq-duo { grid-template-columns: 1fr; }
}

/* ============ Admit Card ============ */
.admit-card {
  background: var(--white);
  border: 1px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
  box-shadow: var(--shadow-sm);
}
.admit-header { display: flex; align-items: center; gap: 1rem; padding-bottom: 1rem; border-bottom: 2px solid var(--primary); margin-bottom: 1.5rem; }
.admit-logo {
  width: 60px; height: 60px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-size: 1.75rem;
}
.admit-header h2 { font-size: 1.25rem; margin-bottom: 0.25rem; }
.admit-header p { color: var(--gray-600); font-size: 0.9rem; }
.admit-body { display: grid; grid-template-columns: 120px 1fr; gap: 1.5rem; align-items: start; }
.admit-photo {
  width: 120px; height: 150px;
  background: var(--gray-100);
  border: 2px solid var(--gray-300);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: var(--gray-400);
}
.admit-table { width: 100%; border-collapse: collapse; }
.admit-table th, .admit-table td { padding: 0.5rem; border-bottom: 1px solid var(--gray-200); text-align: left; }
.admit-table th { background: var(--gray-50); width: 40%; font-weight: 600; }
.admit-footer { display: flex; gap: 1rem; justify-content: center; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px dashed var(--gray-300); }

/* ============ Result Panel ============ */
.result-panel {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  max-width: 800px;
  margin: 2rem auto 0;
}
.result-header { display: flex; align-items: center; gap: 1.25rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--gray-200); margin-bottom: 1.5rem; flex-wrap: wrap; }
.result-photo {
  width: 72px; height: 72px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-size: 2rem;
}
.result-status { margin-left: auto; }
.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.result-card {
  background: var(--gray-50);
  padding: 1rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  text-align: center;
}
.result-card i { font-size: 1.75rem; color: var(--primary); margin-bottom: 0.5rem; }
.result-label { color: var(--gray-600); font-size: 0.85rem; }
.result-value { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--primary); margin-top: 0.25rem; }

/* ============ Payment ============ */
.payment-options { display: grid; gap: 0.75rem; }
.payment-btn {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.85rem 1rem;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
  color: var(--gray-800);
}
.payment-btn:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.payment-logo {
  width: 60px; height: 40px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-weight: 800; font-size: 0.9rem;
}

/* ============ Admin Layout ============ */
.admin-layout { display: flex; min-height: 100vh; background: var(--gray-50); }
.admin-sidebar {
  width: 260px;
  background: var(--primary-dark);
  color: var(--white);
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
}
.admin-brand {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0 1.5rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 1rem;
}
.admin-brand .brand-logo { width: 40px; height: 40px; font-size: 1.2rem; }
.admin-brand-text { font-weight: 700; font-size: 0.95rem; line-height: 1.2; }
.admin-brand-text small { display: block; font-size: 0.7rem; color: var(--gray-400); font-weight: 400; }

.admin-menu { list-style: none; padding: 0 0.75rem; }
.admin-menu li { margin-bottom: 0.15rem; }
.admin-menu a {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.7rem 1rem;
  color: var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 500;
  transition: var(--transition);
}
.admin-menu a:hover { background: rgba(255,255,255,0.08); color: var(--white); }
.admin-menu a.active { background: var(--primary-light); color: var(--white); }
.admin-menu i { font-size: 1.1rem; width: 20px; text-align: center; }
.admin-menu .menu-section {
  padding: 1rem 1rem 0.5rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-500);
  font-weight: 700;
}

.admin-main { flex: 1; min-width: 0; }
.admin-topbar {
  background: var(--white);
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
}
.admin-topbar h1 { font-size: 1.25rem; margin: 0; }
.admin-user { display: flex; align-items: center; gap: 0.75rem; }
.admin-user-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-weight: 700;
}
.admin-content { padding: 1.5rem; }

/* Dashboard Cards */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.dash-card {
  background: var(--white);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: 1rem;
  transition: var(--transition);
  border-left: 4px solid var(--primary);
}
.dash-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.dash-card.success { border-color: var(--success); }
.dash-card.warning { border-color: var(--warning); }
.dash-card.danger { border-color: var(--danger); }
.dash-card.info { border-color: var(--info); }
.dash-icon {
  width: 50px; height: 50px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-size: 1.4rem;
  flex-shrink: 0;
}
.dash-card.success .dash-icon { background: linear-gradient(135deg, var(--success), #34d399); }
.dash-card.warning .dash-icon { background: linear-gradient(135deg, var(--warning), #fbbf24); }
.dash-card.danger .dash-icon { background: linear-gradient(135deg, var(--danger), #f87171); }
.dash-card.info .dash-icon { background: linear-gradient(135deg, var(--info), #60a5fa); }
.dash-info { flex: 1; min-width: 0; }
.dash-label { color: var(--gray-600); font-size: 0.85rem; }
.dash-value { font-size: 1.5rem; font-weight: 800; color: var(--gray-900); }

/* Admin Panel */
.admin-panel {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.panel-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}
.panel-header h3 { margin: 0; font-size: 1.1rem; }
.panel-body { padding: 1.5rem; }
.panel-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* Filters */
.filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.filter-bar .form-group { margin: 0; }

/* Login */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-dark);
  padding: 1.5rem;
}
.login-card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 420px;
  position: relative;
}
.login-logo {
  width: 60px; height: 60px;
  background: var(--primary);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-size: 2rem;
  margin: 0 auto 1.25rem;
  box-shadow: var(--shadow-md);
}
.login-card h2 { text-align: center; margin-bottom: 0.5rem; }
.login-card .subtitle { text-align: center; color: var(--gray-600); margin-bottom: 1.75rem; }

/* ============ Responsive ============ */
@media (max-width: 968px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .admin-sidebar { width: 220px; }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-menu {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 1rem;
    box-shadow: var(--shadow-lg);
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    align-items: stretch;
  }
  .nav-menu.open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav-menu a { padding: 0.75rem 1rem; }

  .hero-slide { padding: 2.5rem 0 3rem; }
  .hero h1 { font-size: 1.85rem; }
  .hero p { font-size: 1rem; }
  .hero-actions .btn { width: 100%; }

  .section { padding: 2.25rem 0; }
  .stat-card { padding: 0.85rem 0.75rem; }
  .stat-value { font-size: 1.35rem; }

  .stepper { font-size: 0.75rem; }
  .stepper::before { display: none; }
  .step { flex: 1; }
  .step span { width: 32px; height: 32px; font-size: 0.9rem; }

  .form-modern { padding: 1.25rem; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .btn { width: 100%; }

  .admit-body { grid-template-columns: 1fr; }
  .admit-photo { margin: 0 auto; }

  .admin-layout { flex-direction: column; }
  .admin-sidebar {
    width: 100%;
    height: auto;
    position: relative;
    padding: 1rem 0;
  }
  .admin-brand { padding: 0 1rem 1rem; }
  .admin-menu { display: flex; overflow-x: auto; padding: 0 1rem; gap: 0.25rem; }
  .admin-menu .menu-section { display: none; }
  .admin-menu a { white-space: nowrap; padding: 0.5rem 0.85rem; font-size: 0.85rem; }
  .admin-menu a span { display: none; }
  .admin-menu a i { margin: 0; }

  .admin-content { padding: 1rem; }
  .admin-topbar { padding: 0.85rem 1rem; }
  .admin-topbar h1 { font-size: 1.05rem; }

  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .topbar-info { font-size: 0.75rem; gap: 0.75rem; }

  .result-header { flex-direction: column; text-align: center; }
  .result-status { margin-left: 0; }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .hero h1 { font-size: 1.6rem; }
  .section-header h2 { font-size: 1.4rem; }
  .card-modern { padding: 1.25rem; }
  .login-card { padding: 1.75rem 1.25rem; }
  .notice-card { flex-direction: column; }
  .notice-date { flex-direction: row; gap: 0.5rem; padding: 0.75rem 1rem; min-width: auto; }
  .notice-date .day { font-size: 1.25rem; }
}

/* Print */
@media print {
  .navbar, .footer, .topbar, .page-header, .admit-footer, .form-actions { display: none !important; }
  .admit-card { box-shadow: none; border: 2px solid #000; }
  body { background: white; }
}

/* Animations */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.pulse { animation: pulse 2s infinite; }

/* Legal Guardian box (apply form) */
.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}
.checkbox-inline input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-light);
  cursor: pointer;
}
.guardian-box {
  border: 1px dashed var(--primary-light);
  background: #f0f6ff;
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-top: 0.25rem;
}

/* Google Maps embed (Help & Support page) */
.map-embed {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--gray-200);
}
.map-embed iframe {
  display: block;
  width: 100%;
  height: 380px;
  border: 0;
}
@media (max-width: 768px) {
  .map-embed iframe { height: 260px; }
}
.guardian-box h4 {
  margin: 0 0 0.85rem;
  color: var(--primary);
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
