/* ====== 250908 15:20 – comp.css (cleaned) ====== */
@charset "utf-8";

/* ========= Centrala spacing-variabler ========= */
:root {
  /* Desktop (≥1220px) */
  --gap-hero: 90px;      /* mellan hero-sektioner */
  --gap-textbox: 50px;   /* hero-kant ↔ första .text-box och box ↔ box */
}

/* Tablet (601–1219px) */
@media (min-width: 601px) and (max-width: 1219px) {
  :root {
    --gap-hero: 60px;
    --gap-textbox: 35px;
  }
}

/* Mobil (≤600px) */
@media (max-width: 600px) {
  :root {
    --gap-hero: 60px;
    --gap-textbox: 20px;
  }
}

/* ========= Hero-sektion ========= */
.hero {
  position: relative;         /* för overlay-rubrik */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 15px;                  /* intern spacing i hero */
  margin: var(--gap-hero) 0;  /* 90/60/30px ovanför + under */
  align-self: stretch;

  background: #DCD1C5;
  border-radius: 5px;
  outline: 1px solid rgba(0, 0, 0, 0.25);	
}

/* ========= Content-box ========= */
.content-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;

  padding: 30px 15px;         /* sidor 15, botten 30 */
  gap: 0;                     /* spacing för .text-box styrs separat */
  flex: 1 0 0;
  margin: 0;
  max-width: var(--hero-inner);
}

/* 🔧 EXAKT avstånd från hero-kant till första .text-box */
.hero > .content-box {
  padding-top: var(--gap-textbox);     /* 50/35/20px överst */
  padding-bottom: var(--gap-textbox);  /* 50/35/20px nederst ✅ */
}

/* Avstånd mellan flera text-boxar i samma content-box */
.hero > .content-box > .text-box + .text-box,
.hero > .content-box > .text-box + .text-box2,
.hero > .content-box > .text-box2 + .text-box,
.hero > .content-box > .text-box2 + .text-box2 {
  margin-top: var(--gap-textbox);
}

/* ========= Alternativa varianter (behållna) ========= */
.content-box-dark {
  display: flex;
  padding: 30px 15px;
  justify-content: space-between;
  align-items: flex-start;
  flex: 1 0 0;
  border-radius: 5px;
}

.content-box2 {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 0;
  flex: 1 0 0;
}

/* ========= Textboxar ========= */
.text-box,
.text-box2 {
  display: flex;
  flex-direction: column;
  gap: 15px;

  width: 650px;              /* .text-box */
  padding: 15px;
  border-radius: 5px;
  background: #EEE8E1;
  border: 1px solid rgba(0,0,0,.25);
  margin: 0;                 /* spacing styrs centralt */
}

.text-box2 {
  width: 466px;
  align-items: center;
}

/* ========= Bilder ========= */
.hero-img {
  width: auto;
  height: 550px;             /* Desktop default */
  max-width: 100%;
  object-fit: contain;
  display: block;
  margin: 0 auto 15px;
}

.hero-img2 {
  width: 300px;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  margin: 0 0 25px 0;
  z-index: 999;
}

/* ========= Hjälpklasser ========= */
.centered-content { justify-content: center; }

.content-stack {
  display: flex;
  flex-direction: column;
  gap: 25px;
  width: 100%;
  align-items: center;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  width: 100%;
  margin-top: 15px;
  justify-items: center;
}

.image-grid img.hero-img2 {
  width: 100%;
  max-width: 300px;
  height: auto;
}

/* ========= Respons ========= */

/* Mobil (285–600px) */
@media (min-width: 285px) and (max-width: 600px) {
  .content-box,
  .content-box2,
  .content-box-dark {
    align-items: center;
    width: 100%;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
  }

  .text-box,
  .text-box2 {
    width: 100%;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
  }

  .hero { padding: 0; }

  .responsive-img {
    width: 75%;
    height: auto;
    margin-bottom: 25px;
  }

  .hero-img { height: 300px; }
  .image-grid { grid-template-columns: 1fr; }
}

/* Mellanläge (601–1219px) */
@media (min-width: 601px) and (max-width: 1219px) {
  .content-box,
  .content-box2 {
    align-items: center;
    width: 100%;
    padding: 15px;
    box-sizing: border-box;
  }

  .text-box,
  .text-box2 {
    width: 75%;
    padding: 15px;
    box-sizing: border-box;
  }

  .hero { padding: 0; }

  .responsive-img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 25px;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
  }

  .content-box2 h3,
  .content-box h3 { text-align: center; }

  .hero-img { height: 400px; }
}
