/* =============================
   Harmony Whisper Kostenacademie
   style.css — Scandinavian Clean
   Mobile-first, ONLY Flexbox
   ============================= */

/* ========== CSS Reset & Base ========== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: Arial, Helvetica, sans-serif; color: #1F2937; background-color: #F7FAFC; line-height: 1.6; }
img, svg { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
ul, ol { margin: 0 0 16px 22px; padding: 0; }
a { color: #0A3D62; text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; background: none; border: none; padding: 0; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid #2E7D32; outline-offset: 2px; }

/* ========== Design Tokens ========== */
:root {
  --color-primary: #0A3D62;
  --color-secondary: #2E7D32;
  --color-accent: #F7FAFC; /* brand accent (light) */
  --color-surface: #FFFFFF; /* card / surface */
  --color-muted: #6B7280; /* secondary text */
  --color-text: #1F2937; /* main text */
  --color-border: #E5E7EB; /* soft border */
  --color-soft: #F5F6F7; /* gentle section bg */

  --radius-s: 8px;
  --radius-m: 12px;
  --shadow-1: 0 1px 2px rgba(0,0,0,0.04), 0 6px 18px rgba(16,24,40,0.06);
  --shadow-2: 0 1px 3px rgba(0,0,0,0.08), 0 10px 30px rgba(16,24,40,0.10);
}

/* ========== Typography ========== */
h1, h2, h3, h4 { font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; color: var(--color-primary); line-height: 1.25; margin: 0 0 14px; }
h1 { font-size: 32px; letter-spacing: 0.2px; }
h2 { font-size: 24px; color: #0F2F49; }
h3 { font-size: 18px; color: #224B6E; }
h4 { font-size: 16px; color: #274B3A; }
p { margin: 0 0 14px; color: var(--color-text); }
small, .text-muted { color: var(--color-muted); }
strong { color: #0F2F49; font-weight: 700; }

/* ========== Layout Helpers ========== */
.container { width: 100%; max-width: 1120px; padding: 0 20px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.content-wrapper { display: flex; flex-direction: column; gap: 18px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.text-section { display: flex; flex-direction: column; gap: 14px; }

/* Mandatory spacing and alignment patterns (exact) */
.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; }

/* ========== Header & Navigation ========== */
header { position: sticky; top: 0; background: var(--color-surface); border-bottom: 1px solid var(--color-border); z-index: 50; }
header .container { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.logo img { height: 32px; width: auto; }

.main-nav { display: none; align-items: center; gap: 16px; flex-wrap: wrap; }
.main-nav a { color: var(--color-text); padding: 8px 10px; border-radius: 8px; transition: background-color 0.2s ease, color 0.2s ease; }
.main-nav a:hover { background: var(--color-soft); color: var(--color-primary); text-decoration: none; }

/* Header CTA */
.btn.cta { display: none; }

/* Mobile menu toggle */
.mobile-menu-toggle { font-size: 22px; line-height: 1; width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--color-surface); border: 1px solid var(--color-border); transition: background-color 0.2s ease, transform 0.2s ease; }
.mobile-menu-toggle:hover { background: var(--color-soft); transform: translateY(-1px); }

/* Mobile full-screen menu */
.mobile-menu { position: fixed; inset: 0; background: var(--color-surface); display: flex; flex-direction: column; padding: 18px 20px; transform: translateX(100%); transition: transform 0.3s ease; box-shadow: var(--shadow-2); z-index: 90; }
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-close { align-self: flex-end; font-size: 22px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--color-border); background: var(--color-surface); margin-bottom: 8px; }
.mobile-menu-close:hover { background: var(--color-soft); }
.mobile-nav { display: flex; flex-direction: column; gap: 10px; }
.mobile-nav a { display: flex; align-items: center; padding: 12px 10px; border-radius: 10px; color: var(--color-text); border: 1px solid transparent; transition: background-color 0.2s ease, border-color 0.2s ease; }
.mobile-nav a:hover { background: var(--color-soft); border-color: var(--color-border); text-decoration: none; }

/* ========== Hero Section ========== */
.hero { background: var(--color-accent); border-bottom: 1px solid var(--color-border); }
.hero .container { padding-top: 36px; padding-bottom: 36px; }
.hero h1 { color: var(--color-primary); }
.hero p { color: var(--color-text); }
.trust ul { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.trust li { display: flex; align-items: center; gap: 8px; padding-left: 0; color: var(--color-text); }

/* ========== Sections (generic) ========== */
main section { padding: 28px 0; border-bottom: 1px solid #F0F2F4; }
main section:last-of-type { border-bottom: none; }

/* ========== Cards & Testimonials ========== */
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-m); padding: 16px; box-shadow: var(--shadow-1); }
.card:hover { box-shadow: var(--shadow-2); }

/* Readable testimonials on light bg */
.testimonial-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-m); box-shadow: var(--shadow-1); color: var(--color-text); }
.testimonial-card p { margin: 0; }
.testimonial-card p + p { color: var(--color-muted); }

/* ========== Buttons ========== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 999px; font-weight: 600; border: 1px solid transparent; transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { background: var(--color-primary); color: #FFFFFF; box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset, var(--shadow-1); }
.btn.primary:hover { background: #093552; box-shadow: var(--shadow-2); text-decoration: none; }
.btn.secondary { background: #EEF3F6; color: #0F2F49; border: 1px solid var(--color-border); }
.btn.secondary:hover { background: #E7EEF2; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--color-primary); border: 1px solid var(--color-border); }
.btn.ghost:hover { background: var(--color-soft); }

/* ========== Lists ========== */
ul li, ol li { margin-bottom: 8px; }
ol { padding-left: 22px; }

/* ========== Footer ========== */
footer { background: #FAFBFC; border-top: 1px solid var(--color-border); }
footer .container { padding-top: 28px; padding-bottom: 28px; }
footer .content-wrapper { display: flex; flex-direction: column; gap: 18px; }
.footer-brand { display: flex; flex-direction: column; gap: 10px; }
.footer-brand img { height: 28px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.footer-nav a { color: var(--color-text); padding: 6px 8px; border-radius: 8px; }
.footer-nav a:hover { background: var(--color-soft); text-decoration: none; }
.footer-contact { display: flex; flex-direction: column; gap: 6px; color: var(--color-text); }
.footer-social { display: flex; align-items: center; gap: 8px; color: var(--color-muted); }

/* ========== Utility Surfaces ========== */
.surface { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-m); box-shadow: var(--shadow-1); padding: 16px; }
.muted { color: var(--color-muted); }

/* ========== Cookie Consent Banner ========== */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; background: #FFFFFF; border-top: 1px solid var(--color-border); box-shadow: 0 -8px 24px rgba(16,24,40,0.08); padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; z-index: 100; transform: translateY(100%); transition: transform 0.3s ease; }
.cookie-banner.show { transform: translateY(0); }
.cookie-banner .cookie-text { display: flex; flex-direction: column; gap: 8px; color: var(--color-text); }
.cookie-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.cookie-buttons .btn { padding: 8px 14px; }
.cookie-accept { background: var(--color-secondary); color: #fff; }
.cookie-accept:hover { background: #256b2a; }
.cookie-reject { background: #F0F3F5; color: var(--color-text); border: 1px solid var(--color-border); }
.cookie-settings { background: transparent; color: var(--color-primary); border: 1px solid var(--color-border); }

/* Cookie Preferences Modal */
.cookie-modal { position: fixed; inset: 0; background: rgba(17,24,39,0.45); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 120; opacity: 0; pointer-events: none; transition: opacity 0.25s ease; }
.cookie-modal.open { opacity: 1; pointer-events: auto; }
.cookie-modal .cookie-modal-content { background: #FFFFFF; width: 100%; max-width: 700px; border-radius: 16px; box-shadow: var(--shadow-2); border: 1px solid var(--color-border); display: flex; flex-direction: column; gap: 14px; padding: 20px; transform: translateY(12px); transition: transform 0.25s ease; }
.cookie-modal.open .cookie-modal-content { transform: translateY(0); }
.cookie-modal .modal-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cookie-modal .modal-body { display: flex; flex-direction: column; gap: 10px; }
.cookie-modal .modal-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* Toggle (for cookie categories) */
.toggle { display: flex; align-items: center; gap: 10px; }
.toggle .switch { width: 44px; height: 26px; background: #E4E8EB; border-radius: 99px; position: relative; transition: background-color 0.2s ease; }
.toggle .switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; background: #FFFFFF; border-radius: 50%; box-shadow: 0 1px 2px rgba(0,0,0,0.18); transition: transform 0.2s ease; }
.toggle input:checked + .switch { background: var(--color-primary); }
.toggle input:checked + .switch::after { transform: translateX(18px); }

/* ========== Animations ========== */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.hero .content-wrapper { animation: fadeInUp 0.4s ease both; }

/* ========== Responsive Rules ========== */
@media (min-width: 768px) {
  /* Typography scale up */
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  h3 { font-size: 20px; }

  /* Header */
  .main-nav { display: flex; }
  .btn.cta { display: inline-flex; }
  .mobile-menu-toggle { display: none; }

  /* Hero spacing */
  .hero .container { padding-top: 54px; padding-bottom: 54px; }

  /* Footer layout */
  footer .content-wrapper { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 24px; }
  .footer-brand, .footer-nav, .footer-contact, .footer-social { flex: 1 1 220px; }

  /* Common text-image sections */
  .text-image-section { flex-direction: row; }
}

@media (min-width: 1024px) {
  h1 { font-size: 48px; }
  .container { gap: 24px; }
}

/* ========== Accessibility & Contrast Tweaks ========== */
.hero, .section, .surface, .testimonial-card { color: var(--color-text); }
.testimonial-card strong { color: var(--color-text); }

/* ========== Additional Flex Layout Utilities for Pages ========== */
/* Many pages use these wrappers; ensure spacious Scandinavian rhythm */
.content-grid > * { flex: 1 1 300px; min-width: 260px; }
.card-container > .card { flex: 1 1 300px; min-width: 260px; }

/* ========== Page-specific gentle accents ========== */
/* Subtle alternating backgrounds for readability */
main section:nth-of-type(odd) { background: #FAFCFE; }
main section.hero { background: var(--color-accent); }

/* ========== Tables (if any appear later) ========== */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--color-border); }
th { background: #F5F7FA; color: #0F2F49; font-weight: 600; }

/* ========== Forms (placeholders if added later) ========== */
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: 10px; background: #FFFFFF; color: var(--color-text); }
input:focus, select:focus, textarea:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(10,61,98,0.12); outline: none; }
label { display: block; margin-bottom: 6px; color: var(--color-text); font-weight: 600; }

/* ========== Spacing helpers ========== */
.mt-0 { margin-top: 0 !important; } .mt-8 { margin-top: 8px !important; } .mt-16 { margin-top: 16px !important; } .mt-24 { margin-top: 24px !important; }
.mb-0 { margin-bottom: 0 !important; } .mb-8 { margin-bottom: 8px !important; } .mb-16 { margin-bottom: 16px !important; } .mb-24 { margin-bottom: 24px !important; }
.pt-0 { padding-top: 0 !important; } .pb-0 { padding-bottom: 0 !important; }

/* ========== Header link current/active suggestion (if JS adds .active) ========== */
.main-nav a.active, .mobile-nav a.active { color: var(--color-primary); background: var(--color-soft); border: 1px solid var(--color-border); }

/* ========== Prevent overlaps and ensure gaps ========== */
main .container, footer .container { gap: 20px; }
.content-wrapper > * + * { margin-top: 0; }

/* ========== Scandinavian micro-interactions ========== */
.card, .testimonial-card, .btn, .mobile-menu-toggle, .mobile-menu-close { transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease; }
.card:hover, .testimonial-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }

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