/* ============================================================
   QuadSec Forensics - Main Stylesheet
   css/main.css
   Color palette:
     Navy bg:     #0A0F1E
     Dark panel:  #0D1B2A
     Card bg:     #0F2035
     Border:      #1A3A5C
     Teal accent: #00D4AA  (primary CTA)
     Teal dim:    #1D9E75
     Gold:        #BA7517
     Text light:  #E8EDF5
     Text muted:  #7A8CA0
============================================================ */

/* ── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-body:    #0A0F1E;
  --bg-dark:    #0D1B2A;
  --bg-card:    #0F2035;
  --bg-card2:   #112640;
  --border:     #1A3A5C;
  --border-dim: #122030;
  --teal:       #00D4AA;
  --teal-dim:   #1D9E75;
  --teal-glow:  rgba(0,212,170,0.12);
  --gold:       #BA7517;
  --gold-light: #E09020;
  --text:       #E8EDF5;
  --text-muted: #7A8CA0;
  --text-dim:   #4A6280;
  --danger:     #E24B4A;
  --success:    #1D9E75;
  --warning:    #E09020;
  --radius:     8px;
  --radius-lg:  14px;
  --transition: 0.2s ease;
  --font-head:  'Rajdhani', sans-serif;
  --font-body:  'Inter', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg-body);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--teal); text-decoration: none; transition: color var(--transition); }
a:hover { color: #fff; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ── Typography ───────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.1rem; }

.accent     { color: var(--teal); }
.text-muted { color: var(--text-muted); }

/* ── Buttons ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: .65rem 1.4rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
}
.btn--primary {
  background: var(--teal);
  color: #0A0F1E;
  border-color: var(--teal);
}
.btn--primary:hover {
  background: #00f0c3;
  border-color: #00f0c3;
  color: #0A0F1E;
  box-shadow: 0 0 20px rgba(0,212,170,.35);
}
.btn--outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn--outline:hover {
  border-color: var(--teal);
  color: var(--teal);
}
.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}
.btn--ghost:hover { color: var(--text); }
.btn--sm    { padding: .45rem .9rem; font-size: .85rem; }
.btn--lg    { padding: .85rem 2rem; font-size: 1.05rem; }
.btn--full  { width: 100%; justify-content: center; }
.btn--danger { background: var(--danger); color: #fff; border-color: var(--danger); }

/* ── Flash Messages ───────────────────────────────────── */
.flash {
  position: fixed; top: 80px; right: 20px; z-index: 9999;
  display: flex; align-items: center; gap: 10px;
  padding: .75rem 1.1rem;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 500;
  border: 1px solid;
  max-width: 400px;
  animation: slideIn .3s ease;
}
.flash--success { background: rgba(29,158,117,.15); border-color: var(--success); color: #5DCAA5; }
.flash--error   { background: rgba(226,75,74,.15);  border-color: var(--danger);  color: #F09595; }
.flash--info    { background: rgba(0,212,170,.1);   border-color: var(--teal);    color: var(--teal); }
.flash__close   { background: none; border: none; color: inherit; cursor: pointer; font-size: 1rem; padding: 0 4px; }
@keyframes slideIn { from { opacity:0; transform:translateX(30px) } to { opacity:1; transform:translateX(0) } }

/* ── Navbar ───────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(10,15,30,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-dim);
  transition: box-shadow var(--transition);
}
.navbar--scrolled {
  box-shadow: 0 4px 24px rgba(0,0,0,.4);
}
.navbar__inner {
  max-width: 1280px; margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex; align-items: center; gap: 2rem;
}
.navbar__brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: .06em;
  display: flex; align-items: center; gap: 4px;
  text-decoration: none;
  white-space: nowrap;
}
.brand-quad      { color: #E8EDF5; }
.brand-forensics { color: var(--teal); }

/* Nav links list */
.navbar__links {
  display: flex; align-items: center; gap: .2rem;
  margin-left: auto;
  list-style: none;
}
.navbar__links li a {
  color: var(--text-muted);
  font-size: .9rem;
  font-weight: 500;
  padding: .4rem .75rem;
  border-radius: 6px;
  transition: all var(--transition);
  white-space: nowrap;
}
.navbar__links li a:hover,
.navbar__links li a.active { color: var(--text); background: rgba(255,255,255,.05); }
.navbar__links li a.active  { color: var(--teal); }

.navbar__actions {
  display: flex; align-items: center; gap: .5rem;
  flex-shrink: 0;
}

/* Hamburger */
.navbar__burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.navbar__burger span {
  display: block; width: 22px; height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: all var(--transition);
}
.navbar__burger.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.navbar__burger.active span:nth-child(2) { opacity: 0; }
.navbar__burger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ── Hero Section ─────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 64px;
}
.hero__bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 60% 40%, rgba(0,212,170,.06) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 10% 80%, rgba(29,158,117,.04) 0%, transparent 50%),
    #0A0F1E;
}
.hero__grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,212,170,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,170,.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 80%);
}
.hero__content {
  position: relative; z-index: 1;
  max-width: 1280px; margin: 0 auto;
  padding: 5rem 2rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}
.hero__badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(0,212,170,.08);
  border: 1px solid rgba(0,212,170,.25);
  border-radius: 40px;
  padding: .35rem .9rem;
  font-size: .8rem; font-weight: 600; letter-spacing: .08em;
  color: var(--teal);
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}
.hero__badge::before {
  content:''; width:6px; height:6px; border-radius:50%; background:var(--teal);
}
.hero__title             { margin-bottom: 1.2rem; }
.hero__title span        { color: var(--teal); }
.hero__desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 2rem;
  max-width: 500px;
}
.hero__cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero__stats {
  display: flex; gap: 2rem; margin-top: 3rem;
  border-top: 1px solid var(--border-dim); padding-top: 2rem;
}
.stat__num   { font-family: var(--font-head); font-size: 2rem; font-weight: 700; color: var(--teal); }
.stat__label { font-size: .8rem; color: var(--text-muted); }

/* ── Sections ─────────────────────────────────────────── */
section     { padding: 5rem 0; }
.container  { max-width: 1280px; margin: 0 auto; padding: 0 2rem; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-badge {
  display: inline-block;
  font-size: .75rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--teal);
  margin-bottom: .6rem;
}
.section-header p { color: var(--text-muted); max-width: 560px; margin: .8rem auto 0; }

/* ── Service icon badge ───────────────────────────────── */
.svc-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 10px;
  background: rgba(0,212,170,.12);
  color: var(--teal);
  flex-shrink: 0;
}
.svc-icon svg { display: block; }

/* ── Training track bullet list ───────────────────────── */
.track-list { list-style: none; padding: 0; margin: 0; }
.track-list li {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .35rem 0;
  font-size: .9rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-dim);
}
.track-list li:last-child { border-bottom: none; }
.track-list li::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--teal);
  flex-shrink: 0;
  display: inline-block;
}

/* ── 2-card centered row (Services bottom row) ────────── */
/* Explicit fixed columns — avoids auto-fit collapse */
.svc-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 860px;
  margin: 0 auto;
}

/* ── Training topic tags ──────────────────────────────── */
.topic-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .2rem;
}
.topic-tag {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  padding: .3rem .75rem;
  border-radius: 20px;
  border: 1px solid;
  letter-spacing: .02em;
  line-height: 1.4;
}
.topic-tag--teal {
  background: rgba(0,212,170,.1);
  border-color: rgba(0,212,170,.35);
  color: var(--teal);
}
.topic-tag--blue {
  background: rgba(56,139,253,.1);
  border-color: rgba(56,139,253,.3);
  color: #6ab0ff;
}
.topic-tag--red {
  background: rgba(226,75,74,.1);
  border-color: rgba(226,75,74,.3);
  color: #f09595;
}
.topic-tag--gold {
  background: rgba(186,117,23,.12);
  border-color: rgba(186,117,23,.4);
  color: var(--gold-light);
}

/* ── Cards ────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--teal);
  box-shadow: 0 8px 40px rgba(0,212,170,.1);
}
.card__thumb {
  aspect-ratio: 16/9;
  background: var(--bg-dark);
  position: relative; overflow: hidden;
}
.card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.card__body     { padding: 1.25rem; }
.card__category {
  font-size: .75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .08em; color: var(--teal); margin-bottom: .5rem;
}
.card__title  { font-size: 1.05rem; margin-bottom: .5rem; }
.card__meta   {
  display: flex; gap: 1rem; flex-wrap: wrap;
  font-size: .8rem; color: var(--text-muted); margin-top: .75rem;
}
.card__price  {
  font-family: var(--font-head);
  font-size: 1.3rem; font-weight: 700; color: var(--teal);
  margin-top: 1rem;
}
.badge-level  { font-size: .72rem; padding: .2rem .6rem; border-radius: 4px; font-weight: 600; }
.badge-level.beginner     { background: rgba(29,158,117,.15); color: #5DCAA5; }
.badge-level.intermediate { background: rgba(186,117,23,.15);  color: #E09020; }
.badge-level.advanced     { background: rgba(226,75,74,.15);   color: #F09595; }

/* ── Grid layouts ─────────────────────────────────────── */
.grid      { display: grid; gap: 1.5rem; }
.grid--2   { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3   { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--4   { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ── Forms ────────────────────────────────────────────── */
.form-group   { margin-bottom: 1.1rem; }
.form-label   { display: block; font-size: .85rem; font-weight: 500; margin-bottom: .4rem; color: var(--text-muted); }
.form-control {
  width: 100%;
  background: var(--bg-dark);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: .95rem;
  padding: .65rem .9rem;
  outline: none;
  transition: border-color var(--transition);
}
.form-control:focus          { border-color: var(--teal); }
.form-control::placeholder   { color: var(--text-dim); }
select.form-control          { cursor: pointer; }
.form-error { font-size: .8rem; color: var(--danger);     margin-top: .3rem; }
.form-hint  { font-size: .8rem; color: var(--text-muted); margin-top: .3rem; }

/* ── Auth card ────────────────────────────────────────── */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 5rem 1rem; background: var(--bg-body);
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  width: 100%; max-width: 440px;
}
.auth-card__logo  { text-align: center; margin-bottom: 1.5rem; }
.auth-card__title { font-size: 1.6rem; margin-bottom: .35rem; text-align: center; }
.auth-card__sub   { font-size: .9rem; color: var(--text-muted); text-align: center; margin-bottom: 2rem; }
.auth-divider {
  display: flex; align-items: center; gap: 1rem;
  font-size: .8rem; color: var(--text-dim); margin: 1.2rem 0;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.auth-card__footer { text-align: center; font-size: .9rem; color: var(--text-muted); margin-top: 1.5rem; }

/* ── Footer ───────────────────────────────────────────── */
.footer {
  background: var(--bg-dark);
  border-top: 1px solid var(--border-dim);
  padding: 4rem 0 0;
}
.footer__inner {
  max-width: 1280px; margin: 0 auto; padding: 0 2rem;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem;
}
.footer__tagline { color: var(--text-muted); font-size: .9rem; margin: .6rem 0 1rem; }
.footer__socials { display: flex; gap: .5rem; }
.social-icon {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); font-size: .8rem; color: var(--text-muted);
  transition: all var(--transition);
}
.social-icon:hover { border-color: var(--teal); color: var(--teal); }
.footer__col h4 {
  font-size: .85rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .08em; color: var(--text-muted); margin-bottom: 1rem;
}
.footer__col ul { display: flex; flex-direction: column; gap: .5rem; }
.footer__col a  { color: var(--text-muted); font-size: .9rem; }
.footer__col a:hover { color: var(--teal); }
.footer__bottom {
  max-width: 1280px; margin: 3rem auto 0;
  border-top: 1px solid var(--border-dim);
  padding: 1.2rem 2rem;
  font-size: .82rem; color: var(--text-dim);
  display: flex; justify-content: center;
}
.footer__bottom a        { color: var(--text-dim); }
.footer__bottom a:hover  { color: var(--teal); }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 1024px) {
  .navbar__links li a { padding: .4rem .55rem; font-size: .85rem; }
}

@media (max-width: 900px) {
  .hero__content { grid-template-columns: 1fr; gap: 2rem; }
  .hero__visual  { display: none; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  /* Hide desktop nav links; show burger */
  .navbar__links { display: none; }
  .navbar__burger { display: flex; }

  /* Mobile nav drawer */
  .navbar__links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem 1.5rem;
    gap: .15rem;
    z-index: 999;
  }
  .navbar__links.open li a {
    display: block;
    padding: .65rem .5rem;
    border-radius: 6px;
    color: var(--text-muted);
    font-size: .95rem;
  }
  .navbar__links.open li a:hover {
    color: var(--teal);
    background: rgba(0,212,170,.07);
  }

  /* Hide Login on mobile to save space */
  .navbar__actions .btn--outline { display: none; }

  .svc-row-2 { grid-template-columns: 1fr; max-width: 100%; }

@media (max-width: 640px) {
  .footer__inner { grid-template-columns: 1fr; }
  .hero__cta     { flex-direction: column; }
  .hero__stats   { gap: 1.2rem; flex-wrap: wrap; }
  /* Collapse the 2-col services bottom row */
  [style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; max-width: 100% !important; }
}