/* ============================================================
   BRF GNISTAN — style.css
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Semi+Condensed:wght@500;600;700&family=Jost:wght@300;400;500&display=swap');

/* --- CSS-variabler --- */
:root {
  --c-yellow:      #E8C97A;
  --c-green:       #2B5740;
  --c-green-light: #3d7459;
  --c-grey:        #8A8880;
  --c-cream:       #F5F1E8;
  --c-white:       #FFFFFF;
  --c-dark:        #1E1E1C;
  --c-dark-soft:   #3a3a38;

  --font-display: 'Barlow Semi Condensed', system-ui, sans-serif;
  --font-body:    'Jost', system-ui, sans-serif;

  --nav-height:      72px;
  --max-width:       1100px;
  --section-padding: 80px 24px;
}

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

html { scroll-behavior: smooth; }

body {
  -webkit-font-smoothing: antialiased;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.7;
  color: var(--c-dark);
  background: var(--c-white);
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* --- Typografi --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.8rem); }

p { max-width: 65ch; }

/* --- Utility --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 6px 24px 42px;
}

.section { padding: var(--section-padding); }
.section--cream { background: var(--c-cream); }

.text-center { text-align: center; }
.text-center p { margin-left: auto; margin-right: auto; }

.section--compact {
  padding: 0px 24px;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  background: var(--c-green);
  color: var(--c-white);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.04em;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn:hover { background: var(--c-green-light); }

.btn--outline {
  background: transparent;
  border: 1.5px solid var(--c-green);
  color: var(--c-green);
}

.btn--outline:hover {
  background: var(--c-green);
  color: var(--c-white);
}

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: var(--c-white);
  border-bottom: 1px solid rgba(0,0,0,0.07);
  display: flex;
  align-items: center;
}

.nav__inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--c-dark);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav__logo span { color: var(--c-green); }

.nav__links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav__links a {
  display: inline-block;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-dark-soft);
  transition: color 0.15s ease;
  position: relative;
}

.nav__links a::after {
  content: attr(data-text);
  display: block;
  font-weight: 600;
  height: 0;
  visibility: hidden;
  overflow: hidden;
}

.nav__links a::before {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 14px;
  right: 14px;
  height: 1.5px;
  background: var(--c-green);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--c-green);
  font-weight: 600;
}

.nav__links a:hover::before,
.nav__links a.active::before {
  transform: scaleX(1);
}

/* Hamburger */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  position: relative;
}

.nav__toggle span {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 1.5px;
  background: var(--c-dark);
  transition: transform 0.25s ease, opacity 0.25s ease;
  transform-origin: center;
}

.nav__toggle span:nth-child(1) { top: 13px; }
.nav__toggle span:nth-child(2) { top: 20px; }
.nav__toggle span:nth-child(3) { top: 27px; }

.nav__toggle.is-open span:nth-child(1) {
  transform: translateX(-50%) translateY(7px) rotate(45deg);
}
.nav__toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.nav__toggle.is-open span:nth-child(3) {
  transform: translateX(-50%) translateY(-7px) rotate(-45deg);
}

/* --- Footer --- */
.footer {
  background: var(--c-dark);
  padding: 20px;
  text-align: center;
}

.footer__logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--c-white);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.footer__logo span { color: var(--c-green); }

.footer p,
.footer a {
  font-size: 14px;
  line-height: 1.4;
  color: rgba(255,255,255,0.45);
  max-width: none;
}

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

.footer__bottom {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 13px;
  color: rgba(255,255,255,0.25);
}

/* --- Hero --- */
.hero {
  position: relative;
  height: 55vh;
  min-height: 520px;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
}

.hero--center { align-items: center; }

.hero__bg {
  position: absolute;
  inset: 0;
  background: var(--c-cream);
  background-size: cover;
  background-position: center 30%; /* Justera vart bilen är placerad i höjdled - 30% från toppen */
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(30,30,28,0.65) 0%, transparent 60%);
}

.hero__content {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 240px 24px 0px;
  width: 100%;
  color: var(--c-white);
}

.hero__content--center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 0;
}

.hero__eyebrow {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-yellow);
  margin-bottom: 12px;
}

.hero__title {
  color: var(--c-white);
  margin-bottom: 20px;
}

.hero__subtitle {
  font-size: 18px;
  font-weight: 300;
  opacity: 0.85;
  max-width: 50ch;
  margin-bottom: 32px;
}

/* --- Kort hero --- */
.hero--short { height: 46vh; min-height: 420px; }
.hero--short .hero__content { padding-top: 150px; }

/* --- Kontaktpanel (kontakt) --- */
.contact-panel {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: -110px auto 100px;
  padding: 0 24px;
}

.contact-panel__inner,
.contact-panel__row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.contact-panel__inner {
  background: var(--c-white);
  box-shadow: 0 20px 50px rgba(0,0,0,0.10);
}

.contact-panel__row {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.contact-panel__head {
  grid-column: 1 / -1;
  padding: 36px 36px 0;
}

.contact-panel__head .card__title { margin-bottom: 0; }

.contact-panel__col { padding: 40px 36px; }
.contact-panel__row .contact-panel__col { padding-top: 20px; }
.contact-panel__col + .contact-panel__col { border-left: 1px solid rgba(0,0,0,0.08); }

.contact-panel__col h4 {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 6px;
}

.contact-panel__col p {
  font-size: 15px;
  color: var(--c-dark-soft);
  line-height: 1.8;
}

.contact-panel__col p:not(.card__label) { font-size: 18px; }

.contact-panel__col a { color: var(--c-green); }

.contact-panel__note {
  font-size: 13px !important;
  color: var(--c-grey) !important;
  margin-top: 6px;
}


/* --- Kort --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.card {
  background: var(--c-white);
  border: 1px solid rgba(0,0,0,0.08);
  padding: 28px 24px;
}

.card__label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-grey);
  margin-bottom: 8px;
}

.card__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.card p {
  font-size: 15px;
  color: var(--c-dark-soft);
}

.card p:not(.card__label) { font-size: 18px; }

/* --- Bildplatshållare --- */
.img-placeholder {
  background: var(--c-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--c-grey);
  letter-spacing: 0.05em;
  aspect-ratio: 16 / 9;
}

/* --- Ingångar (index) --- */
.entry-heading {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 500;
  margin-bottom: 14px;
  max-width: none;
}

.entry-grid {
  display: grid;
  grid-template-columns: repeat(3, 240px);
  gap: 36px;
  justify-content: center;
}

.entry-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--c-green);
  color: var(--c-white);
  padding: 20px 24px;
  transition: background 0.2s ease;
  border-radius: 10px;
}

.entry-card:hover { background: var(--c-green-light); }

.entry-card__title {
  font-size: 2rem;
  color: var(--c-white);
  margin-bottom: 0;
}

.entry-card p {
  font-size: 18px;
  color: rgba(255,255,255,0.75);
  margin-bottom: 0;
  max-width: none;
}

/* --- Delad sektion: bild i full höjd mot kanten, text centrerad i sin halva --- */
.section:has(> .split) { padding: 0; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
}

.split__text {
  padding: 96px max(64px, calc((50vw - 580px) / 2));
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.split__text h2 {
  font-size: clamp(2rem, 3.2vw, 3.2rem);
  margin-bottom: 12px;
}

.split__text h2,
.split__text > .card__label,
.split__text > p:not(.distance-note) {
  text-align: center;
}

.split__text > p:not(.card__label):not(.distance-note) {
  font-size: 18px;
  line-height: 1.75;
  max-width: none;
}

.split__text .card__label { font-size: 13px; }

.split__text .distance-table { font-size: 16px; }

.split__image {
  position: relative;
  overflow: hidden;
  min-height: 620px;
}

.split__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Hero på undersidor --- */
.page-hero {
  position: relative;
  height: 62vh;
  min-height: 480px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.page-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.page-hero__shade {
  position: absolute;
  inset: 0;
  background: rgba(30,30,28,0.15);
}

.page-hero__inner {
  position: relative;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 40px;
}

.page-hero__plate {
  background: rgba(30,30,28,0.66);
  max-width: 640px;
  padding: 28px 32px 30px;
  color: var(--c-white);
}

.page-hero__plate .card__label { font-size: 13px; color: var(--c-yellow); }

.page-hero__plate h1 {
  color: var(--c-white);
  font-size: clamp(2.4rem, 3.8vw, 3.4rem);
  margin: 4px 0 12px;
}

.page-hero__plate p:not(.card__label) {
  color: var(--c-white);
  font-size: 16px;
  margin: 0;
  max-width: none;
}

.page-hero__plate .btn { margin-top: 20px; }

/* Hero följd direkt av kort (for-boende) */
.page-hero + .section:has(.card-grid) { padding-top: 48px; }
.page-hero + .section .card-grid { margin-top: 0; }

/* --- Startsida: rubrik i heron --- */
.hero--home .hero__overlay { background: rgba(30,30,28,0.5); }

.hero--home .hero__title {
  font-size: clamp(3.8rem, 8vw, 7.5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  margin-bottom: 22px;
}

.hero__pre {
  display: block;
  font-family: var(--font-body);
  font-size: 0.24em;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--c-yellow);
  margin-bottom: 10px;
  text-shadow: 0 1px 10px rgba(0,0,0,0.6);
}

.hero--home .hero__subtitle {
  position: relative;
  font-size: 21px;
  font-weight: 400;
  opacity: 1;
  padding-top: 22px;
  text-shadow: 0 1px 10px rgba(0,0,0,0.6);
}

.hero--home .hero__subtitle::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 56px;
  height: 2px;
  margin-left: -28px;
  background: var(--c-yellow);
}

/* --- Kort: gemensam stil på alla sidor --- */
.section:has(.card-grid) > .container { max-width: 1400px; padding: 0 32px; }
.card-grid { gap: 40px; }
.card { padding: 44px; }
.card .card__title { font-size: 1.6rem; margin-bottom: 14px; }
.card p:not(.card__label) { line-height: 1.75; }

.contact-panel { max-width: 1400px; padding: 0 32px; }
.contact-panel__col { padding: 44px; }
.contact-panel__head { padding: 44px 44px 0; }
.contact-panel .card__title { font-size: 1.6rem; margin-bottom: 14px; }

.split__text .info-grid {
  grid-template-columns: 1fr;
}

.split__text .info-item {
  grid-template-columns: 1fr;
  gap: 2px;
}

/* --- Senaste nytt (index) --- */
.news {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 56px;
  align-items: center;
}

.news__title { margin-bottom: 16px; }

.news__text p:not(.card__label) { color: var(--c-dark-soft); font-size: 18px; line-height: 1.75; }

.news__image {
  width: 100%;
  height: auto;
}


/* --- Bildrad (flytta-hit) --- */
.image-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.image-row img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.info-item__label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--c-dark);
  max-width: none;
}

.info-item__value {
  font-size: 15px;
  color: var(--c-dark-soft);
  max-width: none;
}


/* --- Avståndstabell --- */
.distance-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
  font-size: 15px;
}

.distance-table th {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-grey);
  text-align: left;
  padding: 0 0 8px;
  border-bottom: 1.5px solid var(--c-green);
}

.distance-table td {
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  color: var(--c-grey);
}

.distance-table td:first-child {
  font-weight: 500;
  color: var(--c-dark);
  width: 50%;
}

.distance-table th:last-child,
.distance-table td:last-child {
  text-align: right;
  color: var(--c-dark-soft);
}

.tag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 20px;
  font-size: 12px;
  background: var(--c-cream);
  color: var(--c-green);
}

.tag--cykel {
  background: var(--c-yellow);
  color: var(--c-dark);
}

.distance-note {
  font-size: 12px;
  color: var(--c-grey);
  margin-top: 12px;
}


/* --- Dokumentlista --- */
.doc-list {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.doc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(0,0,0,0.08);
  background: var(--c-white);
  color: var(--c-dark);
  font-size: 15px;
  transition: background 0.15s ease, color 0.15s ease;
}

.doc-item:hover {
  background: var(--c-green);
  color: var(--c-white);
}

.doc-item__icon {
  font-size: 16px;
  color: var(--c-green);
  transition: color 0.15s ease;
}

.doc-item:hover .doc-item__icon {
  color: var(--c-white);
}


/* --- Kontaktgrid --- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 60px;
  margin-top: 16px;
}

.contact-grid h3 {
  margin-bottom: 16px;
}

.contact-grid p {
  font-size: 15px;
  color: var(--c-dark-soft);
  line-height: 1.8;
  max-width: none;
}


/* --- Responsiv --- */
/* Kontaktrad i mobilmenyn: dold på dator */
.nav__contact { display: none; }

/* Ingångar i heron: dolda på dator, visas på mobil */
.entry-grid--hero { display: none; }

@media (max-width: 768px) {
  :root {
    --section-padding: 56px 20px;
  }

  .nav__toggle {
    display: block;
  }

  /* Mobilmeny: dropdown som täcker ca 2/3 av skärmen */
  .nav__links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    height: 66vh;
    background: var(--c-white);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    z-index: 99;
    border-radius: 0 0 24px 24px;
    box-shadow: 0 24px 50px rgba(0,0,0,0.25);
    pointer-events: none;
    visibility: hidden;
    clip-path: inset(0 0 100% 0 round 0 0 24px 24px);
    transition: clip-path 0.45s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.45s;
  }

  .nav__links.is-open {
    pointer-events: all;
    visibility: visible;
    clip-path: inset(0 0 0 0 round 0 0 24px 24px);
    transition: clip-path 0.45s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s;
  }

  /* Menyvalen tonar in ett i taget */
  .nav__links li { opacity: 0; transform: translateY(-8px); transition: opacity 0.3s ease, transform 0.3s ease; }
  .nav__links.is-open li { opacity: 1; transform: none; }
  .nav__links.is-open li:nth-child(1) { transition-delay: 0.12s; }
  .nav__links.is-open li:nth-child(2) { transition-delay: 0.17s; }
  .nav__links.is-open li:nth-child(3) { transition-delay: 0.22s; }
  .nav__links.is-open li:nth-child(4) { transition-delay: 0.27s; }
  .nav__links.is-open li:nth-child(5) { transition-delay: 0.32s; }

  /* Aktuell sida */
  .nav__links a.active { color: var(--c-green); }
  .nav__links a.active::before { background: var(--c-yellow); height: 3px; }

  /* Mörk ton bakom menyn */
  body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(30,30,28,0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    z-index: 98;
  }
  body:has(.nav__links.is-open)::after { opacity: 1; }

  /* Kontaktrad längst ner i menyn */
  .nav__contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: 60%;
    margin-top: 6px;
    padding-top: 18px;
    border-top: 1px solid rgba(0,0,0,0.1);
    font-size: 14px;
    color: var(--c-grey);
  }
  .nav__links .nav__contact a {
    padding: 0;
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--c-grey);
  }
  .nav__links .nav__contact a::before,
  .nav__links .nav__contact a::after { display: none; }

  .nav__links a { font-size: 18px; }

  .image-row { grid-template-columns: 1fr; }

  .footer__inner { grid-template-columns: 1fr; gap: 32px; }
  .footer__bottom { flex-direction: column; gap: 8px; }

  .entry-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .split__image { order: -1; min-height: 0; }
  /* Sidor där heron följs direkt av bild och text (flytta-hit, for-maklare): texten först */
  body:has(.page-hero + .section > .split) .split__image { order: 1; }
  .split__image img { position: static; height: auto; }
  .split__text { padding: 48px 20px 56px; }
  .split__text > p:not(.card__label):not(.distance-note) { font-size: 17px; }

  .page-hero { height: auto; min-height: 420px; }
  .hero--home .hero__title { font-size: clamp(2.8rem, 13vw, 3.8rem); }
  .hero__pre { font-size: 0.3em; letter-spacing: 0.2em; }
  .hero--home .hero__subtitle { font-size: 17px; }
  /* Hero på undersidor, mobil: centrerad text utan platta, gul linje */
  .page-hero { min-height: 480px; align-items: center; }
  .page-hero__shade { background: rgba(30,30,28,0.5); }
  .page-hero__inner { padding: 0 20px; }
  .page-hero__plate { background: none; text-align: center; margin: 0 auto; padding: 0; }
  .page-hero__plate h1 { font-size: 2.6rem; margin: 6px 0 16px; text-shadow: 0 2px 14px rgba(0,0,0,0.4); }
  .page-hero__plate .card__label { text-shadow: 0 1px 8px rgba(0,0,0,0.6); }
  .page-hero__plate p:not(.card__label) { position: relative; padding-top: 18px; text-shadow: 0 1px 8px rgba(0,0,0,0.6); }
  .page-hero__plate p:not(.card__label)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 44px;
    height: 2px;
    margin-left: -22px;
    background: var(--c-yellow);
  }

    .news__image { order: -1; }
    .news { grid-template-columns: 1fr; gap: 28px; }

  .contact-grid { grid-template-columns: 1fr; gap: 40px; }


    .contact-panel { margin: -60px auto 56px; }
  .contact-panel__inner,
  .contact-panel__row { grid-template-columns: 1fr; }
  .contact-panel__col + .contact-panel__col { border-left: none; border-top: 1px solid rgba(0,0,0,0.08); }
  .contact-panel { padding: 0 20px; }
  .contact-panel__col { padding: 28px 24px; }
  .contact-panel__head { padding: 28px 24px 0; }
  .section:has(.card-grid) > .container { padding: 0 20px; }
  .card { padding: 28px 24px; }
  /* For-boende, mobil: Viktiga datum före korten, texten före bilden */
  body:has(.page-hero + .section .card-grid) { display: flex; flex-direction: column; }
  body:has(.page-hero + .section .card-grid) > section:nth-of-type(3) { order: 1; }
  body:has(.page-hero + .section .card-grid) > section:nth-of-type(2) { order: 2; }
  body:has(.page-hero + .section .card-grid) > section:nth-of-type(4) { order: 3; }
  body:has(.page-hero + .section .card-grid) > footer { order: 4; }
  body:has(.page-hero + .section .card-grid) .split__image { order: 1; }
  body:has(.page-hero + .section .card-grid) > section:nth-of-type(3) { background: var(--c-cream); }
  body:has(.page-hero + .section .card-grid) > section:nth-of-type(2) { background: var(--c-white); }
  body:has(.page-hero + .section .card-grid) > section:nth-of-type(4) .split__image { order: -1; }

  /* Kort, mobil: utan boxar, centrerad lista (alla sidor) */
  .card-grid { gap: 0; }
  .card {
    background: none;
    border: none;
    border-bottom: 1px solid rgba(0,0,0,0.12);
    padding: 24px 4px;
    text-align: center;
  }
  .card:last-child { border-bottom: none; }
  .card p:not(.card__label) { font-size: 16px; }
  .card .card__title { font-size: 1.8rem; margin: 2px 0 8px; }

  /* Startsida, mobil: ingångarna i heron (beige knappar) */
  .entry-section { display: none; }
  .hero--home { min-height: 640px; align-items: flex-end; }
  .hero--home .hero__content--center { padding-bottom: 28px; }
  .hero--home .hero__overlay {
    background: linear-gradient(to top, rgba(30,30,28,0.7) 0%, rgba(30,30,28,0.3) 50%, rgba(30,30,28,0.05) 100%);
  }
  .hero--home .hero__subtitle { margin-bottom: 22px; }
  .entry-grid--hero {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
  }
  .entry-grid--hero .entry-card {
    position: relative;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 12px 44px;
    border-radius: 6px;
    background: var(--c-cream);
  }
  .entry-grid--hero .entry-card:hover { background: var(--c-white); }
  .entry-grid--hero .entry-card__title { font-size: 1.3rem; line-height: 1.1; color: var(--c-dark); }
  .entry-grid--hero .entry-card p { font-size: 13px; margin: 2px 0 0; color: var(--c-dark-soft); }
  .entry-grid--hero .entry-card::after {
    content: '→';
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--c-green);
  }

  /* Startsida, mobil: mindre luft mellan Senaste nytt och korten */
  .section:has(> .container > .news) { padding-bottom: 40px; }
  .section:has(> .container > .news) > .container { padding-bottom: 0; }
  .section:has(> .container > .news) + .section { padding-top: 40px; }
  .section:has(> .container > .news) + .section .card-grid { margin-top: 0; }

  /* Flytta hit, mobil: lite mindre luft ovanför korten */
  body:has(.page-hero + .section > .split) .card-grid { margin-top: 16px; }
  /* För boende, mobil: lite mindre luft under korten */
  body:has(.page-hero + .section .card-grid) > section:nth-of-type(2) > .container { padding-bottom: 18px; }

  /* Kontaktsidan, mobil: hero som undersidorna, panelen som förut */
  .hero--short { height: auto; min-height: 420px; align-items: flex-end; }
  .hero--short .hero__overlay { background: rgba(30,30,28,0.5); }
  .hero--short .hero__content { text-align: center; padding: 0 20px 110px; }
  .hero--short .hero__title {
    position: relative;
    font-size: 2.6rem;
    margin-bottom: 0;
    padding-bottom: 18px;
    text-shadow: 0 2px 14px rgba(0,0,0,0.4);
  }
  .hero--short .hero__title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 44px;
    height: 2px;
    margin-left: -22px;
    background: var(--c-yellow);
  }
}
