/* ============================================================
   NCLEX XAV Technology – Material Design 3 Design System
   Converted from React/Tailwind to Vanilla CSS
   ============================================================ */

/* ---------- Google Fonts & Icons ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap');

/* ---------- CSS Custom Properties (Material Design 3 Tokens) ---------- */
:root {
  /* Primary */
  --primary: #00346f;
  --primary-container: #004a99;
  --on-primary: #ffffff;
  --primary-fixed: #d7e2ff;
  --primary-fixed-dim: #abc7ff;
  --on-primary-container: #9bbdff;
  --on-primary-fixed: #001b3f;
  --on-primary-fixed-variant: #00458f;
  --inverse-primary: #abc7ff;

  /* Secondary */
  --secondary: #1f667e;
  --secondary-container: #a4e3ff;
  --on-secondary: #ffffff;
  --secondary-fixed: #bce9ff;
  --secondary-fixed-dim: #90cfeb;
  --on-secondary-container: #20667f;
  --on-secondary-fixed: #001f29;
  --on-secondary-fixed-variant: #004d63;

  /* Tertiary */
  --tertiary: #003e1d;
  --tertiary-container: #00582b;
  --on-tertiary: #ffffff;
  --tertiary-fixed: #7efba4;
  --tertiary-fixed-dim: #61de8a;
  --on-tertiary-container: #55d381;
  --on-tertiary-fixed: #00210c;
  --on-tertiary-fixed-variant: #005228;

  /* Error */
  --error: #ba1a1a;
  --error-container: #ffdad6;
  --on-error: #ffffff;
  --on-error-container: #93000a;

  /* Surface */
  --surface: #f7f9ff;
  --surface-dim: #c9dcf0;
  --surface-bright: #f7f9ff;
  --surface-container-lowest: #ffffff;
  --surface-container-low: #ecf4ff;
  --surface-container: #e2efff;
  --surface-container-high: #d7eafe;
  --surface-container-highest: #d2e5f9;
  --surface-variant: #d2e5f9;
  --surface-tint: #255dad;
  --on-surface: #0a1d2b;
  --on-surface-variant: #424751;
  --on-background: #0a1d2b;
  --background: #f7f9ff;
  --inverse-surface: #203241;
  --inverse-on-surface: #e7f2ff;

  /* Outline */
  --outline: #737783;
  --outline-variant: #c2c6d3;

  /* Misc */
  --shadow-color: rgba(10, 29, 43, 0.06);

  /* Border radius */
  --radius: 1rem;
  --radius-lg: 2rem;
  --radius-xl: 3rem;
  --radius-full: 9999px;
}

/* ---------- Base Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--on-surface);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, select, textarea { font-family: inherit; }

/* ---------- Material Symbols Config ---------- */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

/* ---------- Layout Utilities ---------- */
.max-w-7xl { max-width: 80rem; margin-left: auto; margin-right: auto; }
.max-w-screen-2xl { max-width: 1536px; margin-left: auto; margin-right: auto; }
.min-h-screen { min-height: 100vh; }

/* ---------- Typography ---------- */
.font-headline { font-family: 'Inter', sans-serif; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1.1; }
.text-7xl { font-size: 4.5rem; line-height: 1.1; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-tighter { letter-spacing: -0.05em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }

/* ---------- Glassmorphism & Effects ---------- */
.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.glass-header {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

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

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

.medical-pattern {
  background-color: #D6F3F4;
  background-image: radial-gradient(#004a99 0.5px, transparent 0.5px);
  background-size: 24px 24px;
  opacity: 0.15;
}

.tonal-layering {
  background: linear-gradient(180deg, rgba(214, 243, 244, 0.5) 0%, rgba(247, 249, 255, 1) 100%);
}

.tonal-shift { transition: background-color 0.3s ease; }

.progress-glow { box-shadow: 0 0 15px rgba(0, 74, 153, 0.2); }
.success-glow { box-shadow: 0 0 40px -10px rgba(126, 251, 164, 0.4); }

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

.preserve-3d { transform-style: preserve-3d; }

/* ---------- Lift-Up Hover Effect ---------- */
.lift-up {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}
.lift-up:hover {
  transform: translateY(-8px);
  box-shadow: 0 32px 64px -12px rgba(10, 29, 43, 0.06);
}

/* ---------- Scrollbar ---------- */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ============================================================
   COMPONENT STYLES
   ============================================================ */

/* ---------- Top Navigation Bar ---------- */
.nclex-topnav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 50;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 3px rgba(0, 74, 153, 0.05);
  transition: all 0.3s;
}

.nclex-topnav .nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
  padding: 0 1.5rem;
  max-width: 1536px;
  margin: 0 auto;
}

.nclex-topnav .nav-brand {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #1e3a5f;
}

.nclex-topnav .nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.nclex-topnav .nav-links a {
  color: #64748b;
  transition: color 0.2s;
}

.nclex-topnav .nav-links a:hover { color: #1e40af; }
.nclex-topnav .nav-links a.active {
  color: #1d4ed8;
  font-weight: 600;
  border-bottom: 2px solid #1d4ed8;
  padding-bottom: 4px;
}

.nclex-topnav .nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nclex-topnav .nav-icon-btn {
  padding: 0.5rem;
  border-radius: 0.5rem;
  color: #1e3a5f;
  transition: all 0.2s;
}

.nclex-topnav .nav-icon-btn:hover { background: rgba(59, 130, 246, 0.05); }
.nclex-topnav .nav-icon-btn:active { transform: scale(0.95); }

@media (min-width: 768px) {
  .nclex-topnav .nav-links { display: flex; }
}

/* ---------- Side Navigation Bar (Desktop) ---------- */
.nclex-sidenav {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: 16rem;
  flex-direction: column;
  padding: 1rem;
  background: #f1f5f9;
  z-index: 40;
  padding-top: 5rem;
}

.nclex-sidenav .sidenav-header { padding: 1rem; margin-bottom: 2rem; }
.nclex-sidenav .sidenav-header h4 { font-size: 1.125rem; font-weight: 900; color: #1e3a5f; }
.nclex-sidenav .sidenav-header p { font-size: 0.75rem; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.1em; }

.nclex-sidenav .sidenav-links { flex-grow: 1; display: flex; flex-direction: column; gap: 0.25rem; }

.nclex-sidenav .sidenav-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
  transition: all 0.2s;
}

.nclex-sidenav .sidenav-link:hover {
  background: rgba(148, 163, 184, 0.15);
  color: #1d4ed8;
  transform: translateX(4px);
}

.nclex-sidenav .sidenav-link.active {
  background: #dbeafe;
  color: #1e40af;
}

.nclex-sidenav .sidenav-footer {
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

@media (min-width: 1024px) {
  .nclex-sidenav { display: flex; }
}

/* ---------- Bottom Navigation Bar (Mobile) ---------- */
.nclex-bottomnav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  padding: 0.5rem 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.04);
  border-radius: 2.5rem 2.5rem 0 0;
}

.nclex-bottomnav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  color: #94a3b8;
  transition: all 0.3s ease-out;
}

.nclex-bottomnav a span.label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nclex-bottomnav a.active {
  background: #2563eb;
  color: #ffffff;
  border-radius: 1rem;
  padding: 0.5rem 1.25rem;
  margin-bottom: 4px;
}

@media (min-width: 1024px) {
  .nclex-bottomnav { display: none; }
}

/* ---------- Buttons ---------- */
.btn-primary-pill {
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-container));
  color: #fff;
  font-weight: 700;
  border-radius: var(--radius-full);
  box-shadow: 0 8px 25px rgba(0, 74, 153, 0.2);
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.btn-primary-pill:hover {
  box-shadow: 0 12px 35px rgba(0, 74, 153, 0.3);
  transform: translateY(-2px);
}

.btn-primary-pill:active { transform: scale(0.95); }

.btn-outline-pill {
  padding: 1rem 2rem;
  border: 2px solid var(--primary);
  color: var(--primary);
  font-weight: 700;
  border-radius: var(--radius-full);
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  text-align: center;
}

.btn-outline-pill:hover {
  background: rgba(0, 52, 111, 0.05);
}

.btn-ghost {
  padding: 0.75rem 1.5rem;
  color: var(--primary);
  font-weight: 700;
  border-radius: var(--radius-full);
  transition: all 0.2s;
  font-size: 0.875rem;
}

.btn-ghost:hover { background: var(--surface-container-high); }

.btn-container-pill {
  padding: 1rem 2rem;
  background: var(--primary-container);
  color: var(--on-primary);
  font-weight: 700;
  border-radius: var(--radius-full);
  box-shadow: 0 8px 25px rgba(0, 74, 153, 0.2);
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.btn-container-pill:hover { opacity: 0.9; }
.btn-container-pill:active { transform: scale(0.95); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface-container-lowest);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: 0 1px 3px var(--shadow-color);
}

.card-elevated {
  background: var(--surface-container-lowest);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: 0 32px 64px -12px var(--shadow-color);
}

.card-gradient {
  padding: 2rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), var(--primary-container));
  color: var(--on-primary);
}

/* ---------- Form Inputs ---------- */
.input-field {
  width: 100%;
  background: var(--surface-container-low);
  border: none;
  border-radius: 0.5rem;
  padding: 1rem;
  font-size: 0.875rem;
  color: var(--on-surface);
  transition: all 0.2s;
}

.input-field::placeholder { color: var(--outline); }

.input-field:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 74, 153, 0.2);
}

.input-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--secondary);
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
}

/* ---------- Progress Bars ---------- */
.progress-track {
  width: 100%;
  height: 0.375rem;
  background: var(--surface-container);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

.progress-fill-primary { background: var(--primary-container); }
.progress-fill-tertiary { background: var(--tertiary); }
.progress-fill-error { background: var(--error); }
.progress-fill-secondary { background: var(--secondary); }

/* ---------- Badge Chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.chip-primary { background: rgba(0, 52, 111, 0.1); color: var(--primary); }
.chip-tertiary { background: rgba(0, 62, 29, 0.1); color: var(--tertiary); }
.chip-error { background: var(--error-container); color: var(--error); }
.chip-secondary { background: var(--secondary-container); color: var(--on-secondary-container); }
.chip-surface { background: var(--surface-container); color: var(--secondary); }

/* ---------- Footer ---------- */
.nclex-footer {
  width: 100%;
  padding: 3rem 2rem;
  background: #0f172a;
  border-top: 1px solid #1e293b;
  color: #94a3b8;
}

.nclex-footer .footer-inner {
  max-width: 1536px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  text-align: center;
}

.nclex-footer .footer-brand { color: #3b82f6; font-weight: 700; font-size: 1.25rem; }
.nclex-footer .footer-tagline { font-size: 0.75rem; letter-spacing: 0.05em; color: #64748b; }

.nclex-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.nclex-footer .footer-links a {
  font-size: 0.75rem;
  color: #64748b;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}

.nclex-footer .footer-links a:hover { color: #cbd5e1; }

.nclex-footer .footer-copy {
  font-size: 10px;
  color: #475569;
  border-top: 1px solid #1e293b;
  padding-top: 2rem;
  margin-top: 1rem;
  width: 100%;
  text-align: center;
}

/* Light footer variation */
.nclex-footer-light {
  width: 100%;
  padding: 3rem 2rem;
  background: #f8fafc;
  border-top: 1px solid rgba(226, 232, 240, 0.5);
}

.nclex-footer-light .footer-inner {
  max-width: 1536px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .nclex-footer .footer-inner,
  .nclex-footer-light .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* ============================================================
   RESPONSIVE UTILITIES
   ============================================================ */
.hide-mobile { display: none !important; }
.show-mobile { display: flex !important; }

@media (min-width: 768px) {
  .hide-mobile { display: flex !important; }
  .show-mobile-only { display: none !important; }
}

@media (min-width: 1024px) {
  .main-with-sidenav { padding-left: 16rem; }
}

/* ---------- Grid System ---------- */
.grid-1 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Animations ---------- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

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

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 15px rgba(0, 74, 153, 0.2); }
  50% { box-shadow: 0 0 30px rgba(0, 74, 153, 0.4); }
}

.animate-float { animation: float 3s ease-in-out infinite; }
.animate-fade-in-up { animation: fadeInUp 0.6s ease-out forwards; }
.animate-bounce { animation: float 2s ease-in-out infinite; }
