/* ============================================================
   MS Endpoint Academy — Shared Design System
   Mirrors msendpoint.com/assets/css/style.css
   Single source of truth for tokens, components, layout.
   ============================================================ */

/* ── CSS TOKENS ──────────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg-base:     #020617;   /* page background  (slate-950) */
  --bg-surface:  #0f172a;   /* card background  (slate-900) */
  --bg-elevated: #1e293b;   /* hover / elevated (slate-800) */

  /* Text */
  --text-primary:   #f8fafc;
  --text-secondary: #e2e8f0;
  --text-muted:     #94a3b8;

  /* Accents */
  --accent-primary:   #22d3ee;  /* cyan-400  — CTA, links, progress */
  --accent-secondary: #3b82f6;  /* blue-500  — gradients            */
  --accent-security:  #34d399;  /* emerald-400 — success, security   */
  --accent-purple:    #a78bfa;  /* violet-400  — PowerShell, badges  */
  --accent-indigo:    #818cf8;  /* indigo-400  — Teams, special      */

  /* Borders & Glows */
  --border:        rgba(148,163,184,0.10);
  --border-accent: rgba(34,211,238,0.30);
  --glow-cyan:     rgba(34,211,238,0.15);
}

/* ── RESET ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

/* ── BASE ────────────────────────────────────────────────── */
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg-base);
  color: var(--text-secondary);
  line-height: 1.7;
  overflow-x: hidden;
}

/* Ambient background blobs — fixed, pointer-events none */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 15%, rgba(59,130,246,0.07) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(34,211,238,0.07) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(167,139,250,0.03) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ── TYPOGRAPHY HELPERS ──────────────────────────────────── */
.font-display { font-family: 'Outfit', sans-serif; }

.gradient-text {
  background: linear-gradient(135deg, #22d3ee 0%, #3b82f6 50%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Premium cyan→blue gradient (used in index hero) */
.premium-text-gradient {
  background: linear-gradient(135deg, #22d3ee 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.section-title::before {
  content: '';
  width: 3px;
  height: 1.2em;
  background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 2px;
  flex-shrink: 0;
}

/* ── GLASS CARD ──────────────────────────────────────────── */
.glass-card {
  background: rgba(15,23,42,0.5);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  padding: 1.5rem;
  transition: all 0.35s ease;
}
.glass-card:hover {
  background: rgba(15,23,42,0.85);
  border-color: var(--border-accent);
  transform: translateY(-4px);
  box-shadow: 0 20px 50px -20px var(--glow-cyan);
}

/* ── HERO BADGE ──────────────────────────────────────────── */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(34,211,238,0.1);
  border: 1px solid rgba(34,211,238,0.25);
  border-radius: 100px;
  padding: 0.35rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: 1.5rem;
  letter-spacing: 0.5px;
}
.hero-badge .dot {
  width: 6px; height: 6px;
  background: var(--accent-primary);
  border-radius: 50%;
  animation: badge-pulse 2s infinite;
}
@keyframes badge-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: linear-gradient(135deg, #22d3ee, #3b82f6);
  color: #020617;
  font-weight: 700; font-size: 0.9rem;
  padding: 0.75rem 1.75rem;
  border-radius: 12px; border: none;
  cursor: pointer; transition: all 0.25s;
  text-decoration: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(34,211,238,0.3);
}

.btn-outline {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600; font-size: 0.9rem;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  cursor: pointer; transition: all 0.25s;
  text-decoration: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.btn-outline:hover {
  border-color: var(--border-accent);
  color: var(--text-primary);
}

/* ── MISC COMPONENTS ─────────────────────────────────────── */
.bouncer {
  width: 80px; aspect-ratio: 1;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(15,23,42,0.4);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(12px);
  transition: all 0.4s ease;
}
.bouncer:hover {
  border-color: rgba(34,211,238,0.5);
  background: rgba(34,211,238,0.1);
  transform: scale(1.05) rotate(5deg);
}

/* ── HUD & Premium Aesthetics ─────────────────────────────────────────── */

.hud-scanline {
    position: relative;
    overflow: hidden;
}

.hud-scanline::after {
    content: "";
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(34, 211, 238, 0.05) 50%,
        transparent 100%
    );
    animation: scanline 8s linear infinite;
    pointer-events: none;
    z-index: 10;
}

@keyframes scanline {
    0% { top: -100%; }
    100% { top: 100%; }
}

.glass-card-hud {
    background: rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 
        inset 0 0 20px rgba(0, 0, 0, 0.2),
        0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
}

.glass-card-hud::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 40%, transparent 60%, rgba(255,255,255,0.05) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.hud-glow-blue {
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
    border-color: rgba(59, 130, 246, 0.5) !important;
}

.hud-glow-cyan {
    box-shadow: 0 0 15px rgba(34, 211, 238, 0.4);
    border-color: rgba(34, 211, 238, 0.5) !important;
}

.tech-grid {
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 32px 32px;
}

.hover-slide {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-slide:hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.03);
}

.stat-badge {
  background: rgba(15,23,42,0.4);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

/* ── NAVBAR ──────────────────────────────────────────────── */
nav.academy-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 64px;
  background: rgba(2,6,23,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: box-shadow 0.3s, border-color 0.3s;
}
nav.academy-nav.scrolled {
  box-shadow: 0 4px 24px rgba(0,0,0,0.35);
  border-bottom-color: rgba(148,163,184,0.15);
}

.nav-logo {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.5px;
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 0;
  cursor: pointer;
}
.nav-logo .nav-logo-suffix {
  color: var(--text-muted);
  font-size: 0.7rem;
  margin-left: 0.3rem;
  font-weight: 500;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  align-items: center;
}
.nav-links li a,
.nav-links li button {
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: block;
  background: none;
  border: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.nav-links li a:hover,
.nav-links li button:hover,
.nav-links li a.active {
  color: var(--text-primary);
  background: rgba(34,211,238,0.08);
}

/* Blog link — gradient pill (mirrors blog's .nav-academy-btn) */
.nav-blog-btn {
  background: linear-gradient(135deg, #22d3ee, #3b82f6) !important;
  color: #020617 !important;
  font-weight: 700 !important;
  border-radius: 10px !important;
  padding: 0.4rem 1rem !important;
}
.nav-blog-btn:hover {
  background: linear-gradient(135deg, #06b6d4, #2563eb) !important;
  color: #020617 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(34,211,238,0.3);
}

/* Language switcher pills */
.nav-lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.25rem;
}
.nav-lang-btn {
  padding: 0.3rem 0.7rem;
  border-radius: 7px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  background: none;
  border: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.nav-lang-btn.active {
  background: var(--accent-primary);
  color: #020617;
  box-shadow: 0 2px 8px rgba(34,211,238,0.3);
}

/* Hamburger — hidden by default, shown ≤768px */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-hamburger span {
  width: 22px; height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all 0.3s;
  display: block;
}

/* Mobile nav dropdown */
#mobile-menu {
  position: fixed;
  top: 64px; left: 0; right: 0;
  z-index: 99;
  background: rgba(2,6,23,0.97);
  border-bottom: 1px solid var(--border);
  padding: 1rem;
  backdrop-filter: blur(20px);
}
[x-cloak] { display: none !important; }

#mobile-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
#mobile-menu ul li a,
#mobile-menu ul li button {
  display: block;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: 'Plus Jakarta Sans', sans-serif;
  cursor: pointer;
}
#mobile-menu ul li a:hover,
#mobile-menu ul li button:hover {
  color: var(--text-primary);
  background: rgba(34,211,238,0.06);
}
#mobile-menu .nav-lang-switcher {
  margin-top: 0.75rem;
  width: fit-content;
}

/* ── LAYOUT ──────────────────────────────────────────────── */
main {
  position: relative;
  z-index: 1;
  padding-top: 64px;
}
body.no-nav main { padding-top: 0; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── HERO (public pages) ─────────────────────────────────── */
.hero {
  padding: 5rem 2rem 4rem;
  text-align: center;
  position: relative;
}
.hero h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}
.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 2rem;
  line-height: 1.8;
}

/* Hero glow backdrop */
.hero-glow {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; height: 100%;
  background: radial-gradient(circle at 50% 30%, rgba(34,211,238,0.15), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── FORMS / INPUTS ──────────────────────────────────────── */
input, select, textarea {
  background: rgba(15,23,42,0.7);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--text-primary);
  outline: none;
  transition: all 0.25s;
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }
input:focus, select:focus, textarea:focus {
  border-color: var(--border-accent);
  box-shadow: 0 0 0 3px rgba(34,211,238,0.08);
}

/* ── FOOTER ──────────────────────────────────────────────── */
footer.academy-footer {
  padding: 3rem 2rem 2rem;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}
.footer-brand p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.7;
  margin-top: 0.75rem;
}
.footer-col h4 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul li a {
  color: var(--text-muted);
  font-size: 0.83rem;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-col ul li a:hover { color: var(--accent-primary); }
.footer-bottom {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer-bottom a { color: var(--text-muted); text-decoration: none; }
.footer-bottom a:hover { color: var(--accent-primary); }
.footer-bottom-links {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

/* ── ACADEMY PROGRAM CARD (public programs page) ─────────── */
.program-card {
  padding: 2rem;
  cursor: pointer;
  text-decoration: none;
  display: block;
  position: relative;
  overflow: hidden;
}
.program-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(34,211,238,0.03), transparent);
  opacity: 0;
  transition: opacity 0.35s;
}
.program-card:hover::after { opacity: 1; }

/* ── SKELETON LOADER ─────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-surface) 25%, var(--bg-elevated) 50%, var(--bg-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── ANIMATIONS (used by index.php hero) ─────────────────── */
@keyframes comet-stream {
  0%   { transform: translateX(0%); }
  100% { transform: translateX(200%); }
}
@keyframes mirror-glass {
  0%   { transform: skewX(-45deg) translateX(-150%); }
  100% { transform: skewX(-45deg) translateX(150%); }
}
@keyframes pulse-slow {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Nav: hide desktop links, show hamburger */
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  nav.academy-nav { padding: 0 1rem; }

  /* Layout */
  .container { padding: 0 1rem; }
  main { padding-top: 64px; }
  .hero { padding: 3.5rem 1rem 3rem; }
  .hero h1 { font-size: clamp(1.6rem, 7vw, 2.5rem); }

  /* Footer: 2-col */
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  /* Footer: 1-col */
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom-links { flex-direction: column; gap: 0.5rem; }
}

/* ── TAILWIND CO-LOAD OVERRIDES ──────────────────────────────
   When Tailwind CDN is loaded alongside academy.css, its default
   font-size scale produces elements that are too large at 100%
   browser zoom. These overrides correct the display scale for all
   Tailwind utility classes used across the project.
   ─────────────────────────────────────────────────────────── */

/* Force correct font-display everywhere — Tailwind pages sometimes
   define .font-display as "Cal Sans, Inter" instead of Outfit.    */
.font-display { font-family: 'Outfit', sans-serif !important; }

/* Scale down Tailwind's oversized display text classes.
   Original → Corrected (target: readable at 100% zoom):
   9xl  9rem   → 4.5rem
   8xl  6rem   → 3.5rem
   7xl  4.5rem → 2.75rem
   6xl  3.75rem→ 2.25rem
   5xl  3rem   → 1.875rem
   4xl  2.25rem→ 1.5rem
   3xl  1.875rem→1.3rem                                            */
.text-9xl { font-size: 4.5rem   !important; line-height: 1.0  !important; }
.text-8xl { font-size: 3.5rem   !important; line-height: 1.05 !important; }
.text-7xl { font-size: 2.75rem  !important; line-height: 1.1  !important; }
.text-6xl { font-size: 2.25rem  !important; line-height: 1.1  !important; }
.text-5xl { font-size: 1.875rem !important; line-height: 1.15 !important; }
.text-4xl { font-size: 1.5rem   !important; line-height: 1.25 !important; }
.text-3xl { font-size: 1.3rem   !important; line-height: 1.35 !important; }
.text-2xl { font-size: 1.15rem  !important; line-height: 1.4  !important; }
.text-xl  { font-size: 1.05rem  !important; line-height: 1.5  !important; }

/* Prevent element cropping in narrow cards */
.hub-card {
    min-width: 0;
    max-width: 100%;
}
@media (min-width: 1280px) {
    /* Slightly more density on large screens */
    html { font-size: 13.5px !important; }
}


/* Ensure Plus Jakarta Sans propagates from body to Tailwind utility classes */
body { font-family: 'Plus Jakarta Sans', sans-serif; }

/* Global Scale-Down via Root Font Size (14px = 87.5% zoom factor) 
   This safely and globally shrinks Tailwind's oversize defaults 
   across every portal page. */
html, :root { font-size: 14px !important; }

/* ── PREMIUM HUD EXTENSIONS ────────────────────────────── */
.glass-card-hud {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

.hud-border-cyan { border: 1px solid rgba(34, 211, 238, 0.2); }
.hud-border-emerald { border: 1px solid rgba(52, 211, 153, 0.2); }
.hud-border-blue { border: 1px solid rgba(59, 130, 246, 0.2); }

.hud-glow-cyan { box-shadow: 0 0 20px rgba(34, 211, 238, 0.1); }
.hud-glow-emerald { box-shadow: 0 0 20px rgba(52, 211, 153, 0.1); }

.hud-scanline {
  position: relative;
  overflow: hidden;
}
.hud-scanline::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 50%,
    rgba(34, 211, 238, 0.02) 51%,
    transparent 52%
  );
  background-size: 100% 4px;
  pointer-events: none;
  opacity: 0.5;
}

/* ── HUD DENSITY HELPERS ───────────────────────────────── */
.hud-container {
  max-width: 1920px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* ── RESPONSIVE HUD GRID ────────────────────────────────── */
@media (max-width: 1024px) {
  .hud-container { padding: 1rem; }
}

@media (max-width: 768px) {
  .md\:ml-\[240px\] { margin-left: 0 !important; }
  .grid-cols-3, .grid-cols-2 { grid-template-columns: 1fr !important; }
  .p-10, .p-16, .p-12 { padding: 1.5rem !important; }
  .text-6xl { font-size: 2.5rem !important; }
  .text-5xl { font-size: 2rem !important; }
}

