/* Defense Academy - Design System & Styles */

/* ============================================
   1. CSS VARIABLES & DESIGN SYSTEM
   ============================================ */

:root {
  /* Colors */
  --bg: #000a15;
  --surface: #05131f;
  --surface-2: #0a1e2e;
  --text: #ffffff;
  --text-secondary: #c0c8d0;
  --muted: #8a92a0;
  --primary: #1e3a5f;
  --primary-light: #2d5a8c;
  --secondary: #f97316;
  --secondary-dark: #ea580c;
  --border: #1a2738;
  --shadow: rgba(0, 0, 0, 0.4);
  --shadow-lg: rgba(0, 0, 0, 0.6);

  /* Spacing Scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;
  --space-32: 8rem;
  --space-48: 12rem;
  --space-64: 16rem;

  /* Typography Scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3rem;

  /* Line Heights */
  --leading-tight: 1.2;
  --leading-normal: 1.5;
  --leading-relaxed: 1.75;

  /* Border Radius */
  --radius-xs: 0.25rem;
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0ms;
    --transition-base: 0ms;
    --transition-slow: 0ms;
  }
  html {
    scroll-behavior: auto !important;
  }
}

/* ============================================
   2. GLOBAL STYLES
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text);
  background-color: var(--bg);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--text-5xl);
}

h2 {
  font-size: var(--text-4xl);
}

h3 {
  font-size: var(--text-2xl);
}

p {
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

a {
  color: inherit;
  text-decoration: none;
  transition: all var(--transition-base);
}

a:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-8);
}

/* ============================================
   3. NAVIGATION BAR
   ============================================ */

.navbar {
  position: sticky;
  top: 0;
  z-index: 999;
  background: #000a15;
  color: white;
  padding: var(--space-4) 0;
  box-shadow: 0 2px 8px var(--shadow);
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-8);
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  font-weight: 700;
  transition: opacity var(--transition-base);
}

.navbar-logo:hover {
  opacity: 0.8;
}

.logo {
  height: 44px;
  width: auto;
}

.brand-name {
  font-size: var(--text-lg);
  color: white;
}

.nav-menu {
  display: flex;
  gap: var(--space-8);
  align-items: center;
}

.nav-link {
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: color var(--transition-base);
  position: relative;
  padding: var(--space-2) 0;
}

.nav-link:hover {
  color: var(--secondary);
}

/* ============================================
   8. Anchors & scroll adjustments
   ============================================ */

#contact {
  scroll-margin-top: 80px; /* adjust based on navbar height */
}

/* ============================================
   9. Contact form (footer)
   ============================================ */

.contact-form {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.contact-form h3 {
  font-size: var(--text-4xl);
  color: var(--text);
  text-align: center;
  margin-bottom: var(--space-4);
}

.field-group {
  display: flex;
  flex-direction: column;
}

.contact-form label {
  font-size: var(--text-sm);
  margin-bottom: var(--space-1);
  color: var(--text-secondary);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background-color: var(--surface-2);
  color: var(--text);
  font-size: var(--text-base);
  transition: all var(--transition-base);
  font-family: inherit;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--muted);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.privacy-text {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  line-height: var(--leading-normal);
}

.privacy-text a {
  color: var(--secondary);
  text-decoration: underline;
}

.contact-form .btn {
  align-self: flex-start;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 500px; /* match contact-form width */
  margin: var(--space-4) auto 0;
  padding: 0; /* remove extra horizontal padding so edges line up with form */
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.footer-bottom .footer-left,
.footer-bottom .footer-right {
  display: inline-block;
}

/* Additional sections */
.approach-section,
.partners-section {
  padding: var(--space-24) 0;
  color: var(--text);
}

/* differentiate backgrounds */
.approach-section { background-color: var(--surface); }
.partners-section { background-color: var(--surface); }

.approach-section h2 {
  text-align: center;
  margin-bottom: var(--space-8);
}

.approach-section blockquote {
  margin: var(--space-4) 0;
  padding-left: var(--space-4);
  border-left: 4px solid var(--secondary);
  color: var(--text-secondary);
  font-style: italic;
}

.partners-section h2 {
  color: var(--text);
  margin-bottom: var(--space-8);
  text-align: center;
}

.partners-section > .container > p:first-of-type {
  text-align: center;
  margin-bottom: var(--space-8);
}

.partners-section ul {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 800px;
}

/* Partners grid styling */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-8);
}

.partner-card {
  background: white;
  padding: var(--space-8);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.partner-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.partner-card h3 {
  color: #000000;
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
  line-height: var(--leading-tight);
}

.partner-card p {
  font-size: var(--text-sm);
  color: #000000;
  margin-bottom: var(--space-4);
  flex-grow: 1;
}

.partners-section ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4);
  list-style: none;
}

.partners-section ul li {
  font-size: var(--text-base);
  color: var(--text);
  padding: var(--space-2) var(--space-4);
  background: var(--primary);
  border-radius: var(--radius-lg);
  text-align: center;
  color: white;
  flex: 0 0 auto;
}



}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--secondary);
  transition: width var(--transition-base);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-cta {
  background: var(--secondary);
  color: white !important;
  padding: var(--space-2) var(--space-6);
  border-radius: var(--radius-md);
  font-weight: 600;
}

.nav-cta:hover {
  background: var(--secondary-dark);
}

.nav-cta::after {
  display: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: all var(--transition-base);
}

/* Mobile nav toggle state */
.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* ============================================
   4. HERO SECTION
   ============================================ */

.hero {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
}

.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 10, 21, 0.6);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-24) var(--space-8);
  width: 100%;
  box-sizing: border-box;
}

.hero h1 {
  color: white;
  font-size: var(--text-5xl);
  margin-bottom: var(--space-6);
  line-height: 1.2;
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: var(--space-8);
  line-height: var(--leading-relaxed);
}

.hero-content .btn {
  margin-right: var(--space-4);
}

/* ============================================
   5. BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-base);
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  text-align: center;
}

.btn:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--secondary);
  color: white;
}

.btn-primary:hover {
  background: var(--secondary-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  color: white;
}

/* ============================================
   6. FEATURES SECTION
   ============================================ */

.features-section {
  padding: var(--space-24) 0;
  background: #000a15;
}

.features-section h2 {
  text-align: center;
  margin-bottom: var(--space-16);
  color: #ffffff;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-8);
}

.feature-card {
  background: #05131f;
  padding: var(--space-8);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  text-align: center;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--shadow-lg);
  border-color: var(--secondary);
}

.feature-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-4);
  color: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-card h3 {
  font-size: var(--text-xl);
  color: #ffffff;
  margin-bottom: var(--space-2);
}

.feature-card p {
  font-size: var(--text-sm);
  color: var(--muted);
}

/* ============================================
   7. SERVICES SECTION
   ============================================ */

.services-section {
  padding: var(--space-24) 0;
  background-color: var(--surface-2);
}

.services-section h2 {
  color: var(--text);
  margin-bottom: var(--space-12);
  text-align: center;
}

.services-list {
  list-style: none;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-8);
}

.services-list li {
  background-color: var(--surface);
  padding: var(--space-6);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 6px var(--shadow);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  border-left: 4px solid var(--secondary);
  transition: all var(--transition-base);
}

.services-list li:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px var(--shadow-lg);
}

.services-list strong {
  color: #ffffff;
  font-size: var(--text-lg);
  font-weight: 700;
}

/* remove bullet pseudo-element that caused layout issues */

.services-list li p {
  margin: 0;
}

/* ============================================
   8. TESTIMONIAL SECTION
   ============================================ */

.testimonial-section {
  padding: var(--space-24) 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
}

.testimonial-card {
  max-width: 600px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: var(--space-12);
  border-radius: var(--radius-xl);
  text-align: center;
}

.testimonial-icons {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  color: var(--secondary);
}

.testimonial-card blockquote {
  font-size: var(--text-2xl);
  font-weight: 700;
  line-height: var(--leading-relaxed);
  margin: 0;
}

/* ============================================
   9. COURSES SECTION
   ============================================ */

.courses-section {
  padding: var(--space-24) 0;
}

.courses-section h2 {
  text-align: center;
  margin-bottom: var(--space-8);
}

.section-intro {
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--space-16);
  font-size: var(--text-lg);
  color: var(--text-secondary);
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-16);
}

.course-card {
  background: white;
  padding: var(--space-8);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  position: relative;
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.course-badge {
  display: inline-block;
  background: var(--secondary);
  color: white;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-4);
  width: fit-content;
}

.course-card h3 {
  color: #000000;
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
  line-height: var(--leading-tight);
}

.course-card p {
  font-size: var(--text-sm);
  color: #000000;
  margin-bottom: var(--space-4);
}

.course-card > p:nth-of-type(1) {
  flex-grow: 1;
}

.course-duration {
  font-size: var(--text-xs);
  color: var(--muted);
  margin-bottom: var(--space-6);
  margin-top: auto;
}

.course-link {
  color: var(--secondary);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition-base);
  font-size: var(--text-sm);
}

.course-link:hover {
  color: #ea580c;
  text-decoration: underline;
}

/* CTA Section styling */
.cta-section {
  background: var(--primary);
  color: white;
  padding: var(--space-16) 0;
  text-align: center;
}

.cta-section h2 {
  color: white;
  margin-bottom: var(--space-4);
}

.cta-section p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--space-8);
  font-size: var(--text-lg);
}

/* ============================================
   10. FOOTER
   ============================================ */

.footer {
  background: var(--bg);
  color: white;
  padding: var(--space-16) 0 var(--space-8);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

.footer-section h3 {
  color: #fff;
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
}

.footer-section p {
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

.footer-section address {
  font-style: normal;
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

.footer-section a {
  color: rgba(255, 255, 255, 0.9);
  transition: color var(--transition-base);
}

.footer-section a:hover {
  color: var(--secondary);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-8);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--text-sm);
}

/* ============================================
   11. RESPONSIVE DESIGN
   ============================================ */

/* Tablet (768px) */
@media (max-width: 1023px) {
  h1 {
    font-size: var(--text-4xl);
  }

  h2 {
    font-size: var(--text-3xl);
  }

  .hero {
    grid-template-columns: 1fr;
    gap: var(--space-12);
    padding: var(--space-16) 0;
  }

  .hero h1 {
    font-size: var(--text-4xl);
  }

  .nav-menu {
    gap: var(--space-4);
  }
}

/* Mobile (767px and below) */
@media (max-width: 767px) {
  .navbar-container {
    padding: 0 var(--space-4);
  }

  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--primary);
    padding: var(--space-4) 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-link {
    padding: var(--space-4) var(--space-8);
  }

  .nav-cta {
    margin: var(--space-2) var(--space-8);
    width: calc(100% - var(--space-16));
    text-align: center;
  }

  h1 {
    font-size: var(--text-3xl);
  }

  h2 {
    font-size: var(--text-2xl);
  }

  h3 {
    font-size: var(--text-xl);
  }

  .hero {
    padding: var(--space-12) 0;
    min-height: 400px;
  }

  .hero-content {
    padding: var(--space-12) var(--space-4);
    max-width: none;
  }

  .hero h1 {
    font-size: var(--text-3xl);
  }

  .hero-subtitle {
    font-size: var(--text-base);
  }

  .hero-visual {
    padding: 0 var(--space-4);
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .features-section,
  .services-section,
  .testimonial-section {
    padding: var(--space-12) 0;
  }

  .container {
    padding: 0 var(--space-4);
  }

  .testimonial-card {
    padding: var(--space-8);
  }

  .testimonial-card blockquote {
    font-size: var(--text-xl);
  }

  .courses-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    gap: var(--space-8);
  }
}

/* Extra small (479px and below) */
@media (max-width: 479px) {
  .container {
    padding: 0 var(--space-3);
  }

  h1 {
    font-size: var(--text-2xl);
  }

  h2 {
    font-size: var(--text-xl);
  }

  .hero h1 {
    font-size: var(--text-2xl);
  }

  .hero-subtitle {
    font-size: var(--text-sm);
  }

  .btn {
    width: 100%;
  }

  .services-list li {
    font-size: var(--text-base);
    padding: var(--space-3) 0;
  }

  .testimonial-card {
    padding: var(--space-6);
  }

  .testimonial-card blockquote {
    font-size: var(--text-lg);
  }
}

/* Print styles */
@media print {
  .navbar,
  .nav-toggle {
    display: none;
  }

  body {
    background: white;
  }

  a {
    text-decoration: underline;
  }
}
