/* ============================================================
   LNT Outdoor Compliance Checker — Design System
   Mobile-first, 320px → 4K
   ============================================================ */

:root {
  --green-900: #1b4332;
  --green-700: #2d6a4f;
  --sand-500: #dda15e;
  --sand-100: #faedcd;
  --bg: #f8f7f2;
  --text: #212529;
  --text-muted: #6c757d;
  --white: #ffffff;
  --gold: #f4a261;
  --green-tint: #d8f3dc;
  --red: #c0392b;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 6px 24px rgba(0, 0, 0, 0.12);
  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-stack);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

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

a {
  color: var(--green-700);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.6em;
  color: var(--green-900);
}

p {
  margin: 0 0 1em;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* ---------- Layout ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  width: 100%;
}

.section {
  padding: 48px 0;
}

.section-title {
  font-size: 1.6rem;
  margin-bottom: 24px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 60px;
}

.logo {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--green-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logo:hover {
  text-decoration: none;
  color: var(--green-700);
}

.nav-links {
  display: none;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 8px 0;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.nav-links.open {
  display: flex;
}

.nav-links li {
  margin: 0;
}

.nav-links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 20px;
  color: var(--text);
  font-weight: 500;
}

.nav-links a:hover {
  background: var(--sand-100);
  text-decoration: none;
}

.nav-links a.active {
  color: var(--green-700);
  font-weight: 700;
}

.hamburger {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid var(--green-700);
  border-radius: 8px;
  color: var(--green-700);
  font-size: 1.3rem;
  line-height: 1;
}

.lang-toggle {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 14px;
  background: var(--white);
  border: 1px solid var(--green-700);
  border-radius: 8px;
  color: var(--green-700);
  font-weight: 600;
  font-size: 0.9rem;
}

.lang-toggle:hover {
  background: var(--green-700);
  color: var(--white);
}

@media (min-width: 768px) {
  .hamburger {
    display: none;
  }
  .nav-links {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    margin-left: auto;
    padding: 0;
    box-shadow: none;
    background: transparent;
  }
  .nav-links a {
    padding: 8px 12px;
    min-height: 44px;
  }
  .nav-links a.active {
    border-bottom: 2px solid var(--green-700);
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 24px;
  min-height: 44px;
  background: var(--green-700);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  transition: background 0.2s ease;
}

.btn:hover {
  background: var(--green-900);
  color: var(--white);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: var(--green-700);
  border: 2px solid var(--green-700);
}

.btn-outline:hover {
  background: var(--green-700);
  color: var(--white);
}

.btn-sm {
  padding: 6px 14px;
  min-height: 36px;
  font-size: 0.9rem;
}

/* ---------- Cards ---------- */
.card {
  display: block;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  color: var(--text);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  text-decoration: none;
}

.card-img {
  position: relative;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  background-color: var(--sand-100);
}

.card-body {
  padding: 16px;
}

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  font-size: 1.3rem;
  color: #adb5bd;
  line-height: 1;
  transition: color 0.2s ease, transform 0.15s ease;
}

.fav-btn:hover {
  transform: scale(1.1);
}

.fav-btn.faved {
  color: var(--gold);
}

/* ---------- Category cards ---------- */
.cat-card {
  display: block;
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  color: var(--white);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  color: var(--white);
}

.cat-card .card-img {
  aspect-ratio: 4 / 3;
}

.cat-card .cat-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 32px 16px 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), transparent);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--white);
}

/* ---------- Grid ---------- */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 640px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1440px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-size: cover;
  background-position: center;
  background-image: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45));
  color: var(--white);
  padding: 48px 16px;
}

.hero h1 {
  color: var(--white);
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  margin-bottom: 16px;
}

.hero p {
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 auto 24px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--green-900);
  color: rgba(255, 255, 255, 0.9);
  padding: 40px 0 20px;
  margin-top: 48px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-bottom: 28px;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer-col h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 12px;
}

.footer-col p {
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col ul li {
  margin-bottom: 6px;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.92rem;
  display: inline-block;
  padding: 4px 0;
}

.footer-col a:hover {
  color: var(--sand-500);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 16px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.65);
  text-align: center;
}

.footer-bottom p {
  margin-bottom: 6px;
}

/* ---------- Tool UI helpers ---------- */
.tool-panel {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--green-900);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  min-height: 44px;
  border: 1px solid #ced4da;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--white);
  color: var(--text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--green-700);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.15);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--green-tint);
  padding: 0;
  min-height: auto;
  margin: 12px 0;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--green-700);
  cursor: pointer;
  border: 2px solid var(--white);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--green-700);
  cursor: pointer;
  border: 2px solid var(--white);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.result-box {
  background: var(--green-tint);
  border-left: 4px solid var(--green-700);
  padding: 16px 20px;
  border-radius: 8px;
  margin: 16px 0;
}

/* ---------- Disclaimer blocks ---------- */
.disclaimer-inline {
  border: 1px solid #ced4da;
  border-radius: 8px;
  padding: 16px 20px;
  background: var(--sand-100);
  margin-top: 24px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.hero-disclaimer {
  margin-top: 16px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.82);
  max-width: 620px;
  line-height: 1.5;
}

.list-disclaimer {
  margin-top: 32px;
  padding: 14px 18px;
  background: var(--sand-100);
  border-left: 4px solid var(--green-700);
  border-radius: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.badge-cert-note {
  max-width: 420px;
  margin: 14px auto 0;
  padding: 10px 14px;
  background: #fff8e6;
  border: 1px dashed #dda15e;
  border-radius: 8px;
  font-size: 0.82rem;
  color: #7a5c1e;
  text-align: center;
  line-height: 1.5;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--sand-100);
  color: var(--green-900);
  font-size: 0.8rem;
  font-weight: 600;
}

.quiz-option {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 12px 16px;
  margin-bottom: 10px;
  background: var(--white);
  border: 2px solid #dee2e6;
  border-radius: 8px;
  text-align: left;
  font-size: 1rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.quiz-option:hover {
  border-color: var(--green-700);
}

.quiz-option.correct {
  border-color: var(--green-700);
  background: var(--green-tint);
}

.quiz-option.wrong {
  border-color: var(--red);
  background: #fdecea;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 4px;
  border-bottom: 1px solid #e9ecef;
}

.checklist-item input[type="checkbox"] {
  width: 22px;
  height: 22px;
  min-height: auto;
  accent-color: var(--green-700);
  flex-shrink: 0;
}

.print-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ---------- Article ---------- */
.article-body {
  max-width: 760px;
  margin: 0 auto;
  line-height: 1.8;
  font-size: 1.05rem;
}

.article-body h2 {
  font-size: 1.45rem;
  margin: 2rem 0 0.8rem;
}

.article-body h3 {
  font-size: 1.2rem;
  margin: 1.6rem 0 0.6rem;
}

.article-body img {
  border-radius: var(--radius);
  margin: 16px 0;
}

.article-hero {
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
  margin-bottom: 24px;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--green-700);
}

.breadcrumb .sep {
  margin: 0 6px;
}

/* ---------- Utilities ---------- */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.hidden {
  display: none !important;
}

/* ---------- Print ---------- */
@media print {
  .site-header,
  .site-footer,
  .fav-btn,
  .print-btn,
  .hamburger,
  .lang-toggle {
    display: none !important;
  }

  body {
    background: var(--white);
    font-size: 12pt;
  }

  .container,
  .article-body {
    max-width: 100%;
    padding: 0;
  }

  .card,
  .tool-panel {
    box-shadow: none;
    border: 1px solid #ccc;
  }

  .section {
    padding: 16px 0;
  }
}
