/* ==========================================================================
   Föräldrakooperativet Lönnen – Stylesheet
   Modern, warm, mobile-first design inspired by maple leaves and nature
   ========================================================================== */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&family=Nunito+Sans:wght@400;600&display=swap');

/* ---------- Custom Properties ---------- */
:root {
  /* Colors — maple & nature palette */
  --color-primary: #4a7c59;
  --color-primary-dark: #3a6347;
  --color-primary-light: #e8f0eb;
  --color-accent: #d4903c;
  --color-accent-light: #f5e6d0;
  --color-warm: #c75d3a;
  --color-bg: #fdfbf8;
  --color-surface: #ffffff;
  --color-text: #333333;
  --color-text-muted: #666666;
  --color-text-light: #999999;
  --color-border: #e8e4df;

  /* Typography */
  --font-heading: 'Nunito', sans-serif;
  --font-body: 'Nunito Sans', 'Nunito', sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  /* Layout */
  --max-width: 1100px;
  --border-radius: 12px;
  --border-radius-sm: 8px;

  /* Transitions */
  --transition: 0.3s ease;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-accent);
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.3rem; }

p + p { margin-top: var(--space-sm); }

/* ---------- Utility ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

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

.section--alt {
  background-color: var(--color-primary-light);
}

.section--warm {
  background-color: var(--color-accent-light);
}

.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ---------- Header ---------- */
.header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  max-width: var(--max-width);
  margin: 0 auto;
}

.header__logo img {
  height: 40px;
  width: auto;
}

.header__logo span {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--color-primary);
  margin-left: 0.5rem;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Navigation */
.nav__list {
  list-style: none;
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.nav__link {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
  padding: 0.25rem 0;
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition);
}

.nav__link:hover::after,
.nav__link--active::after {
  width: 100%;
}

.nav__link:hover {
  color: var(--color-primary);
}

.nav__link--active {
  color: var(--color-primary);
}

/* Mobile menu button */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 110;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  margin: 6px 0;
  transition: all var(--transition);
  border-radius: 2px;
}

.nav__toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.nav__toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav__toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* ---------- Hero Section ---------- */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
  padding: var(--space-2xl) 0;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 50%;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 650px;
}

.hero__badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.35rem 1rem;
  border-radius: 20px;
  margin-bottom: var(--space-md);
  backdrop-filter: blur(4px);
}

.hero h1 {
  color: white;
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: var(--space-sm);
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.92;
  margin-bottom: var(--space-md);
  line-height: 1.8;
}

.hero__buttons {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn--primary {
  background: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
}

.btn--primary:hover {
  background: #c07f30;
  border-color: #c07f30;
  color: white;
}

.btn--outline {
  background: transparent;
  color: white;
  border-color: rgba(255, 255, 255, 0.5);
}

.btn--outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: white;
  color: white;
}

.btn--outline-dark {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn--outline-dark:hover {
  background: var(--color-primary);
  color: white;
}

/* ---------- Feature Cards ---------- */
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.feature-card {
  background: var(--color-surface);
  border-radius: var(--border-radius);
  padding: var(--space-lg);
  border: 1px solid var(--color-border);
  transition: transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.feature-card__icon {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}

.feature-card h3 {
  margin-bottom: var(--space-xs);
}

.feature-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* ---------- Content Sections ---------- */
.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  align-items: center;
}

.content-grid__image {
  border-radius: var(--border-radius);
  overflow: hidden;
}

.content-grid__image img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: var(--border-radius);
}

.content-grid__text h2 {
  margin-bottom: var(--space-sm);
}

.content-grid__text p {
  color: var(--color-text-muted);
}

/* ---------- Schedule / Day ---------- */
.schedule {
  list-style: none;
}

.schedule__item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-border);
}

.schedule__item:last-child {
  border-bottom: none;
}

.schedule__time {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-primary);
  min-width: 70px;
  font-size: 1rem;
}

.schedule__desc {
  color: var(--color-text);
}

/* ---------- Testimonials ---------- */
.testimonials {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

.testimonial {
  background: var(--color-surface);
  border-radius: var(--border-radius);
  padding: var(--space-lg);
  border-left: 4px solid var(--color-accent);
  font-style: italic;
  position: relative;
}

.testimonial::before {
  content: '\201C';
  font-size: 4rem;
  color: var(--color-accent);
  opacity: 0.3;
  position: absolute;
  top: 0.25rem;
  left: 1rem;
  font-style: normal;
  line-height: 1;
}

.testimonial p {
  position: relative;
  z-index: 1;
  margin-bottom: var(--space-xs);
}

.testimonial__author {
  font-style: normal;
  font-weight: 600;
  color: var(--color-primary);
  font-size: 0.9rem;
}

/* ---------- Activity Cards ---------- */
.activities {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

.activity-card {
  background: var(--color-surface);
  border-radius: var(--border-radius);
  padding: var(--space-md);
  border: 1px solid var(--color-border);
}

.activity-card h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: var(--space-xs);
  font-size: 1.1rem;
}

.activity-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* ---------- Roles List ---------- */
.roles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xs) var(--space-md);
  list-style: none;
}

.roles-grid li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.95rem;
}

.roles-grid li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: 700;
}

/* ---------- Page Header (subpages) ---------- */
.page-header {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
  padding: var(--space-xl) 0 var(--space-lg);
  text-align: center;
}

.page-header h1 {
  color: white;
  font-size: 2.2rem;
  margin-bottom: var(--space-xs);
}

.page-header p {
  opacity: 0.85;
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.contact-item {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
}

.contact-item__icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: var(--color-primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-item h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.contact-item p,
.contact-item a {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/* Map embed */
.map-container {
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-top: var(--space-lg);
  border: 1px solid var(--color-border);
}

.map-container iframe {
  width: 100%;
  height: 350px;
  border: none;
}

/* ---------- GP Article / Highlight ---------- */
.highlight-box {
  background: var(--color-surface);
  border-radius: var(--border-radius);
  padding: var(--space-lg);
  border: 2px solid var(--color-accent);
  text-align: center;
}

.highlight-box h3 {
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--color-text);
  color: rgba(255, 255, 255, 0.75);
  padding: var(--space-xl) 0 var(--space-lg);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.footer h4 {
  color: white;
  font-size: 1rem;
  margin-bottom: var(--space-sm);
}

.footer a {
  color: rgba(255, 255, 255, 0.75);
}

.footer a:hover {
  color: var(--color-accent);
}

.footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: var(--space-lg);
  padding-top: var(--space-sm);
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- Responsive ---------- */

/* Tablet */
@media (min-width: 600px) {
  .features {
    grid-template-columns: repeat(2, 1fr);
  }

  .activities {
    grid-template-columns: repeat(2, 1fr);
  }

  .testimonials {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .roles-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Desktop */
@media (min-width: 900px) {
  h1 { font-size: 2.8rem; }
  h2 { font-size: 2rem; }

  .hero h1 { font-size: 3rem; }
  .hero { padding: var(--space-2xl) 0; }

  .features {
    grid-template-columns: repeat(3, 1fr);
  }

  .content-grid {
    grid-template-columns: 1fr 1fr;
  }

  .content-grid--reverse {
    direction: rtl;
  }

  .content-grid--reverse > * {
    direction: ltr;
  }

  .content-grid__image img {
    height: 400px;
  }

  .footer__inner {
    grid-template-columns: 2fr 1fr 1fr;
  }

  /* Desktop nav */
  .nav__toggle { display: none; }
}

/* Mobile nav */
@media (max-width: 899px) {
  .nav__toggle {
    display: block;
  }

  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--color-surface);
    padding: 5rem var(--space-lg) var(--space-lg);
    transition: right var(--transition);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 105;
  }

  .nav.open {
    right: 0;
  }

  .nav__list {
    flex-direction: column;
    gap: var(--space-sm);
    align-items: flex-start;
  }

  .nav__link {
    font-size: 1.1rem;
    padding: 0.5rem 0;
  }

  .nav__overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 104;
  }

  .nav__overlay.active {
    display: block;
  }
}

/* ---------- Animations ---------- */
@media (prefers-reduced-motion: no-preference) {
  .fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }

  .fade-in.visible {
    opacity: 1;
    transform: translateY(0);
  }
}
