/* ===============================
   Sparkling Trek – Industrial Modern CSS
   Author: Senior CSS Dev & UI Designer
   Requirements met:
   - Industrial modern aesthetic (dark, metallic, urban)
   - Brand colors & fonts
   - Mobile-first, ONLY flexbox (no CSS Grid/Columns)
   - Mandatory spacing patterns
   - Mobile burger menu + cookie consent banner
   - High contrast testimonials (dark text on light background)
   =============================== */

/* -------- CSS Reset & Normalize -------- */
* { box-sizing: border-box; }
html { line-height: 1.15; -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul, ol { margin: 0; padding: 0 0 0 0; list-style: none; }
h1, h2, h3, h4, h5, h6, p { margin: 0 0 12px 0; }
:focus { outline: none; }
:focus-visible { outline: 2px solid #D6452D; outline-offset: 2px; }

/* -------- Design Tokens -------- */
:root {
  --primary: #0B3A6E;           /* Brand primary */
  --secondary: #D6452D;         /* Brand secondary (CTA) */
  --accent: #F4F7FB;            /* Brand accent (light surfaces) */
  --bg: #0E1216;                /* Industrial dark background */
  --bg-elev: #141A21;           /* Elevated dark surface */
  --surface: #1A2129;           /* Panels / cards dark surface */
  --text: #E6ECF2;              /* Light text */
  --muted: #A6B0BB;             /* Muted text */
  --metal: #2A2F36;             /* Metallic border/delineation */
  --metal-light: #3A414B;       /* Lighter metallic */
  --success: #3BAA6D;
  --warning: #E6A700;
  --shadow: rgba(0,0,0,0.35);
}

/* -------- Base -------- */
body {
  background: var(--bg);
  color: var(--text);
  font-family: Verdana, "Segoe UI", Tahoma, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

h1, h2, h3, h4 { font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif; }
h1 { font-size: 32px; line-height: 1.2; letter-spacing: 0.4px; }
h2 { font-size: 24px; line-height: 1.3; letter-spacing: 0.3px; }
h3 { font-size: 18px; line-height: 1.4; letter-spacing: 0.2px; }
h4 { font-size: 16px; letter-spacing: 0.1px; color: var(--muted); }

p { font-size: 16px; color: var(--text); }
strong { color: #FFFFFF; font-weight: 700; }

/* links */
.main-nav a, .mobile-nav a { text-transform: uppercase; letter-spacing: 0.7px; }
a:hover { color: #FFFFFF; }

/* Containers */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; flex-direction: column; gap: 20px; }
.content-wrapper { display: flex; flex-direction: column; gap: 18px; }
.text-section { display: flex; flex-direction: column; gap: 12px; }

/* Lists inside text sections */
.text-section ul li, .text-section ol li { display: flex; align-items: center; gap: 10px; padding: 6px 0; color: var(--text); }
.text-section ul li img, .text-section ol li img { width: 20px; height: 20px; filter: brightness(0) invert(0.9); opacity: 0.9; }

/* Mandatory spacing & alignment patterns */
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; }
.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; }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* Ensure default sections also have breathing room */
main > section { margin-bottom: 60px; padding: 40px 0; background: transparent; }

/* -------- Header & Navigation -------- */
header { background: #0B1016; border-bottom: 1px solid var(--metal); box-shadow: 0 2px 12px var(--shadow); position: relative; z-index: 50; }
header .container { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.logo img { height: 42px; width: auto; display: block; }

.main-nav { display: none; align-items: center; gap: 14px; }
.main-nav a { color: var(--muted); padding: 10px 12px; border: 1px solid transparent; border-radius: 6px; transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease; }
.main-nav a:hover { color: #FFF; border-color: var(--metal-light); background: #0F1620; transform: translateY(-1px); }
.main-nav .cta { color: #fff; background: var(--secondary); border-color: var(--secondary); }
.main-nav .cta:hover { filter: brightness(1.05); }
.main-nav .cta-secondary { color: #FFF; border-color: var(--metal-light); background: transparent; }
.main-nav .cta-secondary:hover { background: #16202B; }

/* Mobile menu toggle */
.mobile-menu-toggle { position: fixed; right: 16px; top: 16px; z-index: 130; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 6px; color: #FFF; background: #111820; border: 1px solid var(--metal); box-shadow: 0 4px 12px var(--shadow); }
.mobile-menu-toggle:hover { background: #16202A; }

/* Mobile Menu Overlay */
.mobile-menu { position: fixed; inset: 0; background: rgba(10, 14, 18, 0.85); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; transform: translateX(100%); transition: transform 280ms ease; z-index: 120; }
.mobile-menu.active { transform: translateX(0); }
.mobile-menu-close { margin: 16px; align-self: flex-end; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: #FFF; background: #111820; border: 1px solid var(--metal); border-radius: 6px; }
.mobile-nav { background: #0E151D; border-top: 1px solid var(--metal); border-left: 1px solid var(--metal); box-shadow: -6px 0 18px var(--shadow) inset; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.mobile-nav a { color: #E8EEF5; padding: 14px 12px; border-radius: 6px; border: 1px solid transparent; background: #121A23; }
.mobile-nav a:hover { background: #16212C; border-color: var(--metal-light); }

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

/* -------- Hero -------- */
.hero { background: #0F151C; border-bottom: 1px solid var(--metal); box-shadow: 0 20px 40px -24px var(--shadow) inset; }
.hero .content-wrapper { padding: 20px 0; }
.hero h1 { color: #FAFCFF; font-size: 28px; }
.hero p { color: var(--text); }

/* CTA Buttons (shared) */
.cta, .btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 18px; border-radius: 8px; color: #FFF; background: var(--secondary); border: 1px solid var(--secondary); box-shadow: 0 8px 20px rgba(214,69,45,0.25), inset 0 1px 0 rgba(255,255,255,0.06); transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease; }
.cta:hover, .btn-primary:hover { transform: translateY(-1px); filter: brightness(1.05); }
.cta:active, .btn-primary:active { transform: translateY(0); }

.cta-secondary, .btn-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 18px; border-radius: 8px; color: #E9F1F7; background: transparent; border: 1px solid var(--metal-light); box-shadow: inset 0 1px 0 rgba(255,255,255,0.05); transition: background-color 160ms ease, transform 160ms ease, border-color 160ms ease; }
.cta-secondary:hover, .btn-secondary:hover { background: #16212B; border-color: #56606C; transform: translateY(-1px); }

/* -------- Sections / Content -------- */
/* Headline accents */
.content-wrapper > h2 { position: relative; padding-left: 14px; }
.content-wrapper > h2::before { content: ""; width: 4px; height: 100%; background: var(--primary); position: absolute; left: 0; top: 0; }

/* Light panels for testimonials as required (dark text on light background) */
.testimonial-card { background: var(--accent); color: #0E151C; border: 1px solid #DDE4EC; border-left: 4px solid var(--primary); border-radius: 10px; box-shadow: 0 6px 18px rgba(0,0,0,0.08); }
.testimonial-card p { color: #0E151C; }
.testimonial-card strong { color: #0B1D2E; }

/* Optional metallic dark cards (not used for testimonials) */
.card { background: var(--surface); border: 1px solid var(--metal); border-radius: 10px; padding: 18px; box-shadow: 0 8px 24px var(--shadow); }

/* Contact lines with icons */
.text-section p img { width: 18px; height: 18px; margin-right: 8px; display: inline-block; vertical-align: middle; filter: brightness(0) invert(0.9); }

/* Content grids (flex-only) */
.content-grid { align-items: stretch; }
.content-grid > * { flex: 1 1 280px; min-width: 260px; }

.card-container > .card { flex: 1 1 300px; min-width: 280px; }

/* Text + Image section */
.text-image-section { justify-content: space-between; }
.text-image-section > * { flex: 1 1 320px; }

/* -------- Footer -------- */
footer { background: #0B1016; border-top: 1px solid var(--metal); padding: 40px 0; color: var(--muted); }
footer .content-wrapper { display: flex; flex-wrap: wrap; gap: 24px; }
footer .text-section { flex: 1 1 240px; min-width: 220px; }
footer a { color: #C7D2DE; }
footer a:hover { color: #FFFFFF; }

/* -------- Cookie Consent Banner -------- */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 200; background: #0E151D; color: #EAF2FA; border-top: 1px solid var(--metal); box-shadow: 0 -6px 20px var(--shadow); padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; transform: translateY(110%); transition: transform 240ms ease; }
.cookie-banner.show { transform: translateY(0); }
.cookie-banner .cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-banner .btn-accept { background: var(--secondary); color: #fff; border: 1px solid var(--secondary); padding: 10px 14px; border-radius: 6px; }
.cookie-banner .btn-reject { background: #121A23; color: #EAF2FA; border: 1px solid var(--metal-light); padding: 10px 14px; border-radius: 6px; }
.cookie-banner .btn-settings { background: transparent; color: #EAF2FA; border: 1px dashed var(--metal-light); padding: 10px 14px; border-radius: 6px; }
.cookie-banner .btn-accept:hover { filter: brightness(1.05); }
.cookie-banner .btn-reject:hover, .cookie-banner .btn-settings:hover { background: #16202B; }

/* Cookie Preferences Modal */
.cookie-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 210; opacity: 0; pointer-events: none; transition: opacity 200ms ease; }
.cookie-modal.open { opacity: 1; pointer-events: auto; }
.cookie-modal .modal-dialog { background: #0F151C; color: #EAF2FA; border: 1px solid var(--metal); border-radius: 10px; box-shadow: 0 18px 48px var(--shadow); width: 92%; max-width: 720px; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.cookie-modal .modal-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--metal); }
.cookie-modal .modal-body { display: flex; flex-direction: column; gap: 12px; }
.cookie-modal .pref-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--metal); }
.cookie-modal .pref-row:last-child { border-bottom: none; }
.cookie-modal .modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.cookie-modal .switch { width: 44px; height: 26px; border-radius: 26px; background: #202A34; border: 1px solid var(--metal-light); position: relative; }
.cookie-modal .switch::after { content: ""; position: absolute; left: 2px; top: 2px; width: 20px; height: 20px; background: #EAF2FA; border-radius: 50%; transition: transform 180ms ease; }
.cookie-modal .switch.on { background: var(--primary); border-color: var(--primary); }
.cookie-modal .switch.on::after { transform: translateX(18px); }

/* -------- Utilities -------- */
.hidden { display: none !important; }
.muted { color: var(--muted); }
.center { display: flex; align-items: center; justify-content: center; }
.nowrap { white-space: nowrap; }

/* -------- Responsive: Mobile-first -------- */
@media (min-width: 480px) {
  h1 { font-size: 34px; }
}

@media (min-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  .text-image-section { flex-direction: row; }
  .hero .content-wrapper { padding: 28px 0; }
}

@media (min-width: 1140px) {
  h1 { font-size: 48px; }
  h2 { font-size: 32px; }
}

/* -------- Additional Industrial Touches -------- */
/* Subtle metallic separators on sections */
main > section { border-top: 1px solid rgba(42,47,54,0.6); border-bottom: 1px solid rgba(42,47,54,0.6); }

/* In-text lists bullets (when no icons) */
.text-section ul li::before { content: ""; width: 8px; height: 8px; border-radius: 1px; background: var(--primary); display: inline-block; margin-right: 10px; box-shadow: 0 0 0 1px rgba(255,255,255,0.06) inset; }
.text-section ul li img + *::before { content: none; }

/* -------- Accessibility & Interactions -------- */
button, a { transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 160ms ease, filter 160ms ease; }

/* -------- Ensure minimum gaps between elements -------- */
.content-wrapper > * + * { margin-top: 0; } /* gaps are handled via flex gap */
.container, .content-wrapper, .card-container, .content-grid, .text-image-section, .testimonial-card, .feature-item { gap: 20px; }

/* -------- Page-specific small refinements -------- */
/* FAQ headings spacing */
.text-section h3 { margin-top: 8px; color: #EAF2FA; }

/* Icon rows in contact blocks */
.text-section p { display: flex; align-items: center; gap: 10px; }

/* Make sure CTAs wrap nicely on mobile */
.text-section .cta, .text-section .cta-secondary { margin-right: 8px; }

/* Header CTA emphasis */
header .main-nav .cta { box-shadow: 0 8px 20px rgba(214,69,45,0.25); }

/* -------- Prevent overlapping and ensure spacing -------- */
main { position: relative; z-index: 1; }
header, footer, .mobile-menu, .cookie-banner, .cookie-modal { position: relative; }

/* -------- Print basics (optional minimal) -------- */
@media print {
  .mobile-menu-toggle, .mobile-menu, .cookie-banner, .cookie-modal { display: none !important; }
  header, footer, main, section { background: #FFF; color: #000; border: none; box-shadow: none; }
}
