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

:root {
  /* Radius */
  --radius: 8px;

  /* Brand / palette (Midnight crimson) */
  --color-base: #1A1A1E;
  --color-bg: #1A1A1E;
  --color-bg-alt: #232327;
  --color-bg-card: #2B2D32;
  --color-border: #3E4047;
  --color-shadow: rgba(0,0,0,0.45);

  --color-primary: #DC143C;      /* deep crimson */
  --color-primary-dark: #A40D32;
  --color-secondary: #C0C0C0;      /* silver accent */
  --color-accent: #D9D9D9;

  --color-text: #F6F6F8;
  --color-text-muted: #C9C9D1;
  --color-text-on-primary: #FFFFFF;

  /* Typography scale */
  --font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --font-size-xs:   0.75rem  /* captions, labels */
  --font-size-sm:   0.875rem /* nav links, small text */
  --font-size-base:  1rem     /* body text */
  --font-size-md:   1.125rem /* lead paragraphs */
  --font-size-lg:   1.25rem  /* sub-headings, card titles */
  --font-size-xl:   1.5rem    /* h3 */
  --font-size-2xl:  2rem      /* h2, section titles */
  --font-size-3xl:  2.75rem   /* h1 on desktop */
  --font-size-hero: 3.5rem    /* hero headline on desktop */

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

  --font-weight-normal: 400
  --font-weight-medium: 500
  --font-weight-bold:   700
}

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

* { margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Global elements defaults */
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { font-weight: var(--font-weight-bold); }
em { font-style: italic; }

ul, ol { margin-left: 1.25rem; margin-bottom: 0.75rem; }

/* Layout utilities */
.container {
  width: 100%;
  margin: 0 auto;            /* required across breakpoints */
  padding: 0 1rem;
}
.section { padding: 2rem 1rem; }
.hero { width: 100%; display: flex; align-items: center; justify-content: center; text-align: center; padding: 2rem 1rem; background: linear-gradient(135deg, rgba(220,20,60,0.25), rgba(26,26,30,0.95)); min-height: 60vh; }

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

/* Cards */
.card { display:flex; flex-direction: column; border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; background: var(--color-bg-card); transition: transform 0.2s ease, background 0.2s ease; }
.card:hover { transform: translateY(-4px); }
.card img {
  width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block;
  /* Mandatory border radii for top corners only */
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}
.card-content { padding: 1rem; }

/* Card grid */
.card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
.card-grid > * { min-width: 0; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  border: 1px solid transparent;
  background: var(--color-primary);
  color: #fff;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.btn:hover { filter: brightness(0.92); transform: translateY(-1px); }
.btn-primary { background: var(--color-primary); }
.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn:focus { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 64px;             /* required: not a fixed height */
  overflow: visible;              /* allow logo to render fully */
  background: rgba(26,26,30,0.96);
}
.site-header .container {
  display: flex;
  align-items: center;            /* vertically center inside header */
  gap: 1rem;
  padding: 0.5rem 1rem;             /* mobile padding; content must center vertically */
  width: 100%;
}
.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  overflow: hidden;
  max-height: 52px;
  text-decoration: none;
}
.site-logo img {
  height: 44px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  display: block;
}
.nav-toggle-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}
.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);
}
.nav-toggle-label span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #ffffff; /* mandatory white bars for hamburger */
  border-radius: 2px;
  transition: 0.2s ease;
}
.site-nav {
  display: none;                   /* mobile hidden by default */
  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);
}
.nav-toggle-input:checked ~ .site-nav { display: block; }

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

/* Nav link defaults (tablet/desktop overridden below) */
.nav-link {
  display: block;
  padding: 0.75rem 1rem;
  font-size: var(--font-size-xs); /* mobile: xs; overridden on tablet/desktop */
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-link:hover { color: var(--color-primary); text-decoration: none; background: rgba(255,255,255,0.03); }

/* Dropdown nav */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { cursor: pointer; text-decoration: none; padding: 0.75rem 1rem; display: block; color: var(--color-text); }
.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;
}
.nav-dropdown:hover > .nav-dropdown-menu,
.nav-dropdown:focus-within > .nav-dropdown-menu { display: block; }

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

/* Mobile-specific dropdown adjustments */
@media (max-width: 767px) {
  .nav-dropdown-menu {
    position: static;
    display: none;
    border: none;
    box-shadow: none;
    padding-left: 1rem;
  }
  .nav-dropdown:hover > .nav-dropdown-menu { display: none; }
  .nav-dropdown:focus-within > .nav-dropdown-menu { display: block; }
  /* On mobile, ensure the dropdown expands vertically under the trigger if opened via focus */
}
  
/* Hero CTA sizing */
.hero .cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }

/* Footer */
.site-footer { background: #0f0f12; padding: 2rem 0; color: var(--color-text); }
.footer-inner { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; text-align: center; }

.faq-section { padding: 2rem 0; }

/* FAQ items (CSS-only accordion) */
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  background: var(--color-bg-card);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 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: "−"; transform: rotate(0.25turn); }
.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); }

/* Forms */
label { display:block; margin-bottom: .25rem; font-weight: var(--font-weight-bold); color: var(--color-text); }
input, textarea, select {
  width: 100%;
  padding: .5rem .75rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: #2A2B34;
  color: var(--color-text);
  font-family: var(--font-family);
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--color-primary); outline-offset: 2px; }

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

/* Typography: general headings and body tweaks */
h1 { font-size: var(--font-size-3xl); line-height: var(--line-height-tight); font-weight: var(--font-weight-bold); color: var(--color-text); margin: 0.75rem 0; }
h2 { font-size: var(--font-size-2xl); font-weight: var(--font-weight-bold); color: var(--color-text); margin: 0.75rem 0; }
h3 { font-size: var(--font-size-xl); font-weight: var(--font-weight-bold); color: var(--color-text); }
h4 { font-size: var(--font-size-lg); font-weight: var(--font-weight-bold); color: var(--color-text); }

/* Responsiveness: base mobile-first (≤767px) implemented by default; tablet and desktop overrides below */

/* Tablet (≥768px) - horizontal nav, increased container width, adjusted typography and grid */
@media (min-width: 768px) {
  /* Centered container width at tablet */
  .container {
    max-width: 960px;
    padding: 0 1.5rem;
  }

  /* Hide hamburger; show full nav inline on header row */
  .nav-toggle-label { display: none; }

  .site-nav {
    display: flex; /* visible on tablet/desktop */
    position: static;
    width: auto;
    background: transparent;
    border-top: none;
    box-shadow: none;
  }

  .site-header .container {
    display: flex;
    align-items: center;
    gap: 1rem;
  }

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

  .nav-link {
    font-size: var(--font-size-sm);
    padding: 0.4rem 0.75rem;
    border-bottom: none;
    white-space: nowrap;
  }

  .hero {
    min-height: 60vh;
  }

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

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

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

  /* Dropdown menu behavior on tablet: keep hover/focus open like desktop */
  .nav-dropdown-menu {
    min-width: 200px;
  }
  .nav-dropdown:hover > .nav-dropdown-menu,
  .nav-dropdown:focus-within > .nav-dropdown-menu {
    display: block;
  }
}

/* Desktop (≥1024px) - larger container padding and hero scale, grid enhancements */
@media (min-width: 1024px) {
  .container {
    max-width: 1200px;
    padding: 0 2rem;
  }

  .site-header { /* optional extended sticky feel */ }

  .hero { min-height: 70vh; }
  .hero h1 { font-size: var(--font-size-hero); }

  .section { padding: 4rem 0; }
}