/* SilentTrek – Scandinavian Clean UI
   Mobile-first, flexbox-only, accessible, brand-aligned
   Brand colors: primary #0B3A53, secondary #2C7A7B, accent #F5F7FA
   Fonts: Headings Georgia (serif), Body Arial (sans) */

/* ============ CSS RESET & NORMALIZE ============ */
* { box-sizing: border-box; }
*::before, *::after { box-sizing: inherit; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: Arial, Helvetica, sans-serif; line-height: 1.6; color: #1F2A33; background: #FFFFFF; }
img { max-width: 100%; height: auto; display: block; }
svg { display: inline-block; vertical-align: middle; }
figure { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: none; padding: 0; cursor: pointer; }
a { color: #0B3A53; text-decoration: none; }
a:hover, a:focus { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid #2C7A7B; outline-offset: 2px; }

/* ============ THEME TOKENS ============ */
:root {
  --color-primary: #0B3A53;
  --color-secondary: #2C7A7B;
  --color-accent: #F5F7FA;
  --color-bg: #FFFFFF;
  --color-surface: #FFFFFF;
  --color-muted: #5B6B75;
  --color-border: #E3E8ED;
  --shadow-s: 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow-m: 0 6px 18px rgba(16, 24, 40, 0.08);
  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 16px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;
  --space-40: 40px;
  --space-60: 60px;
}

/* ============ TYPOGRAPHY ============ */
h1, h2, h3, h4 { font-family: Georgia, 'Times New Roman', serif; color: var(--color-primary); margin: 0 0 var(--space-16); line-height: 1.25; }
h1 { font-size: 32px; letter-spacing: 0.2px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; color: #123D55; }
h4 { font-size: 18px; }
p { margin: 0 0 var(--space-16); color: #25323A; }
.small, .hint, .disclaimer, .language-note { font-size: 14px; color: var(--color-muted); }
.subheadline { color: #34505E; font-size: 18px; margin-bottom: var(--space-20); }

/* ============ LAYOUT PRIMITIVES (Flex-only) ============ */
.container { display: flex; width: 100%; padding: 0 20px; }
.content-wrapper { display: flex; flex-direction: column; gap: var(--space-20); width: 100%; max-width: 1120px; margin: 0 auto; }

/* Sections spacing for Scandinavian airy feel */
section { margin-bottom: var(--space-60); padding: var(--space-40) 0; background: transparent; }
/* Mandatory pattern class (kept for compatibility with instructions) */
.section { margin-bottom: 60px; padding: 40px 20px; display: flex; flex-direction: column; gap: 20px; }

/* Card & grid patterns (flex-only) */
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-m); padding: var(--space-20); box-shadow: var(--shadow-s); }
.content-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
.text-image-section { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.testimonial-card { display: flex; align-items: center; gap: 20px; padding: 20px; background: #FFFFFF; border: 1px solid var(--color-border); border-radius: var(--radius-m); box-shadow: var(--shadow-s); color: #23323B; }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* Lists */
ul, ol { padding-left: 20px; margin: 0 0 var(--space-20); }
li { margin-bottom: 10px; }
ol { counter-reset: item; }

/* ============ HEADER & NAVIGATION ============ */
header { position: relative; background: var(--color-bg); border-bottom: 1px solid var(--color-border); }
header .container { align-items: center; }
header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--space-16); padding: 14px 0; }
.brand { display: flex; align-items: center; }
.brand img { height: 36px; width: auto; }

.main-nav { display: none; align-items: center; gap: var(--space-16); }
.main-nav a { color: #2A3D48; padding: 8px 10px; border-radius: 8px; transition: background-color .2s ease, color .2s ease; }
.main-nav a:hover { background: var(--color-accent); color: var(--color-primary); text-decoration: none; }
.main-nav a[aria-current="page"] { color: var(--color-primary); background: #EAF1F5; }

/* Mobile burger button */
.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; background: var(--color-accent); color: var(--color-primary); box-shadow: var(--shadow-s); transition: background .2s ease, transform .15s ease; }
.mobile-menu-toggle:hover { background: #EAF1F5; transform: translateY(-1px); }

/* Mobile menu overlay (full-screen) */
.mobile-menu { position: fixed; inset: 0; display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; padding: 20px; background: rgba(11,58,83,0.06); backdrop-filter: blur(2px); transform: translateX(100%); transition: transform .35s ease; z-index: 9999; }
.mobile-menu .mobile-nav { display: flex; flex-direction: column; gap: 12px; background: #FFFFFF; border: 1px solid var(--color-border); border-radius: var(--radius-m); padding: 20px; box-shadow: var(--shadow-m); }
.mobile-menu .mobile-nav a { font-size: 18px; padding: 12px 10px; color: #23323B; border-radius: 8px; }
.mobile-menu .mobile-nav a:hover { background: var(--color-accent); text-decoration: none; }
.mobile-menu .mobile-menu-close { align-self: flex-end; width: 40px; height: 40px; border-radius: 8px; background: #FFFFFF; border: 1px solid var(--color-border); color: #0B3A53; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; box-shadow: var(--shadow-s); }
/* Open states (supporting two approaches) */
.mobile-menu.open { transform: translateX(0); }
body.menu-open .mobile-menu { transform: translateX(0); }

/* Show desktop nav on larger screens */
@media (min-width: 980px) {
  .main-nav { display: flex; }
  .mobile-menu-toggle { display: none; }
}

/* ============ HERO ============ */
.hero { background: var(--color-accent); border-bottom: 1px solid var(--color-border); }
.hero .content-wrapper { padding: 20px 0; }
.hero h1 { font-size: 28px; }
.hero .subheadline { font-size: 16px; max-width: 60ch; }
.supporting-points { display: flex; flex-direction: column; gap: 8px; margin-bottom: var(--space-16); }
.trust-badges { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 8px; }
.trust-badges span { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; background: #FFFFFF; border: 1px solid var(--color-border); border-radius: 999px; color: #2A3D48; box-shadow: var(--shadow-s); }
.trust-badges img { height: 16px; width: 16px; }

/* CTA buttons inside rows */
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-row a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 10px; border: 1px solid transparent; background: #FFFFFF; color: var(--color-primary); transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease; box-shadow: var(--shadow-s); font-weight: 600; }
.cta-row a:first-child { background: var(--color-secondary); color: #FFFFFF; border-color: var(--color-secondary); }
.cta-row a:last-child { background: #FFFFFF; color: var(--color-primary); border-color: #CFE3E4; }
.cta-row a:hover { transform: translateY(-1px); box-shadow: var(--shadow-m); text-decoration: none; }

/* Text sections */
.text-section { display: flex; flex-direction: column; gap: 10px; max-width: 80ch; }
.text-section img { display: inline-block; vertical-align: middle; margin-right: 8px; }

/* Ordered steps styling where present */
ol { padding-left: 20px; }
ol li { padding-left: 2px; }

/* Testimonials - ensure strong contrast and readability */
.testimonial-card p { margin: 0; }
.testimonial-card p + p { color: #31424B; }

/* Footer */
footer { background: #FAFCFE; border-top: 1px solid var(--color-border); }
footer .content-wrapper { padding: 20px 0; gap: 20px; }
.footer-links { display: flex; flex-direction: column; gap: 20px; }
.footer-links nav { display: flex; flex-direction: column; gap: 8px; }
.footer-links nav strong { color: var(--color-primary); margin-bottom: 4px; }
.footer-contact { display: flex; flex-direction: column; gap: 8px; color: #2A3D48; }
footer a { color: #2A3D48; }
footer a:hover { color: var(--color-primary); text-decoration: underline; }

/* Page-specific small elements */
.language-note { margin-top: 4px; }
.hint { background: #F8FBFC; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: 10px; }
.disclaimer { background: #FAFAFA; padding: 10px 12px; border-left: 3px solid #DDE6EB; border-radius: 8px; }

/* ============ BUTTON UTILITIES (optional generic) ============ */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 18px; border-radius: 10px; border: 1px solid transparent; font-weight: 600; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease; box-shadow: var(--shadow-s); }
.btn:focus-visible { outline: 2px solid #84C7C8; outline-offset: 2px; }
.btn-primary { background: var(--color-secondary); color: #FFFFFF; border-color: var(--color-secondary); }
.btn-primary:hover { box-shadow: var(--shadow-m); transform: translateY(-1px); }
.btn-outline { background: #FFFFFF; color: var(--color-primary); border-color: #CFE3E4; }
.btn-outline:hover { background: var(--color-accent); transform: translateY(-1px); }

/* ============ COOKIE CONSENT (Banner + Modal) ============ */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; padding: 16px; transform: translateY(110%); transition: transform .35s ease; z-index: 9998; }
.cookie-banner .cookie-inner { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 1120px; background: #FFFFFF; border: 1px solid var(--color-border); border-radius: var(--radius-m); padding: 16px; box-shadow: var(--shadow-m); }
.cookie-banner .cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-banner .cookie-actions .btn { flex: 1 1 auto; min-width: 140px; }
.cookie-banner.show { transform: translateY(0); }
.cookie-banner .cookie-title { font-family: Georgia, 'Times New Roman', serif; font-size: 18px; color: var(--color-primary); margin: 0; }
.cookie-banner p { margin: 0; color: #2A3D48; }

/* Cookie settings modal */
.cookie-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.35); opacity: 0; pointer-events: none; transition: opacity .3s ease; z-index: 9997; }
.cookie-backdrop.show { opacity: 1; pointer-events: auto; }
.cookie-modal { position: fixed; left: 50%; top: 50%; transform: translate(50%, -50%) scale(.98); display: flex; flex-direction: column; gap: 16px; width: min(92%, 640px); background: #FFFFFF; border: 1px solid var(--color-border); border-radius: var(--radius-l); padding: 20px; box-shadow: var(--shadow-m); opacity: 0; pointer-events: none; transition: transform .3s ease, opacity .3s ease; z-index: 10000; }
.cookie-modal.show { transform: translate(-50%, -50%) scale(1); opacity: 1; pointer-events: auto; }
.cookie-modal .modal-header { display: flex; align-items: center; justify-content: space-between; }
.cookie-modal .modal-header h3 { margin: 0; }
.cookie-modal .modal-body { display: flex; flex-direction: column; gap: 12px; }
.cookie-options { display: flex; flex-direction: column; gap: 10px; }
.cookie-option { display: flex; justify-content: space-between; align-items: center; gap: 16px; border: 1px solid var(--color-border); border-radius: 10px; padding: 10px 12px; }
.cookie-option .label { display: flex; flex-direction: column; gap: 2px; }
.cookie-option .label strong { color: var(--color-primary); }
.cookie-modal .modal-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* Toggle switch for cookie categories */
.switch { position: relative; display: inline-flex; align-items: center; width: 44px; height: 26px; }
.switch input { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; background: #CFD8DE; border-radius: 999px; outline: none; transition: background .2s ease; position: relative; }
.switch input::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; background: #FFFFFF; border-radius: 50%; box-shadow: var(--shadow-s); transition: transform .2s ease; }
.switch input:checked { background: var(--color-secondary); }
.switch input:checked::after { transform: translateX(18px); }
.switch input:disabled { opacity: .6; }

/* ============ RESPONSIVE BEHAVIOR ============ */
@media (min-width: 600px) {
  .hero h1 { font-size: 32px; }
  .hero .subheadline { font-size: 18px; }
}
@media (min-width: 768px) {
  .text-image-section { flex-direction: row; }
  .hero h1 { font-size: 40px; }
  section { padding: var(--space-40) 0; }
}
@media (min-width: 1024px) {
  h1 { font-size: 48px; }
  h2 { font-size: 32px; }
  h3 { font-size: 22px; }
  .footer-links { flex-direction: row; justify-content: space-between; }
  .footer-links nav { flex: 1 1 45%; }
}

/* ============ ACCESSORY STYLES FOR SPECIFIC ELEMENTS PRESENT IN HTML ============ */
/* Footer variations used on some pages (single-row nav) */
footer nav { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Special lists used as key content blocks */
.content-wrapper > ul, .content-wrapper > ol { background: #FFFFFF; border: 1px solid var(--color-border); border-radius: var(--radius-m); padding: 16px 18px; box-shadow: var(--shadow-s); }

/* Hero CTAs alignment on narrow screens */
.hero .cta-row { margin-top: 6px; }

/* Address/phone/mail icon rows inside text-section */
.text-section p img { height: 18px; width: 18px; }

/* ============ SAFETY: PREVENT OVERLAP & CONSISTENT GAPS ============ */
.content-wrapper > * + * { margin-top: 0; }
.card + .card, .testimonial-card + .testimonial-card { margin-top: 20px; }

/* ============ PRINT BASICS ============ */
@media print {
  .mobile-menu, .mobile-menu-toggle, .cookie-banner, .cookie-backdrop, .cookie-modal { display: none !important; }
  a { text-decoration: underline; }
}

/* ============ END ============ */
