/* ==========================================================================
   IVS Academy - IT Training Pages v2 Stylesheet
   ========================================================================== */

:root {
  --font-sans: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Poppins', 'Be Vietnam Pro', sans-serif;
  --bg-dark: #07111F;
  --bg-card: #0f1f35;
  --bg-card-hover: #162a47;
  --bg-alt: #0a1728;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-light: #cbd5e1;
  --border-light: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(6, 182, 212, 0.35);
  --header-height: 80px;

  /* Theme Defaults (Cyan/Orange Accent) */
  --accent-color: #06b6d4;
  --accent-light: #38bdf8;
  --accent-glow: rgba(6, 182, 212, 0.25);
  --gradient-text-from: #38bdf8;
  --gradient-text-to: #f97316;
}

/* Theme Variances */
body.theme-hardware {
  --accent-color: #f97316;
  --accent-light: #fb923c;
  --accent-glow: rgba(249, 115, 22, 0.25);
  --gradient-text-from: #fb923c;
  --gradient-text-to: #fdba74;
}

body.theme-network {
  --accent-color: #22c55e;
  --accent-light: #4ade80;
  --accent-glow: rgba(34, 197, 94, 0.25);
  --gradient-text-from: #4ade80;
  --gradient-text-to: #38bdf8;
}

body.theme-programming {
  --accent-color: #3b82f6;
  --accent-light: #60a5fa;
  --accent-glow: rgba(59, 130, 246, 0.25);
  --gradient-text-from: #60a5fa;
  --gradient-text-to: #38bdf8;
}

body.theme-robotics {
  --accent-color: #ef4444;
  --accent-light: #f87171;
  --accent-glow: rgba(239, 68, 68, 0.25);
  --gradient-text-from: #f87171;
  --gradient-text-to: #fb923c;
}

body.theme-software {
  --accent-color: #a855f7;
  --accent-light: #c084fc;
  --accent-glow: rgba(168, 85, 247, 0.25);
  --gradient-text-from: #c084fc;
  --gradient-text-to: #f472b6;
}

/* Global Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
}

body {
  margin: 0;
  padding-top: var(--header-height);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Accessibility Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--accent-color);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 700;
  z-index: 9999;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

/* Header & Fallback Header */
#header-placeholder {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  background: rgba(7, 17, 31, 0.92);
  border-bottom: 1px solid var(--border-light);
  backdrop-filter: blur(12px);
}

.fallback-header {
  height: 100%;
  display: flex;
  align-items: center;
}

.fallback-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.fallback-header .brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.25rem;
  color: #fff;
}

.fallback-header .brand-mark {
  background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
  color: #fff;
  padding: 0.25rem 0.6rem;
  border-radius: 0.5rem;
  font-size: 1.1rem;
}

.fallback-header .brand small {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
}

.fallback-nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.fallback-nav a {
  color: var(--text-light);
  transition: color 0.2s ease;
}

.fallback-nav a:hover {
  color: var(--accent-light);
}

@media (max-width: 768px) {
  .fallback-nav {
    display: none;
  }
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, var(--gradient-text-from), var(--gradient-text-to));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hero Section */
.hero {
  position: relative;
  padding: 4rem 0 5rem 0;
  background: radial-gradient(ellipse 80% 50% at 50% -10%, var(--accent-glow) 0%, transparent 70%);
  border-bottom: 1px solid var(--border-light);
}

.hero-grid {
  position: absolute;
  inset: 0;
  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: 40px 40px;
  pointer-events: none;
}

.hero-layout {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 992px) {
  .hero-layout {
    grid-template-columns: 1fr;
  }
}

.hero-copy {
  display: flex;
  flex-direction: column;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.breadcrumb a:hover {
  color: var(--accent-light);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  align-self: flex-start;
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  color: var(--accent-light);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.hero-copy h1 {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 900;
  line-height: 1.2;
  margin: 0 0 1.25rem 0;
  color: #fff;
}

@media (max-width: 640px) {
  .hero-copy h1 {
    font-size: 2rem;
  }
}

.hero-copy p {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.75rem;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-color), #0284c7);
  color: #fff;
  box-shadow: 0 10px 25px -5px var(--accent-glow);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -5px var(--accent-glow);
  filter: brightness(1.1);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent-color);
  color: var(--accent-light);
  transform: translateY(-2px);
}

/* Hero Panel (Sidebar Facts) */
.hero-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 1.25rem;
  padding: 1.75rem;
  backdrop-filter: blur(10px);
}

.hero-panel-title {
  margin: 0 0 1.25rem 0;
  font-size: 1.1rem;
  color: #fff;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.75rem;
}

.hero-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.hero-fact {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0.75rem;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
}

.hero-fact strong {
  color: var(--accent-light);
  font-size: 1rem;
}

.hero-fact span {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.note {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  border-left: 3px solid var(--accent-color);
  padding: 0.75rem;
  border-radius: 0 0.5rem 0.5rem 0;
  line-height: 1.5;
}

/* Sections */
.section {
  padding: 5rem 0;
  position: relative;
}

.section-alt {
  background-color: var(--bg-alt);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.section-heading {
  margin-bottom: 3.5rem;
}

.section-heading.center {
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-light);
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 1rem 0;
}

@media (max-width: 640px) {
  .section-title {
    font-size: 1.75rem;
  }
}

.section-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Cards & Grids */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 1.25rem;
  padding: 2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-5px);
  box-shadow: 0 20px 40px -10px var(--accent-glow);
}

.card-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  color: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.75rem 0;
}

.card p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 1rem 0;
  flex-grow: 1;
}

.meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.pill {
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  color: var(--text-light);
  padding: 0.25rem 0.65rem;
  border-radius: 0.375rem;
}

.card-link {
  color: var(--accent-light);
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: gap 0.2s ease;
}

.card-link:hover {
  gap: 0.7rem;
}

/* Split Layout & Callouts */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 992px) {
  .split {
    grid-template-columns: 1fr;
  }
}

.callout {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 1.25rem;
  padding: 2rem;
}

.callout h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 1.25rem 0;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.75rem;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.check-list li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--text-light);
  font-size: 0.95rem;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent-light);
  font-weight: 900;
}

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 1.25rem;
  top: 1.5rem;
  bottom: 1.5rem;
  width: 2px;
  background: var(--border-light);
}

.timeline-item {
  display: flex;
  gap: 1.5rem;
  position: relative;
}

.timeline-marker {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--bg-dark);
  border: 2px solid var(--accent-color);
  color: var(--accent-light);
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 2;
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  flex-grow: 1;
}

.timeline-content h3 {
  margin: 0 0 0.4rem 0;
  font-size: 1.1rem;
  color: #fff;
}

.timeline-content p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* FAQ Details */
.faq {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 800px;
  margin: 0 auto;
}

.faq details {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 1rem;
  overflow: hidden;
  transition: border-color 0.25s ease;
}

.faq details[open] {
  border-color: var(--border-hover);
}

.faq summary {
  padding: 1.25rem 1.5rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--accent-light);
  transition: transform 0.25s ease;
}

.faq details[open] summary::after {
  content: "−";
}

.faq-answer {
  padding: 0 1.5rem 1.25rem 1.5rem;
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
}

.faq-answer p {
  margin: 0;
}

/* CTA Band */
.cta-band {
  background: linear-gradient(135deg, rgba(15, 31, 53, 0.95), rgba(7, 17, 31, 0.98));
  border: 1px solid var(--border-light);
  border-radius: 1.75rem;
  padding: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

@media (max-width: 768px) {
  .cta-band {
    flex-direction: column;
    text-align: center;
    padding: 2rem;
  }
  .cta-band .meta-list {
    justify-content: center;
  }
}

.cta-band h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.5rem 0;
}

.cta-band p {
  color: var(--text-muted);
  margin: 0 0 1rem 0;
}

/* Fallback Footer */
#footer-placeholder {
  margin-top: auto;
}

.fallback-footer {
  background: #040a14;
  border-top: 1px solid var(--border-light);
  padding: 3rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.footer-grid strong {
  color: #fff;
  font-size: 1.1rem;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .footer-links {
    justify-content: center;
  }
}

.footer-links a:hover {
  color: var(--accent-light);
}

/* Mobile CTA Sticky Bar */
.mobile-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(7, 17, 31, 0.95);
  border-top: 1px solid var(--border-light);
  padding: 0.75rem 1rem;
  backdrop-filter: blur(10px);
  z-index: 999;
}

.mobile-cta .btn {
  width: 100%;
}

@media (max-width: 640px) {
  .mobile-cta {
    display: block;
  }
  body {
    padding-bottom: 4rem;
  }
}
