@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800;900&display=swap');

:root {
  --font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  --radius: 10px;

  /* Color Palette (CD33 variant) */
  --color-bg: #091210;
  --color-bg-alt: #0b1a14;
  --color-bg-card: #0f1b17;
  --color-primary: #39D353;
  --color-secondary: #2AAE78;
  --color-accent: #FFA500;

  --color-text: #E8F8E8;
  --color-text-muted: #A0A0A0;
  --color-text-on-primary: #1A1A1A;
  --color-border: rgba(255,255,255,0.25);
  --color-shadow: rgba(0,0,0,0.4);

  /* Typography scale */
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-md: 1.125rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 2rem;
  --font-size-3xl: 2.75rem;
  --font-size-hero: 3.5rem;

  --line-height-tight: 1.2;
  --line-height-base: 1.6;

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 700;
  --font-weight-extra: 900;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  max-width: 100%;
  height: 100%;
  font-family: var(--font-family);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: var(--line-height-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video, iframe { max-width: 100%; height: auto; display: block; }

/* Layout utilities */
.container { width: 100%; margin: 0 auto; padding: 0 1rem; }

/* Site header */
.site-header { position: sticky; top: 0; z-index: 1000; min-height: 64px; overflow: visible; background: var(--color-bg); border-bottom: 1px solid var(--color-border); }
.site-header .container { display: flex; align-items: center; gap: 1rem; padding: 0.5rem 1rem; width: 100%; }

/* Logo */
.site-logo { display: flex; align-items: center; flex-shrink: 0; overflow: hidden; max-height: 52px; }
.site-logo a { display: flex; align-items: center; text-decoration: none; color: inherit; }
.site-logo img { height: 44px; width: auto; max-width: 160px; object-fit: contain; display: block; }

/* Mobile nav toggle (hidden input) */
.nav-toggle-input { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }

/* Hamburger button (visible on mobile) */
.nav-toggle-label { display: flex; flex-direction: column; justify-content: center; gap: 5px; cursor: pointer; margin-left: auto;
  padding: 0.4rem 0.6rem; z-index: 200; border-radius: 6px;
  background: rgba(0,0,0,0.45); border: 1.5px solid rgba(255,255,255,0.7); }

/* Hamburger bars are always white */
.nav-toggle-label span { display: block; width: 24px; height: 2px; background-color: #ffffff; border-radius: 2px; transition: 0.2s ease; }

/* Mobile nav (hidden by default) */
.site-nav { display: none; position: absolute; top: 100%; left: 0; width: 100%; z-index: 500;
  background: var(--color-bg); border-top: 1px solid var(--color-border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.18); }

/* Show mobile nav when checkbox is checked */
.nav-toggle-input:checked ~ .site-nav { display: block; }

/* Nav list (default mobile) */
.nav-list { display: flex; gap: 0; list-style: none; margin: 0; padding: 0; flex-direction: column; }

/* Nav links (mobile) */
.nav-link { font-size: var(--font-size-sm); color: var(--color-text); text-decoration: none; padding: 0.75rem 1rem; display: block; }

/* Dropdown nav */
.nav-dropdown { position: relative; }

/* Dropdown trigger */
.nav-dropdown-toggle { cursor: pointer; display: block; padding: 0.75rem 1rem; font-weight: var(--font-weight-bold); color: var(--color-text); text-decoration: none; }

/* Dropdown menu (hidden by default) */
.nav-dropdown-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 200px; z-index: 9999;
  list-style: none; margin: 0; padding: 0.5rem 0; background: var(--color-bg-card);
  border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,0.18); white-space: nowrap; }

/* Hover or focus reveals dropdown (desktop) */
.nav-dropdown:hover > .nav-dropdown-menu { display: block; }
.nav-dropdown:focus-within > .nav-dropdown-menu { display: block; }

/* Dropdown menu items */
.nav-dropdown-menu .nav-link { display: block; padding: 0.5rem 1.25rem; width: 100%; border-bottom: none; color: var(--color-text); text-decoration: none; }

/* Hover state for items inside dropdown */
.nav-dropdown-menu .nav-link:hover { background: var(--color-bg-alt); }

/* Desktop/tablet: horizontal nav layout overrides (via media queries) */
@media (min-width: 768px) {
  /* NAV LAYOUT: logo-left, nav-centered */
  .site-header .container { justify-content: flex-start; }

  /* Tablet+ nav visible and centered */
  .site-nav { display: flex; flex: 1; justify-content: center; align-items: center; position: static; background: transparent; border-top: none; box-shadow: none; }

  .nav-list { display: flex; flex-direction: row !important; flex-wrap: nowrap; align-items: center; justify-content: center; gap: 1.5rem; padding: 0; margin: 0; }

  .nav-link { font-size: var(--font-size-sm); padding: 0.4rem 0.75rem; border-bottom: none; color: var(--color-text); text-decoration: none; }

  /* Ensure hamburger is hidden on tablet/desktop */
  .nav-toggle-label { display: none !important; }

  /* Dropdown behavior on desktop/tablet remains the same (hover/focus) */
  .nav-dropdown-menu { position: absolute; top: 100%; left: 0; min-width: 200px; }
  /* Prevent long wrap in horizontal nav on larger screens */
}

@media (min-width: 1024px) {
  .container { max-width: 1200px; padding: 0 2rem; margin: 0 auto; }

  /* Desktop enhancements for hero and grid layout */
  .hero { min-height: 70vh; }

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

  .section { padding: 4rem 0; }

  .card-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

  .footer-inner { flex-direction: row; text-align: left; padding: 0; justify-content: space-between; }

  .nav-link { font-size: var(--font-size-sm); }
}

@media (max-width: 767px) {
  /* Base mobile adjustments for hero and cards */
  .hero { min-height: 50vh; padding: 2rem 1rem; }

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

  .hero-content { text-align: center; }

  .hero-cta { justify-content: center; display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }

  .hero-stats { display: flex; justify-content: center; gap: 3rem; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,0.2); padding-top: 2rem; margin-top: 0.5rem; }
  .hero-stat { text-align: center; min-width: 80px; }
  .hero-stat strong { display: block; font-size: 2rem; font-weight: 700; color: var(--color-primary); line-height: 1.1; }
  .hero-stat span { font-size: 0.78rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.06em; }

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

  .section-title { font-size: var(--font-size-xl); }

  .footer-inner { flex-direction: column; text-align: center; gap: 0.75rem; }
  table { display: block; overflow-x: auto; }
  .nav-list { flex-direction: column; }
  .site-nav { position: static; display: none; width: 100%; background: transparent; border: none; box-shadow: none; }
  .nav-dropdown-menu { position: static; box-shadow: none; border: none; padding-left: 1rem; display: none; }
  .nav-dropdown:focus-within > .nav-dropdown-menu { display: none; }
  .nav-dropdown:hover > .nav-dropdown-menu { display: none; }
  /* Ensure mobile nav remains functional via toggle */
  .site-header .container { padding: 0.5rem 1rem; justify-content: flex-start; }
  .nav-toggle-label { display: flex; } /* keep visible on mobile */
}

/* Sections, cards, and utilities (common rules) */
.section { padding: 2rem 0; }

.section-title { font-size: var(--font-size-2xl); margin: 0 0 0.75rem; color: var(--color-text); }

.card { display: flex; flex-direction: column; border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; background: var(--color-bg-card); color: var(--color-text); text-decoration: none; transition: transform 0.2s ease, border-color 0.2s ease; }
.card:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.4); }

/* Card image rules (mandatory) */
.card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; border-top-left-radius: var(--radius); border-top-right-radius: var(--radius); }

/* Card body/content */
.card-content { padding: 1rem; display:flex; flex-direction: column; gap: 0.5rem; }

/* Card titles and text */
.card-title { font-size: var(--font-size-lg); margin: 0; color: var(--color-text); font-weight: 700; }
.card-desc { color: var(--color-text-muted); font-size: var(--font-size-sm); margin: 0; }

/* Card grid layout (mandatory) */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }

/* Buttons */
.btn { display: inline-block; padding: 0.75rem 1rem; border-radius: var(--radius); border: 1px solid var(--color-border);
  background: var(--color-primary); color: var(--color-text-on-primary); text-decoration: none;
  font-size: var(--font-size-sm); font-weight: var(--font-weight-medium); transition: 0.2s ease; }
.btn:hover { filter: brightness(0.95); }

.btn-primary { background: var(--color-primary); color: var(--color-text-on-primary); border: 1px solid rgba(255,255,255,0.25); }
.btn-secondary { background: transparent; color: var(--color-text); border: 1px solid var(--color-border); }

/* Forms */
form, input, textarea, select { font-family: var(--font-family); color: var(--color-text); }
label { display: block; margin-bottom: 0.25rem; font-weight: 600; color: var(--color-text); }

input, textarea, select { width: 100%; background: var(--color-bg-card); border: 1px solid var(--color-border); padding: 0.5rem 0.75rem; border-radius: var(--radius); }

button, [type="submit"] { cursor: pointer; }

/* Tables (basic) */
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--color-border); padding: 0.75rem; text-align: left; }

/* Utility classes */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.hidden { display: none !important; }

/* FAQ accordion (CSS-only) */
.faq-section { padding: 2rem 0; }
.faq-item { border: 1px solid var(--color-border); border-radius: var(--radius); margin-bottom: 0.75rem; background: var(--color-bg-card); overflow: hidden; transition: 0.2s ease; }
.faq-item[open] { border-color: var(--color-primary); box-shadow: 0 2px 12px var(--color-shadow); }
.faq-question { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; cursor: pointer; font-weight: var(--font-weight-bold); font-size: var(--font-size-md); list-style: none; user-select: none; }
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after { content: "+"; font-size: 1.5rem; font-weight: 300; color: var(--color-primary); flex-shrink: 0; transition: transform 0.2s ease; }
.faq-item[open] > .faq-question::after { content: "−"; }
.faq-answer { padding: 0 1.25rem 1.25rem; border-top: 1px solid var(--color-border); }
.faq-answer p { margin: 0.75rem 0 0; color: var(--color-text-muted); line-height: var(--line-height-base); }

/* Footer */
.site-footer { background: #040909; color: var(--color-text); padding: 2rem 0; border-top: 1px solid var(--color-border); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 0 1rem; max-width: 1200px; margin: 0 auto; }
.footer-copy { font-size: var(--font-size-xs); color: var(--color-text-muted); }

/* Hero (brand block) */
.hero { position: relative; width: 100%; display: flex; align-items: center; justify-content: center;
  padding: 4rem 0; color: var(--color-text);
  background: linear-gradient(135deg, rgba(57,211,83,0.25) 0%, rgba(255,165,0,0.25) 100%), var(--color-bg);
}
.hero-content { text-align: center; padding: 0 1rem; }
.hero h1 { font-size: var(--font-size-hero); line-height: 1.05; margin: 0 0 1rem; font-weight: 900; color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,0.25); }
.hero p { font-size: var(--font-size-base); color: #EFFFEF; margin: 0 0 1.25rem; }

/* Hero extras (provided rules) */
.hero-content { text-align: center; }
.hero-cta { justify-content: center; display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.hero-stats { display: flex; justify-content: center; gap: 3rem; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,0.2); padding-top: 2rem; margin-top: 0.5rem; }
.hero-stat { text-align: center; min-width: 80px; }
.hero-stat strong { display: block; font-size: 2rem; font-weight: 700; color: var(--color-primary); line-height: 1.1; }
.hero-stat span { font-size: 0.78rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.06em; }

@media (max-width: 767px) {
  .hero-stats { gap: 1.5rem; }
  .hero-stat strong { font-size: 1.5rem; }
}