/* FSec custom styles — FED v5 + Edutech-inspired theme */

/* ===== Color tokens ===== */
:root {
  --fed-navy: #0f172a;
  --fed-indigo: #4338ca;
  --fed-blue: #1e40af;
  --fed-accent: #f59e0b;
  --fed-sand: #fef3c7;
  --fed-slate: #1e293b;
  --edutech-navy: #0f172a;
  --edutech-indigo: #4338ca;
  --edutech-blue: #1e40af;
  --edutech-accent: #f59e0b;
  --edutech-sand: #fef3c7;
  --edutech-slate: #1e293b;
}

.text-fed-navy { color: var(--fed-navy) !important; }
.bg-fed-navy { background-color: var(--fed-navy) !important; }
.text-fed-indigo { color: var(--fed-indigo) !important; }
.bg-fed-indigo { background-color: var(--fed-indigo) !important; }
.text-fed-blue { color: var(--fed-blue) !important; }
.bg-fed-blue { background-color: var(--fed-blue) !important; }
.text-fed-accent { color: var(--fed-accent) !important; }
.bg-fed-accent { background-color: var(--fed-accent) !important; }
.bg-fed-sand { background-color: var(--fed-sand) !important; }

.text-edutech-navy { color: var(--edutech-navy) !important; }
.bg-edutech-navy { background-color: var(--edutech-navy) !important; }
.text-edutech-indigo { color: var(--edutech-indigo) !important; }
.bg-edutech-indigo { background-color: var(--edutech-indigo) !important; }
.text-edutech-blue { color: var(--edutech-blue) !important; }
.bg-edutech-blue { background-color: var(--edutech-blue) !important; }
.text-edutech-accent { color: var(--edutech-accent) !important; }
.bg-edutech-accent { background-color: var(--edutech-accent) !important; }
.bg-edutech-sand { background-color: var(--edutech-sand) !important; }

/* ===== Fonts ===== */
h1, h2, h3, h4, h5, h6,
.font-poppins { font-family: 'Poppins', sans-serif; }
.font-mono,
.font-mono * { font-family: 'JetBrains Mono', monospace; }

/* ===== Hero / ambient ===== */
.hero-pattern {
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.12) 1px, transparent 0);
  background-size: 32px 32px;
}

.glass {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.text-gradient {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Motion ===== */
.card-hover { transition: all 0.35s cubic-bezier(0.4,0,0.2,1); }
.card-hover:hover { transform: translateY(-6px); box-shadow: 0 25px 50px -12px rgba(0,0,0,0.12); }

.animate-fade-in { animation: fadeIn 0.7s ease-out both; }
.animate-float { animation: float 6s ease-in-out infinite; }

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

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ===== Icon pulse (replaces anime.js on mobile) ===== */
.anime-pulse {
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* ===== Tables ===== */
.table-fsec { width:100%; border-collapse: separate; border-spacing: 0; }
.table-fsec th {
  background: var(--fed-navy);
  color: #fff;
  padding: 0.85rem 0.75rem;
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.table-fsec td {
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.85rem;
}
.table-fsec tr:last-child td { border-bottom: none; }
.table-fsec tr:hover td { background: #f8fafc; }

/* ===== Forms ===== */
.fsec-input {
  border: 2px solid #e2e8f0;
  border-radius: 0.85rem;
  padding: 0.75rem 1rem;
  font-weight: 500;
  transition: 0.2s;
  background: #fff;
  font-size: 16px;
  line-height: 1.5;
}
.fsec-input:focus {
  border-color: var(--fed-accent);
  outline: none;
  box-shadow: 0 0 0 4px rgba(245,158,11,0.12);
}

.btn-prime {
  background: var(--fed-navy);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: 0;
  padding: 1rem 1.75rem;
  border-radius: 9999px;
  border: none;
  transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}
.btn-prime:hover {
  background: var(--fed-slate);
  transform: translateY(-2px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
}

.btn-prime.btn-ghost {
  background: transparent;
  color: #475569;
  border: 2px solid #e2e8f0;
  box-shadow: none;
}
.btn-prime.btn-ghost:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: none;
}

.btn-prime.btn-amber {
  background: #fbbf24;
  color: #0f172a;
}
.btn-prime.btn-amber:hover {
  background: #f59e0b;
}

.btn-prime.btn-white {
  background: #fff;
  color: #0f172a;
}
.btn-prime.btn-white:hover {
  background: #f8fafc;
}

/* Color overrides for .btn-prime + Tailwind utility color combos used in pages */
.btn-prime.bg-rose-600 { background: #e11d48; }
.btn-prime.bg-rose-600:hover { background: #be123c; }
.btn-prime.bg-rose-700 { background: #be123c; }
.btn-prime.bg-rose-700:hover { background: #9f1239; }
.btn-prime.bg-amber-400 { background: #fbbf24; color: #0f172a; }
.btn-prime.bg-amber-400:hover { background: #f59e0b; }
.btn-prime.bg-amber-300 { background: #f59e0b; color: #0f172a; }
.btn-prime.bg-amber-300:hover { background: #d97706; }
.btn-prime.bg-amber-500 { background: #f59e0b; color: #0f172a; }
.btn-prime.bg-amber-500:hover { background: #fbbf24; }
.btn-prime.bg-amber-600 { background: #d97706; color: #0f172a; }
.btn-prime.bg-amber-600:hover { background: #b45309; }
.btn-prime.bg-emerald-500 { background: #10b981; }
.btn-prime.bg-emerald-500:hover { background: #059669; }
.btn-prime.bg-emerald-400 { background: #34d399; }
.btn-prime.bg-emerald-400:hover { background: #10b981; }
.btn-prime.bg-slate-100 { background: #f1f5f9; color: #0f172a; }
.btn-prime.bg-slate-100:hover { background: #e2e8f0; }

/* ===== Utility ===== */
.expiry-warning {
  background: #fff1f2;
  color: #be123c;
  padding: 0.4rem 0.75rem;
  border-radius: 0.5rem;
  font-weight: 700;
  font-size: 0.75rem;
  border: 1.5px solid #f43f5e;
  display: inline-block;
}

.section-label {
  display: block;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 0.5rem;
  letter-spacing: 0.08em;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Scroll / accessibility ===== */
html { scroll-behavior: smooth; }

/* ===== SimpleBar customisation ===== */
.simplebar-scrollbar::before { background: var(--fed-indigo); border-radius: 10px; opacity: .5; }
.simplebar-track.simplebar-vertical,
.simplebar-track.simplebar-horizontal { background: rgba(15,23,42,.08); }
.simplebar-track.simplebar-vertical { width: 8px; }
.simplebar-track.simplebar-horizontal { height: 8px; }

/* ===== Mobile menu spacing inside SimpleBar ===== */
#mobileMenu .simplebar-content { padding: 1.25rem 0 1.5rem; }
#mobileMenu .simplebar-content > * + * { margin-top: 0.75rem; }

/* ===== Hide scrollbars for snap carousels ===== */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== DataTables overrides ===== */
.dataTables_wrapper .dataTables_filter input {
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.5rem 0.75rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  outline: none;
  transition: 0.2s;
}
.dataTables_wrapper .dataTables_filter input:focus {
  border-color: var(--fed-accent);
  box-shadow: 0 0 0 4px rgba(245,158,11,0.12);
}
.dataTables_wrapper .dataTables_length select {
  border: 2px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.4rem 0.6rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: 9999px !important;
  padding: 0.35rem 0.75rem !important;
  margin: 0 0.15rem !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: var(--fed-navy) !important;
  color: #fff !important;
  border: none !important;
}

/* ===== Responsive images ===== */
img, svg, video {
  max-width: 100%;
  height: auto;
}

/* ===== DataTables mobile fixes ===== */
.dataTables_wrapper .dataTables_filter {
  float: none;
  width: 100%;
  margin-bottom: 0.75rem;
}
.dataTables_wrapper .dataTables_filter input {
  width: 100%;
  max-width: 100%;
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.5rem 0.75rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  outline: none;
  transition: 0.2s;
}
.dataTables_wrapper .dataTables_filter input:focus {
  border-color: var(--fed-accent);
  box-shadow: 0 0 0 4px rgba(245,158,11,0.12);
}
.dataTables_wrapper .dataTables_length select {
  border: 2px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.4rem 0.6rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: 9999px !important;
  padding: 0.35rem 0.75rem !important;
  margin: 0 0.15rem !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: var(--fed-navy) !important;
  color: #fff !important;
  border: none !important;
}

@media (min-width: 640px) {
  .dataTables_wrapper .dataTables_filter {
    width: auto;
    float: right;
    text-align: right;
    margin-bottom: 0;
  }
  .dataTables_wrapper .dataTables_filter input {
    width: auto;
    max-width: 16rem;
  }
}

@media print {
  nav, footer, .no-print { display: none !important; }
}

/* ===== Responsive layout overrides ===== */
html, body { overflow-x: hidden; }
body { min-width: 320px; }

img, svg, video, picture, embed, iframe, object {
  max-width: 100%;
  height: auto;
}

/* Use more screen real-estate on large laptops and desktops
   while keeping comfortable line lengths in the text column. */
body .max-w-7xl {
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 640px) {
  body .max-w-7xl { max-width: 100%; }
}
@media (min-width: 1024px) {
  body .max-w-7xl { max-width: 1200px; }
}
@media (min-width: 1280px) {
  body .max-w-7xl { max-width: 1400px; }
}
@media (min-width: 1536px) {
  body .max-w-7xl { max-width: 1600px; }
}

/* Prevent iOS zoom on form focus */
input, textarea, select, button { font-size: 16px; }
@media (min-width: 768px) {
  input, textarea, select, button { font-size: inherit; }
}

/* DataTables wrapper is always scrollable on very small screens */
.dataTables_wrapper { width: 100%; overflow-x: auto; }

/* Helper: force a full-width section with the same side padding as .max-w-7xl */
.fsec-container {
  width: 100%;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 640px) {
  .fsec-container { padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media (min-width: 1024px) {
  .fsec-container { padding-left: 2rem; padding-right: 2rem; }
}
@media (min-width: 1280px) {
  .fsec-container { padding-left: 2.5rem; padding-right: 2.5rem; }
}
