/* pages.css — page-specific styles (Task 3+) */

/* ===== FORSIDE (f3 variant) ===== */

.hero {
  padding: 56px 56px;
}
.hero__title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(56px, 7.2vw, 104px);
  line-height: 0.92;
  color: var(--tekst);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  font-style: italic;
  margin: 0;
  text-wrap: balance;
}

.boxes {
  padding: 0 56px 56px;
}
.boxes__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  /* Size the row explicitly, so the boxes' height:100% has a definite row to
     resolve against instead of an auto one. */
  grid-auto-rows: 1fr;
  gap: 24px;
}
.box {
  aspect-ratio: 4 / 3;
  /* Stretch every box to the row height, so a box with one line of text more
     does not end up taller than its neighbours. width:100% is load-bearing:
     without it aspect-ratio derives the width from the stretched height and
     the box grows wider than its grid column. */
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--sidehvid);
  text-decoration: none;
  transition: transform 0.25s ease;
}
.box:hover {
  transform: translateY(-4px);
}
.box--1,
.box--2,
.box--3 {
  background: var(--bla);
}
.box__title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(32px, 3.9vw, 56px);
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-align: center;
  text-wrap: balance;
  text-transform: none;
  font-style: normal;
  color: var(--sidehvid);
  margin: 0;   /* reset the UA h2 margin so the title stays inside the 4/3 box */
}

.ai {
  padding: 0 56px 80px;
}
.ai__box {
  background: var(--magenta);
  color: var(--sort);
  padding: 36px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  transition: transform 0.25s ease;
}
.ai__box:hover {
  transform: translateY(-2px);
}
.ai__lead {
  display: flex;
  align-items: center;
  gap: 22px;
}
.ai__icon {
  width: 40px;
  height: 40px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}
.ai__title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 44px;
  line-height: 1.0;
  letter-spacing: -0.01em;
  text-transform: none;
  font-style: normal;
  color: var(--sort);
  margin: 0;   /* nulstil UA h2-margin — ellers vokser magenta-bjælken (godkendt: 116px høj) */
}
.ai__arrow {
  width: 32px;
  height: 32px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}

/* ===== PROGRAMSIDE (bog-e0o) ===== */

/* Hero */
.pp-hero {
  background: var(--sidehvid);
  padding: 48px 56px 28px;
}
.pp-hero__title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(48px, 5.5vw, 80px);
  line-height: 0.92;
  letter-spacing: -0.02em;
  color: var(--tekst);
  text-transform: uppercase;
  font-style: italic;
  margin: 0;
}

/* Search bar */
.pp-search {
  background: #fff;
  margin: 0 56px;
  padding: 24px 28px;
  border: 1px solid var(--border-soft);
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 18px;
  align-items: end;
}
.pp-search__label {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tekst-mute);
  margin-bottom: 6px;
}
.pp-search__field {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-soft);
  background: var(--sidehvid);
}
.pp-search__field svg {
  margin: 0 16px;
  width: 22px;
  height: 22px;
  stroke: var(--tekst-mute);
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}
.pp-search__field input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 16px 16px 16px 0;
  font-size: 17px;
  color: var(--tekst);
  outline: none;
  /* Indtastet tekst = sans (arver body); kun placeholder er serif-kursiv (godkendt) */
}
.pp-search__field input::placeholder {
  color: var(--tekst-mute);
  font-style: italic;
  font-family: var(--serif);
}
.pp-search__select {
  position: relative;
}
.pp-search__select select {
  width: 100%;
  border: 1px solid var(--border-soft);
  background: #fff;
  padding: 15px 38px 15px 16px;
  font-size: 15px;
  color: var(--tekst);
  appearance: none;
  cursor: pointer;
  font-family: var(--sans);
}
.pp-search__select::after {
  content: "▾";
  position: absolute;
  right: 14px;
  bottom: 15px;
  color: var(--tekst-mute);
  pointer-events: none;
  font-size: 13px;
}

/* Mobile chips — hidden on desktop */
.pp-dag-chips {
  display: none;
}

/* ===== FORSIDE: mobil app-shell (bar-kasser) — godkendt design bog-e0o ===== */
/* Desktop viser .forside-desktop; mobil viser .forside-mobile (lodrette bar-kasser, ingen hero). */
.forside-mobile { display: none; }

@media (max-width: 767px) {
  .forside-desktop { display: none; }
  .forside-mobile {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
  }
  .mbox {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 92px;
    padding: 22px;
    color: var(--sidehvid);
    text-decoration: none;
    transition: transform 0.2s ease;
  }
  .mbox:hover { transform: translateY(-2px); }
  .mbox--blaa { background: var(--bla); }
  .mbox--tove { background: var(--magenta); color: var(--sort); }   /* mørk Tove-tekst (WCAG-override) */
  .mbox__lead { display: flex; align-items: center; gap: 14px; }
  .mbox__icon { width: 26px; height: 26px; stroke: currentColor; stroke-width: 2; fill: none; flex-shrink: 0; }
  .mbox__title {
    font-family: var(--serif);
    font-weight: 700;
    font-style: normal;
    font-size: 23px;
    line-height: 0.98;
    letter-spacing: -0.01em;
    text-transform: none;
  }
  .mbox__arrow { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2; fill: none; flex-shrink: 0; }
}

/* ===== PROGRAMSIDE: mobil (≤767px) ===== */
@media (max-width: 767px) {
  /* Hero: hide on mobile (programside uses no large hero on mobile) */
  .pp-hero {
    display: none;
  }

  /* Search: full-width, compact */
  .pp-search {
    display: block;
    margin: 0;
    padding: 12px 14px;
    border-left: 0;
    border-right: 0;
    border-top: 0;
  }
  .pp-search__field-wrap {
    margin-bottom: 0;
  }
  .pp-search__label {
    display: none; /* Clean on mobile — no "Søg"/"Dag" labels */
  }
  .pp-search__field {
    background: #fff;
    border: 1px solid var(--border-soft);
    margin-bottom: 10px;
  }
  .pp-search__field input {
    font-size: 15px;
    padding: 10px 10px 10px 0;
  }
  .pp-search__field svg {
    margin: 0 12px;
    width: 20px;
    height: 20px;
  }

  /* Hide desktop select on mobile */
  .pp-search__dag-wrap {
    /* wrapper stays, but select is hidden, chips shown */
  }
  .pp-search__select {
    display: none;
  }

  /* Show day chips on mobile */
  .pp-dag-chips {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
  }
  .pp-dag-chip {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 8px 14px;
    border: 1px solid var(--border-soft);
    background: #fff;
    color: var(--tekst-mute);
    border-radius: 999px;
    cursor: pointer;
    font-family: var(--sans);
    white-space: nowrap;
    -webkit-appearance: none;
    appearance: none;
  }
  .pp-dag-chip.active {
    background: var(--tekst);
    color: #fff;
    border-color: var(--tekst);
  }

}
