/* =============================
   Passionsfabriken – style.css
   Creative Artistic theme (flex-only layouts)
   ============================= */

/* ---------- CSS Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: Verdana, Geneva, Tahoma, sans-serif; color: #0F172A; background: #FFFFFF; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: #1E3A8A; text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }
:focus-visible { outline: 3px dashed #F59E0B; outline-offset: 3px; }

/* ---------- Brand Variables (with fallbacks) ---------- */
:root {
  --primary: #1E3A8A; /* deep blue */
  --secondary: #2F855A; /* creative green */
  --accent: #F3F4F6; /* light cool gray */
  --ink: #0F172A; /* text */
  --muted: #475569; /* secondary text */
  --pink: #EC4899; /* artistic accent */
  --sun: #F59E0B; /* warm accent */
  --sky: #06B6D4; /* pop accent */
  --paper: #FFFFFF; /* base background */
  --shadow: 0 10px 20px rgba(2, 8, 23, 0.08), 0 2px 6px rgba(2, 8, 23, 0.06);
  --radius-s: 10px; --radius-m: 16px; --radius-l: 22px;
  --gap-s: 12px; --gap: 20px; --gap-l: 30px;
}

/* ---------- Typography Scale ---------- */
h1, h2, h3, h4, h5, h6 { font-family: "Trebuchet MS", Verdana, Arial, sans-serif; color: var(--primary); margin: 0 0 12px; line-height: 1.25; letter-spacing: -0.2px; }
h1 { font-size: 40px; }
h2 { font-size: 32px; position: relative; }
h3 { font-size: 24px; color: var(--secondary); }
h4 { font-size: 20px; }
p { margin: 0 0 12px; color: #5a6784; }
.lead { font-size: 18px; color: var(--muted); }
strong { color: var(--ink); }

/* Artistic underline for section headings */
h2::after { content: ""; display: block; width: 68px; height: 8px; background: var(--sun); border-radius: 6px; margin-top: 10px; }

/* ---------- Global Layout Helpers (Flex-only) ---------- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; display: flex; flex-direction: column; align-items: stretch; }
.content-wrapper { display: flex; flex-direction: column; gap: var(--gap); align-items: flex-start; }

/* Mandatory spacing classes (included exactly as requested) */
.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 native section spacing and creative alternation */
main > section { padding: 40px 0; }
main > section:nth-of-type(odd) { background: var(--paper); }
main > section:nth-of-type(even) { background: var(--accent); }

/* ---------- Header & Navigation ---------- */
header { position: sticky; top: 0; z-index: 1000; background: #FFFFFF; border-bottom: 1px solid #E5E7EB; box-shadow: 0 2px 8px rgba(2,8,23,0.04); }
header .container { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.logo img { height: 38px; width: auto; }

.main-nav { display: none; align-items: center; gap: 16px; }
.main-nav a { color: var(--ink); font-size: 14px; font-weight: 600; letter-spacing: 0.2px; padding: 8px 10px; border-radius: 8px; transition: all .25s ease; }
.main-nav a:hover { background: var(--accent); color: var(--primary); text-decoration: none; }
/* Highlight key CTAs in nav */
.main-nav a[href*="anmalan"], .main-nav a[href*="bokning"] {
  background: var(--primary); color: #fff; padding: 8px 14px; border-radius: 999px; box-shadow: var(--shadow);
}
.main-nav a[href*="anmalan"]:hover, .main-nav a[href*="bokning"]:hover { transform: translateY(-1px); background: #0F2C79; }

/* Mobile menu button */
.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; background: var(--primary); color: #fff; border: none; cursor: pointer; font-size: 22px; box-shadow: var(--shadow); transition: transform .2s ease; }
.mobile-menu-toggle:hover { transform: scale(1.04); }

/* Mobile menu overlay & panel (flex-only) */
.mobile-menu { position: fixed; inset: 0; display: none; flex-direction: row; justify-content: flex-end; align-items: stretch; background: rgba(2,8,23,0.5); z-index: 1200; }
.mobile-menu.active { display: flex; }
.mobile-nav { width: 84%; max-width: 360px; background: #FFFFFF; display: flex; flex-direction: column; gap: 6px; padding: 18px; transform: translateX(100%); transition: transform .35s ease; box-shadow: -8px 0 24px rgba(2,8,23,0.12); }
.mobile-menu.active .mobile-nav { transform: translateX(0); }
.mobile-menu-close { align-self: flex-end; background: transparent; border: 2px solid var(--accent); color: var(--ink); border-radius: 10px; padding: 6px 10px; font-size: 18px; cursor: pointer; }
.mobile-nav a { display: flex; align-items: center; padding: 12px 10px; border-radius: 10px; color: var(--ink); font-weight: 600; font-size: 16px; }
.mobile-nav a:hover { background: var(--accent); color: var(--primary); text-decoration: none; }
.mobile-nav a[href*="anmalan"], .mobile-nav a[href*="bokning"] { background: var(--secondary); color: #fff; justify-content: center; margin-top: 4px; }

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

/* ---------- Hero / CTA Rows / Trust / Metrics ---------- */
.cta-row { display: flex; flex-wrap: wrap; gap: var(--gap); align-items: center; }
.cta-row a { display: inline-flex; align-items: center; justify-content: center; padding: 12px 20px; border-radius: 14px; font-weight: 700; letter-spacing: 0.3px; transition: transform .2s ease, background-color .2s ease, color .2s ease; box-shadow: var(--shadow); }
.cta-row a:first-child { background: var(--primary); color: #fff; }
.cta-row a:first-child:hover { transform: translateY(-2px); background: #173174; }
.cta-row a:nth-child(2) { background: #FFFFFF; color: var(--primary); border: 2px solid var(--primary); }
.cta-row a:nth-child(2):hover { background: var(--accent); transform: translateY(-2px); }

.trust-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.trust-item { display: flex; align-items: center; gap: 8px; background: #FFFFFF; border: 1px solid #E5E7EB; padding: 8px 12px; border-radius: 12px; color: var(--muted); font-size: 14px; }
.trust-item img { width: 18px; height: 18px; }

.metrics-bar { display: flex; flex-wrap: wrap; gap: 16px; align-items: stretch; }
.metrics-bar > div { flex: 1 1 160px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; background: #FFFFFF; border: 1px solid #E5E7EB; border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow); }
.metrics-bar strong { font-size: 22px; color: var(--secondary); }
.metrics-bar span { font-size: 13px; color: var(--muted); }

.mini-testimonial { display: flex; flex-direction: column; gap: 6px; background: #FFFFFF; border-left: 6px solid var(--pink); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }

.social-proof-row { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-style: italic; }

/* ---------- Text & Lists ---------- */
.text-section { display: flex; flex-direction: column; gap: 10px; background: #FFFFFF; padding: 16px; border-radius: 14px; border: 1px solid #E5E7EB; box-shadow: var(--shadow); }
.text-section h3 { margin-top: 4px; }

ul, ol { padding-left: 20px; margin: 0; display: flex; flex-direction: column; gap: 6px; }
li { margin: 0; }

/* ---------- USP / Grids (Flex-only) ---------- */
.usp-grid { display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; }
.usp-grid .text-section { flex: 1 1 240px; }

/* ---------- Testimonials (must be dark text on light bg) ---------- */
.testimonial-card { background: #FFFFFF; border: 2px solid #E5E7EB; border-radius: 18px; box-shadow: var(--shadow); color: var(--ink); }
.testimonial-card p { margin: 0; }
.testimonial-card strong { color: var(--primary); }

/* ---------- Cards (generic) ---------- */
.card { background: #FFFFFF; border: 1px solid #E5E7EB; border-radius: 16px; padding: 18px; box-shadow: var(--shadow); }

/* ---------- Footer ---------- */
footer section { padding: 40px 0; background: #0D1B4C; color: #E5E7EB; }
footer .content-wrapper { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.footer-brand, .footer-nav, .footer-legal, .footer-contact { display: flex; flex-direction: column; gap: 10px; }
.footer-brand img { width: 42px; height: auto; }
.footer-nav a, .footer-legal a { color: #E5E7EB; font-size: 14px; padding: 4px 0; }
.footer-nav a:hover, .footer-legal a:hover { color: #FFFFFF; text-decoration: underline; }
.footer-contact a { color: #FFFFFF; }

/* ---------- Buttons & Links (Generic) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 18px; border-radius: 14px; border: none; cursor: pointer; font-weight: 700; transition: transform .2s ease, background-color .2s ease, color .2s ease; box-shadow: var(--shadow); }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { transform: translateY(-2px); background: #173174; }
.btn--outline { background: #fff; color: var(--primary); border: 2px solid var(--primary); }
.btn--outline:hover { background: var(--accent); }

/* ---------- Images in text rows ---------- */
.text-section img { display: inline-block; vertical-align: middle; margin-right: 8px; }

/* ---------- Responsive rules ---------- */
@media (min-width: 768px) {
  h1 { font-size: 48px; }
  .lead { font-size: 20px; }
  .text-image-section { flex-direction: row; }
}
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; }
}

/* ---------- Creative micro-accents ---------- */
/* Color tags for emphasis */
mark { background: #FEF3C7; color: var(--ink); padding: 0 4px; border-radius: 4px; }

/* Decorative chips for headings (artistic vibe) */
h1::before { content: ""; display: inline-block; width: 10px; height: 10px; background: var(--pink); border-radius: 50%; margin-right: 8px; }
h1::after { content: ""; display: inline-block; width: 10px; height: 10px; background: var(--sky); border-radius: 50%; margin-left: 8px; }

/* ---------- Tables (if any appear) ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #E5E7EB; }
th { background: var(--accent); color: var(--primary); }

/* ---------- Mobile Menu & Cookie Animations ---------- */
@keyframes slideUpIn { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Cookie Consent Banner ---------- */
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1300; background: #FFFFFF; border: 2px solid #E5E7EB; border-radius: 16px; box-shadow: var(--shadow); display: none; flex-direction: column; gap: 12px; padding: 16px; }
.cookie-banner.show { display: flex; animation: slideUpIn .35s ease both; }
.cookie-banner .cookie-content { display: flex; flex-direction: column; gap: 10px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cookie-actions .accept-all { background: var(--secondary); color: #fff; }
.cookie-actions .reject-all { background: #FFFFFF; color: var(--secondary); border: 2px solid var(--secondary); }
.cookie-actions .settings { background: var(--primary); color: #fff; }
.cookie-actions button { border: none; padding: 10px 14px; border-radius: 12px; font-weight: 700; cursor: pointer; box-shadow: var(--shadow); }
.cookie-actions button:hover { transform: translateY(-1px); }

/* Cookie Settings Modal */
.cookie-modal { position: fixed; inset: 0; z-index: 1400; display: none; align-items: center; justify-content: center; background: rgba(2,8,23,0.55); }
.cookie-modal.show { display: flex; animation: fadeIn .25s ease both; }
.cookie-modal .modal-inner { width: min(720px, 92%); background: #FFFFFF; border-radius: 18px; border: 1px solid #E5E7EB; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px; padding: 18px; }
.cookie-modal .modal-header { display: flex; align-items: center; justify-content: space-between; }
.cookie-modal .modal-body { display: flex; flex-direction: column; gap: 12px; }
.cookie-modal .category { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid #E5E7EB; border-radius: 12px; background: #FFFFFF; }
.cookie-modal .category .label { display: flex; flex-direction: column; gap: 4px; }
.toggle { width: 48px; height: 28px; background: #CBD5E1; border-radius: 999px; position: relative; display: inline-flex; align-items: center; padding: 3px; transition: background-color .2s ease; }
.toggle::after { content: ""; width: 22px; height: 22px; background: #FFFFFF; border-radius: 50%; box-shadow: 0 1px 3px rgba(2,8,23,0.24); transform: translateX(0); transition: transform .2s ease; }
.toggle.on { background: var(--secondary); }
.toggle.on::after { transform: translateX(20px); }
.cookie-modal .modal-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.cookie-modal .btn-save { background: var(--primary); color: #fff; }
.cookie-modal .btn-cancel { background: #FFFFFF; color: var(--primary); border: 2px solid var(--primary); }

/* ---------- Accessibility helpers ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- Page-specific refinements ---------- */
/* Index hero extra spacing */
[aria-labelledby="hero"] .content-wrapper { gap: 22px; }

/* Resultat badges */
[aria-labelledby="deltagarresultat"] .metrics-bar strong,
[aria-label="Nyckeltal"] strong { color: var(--secondary); }

/* Footer layout on desktop */
@media (min-width: 992px) {
  footer .content-wrapper { flex-direction: row; }
  .footer-brand { flex: 2 1 260px; }
  .footer-nav, .footer-legal, .footer-contact { flex: 1 1 200px; }
}

/* ---------- Forms (if added later) ---------- */
input, select, textarea { width: 100%; padding: 12px 14px; border: 1px solid #CBD5E1; border-radius: 12px; background: #FFFFFF; font: inherit; color: var(--ink); }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30,58,138,0.15); outline: none; }
label { display: flex; margin-bottom: 6px; font-weight: 700; color: var(--ink); }

/* ---------- Prevent overlaps & ensure gaps ---------- */
.content-wrapper > * { width: 100%; }
.content-wrapper, .card-container, .content-grid, .usp-grid, .trust-row, .metrics-bar, .cta-row { gap: 20px; }

/* ---------- Desktop enhancements ---------- */
@media (min-width: 1100px) {
  .container { padding: 0 24px; }
}

/* ---------- Print basics ---------- */
@media print {
  header, .mobile-menu, .cookie-banner, .cookie-modal, footer { display: none !important; }
  a { text-decoration: underline; color: #000; }
}
