/* ===============================
   Blooming Echo Akademi – style.css
   Vibrant Energetic Design – Mobile-first, Flex-only
   =============================== */

/* ===== CSS RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding-left: 1.25rem; }
button { background: none; border: none; cursor: pointer; font: inherit; }
:focus { outline: 2px solid #2DBE7E; outline-offset: 2px; }

/* ===== THEME VARIABLES (with fallbacks) ===== */
:root {
  --primary: #0B5CAB; /* electric blue */
  --primary-700: #084a8a;
  --secondary: #2DBE7E; /* vibrant green */
  --secondary-700: #229464;
  --accent: #FFFFFF; /* white */
  --bg: #0A0D14; /* deep ink backdrop for punchy contrast */
  --bg-alt: #0F1420;
  --surface: #0F1B2E; /* dark card surface for sections when needed */
  --text: #0E1623; /* near-black readable text */
  --text-inverse: #FFFFFF; /* on dark */
  --muted: #5E6B85;
  --border: #D6DEE8;
  --shadow: 0 10px 24px rgba(11, 92, 171, 0.18), 0 4px 12px rgba(0,0,0,0.12);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --space-8: 8px; --space-12: 12px; --space-16: 16px; --space-20: 20px; --space-24: 24px; --space-32: 32px; --space-40: 40px; --space-48: 48px; --space-60: 60px; --space-80: 80px;
  --container: 1140px;
  --transition: 220ms ease;
}

/* ===== TYPOGRAPHY ===== */
body {
  font-family: Arial, Helvetica, sans-serif; /* brand body */
  color: var(--text);
  background: #F7FAFF; /* energetic bright canvas */
  line-height: 1.6;
  font-size: 16px;
}
h1, h2, h3, h4 {
  font-family: "Trebuchet MS", Verdana, Arial, sans-serif; /* brand display */
  margin: 0 0 var(--space-16) 0;
  letter-spacing: 0.2px;
}
h1 { font-size: 32px; line-height: 1.2; }
h2 { font-size: 24px; line-height: 1.25; }
h3 { font-size: 18px; line-height: 1.3; }

p { margin: 0 0 var(--space-16) 0; color: var(--text); }
strong { font-weight: 700; }

/* ===== GLOBAL LAYOUT HELPERS (FLEX-ONLY) ===== */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-20);
  display: flex;
  flex-direction: column;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--space-24);
}

section { padding: var(--space-40) 0; }

/* MANDATORY CSS SPACING AND 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; }

/* ===== TOPBAR / HEADER ===== */
header { position: relative; z-index: 100; }
.topbar {
  position: sticky; top: 0; left: 0; right: 0;
  background: var(--accent);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-12);
  padding: var(--space-12) var(--space-20);
}
.logo { display: flex; align-items: center; }
.logo img { height: 36px; width: auto; }

.main-nav { display: none; align-items: center; gap: var(--space-16); }
.main-nav a {
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--text);
  transition: background var(--transition), color var(--transition), transform var(--transition);
}
.main-nav a:hover { background: #EAF3FF; color: var(--primary); transform: translateY(-1px); }
.main-nav a[aria-current="page"] { color: var(--primary); font-weight: 700; }

.mobile-menu-toggle { font-size: 22px; line-height: 1; color: var(--primary); padding: 8px 12px; border-radius: var(--radius-sm); background: #EAF3FF; }
.mobile-menu-toggle:hover { background: #D8EAFF; }

/* ===== MOBILE MENU OVERLAY ===== */
.mobile-menu {
  position: fixed; inset: 0 auto 0 0; right: 0; /* cover full screen */
  width: 100%; height: 100vh;
  background: var(--primary);
  color: var(--text-inverse);
  display: flex; flex-direction: column; gap: var(--space-24);
  padding: var(--space-24);
  transform: translateX(100%);
  transition: transform 280ms cubic-bezier(.2,.8,.2,1);
  z-index: 999;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-close { align-self: flex-end; font-size: 24px; color: var(--accent); padding: 6px 8px; }
.mobile-nav { display: flex; flex-direction: column; gap: 14px; }
.mobile-nav a {
  color: var(--accent);
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.06);
  transition: background var(--transition), transform var(--transition);
}
.mobile-nav a:hover { background: rgba(255,255,255,0.12); transform: translateX(4px); }

/* ===== HERO ===== */
.hero {
  position: relative;
  background: var(--primary);
  color: var(--text-inverse);
  overflow: hidden;
}
.hero .content-wrapper { align-items: flex-start; }
.hero h1 { font-size: 32px; color: var(--accent); }
.hero p { color: #E8F2FF; max-width: 72ch; }
/* energetic slashes (decorative) */
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  width: 160px; height: 160px; border-radius: 20px;
  background: #2DBE7E; opacity: 0.18; transform: rotate(15deg);
}
.hero::before { top: -40px; right: -30px; }
.hero::after { bottom: -50px; left: -30px; background: #00E0B8; opacity: 0.14; }
.hero .container, .hero .content-wrapper { position: relative; z-index: 1; }

/* ===== BUTTONS ===== */
.btn-primary, .btn-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: var(--radius-md); font-weight: 800; letter-spacing: .2px; text-transform: none; }
.btn-primary { background: var(--secondary); color: #04120B; padding: 12px 20px; box-shadow: var(--shadow); transition: transform var(--transition), box-shadow var(--transition), background var(--transition); }
.btn-primary:hover { transform: translateY(-2px); background: var(--secondary-700); box-shadow: 0 14px 30px rgba(45,190,126,0.28), 0 6px 14px rgba(0,0,0,0.14); }
.btn-secondary { background: #0F1B2E; color: var(--accent); padding: 12px 18px; border: 2px solid #2F8FE2; transition: background var(--transition), color var(--transition), transform var(--transition), border-color var(--transition); }
.btn-secondary:hover { background: #183257; border-color: #57A6F0; transform: translateY(-2px); }
.btn-primary:focus, .btn-secondary:focus { outline: 3px solid rgba(45,190,126,0.6); outline-offset: 2px; }

/* CTA ROW */
.cta-row { display: flex; flex-wrap: wrap; gap: var(--space-16); align-items: center; }

/* ===== LISTS & TEXT SECTIONS ===== */
.text-section { display: flex; flex-direction: column; gap: var(--space-16); }
.text-section ul, .text-section ol { display: flex; flex-direction: column; gap: 10px; }
.text-section li { color: var(--text); }

/* Badges rows on home */
.trust-row ul, .metrics-row ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-12); }
.trust-row li, .metrics-row li {
  background: #FFFFFF; color: var(--text);
  border: 1px solid var(--border); border-left: 4px solid var(--secondary);
  padding: 10px 14px; border-radius: var(--radius-sm);
  box-shadow: 0 4px 10px rgba(11,92,171,.08);
}

/* Breadcrumbs */
nav[aria-label="Brödsmulor"] { display: flex; flex-wrap: wrap; gap: 8px; color: #D7E7FF; font-size: 14px; }
nav[aria-label="Brödsmulor"] a { color: #FFFFFF; text-decoration: underline; }

/* ===== TESTIMONIALS (high contrast on light background) ===== */
.testimonial-card {
  background: #FFFFFF; color: #0B1220;
  border: 1px solid #E6EEF8;
  border-left: 6px solid var(--primary);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 18px rgba(11,92,171,0.10), 0 4px 8px rgba(0,0,0,0.06);
}
.testimonial-card p { margin: 0; }
.testimonial-card strong { color: #092243; }

/* ===== CARDS (generic) ===== */
.card { background: #FFFFFF; color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-20); box-shadow: var(--shadow); }

/* ===== DETAILS / SUMMARY ===== */
details { background: #FFFFFF; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0; overflow: hidden; }
details + details { margin-top: var(--space-12); }
summary { list-style: none; cursor: pointer; padding: 14px 16px; font-weight: 700; color: #0E2B57; display: flex; align-items: center; justify-content: space-between; }
summary::after { content: "+"; font-weight: 900; color: var(--secondary); margin-left: 10px; transition: transform var(--transition); }
details[open] summary::after { content: "–"; transform: rotate(180deg); }
details > *:not(summary) { padding: 0 16px 16px 16px; }

/* ===== PAGINATION ===== */
.pagination { display: flex; gap: var(--space-12); align-items: center; margin-top: var(--space-16); }
.pagination a { padding: 10px 14px; border-radius: var(--radius-sm); background: #EAF3FF; color: var(--primary); }
.pagination a:hover { background: #D8EAFF; }

/* ===== FOOTER ===== */
footer section { background: #0A0F1A; color: #E6F0FF; }
footer .content-wrapper { flex-direction: column; gap: var(--space-24); }
footer h3 { color: #FFFFFF !important; font-size: 18px; }
footer nav { display: flex; flex-direction: column; gap: 8px; }
footer a { color: #CFE4FF; }
footer a:hover { color: #FFFFFF; text-decoration: underline; }
footer p img { display: inline-block; vertical-align: middle; margin-right: 8px; }
footer p {color: #fff !important;}
/* ===== LINKS & INTERACTIONS ===== */
a { transition: color var(--transition), background var(--transition), box-shadow var(--transition); }
a:hover { color: var(--primary); }

/* ===== UTILITIES ===== */
.hidden { display: none !important; }
.muted { color: var(--muted); }

/* ===== RESPONSIVE FLEX LAYOUTS ===== */
/* Text-image sections alignment */
.text-image-section { align-items: center; }

/* ===== MOBILE NAV DISPLAY RULES ===== */
@media (min-width: 992px) {
  .main-nav { display: flex; }
  .mobile-menu-toggle { display: none; }
}

/* ===== TYPOGRAPHY UPSCALE ON LARGER SCREENS ===== */
@media (min-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 32px; }
  h3 { font-size: 20px; }
  .hero { padding: var(--space-60) 0; }
}
@media (min-width: 1100px) {
  h1 { font-size: 48px; }
}

/* ===== HIGH-ENERGY SECTION ACCENTS ===== */
/* Optional accent bar for non-hero sections */
section .container .content-wrapper > h2 {
  position: relative; padding-top: 6px; margin-top: 6px;
}
section .container .content-wrapper > h2::before {
  content: ""; position: relative; display: inline-block; width: 42px; height: 6px; margin-right: 10px; background: var(--secondary); border-radius: 4px; vertical-align: middle; transform: translateY(-4px);
}

/* ===== ICON INLINE ADJUSTMENT ===== */
p img[alt^="Telefon"], p img[alt^="E‑post"], p img[alt^="Adress"], p img[alt^="E‑post"], p img[alt^="E‑post"], p img[alt^="E‑post"] { display: inline-block; vertical-align: middle; margin-right: 8px; }

/* ===== FORMS (links-as-buttons in content) ===== */
a[role="button"] { display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; background: #EAF3FF; color: var(--primary); border-radius: var(--radius-sm); }
a[role="button"]:hover { background: #D8EAFF; }

/* ===== SPECIAL ROWS ===== */
.metrics-row, .trust-row { display: flex; flex-direction: column; gap: var(--space-16); }

/* ===== ARIA-CURRENT IN SECONDARY NAVS ===== */
nav a[aria-current="page"] { font-weight: 800; color: var(--primary); }

/* ===== COOKIE CONSENT BANNER ===== */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: flex; flex-wrap: wrap; gap: var(--space-12); align-items: center; justify-content: space-between;
  background: #0B1426; color: #EAF3FF;
  padding: var(--space-16) var(--space-20);
  box-shadow: 0 -10px 24px rgba(0,0,0,0.22);
  transform: translateY(0);
  transition: transform var(--transition), opacity var(--transition);
  z-index: 998;
}
.cookie-banner.hidden { transform: translateY(100%); opacity: 0; pointer-events: none; }
.cookie-banner .text { display: flex; flex: 1; min-width: 240px; gap: 10px; align-items: center; }
.cookie-actions { display: flex; gap: var(--space-12); flex-wrap: wrap; }
.cookie-btn { padding: 10px 14px; border-radius: var(--radius-sm); font-weight: 700; }
.cookie-accept { background: var(--secondary); color: #07180F; box-shadow: 0 8px 18px rgba(45,190,126,0.3); }
.cookie-accept:hover { background: var(--secondary-700); }
.cookie-reject { background: transparent; color: #FFFFFF; border: 2px solid #3B5FA3; }
.cookie-reject:hover { background: #102346; }
.cookie-settings { background: #EAF3FF; color: var(--primary); }
.cookie-settings:hover { background: #D8EAFF; }

/* Cookie Modal */
.cookie-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: none; align-items: center; justify-content: center; z-index: 1000; }
.cookie-modal-backdrop.open { display: flex; }
.cookie-modal {
  background: #FFFFFF; color: var(--text);
  width: min(720px, 92%);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
  display: flex; flex-direction: column; gap: var(--space-20);
  padding: var(--space-24);
  transform: translateY(10px); transition: transform 260ms ease;
}
.cookie-modal-backdrop.open .cookie-modal { 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: var(--space-16); }
.cookie-modal .modal-actions { display: flex; flex-wrap: wrap; gap: var(--space-12); justify-content: flex-end; }
/* simple toggle visuals (if inputs exist) */
.toggle { display: inline-flex; align-items: center; gap: 10px; }
.toggle input[type="checkbox"] { appearance: none; width: 44px; height: 26px; border-radius: 26px; background: #DDE7F5; position: relative; transition: background var(--transition); }
.toggle input[type="checkbox"]::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; background: #FFFFFF; border-radius: 50%; box-shadow: 0 2px 6px rgba(0,0,0,0.2); transition: transform var(--transition); }
.toggle input[type="checkbox"]:checked { background: var(--secondary); }
.toggle input[type="checkbox"]:checked::after { transform: translateX(18px); }

/* ===== RESPONSIVE TWEAKS ===== */
@media (min-width: 768px) {
  .content-wrapper { gap: var(--space-32); }
  .cta-row { gap: var(--space-20); }
  .metrics-row, .trust-row { flex-direction: row; }
}

/* ===== PAGE-SPECIFIC SMALL ENHANCEMENTS ===== */
blockquote { margin: 0; padding: 14px 18px; background: #FFFFFF; border-left: 6px solid var(--secondary); border-radius: var(--radius-sm); color: #0B1220; box-shadow: 0 6px 12px rgba(0,0,0,0.06); }

/* ===== ENSURE ADEQUATE SPACING BETWEEN ELEMENTS ===== */
section + section { border-top: 0; }
section .container > .content-wrapper > * + * { margin-top: 0; }

/* ===== ACCESSIBLE CONTRAST FOR TESTIMONIALS / REVIEWS ===== */
/* Already light background with dark text in .testimonial-card */

/* ===== DESKTOP REFINEMENTS ===== */
@media (min-width: 992px) {
  .topbar { padding: var(--space-12) var(--space-32); }
  .hero .content-wrapper { max-width: 900px; }
}

/* ===== FLEX-ONLY ENFORCEMENT – COMMON LAYOUTS ===== */
/* Feature list demo */
.features { display: flex; flex-wrap: wrap; gap: var(--space-20); }
.card-grid { display: flex; flex-wrap: wrap; gap: var(--space-20); justify-content: space-between; }

/* ===== MISC ===== */
hr { border: none; height: 1px; background: var(--border); margin: var(--space-24) 0; }

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