/*
Theme Name: Lovdahlsparken
Theme URI: https://lovdahlsparken.no
Author: Lemon / Jon Rune Naess
Description: Custom WordPress theme for Lovdahlsparken residential project in Stavanger
Version: 1.0.0
Text Domain: lovdahlsparken
*/

/* ============================================
   Lovdahlsparken — Main Stylesheet
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Colors */
  --color-primary: #5C3A2E;
  --color-primary-hover: #4A2E24;
  --color-text: #1A1A1A;
  --color-text-muted: #1A1A1A;
  --color-text-light: #1A1A1A;
  --color-bg: #FFFFFF;
  --color-bg-warm: #F5F2EE;
  --color-bg-subpage: #F2F0E7;
  --color-bg-muted: #C6C6B7;
  --color-border: #E0D8D0;
  --color-border-light: #EDEBE8;

  /* Placeholder colors (for portrait circles etc.) */
  --img-portrait: #B8A99A;

  /* Typography */
  --font-serif: 'Merriweather', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Body text runs on a 17px root (see html below). Headings opt out of that
     bump via this scale — 16/17 keeps them at their original rendered size.
     Set to 1 to let headings grow with the body text. */
  --heading-scale: 0.9412;

  /* Spacing */
  --section-spacing: 100px;
  --block-spacing: 64px;      /* between page-builder blocks */
  --container-width: 1440px;
  --container-padding: 48px;

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

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

html {
  /* Everything else in this file is rem-based, so this scales the whole
     type system at once. Bumped 16 -> 17 for readability (buyers skew 55+).
     Headings are held at their old size by --heading-scale. */
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-serif);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  overflow-x: clip;
}

/* Elements that stay Inter (sans) */
.btn,
.label,
.link-arrow,
.nav-dropdown,
.main-nav,
.site-footer,
.hero-buttons-bar,
.news-card__date,
.stats-bar,
.subpage-header-centered__breadcrumb,
.subpage-two-col__links,
.document-item__meta,
.document-item__download,
.post-meta,
.book-visning-float {
  font-family: var(--font-sans);
}

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

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

ul, ol {
  list-style: none;
}

/* --- Container --- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: calc(3.5rem * var(--heading-scale));
  letter-spacing: -0.02em;
}

h2 {
  font-size: calc(2.5rem * var(--heading-scale));
}

h3 {
  font-size: calc(1.5rem * var(--heading-scale));
}

h4 {
  font-size: calc(1.125rem * var(--heading-scale));
}

p {
  line-height: 1.7;
  color: var(--color-text-muted);
}

/* --- Labels & Links --- */
.label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  display: block;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text);
  transition: gap var(--transition);
}

.link-arrow:hover {
  gap: 10px;
}

.link-arrow::after {
  content: '\2192';
  font-size: 1em;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  transition: all var(--transition);
}

.btn:hover {
  background: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
}

.btn--primary {
  background: var(--color-primary);
  color: #FFFFFF;
  border-color: var(--color-primary);
}

.btn--primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  color: #FFFFFF;
}

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

/* --- HEADER --- */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 32px 0;
}

.site-header .container {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 110px;
  width: auto;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.logo:hover .logo-img {
  transform: translateY(-4px);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.08));
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-top: 8px;
}

.main-nav a {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text);
  transition: color var(--transition);
  letter-spacing: 0.02em;
}

.main-nav a:hover {
  color: var(--color-primary);
}

/* --- NAV DROPDOWN --- */
.nav-dropdown {
  position: relative;
}

.nav-dropdown__trigger {
  cursor: pointer;
}

.nav-dropdown__trigger::after {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  margin-left: 6px;
  transition: transform var(--transition);
}

.nav-dropdown:hover .nav-dropdown__trigger::after {
  transform: rotate(-135deg) translateY(-2px);
}

.nav-dropdown__menu {
  position: absolute;
  top: 100%;
  left: -16px;
  padding-top: 16px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.nav-dropdown:hover .nav-dropdown__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown__menu a {
  display: block;
  white-space: nowrap;
  padding: 10px 24px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-bg);
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  transition: background var(--transition), color var(--transition);
}

.nav-dropdown__menu a:first-child {
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.nav-dropdown__menu a:last-child {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.nav-dropdown__menu a:hover {
  background: var(--color-bg-warm);
  color: var(--color-primary);
}

/* --- HERO --- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  min-height: 100vh;
}

.hero__content {
  padding: 160px 64px 80px 0;
  padding-left: max(var(--container-padding), calc((100vw - var(--container-width)) / 2 + var(--container-padding)));
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero__title {
  font-size: calc(4rem * var(--heading-scale));
  line-height: 1.1;
  margin-bottom: 24px;
  color: var(--color-text);
}

.hero__text {
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--color-text-muted);
  margin-bottom: 32px;
  max-width: 420px;
}

.hero__link {
  margin-bottom: 0;
}

.hero__right {
  display: flex;
  flex-direction: column;
}

.hero__image {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.hero__slide {
  margin: 0;
  width: 100%;
  height: 100%;
  position: relative;
}

.hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center left;
  display: block;
}

.hero__image--slideshow .hero__slide {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 1;
}

.hero__image--slideshow .hero__slide.is-active {
  opacity: 1;
  z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
  .hero__image--slideshow .hero__slide {
    transition: none;
  }
}

/* Soft gradient overlay at top for nav readability */
.hero__image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 180px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
  z-index: 3;
}

/* Hero buttons bar — below image, same width as image */
.hero-buttons-bar {
  padding: 24px 48px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.hero-buttons-bar__left {
  display: flex;
  gap: 12px;
}

.hero-buttons-bar__right {
  display: flex;
  gap: 12px;
}

/* --- APARTMENT TYPES --- */
.apartment-types {
  padding: var(--section-spacing) 0 0;
}

.apartment-grid {
  display: grid;
  grid-template-columns: repeat(var(--apartment-cols, 3), 1fr);
  gap: 32px;
}

/* Use flexbox for apartment cards to push link-arrow to bottom */
.apartment-card {
  display: flex;
  flex-direction: column;
}

.apartment-card__image {
  aspect-ratio: 3 / 2;
  margin-bottom: 24px;
  overflow: hidden;
  position: relative;
  /* thin frame so the container stays visible when the white-background
     floor plan fades in on hover */
  border: 1px solid var(--color-border);
}

.apartment-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Optional floor plan shown on hover, crossfading over the photo.
   object-fit contain on a light surface — plan drawings must not crop. */
.apartment-card__hover {
  position: absolute;
  inset: 0;
  object-fit: contain;
  background: var(--color-bg);
  padding: 12px;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity var(--transition);
}

@media (hover: hover) {
  .apartment-card__image--has-hover:hover .apartment-card__hover {
    opacity: 1;
  }
}

.apartment-card__badge {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 8px 14px;
  pointer-events: none;
}

/* Plain section separator, same thin dark rule as the nøkkeldata groups.
   Carries the section spacing itself on both sides; the project section
   between the two dividers therefore drops its own padding. */
.section-divider {
  border: 0;
  border-top: 1px solid var(--color-text);
  margin: var(--section-spacing) 0;
}

/* Card images wrapped in a link: the <a> must fill the aspect-ratio box
   so the img's height:100% still resolves against it */
.apartment-card__image a,
.info-card__image a,
.feature-card__image a,
.project-gallery__image a,
.post-listing-card__image a,
.card-trio__image a {
  display: block;
  height: 100%;
}

.apartment-card__title {
  font-family: var(--font-serif);
  font-size: calc(2.375rem * var(--heading-scale));
  margin-bottom: 8px;
}

.apartment-card__subtitle {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.apartment-card__text {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
  flex: 1;
}

.apartment-card .link-arrow {
  margin-top: auto;
}

/* --- STATS BAR --- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 32px;
  margin-bottom: 60px;
  padding: 32px 0;
}

.stats-bar__group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-column: span 2;
  /* Match the apartment-grid's gap so label and values align with the
     card columns above (otherwise values land 16px to the left). */
  gap: 32px;
  border-top: 1px solid var(--color-text);
  padding-top: 24px;
}

.stats-bar__label {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  padding-right: 32px;
}

.stats-bar__values p {
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.7;
}

/* --- PROJECT / FEATURES SECTION --- */
.project-section {
  /* vertical spacing comes from the section dividers around it */
  padding: 0;
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.project-gallery {
  position: relative;
}

.project-gallery__image {
  /* Close to square */
  aspect-ratio: 1 / 1;
  overflow: hidden;
  margin-bottom: 20px;
}

.project-gallery__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-gallery__title {
  font-family: var(--font-serif);
  font-size: calc(2.375rem * var(--heading-scale));
  margin: 0 0 12px;
  line-height: 1.25;
}

.project-gallery__label {
  display: inline-block;
  margin-bottom: 12px;
}

.project-gallery__text {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin: 0 0 16px;
}

.project-gallery__link {
  margin-top: 4px;
}

.project-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-content: start;
}

.feature-card__image {
  /* 364x484 ratio */
  aspect-ratio: 364 / 484;
  margin-bottom: 20px;
  overflow: hidden;
}

.feature-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature-card__title {
  font-family: var(--font-serif);
  font-size: calc(2.375rem * var(--heading-scale));
  margin-bottom: 12px;
  line-height: 1.25;
}

.feature-card__label {
  margin-bottom: 12px;
}

.feature-card__text {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

/* --- THREE INFO CARDS --- */
.info-cards {
  padding: 0 0 var(--section-spacing);
}

.info-cards__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.info-card {
  display: flex;
  flex-direction: column;
}

.info-card__image {
  /* 492x634 ratio */
  aspect-ratio: 492 / 634;
  margin-bottom: 24px;
  overflow: hidden;
}

.info-card__image img,
.info-card__image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.info-card__title {
  font-family: var(--font-serif);
  font-size: calc(2.375rem * var(--heading-scale));
  margin-bottom: 12px;
}

.info-card__label {
  margin-bottom: 12px;
}

.info-card__text {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
  flex: 1;
}

.info-card .link-arrow {
  margin-top: auto;
}

/* --- MAP SECTION --- */
.map-section {
  position: relative;
  height: 800px;
  overflow: hidden;
  margin: 0 var(--container-padding);
}

.map-section__bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.map-section__address {
  position: absolute;
  bottom: 0;
  right: 0;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.02em;
}

/* --- AKTUELT / NEWS --- */
.news-section {
  padding: var(--section-spacing) 0;
}

.news-section__title {
  font-family: var(--font-serif);
  font-size: calc(2.5rem * var(--heading-scale));
  margin-bottom: 48px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-bottom: 40px;
}

.news-card {
  display: flex;
  flex-direction: column;
}

.news-card__date {
  font-size: 0.75rem;
  color: var(--color-text-light);
  margin-bottom: 12px;
}

.news-card__title {
  font-family: var(--font-serif);
  font-size: calc(1.25rem * var(--heading-scale));
  margin-bottom: 12px;
  line-height: 1.35;
}

.news-card__text {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
  flex: 1;
}

.news-card .link-arrow {
  margin-top: auto;
}

/* --- TIMELINE --- */
/* --- Timeline slider (horizontal on desktop, vertical on mobile) --- */
.timeline-slider-wrapper {
  position: relative;
  padding: 60px 0 40px;
  margin-top: 40px;
  max-width: 100%;
  overflow: hidden;
}

.timeline-slider {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  user-select: none;
  -webkit-user-select: none;
}

.timeline-slider.no-scroll { overflow-x: hidden; }
.timeline-slider.no-scroll .timeline-items { justify-content: center; }
.timeline-slider::-webkit-scrollbar { display: none; }

.timeline-items {
  position: relative;
  display: flex;
  flex-direction: row;
  gap: 30px;
  padding: 0;
  min-width: min-content;
  justify-content: center;
}

/* Horizontal connecting line — sized in JS so it spans first dot → last dot */
.timeline-items::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: var(--timeline-line-width, calc(100% - 175px));
  height: 2px;
  background-color: var(--color-primary);
  z-index: 0;
}

.timeline-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  min-width: 175px;
  z-index: 1;
}

.timeline-label,
.timeline-heading {
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.timeline-item-current .timeline-label,
.timeline-item-current .timeline-heading {
  opacity: 1;
}

.timeline-dot {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  background-color: var(--color-primary);
  border-radius: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-dot svg {
  width: 10px;
  height: 10px;
  color: #fff;
  stroke-width: 3;
}

.timeline-item-current .timeline-dot {
  animation: timeline-pulse 2s ease-in-out infinite;
}

@keyframes timeline-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(92, 58, 46, 0.4); }
  50%      { box-shadow: 0 0 0 10px rgba(92, 58, 46, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .timeline-item-current .timeline-dot { animation: none; }
  .timeline-slider { scroll-behavior: auto; }
}

/* Small label sits on top via flex order */
.timeline-label {
  margin: 48px 0 8px 0;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.2;
  order: 1;
  display: block;
}

/* Large heading sits below */
.timeline-heading {
  margin: 0;
  font-family: var(--font-serif);
  font-size: calc(1.375rem * var(--heading-scale));
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
  display: block;
  order: 2;
}

.timeline-nav {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 30px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.timeline-nav.is-visible { opacity: 1; }

.timeline-prev,
.timeline-next {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  transition: opacity 0.3s ease;
}

.timeline-prev svg,
.timeline-next svg {
  width: 18px;
  height: auto;
  display: block;
}

.timeline-prev:disabled,
.timeline-next:disabled {
  opacity: 0;
  cursor: not-allowed;
  pointer-events: none;
}

/* Vertical stack on mobile */
@media (max-width: 768px) {
  .timeline-slider-wrapper {
    padding: 40px 0;
  }
  .timeline-slider {
    overflow-x: visible;
    overflow-y: visible;
  }
  .timeline-items {
    flex-direction: column;
    gap: 0;
    min-width: auto;
    justify-content: flex-start;
  }
  .timeline-items::before {
    top: 8px;
    left: 8px;
    transform: none;
    width: 2px;
    height: calc(100% - 16px);
  }
  .timeline-item {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    gap: 20px;
    min-width: auto;
    padding: 0 0 32px 0;
  }
  .timeline-item:last-child { padding-bottom: 0; }
  .timeline-dot {
    position: relative;
    top: 0;
    left: 0;
    transform: none;
    flex-shrink: 0;
  }
  .timeline-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
  }
  .timeline-label {
    margin: 0;
    order: 0;
  }
  .timeline-heading {
    margin: 0;
    font-size: calc(1.25rem * var(--heading-scale));
    order: 0;
  }
  .timeline-nav { display: none; }
}

/* ============================================
   SUBPAGE STYLES
   ============================================ */

/* --- SUBPAGE HEADER --- */
.site-header--subpage {
  position: relative;
  background: var(--color-bg-warm);
  padding: 24px 0;
}

.site-header--subpage .container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.header-left {
  display: flex;
  align-items: center;
}

.header-left .btn {
  font-size: 0.75rem;
  padding: 10px 20px;
}

.header-center {
  display: flex;
  justify-content: center;
}

.header-center .logo-img {
  height: 110px;
}

.header-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.header-right .main-nav {
  padding-top: 0;
}

/* Hide the nav CTA on desktop — visible only in mobile nav slide-out */
.main-nav__cta {
  display: none;
}

/* --- BOOK VISNING FLOATING BUTTON --- */
.book-visning-float {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  background: var(--color-primary);
  padding: 14px 24px;
  border: 1px solid var(--color-primary);
  transition: all var(--transition);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.book-visning-float::after {
  content: '\2192';
  font-size: 1em;
}

.book-visning-float:hover {
  background: var(--color-primary-hover);
  color: #fff;
  border-color: var(--color-primary-hover);
}

/* --- VISNING FORM --- */
.visning-form {
  padding-bottom: var(--section-spacing);
}

.visning-form__inner {
  max-width: 600px;
  margin: 0 auto;
}

.visning-form__heading {
  font-size: calc(1.75rem * var(--heading-scale));
  margin-bottom: 12px;
}

.visning-form__description {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--color-text-muted);
  margin-bottom: 40px;
}

.visning-form__dates {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  padding: 24px 32px;
  margin-bottom: 40px;
}

.visning-form__dates-title {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.visning-form__dates-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.visning-form__dates-list li {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border-light);
  color: var(--color-text);
}

.visning-form__dates-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.visning-form__field {
  margin-bottom: 20px;
}

.visning-form__field label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}

.visning-form__field input,
.visning-form__field select {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color var(--transition);
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
}

.visning-form__field input:focus,
.visning-form__field select:focus {
  outline: none;
  border-color: var(--color-primary);
}

.visning-form__field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.visning-form__submit {
  margin-top: 32px;
}

.visning-form__submit .btn {
  width: 100%;
}

.visning-form__success {
  text-align: center;
  padding: 60px 0;
}

.visning-form__success h2 {
  font-size: calc(1.75rem * var(--heading-scale));
  margin-bottom: 12px;
}

.visning-form__success p {
  font-size: 1rem;
  color: var(--color-text-muted);
}

/* --- VISNING POPUP (lower-right corner) --- */
.visning-popup {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 9999;
  pointer-events: none;
}

.visning-popup__card {
  position: relative;
  background: var(--color-bg-subpage);
  padding: 40px 44px;
  max-width: 380px;
  width: max-content;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.visning-popup.is-visible .visning-popup__card {
  opacity: 1;
  transform: translateY(0);
}

.visning-popup__close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--color-text);
  line-height: 1;
  padding: 4px 8px;
  transition: opacity var(--transition);
}

.visning-popup__close:hover {
  opacity: 0.6;
}

.visning-popup__heading {
  font-family: var(--font-serif);
  font-size: calc(1.375rem * var(--heading-scale));
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 10px;
  line-height: 1.3;
  padding-right: 20px;
}

.visning-popup__location {
  font-family: var(--font-serif);
  font-size: 0.875rem;
  color: var(--color-text);
  margin: 0 0 24px;
  font-style: italic;
}

.visning-popup__cta {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  padding: 10px 28px;
}

/* --- DNB ESTATE FORM (interesseskjema) --- */
#interesseskjema {
  overflow: hidden;
}

#interesseskjema .autoprospekt-widget-frame {
  width: 100% !important;
  height: auto !important;
}

#interesseskjema .autoprospekt-widget-frame label input {
  background-color: transparent !important;
  border-color: var(--color-text) !important;
  border-radius: 0 !important;
  margin-top: 10px !important;
  color: var(--color-text) !important;
}

#interesseskjema .autoprospekt-widget-frame input[type=checkbox] + span {
  background-color: transparent !important;
  border-color: var(--color-text) !important;
  border-radius: 0 !important;
  border-width: 1px !important;
}

#interesseskjema .autoprospekt-widget-frame input[type=checkbox]:checked + span:before {
  width: 7px !important;
  left: 8px !important;
  top: 4px !important;
  border-color: var(--color-text) !important;
}

#interesseskjema .autoprospekt-widget-frame label span,
#interesseskjema .autoprospekt-widget-frame p,
#interesseskjema .autoprospekt-widget-frame label {
  color: var(--color-text) !important;
}

/* Smaller text for the privacy policy fine print */
#interesseskjema .autoprospekt-widget-frame p {
  font-size: 0.75rem;
  line-height: 1.5;
}

#interesseskjema .autoprospekt-widget-frame a.autoprospekt-widget-link,
#interesseskjema .autoprospekt-widget-frame label span.autoprospekt-widget-link {
  color: inherit !important;
  text-decoration: underline !important;
}

#interesseskjema .autoprospekt-widget-frame button,
#interesseskjema .autoprospekt-widget-frame button[type=submit],
#interesseskjema .autoprospekt-widget button,
#interesseskjema button[type=submit],
#interesseskjema #autoprospekt-form-container button {
  width: auto !important;
  padding: 10px 28px 14px !important;
  border-radius: 0 !important;
  background-color: var(--color-primary) !important;
  color: #fff !important;
  border: none !important;
  margin-top: 16px !important;
  font-family: var(--font-sans) !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.04em !important;
  cursor: pointer !important;
  transition: background-color 0.3s ease, color 0.3s ease !important;
  opacity: 1 !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

#interesseskjema .autoprospekt-widget-frame button:hover,
#interesseskjema .autoprospekt-widget-frame button[type=submit]:hover,
#interesseskjema .autoprospekt-widget button:hover,
#interesseskjema button[type=submit]:hover,
#interesseskjema #autoprospekt-form-container button:hover {
  background-color: var(--color-primary-hover) !important;
  color: #fff !important;
}

#interesseskjema .autoprospekt-widget-frame button:disabled,
#interesseskjema button[type=submit]:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
}

/* --- SUBPAGE BACKGROUND --- */
.page-bg-subpage {
  background-color: var(--color-bg-subpage);
}

.page-bg-muted {
  background-color: var(--color-bg-muted);
}

/* Match nav bg to page bg */
.page-bg-subpage .site-header--subpage {
  background: var(--color-bg-subpage);
}

.page-bg-muted .site-header--subpage {
  background: var(--color-bg-muted);
}

.page-bg-white {
  background-color: #FFFFFF;
}

.page-bg-white .site-header--subpage {
  background: #FFFFFF;
}

/* --- SUBPAGE HERO (Title left + image right) --- */
.subpage-hero {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  min-height: 60vh;
  margin-top: 24px;
}

.subpage-hero__content {
  padding: 80px 64px 80px 0;
  padding-left: max(var(--container-padding), calc((100vw - var(--container-width)) / 2 + var(--container-padding)));
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.subpage-hero__label {
  margin-bottom: 16px;
}

.subpage-hero__title {
  font-size: calc(4rem * var(--heading-scale));
  line-height: 1.1;
  margin-bottom: 24px;
}

.subpage-hero__text {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text-muted);
  max-width: 440px;
}

.subpage-hero__figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* When the hero has an image caption, push the next section down a bit
   so the caption doesn't visually butt against it (e.g. info-cards under
   the prosjektet hub page). No-op when there's no caption. */
.subpage-hero:has(.subpage-hero__figure .image-caption) {
  margin-bottom: 40px;
}

.subpage-hero__image {
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

.subpage-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.subpage-hero__figure .image-caption {
  padding: 12px 16px 8px;
}

/* --- SUBPAGE BANNER (image starts at content-left, bleeds to viewport-right) --- */
.subpage-banner__figure {
  /* The figure inherits the negative right margin so the image area bleeds
     to the viewport edge — the caption underneath stays at content width. */
  margin: 0;
  margin-right: calc(-1 * max(var(--container-padding), calc((100vw - var(--container-width)) / 2 + var(--container-padding))));
}

.subpage-banner__image {
  height: 60vh;
  max-height: 720px;
  min-height: 360px;
  overflow: hidden;
  position: relative;
}

.subpage-banner__figure .image-caption {
  /* Caption sits at content width, not bleeding to the viewport edge */
  margin-right: max(var(--container-padding), calc((100vw - var(--container-width)) / 2 + var(--container-padding)));
  margin-top: 12px;
}

.subpage-banner__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Soft gradient overlay at top for nav readability */
.subpage-banner__image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 180px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}

.subpage-banner__intro {
  padding: 72px 0 48px;
}

.subpage-banner__intro-inner {
  max-width: 520px;
}

.subpage-banner__label {
  display: inline-block;
  margin-bottom: 16px;
}

.subpage-banner__title {
  font-size: calc(3rem * var(--heading-scale));
  line-height: 1.15;
  margin: 0 0 24px;
}

.subpage-banner__text {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--color-text);
  margin: 0;
}

/* --- SUBPAGE BODY CONTENT --- */
.subpage-body {
  padding: var(--section-spacing) 0;
}

.subpage-body__content {
  max-width: 800px;
}

.subpage-body__content p {
  font-size: 0.9375rem;
  line-height: 1.9;
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

.subpage-body__content h2 {
  font-size: calc(2rem * var(--heading-scale));
  margin-bottom: 16px;
  margin-top: 48px;
}

.subpage-body__content h3 {
  font-size: calc(1.375rem * var(--heading-scale));
  margin-bottom: 12px;
  margin-top: 40px;
}

/* --- 2-COLUMN SUBPAGE (Underside uten fremhevet bilde) --- */
.subpage-header-centered {
  text-align: center;
  padding: 120px 0 48px;
}

.subpage-header-centered__title {
  font-size: calc(4rem * var(--heading-scale));
  line-height: 1.1;
  margin-bottom: 16px;
}

.subpage-header-centered__breadcrumb {
  font-size: 0.75rem;
  color: var(--color-text);
  letter-spacing: 0.02em;
}

.subpage-header-centered__breadcrumb a {
  color: var(--color-text-muted);
  transition: color var(--transition);
}

.subpage-header-centered__breadcrumb a:hover {
  color: var(--color-text);
}

.subpage-two-col {
  padding-bottom: var(--section-spacing);
}

.subpage-two-col__section-title {
  font-family: var(--font-serif);
  font-size: calc(1.5rem * var(--heading-scale));
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 32px;
  margin-top: 16px;
}

.subpage-two-col__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-bottom: var(--block-spacing);
}

/* Optional vertical divider between the two columns. */
.subpage-two-col__grid--divider {
  position: relative;
  gap: 64px;
}

.subpage-two-col__grid--divider::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: #000;
}

.subpage-two-col__grid p {
  font-size: 0.9375rem;
  line-height: 1.9;
  color: var(--color-text);
  margin-bottom: 16px;
}

/* WYSIWYG content: give headings breathing room before the paragraph below. */
:where(
  .subpage-two-col__grid,
  .subpage-two-col__narrow,
  .text-image-trio__text,
  .text-pair__text,
  .image-text__body
) :is(h1, h2, h3, h4, h5, h6):has(+ p) {
  margin-bottom: 1em;
}

.subpage-two-col__image {
  margin: 0 0 var(--block-spacing);
  overflow: hidden;
}

.subpage-two-col__image img {
  width: 100%;
  height: auto;
  display: block;
}

.subpage-two-col__image--side-by-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: var(--block-spacing);
}

.subpage-two-col__image--side-by-side img {
  width: 100%;
  height: auto;
}

.subpage-two-col__image--side-by-side-figure {
  margin: 0;
}

.subpage-two-col__image--side-by-side-figure img {
  width: 100%;
  height: auto;
}

.subpage-two-col__caption {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: 10px;
  line-height: 1.5;
}

.subpage-two-col__narrow {
  max-width: 50%;
  margin: 0 auto var(--block-spacing);
}

.subpage-two-col__narrow p {
  font-size: 0.9375rem;
  line-height: 1.9;
  color: var(--color-text);
  margin-bottom: 16px;
}

.subpage-two-col__button {
  margin-top: 40px;
  margin-bottom: var(--block-spacing);
}

.subpage-two-col__links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  margin-top: 16px;
}

/* --- Full width gallery (horizontal marquee carousel) --- */
.fw-gallery {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-bottom: var(--block-spacing);
  position: relative;
  height: var(--fw-gallery-max-h, 600px);
  background: var(--color-bg-subpage);
  overflow: hidden;
}

.fw-gallery__track {
  display: flex;
  align-items: center;
  height: 100%;
  width: max-content;
  will-change: transform;
}

.fw-gallery__slide {
  margin: 0;
  height: 100%;
  flex-shrink: 0;
  position: relative; /* anchor for the overlay caption */
}

.fw-gallery__slide img {
  height: 100%;
  width: auto;
  display: block;
}

/* Single image: center, no animation */
.fw-gallery:not(.fw-gallery--marquee) .fw-gallery__track {
  width: 100%;
  justify-content: center;
}

.fw-gallery:not(.fw-gallery--marquee) .fw-gallery__slide img {
  max-width: 100%;
  width: auto;
}

/* Marquee animation — JS sets --fw-gallery-duration based on track width */
.fw-gallery--marquee .fw-gallery__track {
  animation: fw-gallery-scroll var(--fw-gallery-duration, 40s) linear infinite;
}

.fw-gallery--marquee:hover .fw-gallery__track,
.fw-gallery--marquee:focus-within .fw-gallery__track {
  animation-play-state: paused;
}

@keyframes fw-gallery-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .fw-gallery--marquee .fw-gallery__track {
    animation: none;
  }
}

/* Optional descriptive text under the carousel. */
.fw-gallery--has-description {
  margin-bottom: 12px;
}

.fw-gallery__description {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--color-text);
  text-align: center;
  margin: 0 0 var(--block-spacing);
}

/* --- Spacer (adds vertical space between blocks) --- */
.block-spacer {
  /* No bottom margin of its own — size comes purely from height. */
  margin-bottom: 0;
}
.block-spacer--small  { height: 32px; }
.block-spacer--medium { height: 64px; }
.block-spacer--large  { height: 100px; }
.block-spacer--xl     { height: 160px; }

@media (max-width: 768px) {
  .block-spacer--small  { height: 24px; }
  .block-spacer--medium { height: 48px; }
  .block-spacer--large  { height: 72px; }
  .block-spacer--xl     { height: 100px; }
}

/* --- Shared image caption (figcaption) ---
   Default: small muted line below the image.
   --overlay variant: white-on-dark, top-left corner of the image. */
.image-caption {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-top: 10px;
}

.image-caption--overlay {
  position: absolute;
  bottom: 12px;
  right: 12px;
  margin: 0;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.3;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  max-width: calc(100% - 24px);
  text-align: right;
  z-index: 4;
  pointer-events: none;
}

/* --- Card Trio (3 cols, image on top + text below) --- */
.card-trio {
  margin-bottom: var(--block-spacing);
}

.card-trio__title {
  font-family: var(--font-serif);
  font-size: calc(2.375rem * var(--heading-scale));
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 32px;
  color: var(--color-text);
}

.card-trio__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.card-trio__card {
  display: flex;
  flex-direction: column;
}

.card-trio__image {
  margin: 0 0 24px;
}

.card-trio__image img {
  width: 100%;
  height: auto;
  display: block;
}

.card-trio__card-title {
  font-family: var(--font-serif);
  font-size: calc(1.5rem * var(--heading-scale));
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 12px;
  color: var(--color-text);
}

.card-trio__card-text {
  font-size: 0.9375rem;
  line-height: 1.9;
  color: var(--color-text);
}

.card-trio__card-text p {
  margin: 0 0 16px;
}

.card-trio__card-text p:last-child {
  margin-bottom: 0;
}

.card-trio__card-link {
  margin-top: 16px;
  align-self: flex-start;
}

/* --- Text + Image Trio (2 text + 1 image, 3 cols) --- */
.text-image-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 32px;
  row-gap: 32px;
  align-items: start;
  margin-bottom: var(--block-spacing);
}

.text-image-trio__title {
  font-family: var(--font-serif);
  font-size: calc(2.375rem * var(--heading-scale));
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
  color: var(--color-text);
}

.text-image-trio__text {
  font-size: 0.9375rem;
  line-height: 1.9;
  color: var(--color-text);
}

.text-image-trio__button {
  margin-top: 32px;
}

.text-image-trio__image {
  margin: 0;
}

.text-image-trio__image img {
  width: 100%;
  height: auto;
  display: block;
}

.text-image-trio__caption {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: 10px;
  line-height: 1.5;
}

/* Column placement — title spans the text columns in row 1, rest in row 2.
   Image spans both rows so it stays as tall as the title + text columns combined. */
.text-image-trio--image-left  .text-image-trio__image  { grid-column: 1;        grid-row: 1 / span 2; }
.text-image-trio--image-left  .text-image-trio__title  { grid-column: 2 / span 2; grid-row: 1; }
.text-image-trio--image-left  .text-image-trio__col--1 { grid-column: 2;        grid-row: 2; }
.text-image-trio--image-left  .text-image-trio__col--2 { grid-column: 3;        grid-row: 2; }

.text-image-trio--image-center .text-image-trio__title  { grid-column: 1 / span 3; grid-row: 1; }
.text-image-trio--image-center .text-image-trio__col--1 { grid-column: 1;        grid-row: 2; }
.text-image-trio--image-center .text-image-trio__image  { grid-column: 2;        grid-row: 2; }
.text-image-trio--image-center .text-image-trio__col--2 { grid-column: 3;        grid-row: 2; }

.text-image-trio--image-right .text-image-trio__title  { grid-column: 1 / span 2; grid-row: 1; }
.text-image-trio--image-right .text-image-trio__col--1 { grid-column: 1;        grid-row: 2; }
.text-image-trio--image-right .text-image-trio__col--2 { grid-column: 2;        grid-row: 2; }
.text-image-trio--image-right .text-image-trio__image  { grid-column: 3;        grid-row: 1 / span 2; }

/* --- Text Pair + Images (asymmetric 3-col grid) --- */
.text-pair {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 32px;
  row-gap: 48px;
  margin-bottom: var(--block-spacing);
}

.text-pair__col {
  border-top: 1px solid var(--color-text);
  padding-top: 32px;
}

.text-pair__col--left  { grid-column: 1; }
.text-pair__col--right { grid-column: 2; }

.text-pair__image {
  margin: 0;
}

.text-pair__image--left  { grid-column: 1;     grid-row: 2; }
.text-pair__image--right { grid-column: 2 / -1; grid-row: 2; }

.text-pair__image img {
  width: 100%;
  height: auto;
  display: block;
}

.text-pair__title {
  font-family: var(--font-serif);
  font-size: calc(2.375rem * var(--heading-scale));
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 8px;
  color: var(--color-text);
}

.text-pair__subtitle {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--color-text);
  margin: 0 0 24px;
}

.text-pair__text {
  font-size: 0.9375rem;
  line-height: 1.9;
  color: var(--color-text);
}

/* --- Image + Text block --- */
.image-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
  margin-bottom: var(--block-spacing);
}

/* Full-bleed background variants — pseudo-element extends bg to viewport edges */
.image-text--bg-white,
.image-text--bg-beige {
  position: relative;
  isolation: isolate;
  padding: 80px 0;
  margin-top: 0;
  margin-bottom: 0;
}

.image-text--bg-white::before,
.image-text--bg-beige::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  z-index: -1;
}

.image-text--bg-white::before { background: #ffffff; }
.image-text--bg-beige::before { background: var(--color-bg-subpage); }

.image-text--right .image-text__image {
  order: 2;
}

.image-text__image img {
  width: 100%;
  height: auto;
  display: block;
}

.image-text__title {
  font-family: var(--font-serif);
  font-size: calc(1.75rem * var(--heading-scale));
  font-weight: 700;
  margin: 0 0 24px;
  color: var(--color-text);
}

.image-text__body {
  font-size: 0.9375rem;
  line-height: 1.9;
  color: var(--color-text);
}

/* Shared WYSIWYG spacing rules (applies to image_text, text_image_trio, text_pair) */
.image-text__body p,
.text-image-trio__text p,
.text-pair__text p {
  margin: 0 0 20px;
}

.image-text__body p:last-child,
.text-image-trio__text p:last-child,
.text-pair__text p:last-child {
  margin-bottom: 0;
}

.image-text__body h2,
.text-image-trio__text h2,
.text-pair__text h2 {
  font-size: calc(2rem * var(--heading-scale));
  line-height: 1.2;
  margin: 40px 0 16px;
}

.image-text__body h3,
.text-image-trio__text h3,
.text-pair__text h3 {
  font-size: calc(1.375rem * var(--heading-scale));
  line-height: 1.2;
  margin: 32px 0 12px;
}

.image-text__body h4,
.text-image-trio__text h4,
.text-pair__text h4 {
  font-size: calc(1.125rem * var(--heading-scale));
  line-height: 1.3;
  margin: 24px 0 8px;
}

.image-text__body :is(h2, h3, h4):first-child,
.text-image-trio__text :is(h2, h3, h4):first-child,
.text-pair__text :is(h2, h3, h4):first-child {
  margin-top: 0;
}

.image-text__button {
  margin-top: 32px;
}

/* --- POST TEMPLATE (Aktueltsak) --- */
.post-header {
  text-align: center;
  padding: 80px 0 48px;
}

.post-header__title {
  font-size: calc(3.5rem * var(--heading-scale));
  line-height: 1.15;
  max-width: 700px;
  margin: 0 auto 16px;
}

.post-header__date {
  font-size: 0.8125rem;
  color: var(--color-text-light);
}

.post-intro {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
  padding-bottom: 48px;
}

.post-intro p {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--color-text-muted);
}

.post-featured-image {
  overflow: hidden;
  margin-bottom: var(--section-spacing);
}

.post-featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

.post-body {
  max-width: 800px;
  padding-bottom: var(--section-spacing);
}

.post-body p {
  font-size: 0.9375rem;
  line-height: 1.9;
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

/* --- BOLIGVELGER / SIMPLE HERO TEMPLATE --- */
.simple-hero {
  padding: 80px 0 0;
  text-align: center;
}

.simple-hero__title {
  font-size: calc(4rem * var(--heading-scale));
  line-height: 1.1;
  margin-bottom: 20px;
}

.simple-hero__text {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto 48px;
}

.simple-hero__image {
  overflow: hidden;
}

.simple-hero__image img {
  width: 100%;
  height: auto;
  display: block;
}

.shortcode-area {
  padding: var(--section-spacing) 0;
  min-height: 400px;
}

.shortcode-area__placeholder {
  background: var(--color-bg-warm);
  border: 2px dashed var(--color-border);
  padding: 80px 48px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* --- ad-units (Boligvelger) plugin overrides ---
   The plugin's .preview-nav uses position: absolute but is rendered as a
   sibling of .preview-block (not inside it). Without a positioned ancestor
   the nav escapes to viewport (0,0) — anchor it to the row instead.
   Also force the unit-list <table> to fill its container — bare HTML tables
   size to content and end up at ~50% width otherwise. */
#adunits .ad-row.stacked {
  position: relative;
}

#adunits .unit-list {
  width: 100%;
}

/* Compact total badge inside the building (parent) popup h4 title */
#adunits .unit-popup--parent h4 .unit-popup__total {
  float: right;
  font-weight: 400;
  font-size: 0.875rem;
  opacity: 0.7;
  line-height: 1.7;
}

/* --- GALLERY GRID --- */
.gallery-grid {
  padding: var(--section-spacing) 0;
}

.gallery-grid__items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gallery-grid__item {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  margin: 0;
}

.gallery-grid__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-grid__item:hover img {
  transform: scale(1.03);
}

/* Soft dark gradient at the bottom of gallery items with a caption,
   for legibility behind the overlaid caption text. */
.gallery-grid__item:has(.gallery-grid__caption)::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 90px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.6) 100%);
  pointer-events: none;
  z-index: 1;
}

/* .gallery-grid__caption uses the shared .image-caption--overlay style
   (bottom-right, white text-shadow). z-index sits above the gradient. */
.gallery-grid__caption {
  z-index: 2;
}

/* --- POST LISTING (Aktuelt overview) --- */
.post-listing {
  padding: 48px 0 var(--section-spacing);
}

.post-listing__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.post-listing-card {
  display: flex;
  flex-direction: column;
}

.post-listing-card__image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  margin-bottom: 20px;
}

.post-listing-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-listing-card__date {
  font-size: 0.75rem;
  color: var(--color-text-light);
  margin-bottom: 8px;
}

.post-listing-card__title {
  font-family: var(--font-serif);
  font-size: calc(1.25rem * var(--heading-scale));
  margin-bottom: 12px;
  line-height: 1.35;
}

.post-listing-card__text {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
  flex: 1;
}

.post-listing-card .link-arrow {
  margin-top: auto;
}

/* --- DOCUMENT DOWNLOAD LIST --- */
.document-list {
  margin-top: 48px;
  margin-bottom: var(--section-spacing);
}

.document-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  border-bottom: 1px solid var(--color-border);
}

.document-item:first-child {
  border-top: 1px solid var(--color-border);
}

.document-item__info {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  min-width: 0;
}

.document-item__icon {
  width: 44px;
  height: 44px;
  background: var(--color-bg-warm);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.document-item__icon svg {
  width: 22px;
  height: 22px;
  color: var(--color-primary);
}

.document-item__text {
  min-width: 0;
}

.document-item__title {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 2px;
}

.document-item__meta {
  font-size: 0.75rem;
  color: var(--color-text-light);
  letter-spacing: 0.02em;
}

.document-item__download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  padding: 10px 20px;
  border: 1px solid var(--color-border);
  background: transparent;
  transition: all var(--transition);
  flex-shrink: 0;
  margin-left: 24px;
}

.document-item__download:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.document-item__download svg {
  width: 16px;
  height: 16px;
}

/* --- LIGHTBOX --- */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  cursor: pointer;
}

.lightbox.is-active {
  opacity: 1;
  visibility: visible;
}

.lightbox__figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox__img {
  max-width: 100%;
  max-height: calc(90vh - 56px); /* leave space for caption */
  object-fit: contain;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.lightbox.is-active .lightbox__img {
  transform: scale(1);
}

.lightbox__caption {
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.5;
  max-width: 80vw;
  text-align: center;
  margin: 0;
}

.lightbox__caption:empty {
  display: none;
}

.lightbox__close {
  position: absolute;
  top: 24px;
  right: 32px;
  color: #fff;
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 16px;
  line-height: 1;
}

.lightbox__nav--prev {
  left: 16px;
}

.lightbox__nav--next {
  right: 16px;
}

/* --- FOOTER --- */
.site-footer {
  padding: 60px 0 32px;
  border-top: 1px solid var(--color-text);
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.footer-logos {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
}

.footer-logo-img {
  height: auto;
  width: 170px;
}

.footer-logo-img--dnb {
  /* DNB logo is white on transparent — invert for light bg */
  filter: invert(1);
  width: 150px;
}

.footer-logo-img--ogreid {
  /* Force Øgreid logo to pure black to match DNB */
  filter: brightness(0);
}

.footer-description {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.footer-contact__name {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.footer-contact__role {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.footer-contact__detail {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.footer-contact__detail a {
  color: var(--color-primary);
  text-decoration: underline;
}

.footer-contact__photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin-bottom: 16px;
  object-fit: cover;
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--color-border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom__text {
  font-size: 0.75rem;
  color: var(--color-text-light);
}

.footer-bottom__text a {
  color: var(--color-text-muted);
  transition: color var(--transition);
}

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

.footer-bottom__links {
  font-size: 0.75rem;
  color: var(--color-text-light);
}

.footer-bottom__links a {
  color: var(--color-text-muted);
  transition: color var(--transition);
}

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

/* --- HAMBURGER NAV TOGGLE (hidden on desktop) --- */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 200;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
}

.nav-toggle__bar {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-text);
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

/* Animate to X when open */
.nav-toggle.is-open .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- RESPONSIVE — Tablet (≤1024px) --- */
@media (max-width: 1024px) {
  :root {
    --container-padding: 32px;
  }

  .hero {
    grid-template-columns: 1fr 1.2fr;
  }

  .hero__title {
    font-size: calc(3rem * var(--heading-scale));
  }

  .apartment-grid {
    grid-template-columns: repeat(var(--apartment-cols-tablet, 2), 1fr);
    gap: 24px;
  }

  .project-features {
    gap: 24px;
  }

  .news-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  /* Subpage tablet */
  .subpage-hero {
    grid-template-columns: 1fr 1fr;
  }

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

/* --- Utility: desktop-only line break --- */

/* --- RESPONSIVE — Mobile (≤768px) --- */
@media (max-width: 768px) {
  br.br-desktop { display: none; }

  :root {
    --container-padding: 24px;
    --section-spacing: 64px;
    --block-spacing: 48px;
  }

  h1,
  .hero__title {
    font-size: calc(2.5rem * var(--heading-scale));
  }

  h2 {
    font-size: calc(2rem * var(--heading-scale));
  }

  h3 {
    font-size: calc(1.25rem * var(--heading-scale));
  }

  /* --- Mobile Nav --- */
  .nav-toggle {
    display: flex;
  }

  .site-header .container {
    align-items: center;
  }

  .logo-img {
    height: 70px;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 360px;
    height: 100vh;
    height: 100dvh;
    background: var(--color-bg-warm);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 120px 48px 48px;
    gap: 0;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.12);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 150;
    border-left: 1px solid var(--color-border);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Prevent body scroll when nav is open */
  body.nav-open {
    overflow: hidden;
  }

  .main-nav.is-open {
    transform: translateX(0);
  }

  .main-nav > a,
  .main-nav > .nav-dropdown {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    text-transform: none;
    color: var(--color-text);
    padding: 16px 0;
    border-bottom: 1px solid var(--color-border);
    width: 100%;
    display: block;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.2s ease;
  }

  /* Hide Meld interesse from header on mobile — it's in the nav */
  .header-left .btn {
    display: none;
  }

  /* Meld interesse button at bottom of mobile nav */
  .main-nav__cta {
    display: block;
    margin-top: auto;
    padding-top: 32px;
    width: 100%;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.3s ease 0.3s, transform 0.3s ease 0.3s;
  }

  .main-nav.is-open .main-nav__cta {
    opacity: 1;
    transform: translateX(0);
  }

  .main-nav__cta .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .main-nav__cta .btn--primary {
    color: #FFFFFF;
    background: var(--color-primary);
    border-color: var(--color-primary);
  }

  .main-nav__cta .btn--primary:hover {
    color: #FFFFFF;
  }

  .main-nav a:hover {
    color: var(--color-primary);
  }

  /* Mobile dropdown — expand inline instead of absolute */
  .main-nav .nav-dropdown__trigger {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    text-transform: none;
    display: block;
    padding: 0;
  }

  .nav-dropdown__trigger::after {
    transform: rotate(45deg) translateY(-3px);
    margin-left: 8px;
    width: 6px;
    height: 6px;
    transition: transform 0.3s ease;
  }

  .nav-dropdown.is-open .nav-dropdown__trigger::after {
    transform: rotate(-135deg) translateY(-3px);
  }

  .nav-dropdown__menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    padding-top: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }

  .nav-dropdown.is-open .nav-dropdown__menu {
    max-height: 400px;
  }

  .nav-dropdown__menu a {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 10px 0 10px 16px;
    border: none;
    border-left: 2px solid var(--color-border);
    background: transparent;
    color: var(--color-text-muted);
    opacity: 1;
    transform: none;
  }

  .nav-dropdown__menu a:first-child {
    padding-top: 14px;
    border-top: none;
  }

  .nav-dropdown__menu a:last-child {
    padding-bottom: 14px;
    border-bottom: none;
  }

  .nav-dropdown__menu a:hover {
    background: transparent;
    color: var(--color-primary);
    border-left-color: var(--color-primary);
  }

  /* Staggered entrance for nav items */
  .main-nav.is-open > a,
  .main-nav.is-open > .nav-dropdown {
    opacity: 1;
    transform: translateX(0);
  }

  .main-nav.is-open > :nth-child(1) {
    transition-delay: 0.1s;
  }

  .main-nav.is-open > :nth-child(2) {
    transition-delay: 0.15s;
  }

  .main-nav.is-open > :nth-child(3) {
    transition-delay: 0.2s;
  }

  .main-nav.is-open > :nth-child(4) {
    transition-delay: 0.25s;
  }

  /* Overlay behind nav */
  .main-nav::before {
    content: '';
    position: fixed;
    top: 0;
    right: 100%;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0);
    transition: background 0.4s ease;
    pointer-events: none;
  }

  .main-nav.is-open::before {
    background: rgba(0, 0, 0, 0.3);
    pointer-events: auto;
  }

  /* --- Mobile Hero --- */
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero__content {
    padding: 150px var(--container-padding) 40px;
  }

  .hero__image {
    flex: none;
    height: 55vh;
  }

  .hero-buttons-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 20px var(--container-padding);
  }

  .hero-buttons-bar__left {
    display: contents;
  }

  .hero-buttons-bar__right {
    display: contents;
  }

  .hero-buttons-bar .btn {
    padding: 12px 16px;
    font-size: 0.75rem;
    width: 100%;
    text-align: center;
  }

  /* Make Book visning a bordered button on mobile */
  .hero-buttons-bar__right .link-arrow {
    padding: 12px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    text-align: center;
  }

  .hero-buttons-bar__right .link-arrow:hover {
    background: var(--color-text);
    color: var(--color-bg);
    border-color: var(--color-text);
  }

  /* --- Mobile Apartment Types --- */
  .apartment-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .apartment-card__image {
    aspect-ratio: 3 / 2;
  }

  /* --- Mobile Stats Bar --- */
  .stats-bar {
    grid-template-columns: 1fr;
    padding-bottom: 32px;
  }

  .stats-bar__group {
    grid-column: span 1;
    padding-bottom: 24px;
  }

  /* --- Mobile Project Section --- */
  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-gallery__image {
    aspect-ratio: 4 / 3;
  }

  .project-features {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .feature-card__image {
    aspect-ratio: 3 / 3.2;
  }

  /* --- Mobile Info Cards --- */
  .info-cards__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .info-card__image {
    aspect-ratio: 3 / 3.2;
  }

  /* --- Mobile Map --- */
  .map-section {
    height: 400px;
    margin: 0;
  }

  .map-section__address {
    font-size: 0.6875rem;
    padding: 8px 12px;
  }

  /* --- Mobile News --- */
  .news-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .news-section__title {
    font-size: calc(2rem * var(--heading-scale));
    margin-bottom: 32px;
  }

  /* --- Mobile Footer --- */
  .footer-top {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-info {
    text-align: center;
  }

  .footer-logos {
    justify-content: center;
  }

  .footer-contact {
    text-align: center;
  }

  .footer-contact__photo {
    margin-left: auto;
    margin-right: auto;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 4px;
  }

  /* --- Subpage Mobile — match homepage layout --- */
  .site-header--subpage .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .header-left {
    display: none;
  }

  .header-center {
    justify-content: flex-start;
  }

  .header-center .logo-img {
    height: 70px;
  }

  /* Ensure subpage mobile nav padding matches homepage */
  .header-right .main-nav {
    padding: 120px 48px 48px;
  }

  .subpage-hero {
    grid-template-columns: 1fr;
  }

  .subpage-hero__content {
    padding: 48px var(--container-padding);
  }

  .subpage-hero__title {
    font-size: calc(2.5rem * var(--heading-scale));
  }

  .subpage-hero__image {
    height: 45vh;
  }

  .subpage-hero__image img {
    height: 100%;
  }

  .subpage-header-centered__title {
    font-size: calc(2.5rem * var(--heading-scale));
  }

  .subpage-banner__image {
    height: 45vh;
    min-height: 280px;
  }

  .subpage-banner__title {
    font-size: calc(2.25rem * var(--heading-scale));
  }

  .subpage-banner__intro {
    padding: 48px 0 32px;
  }

  .image-text--bg-white,
  .image-text--bg-beige {
    padding: 48px 0;
  }

  .subpage-two-col__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  /* Divider only makes sense when columns are side-by-side. */
  .subpage-two-col__grid--divider {
    gap: 24px;
  }

  .subpage-two-col__grid--divider::before {
    display: none;
  }

  .subpage-two-col__image--side-by-side {
    grid-template-columns: 1fr;
  }

  .fw-gallery {
    height: min(var(--fw-gallery-max-h, 600px), 50vh);
  }

  .image-text {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .image-text--right .image-text__image {
    order: 0;
  }

  .text-image-trio {
    grid-template-columns: 1fr;
    row-gap: 24px;
  }

  .text-image-trio__title,
  .text-image-trio__col--1,
  .text-image-trio__col--2,
  .text-image-trio__image {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  /* Stack: title → text_1 → image → text_2 */
  .text-image-trio__title  { order: 1; }
  .text-image-trio__col--1 { order: 2; }
  .text-image-trio__image  { order: 3; }
  .text-image-trio__col--2 { order: 4; }

  .text-image-trio__title {
    font-size: calc(1.875rem * var(--heading-scale));
  }

  .text-pair {
    grid-template-columns: 1fr;
    row-gap: 24px;
  }

  .text-pair__col--left,
  .text-pair__col--right,
  .text-pair__image--left,
  .text-pair__image--right {
    grid-column: 1;
  }

  .text-pair__col--left  { grid-row: 1; }
  .text-pair__image--left  { grid-row: 2; }
  .text-pair__col--right { grid-row: 3; margin-top: 24px; }
  .text-pair__image--right { grid-row: 4; }

  .text-pair__title {
    font-size: calc(1.875rem * var(--heading-scale));
  }

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

  .card-trio__title {
    font-size: calc(1.875rem * var(--heading-scale));
  }

  .post-header__title {
    font-size: calc(2.25rem * var(--heading-scale));
  }

  .simple-hero__title {
    font-size: calc(2.5rem * var(--heading-scale));
  }

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

  .post-listing__grid {
    grid-template-columns: 1fr;
  }

  .book-visning-float {
    bottom: 20px;
    right: 20px;
    font-size: 0.75rem;
    padding: 12px 18px;
  }

  .visning-form__dates {
    padding: 20px 24px;
  }

  .visning-popup {
    bottom: 16px;
    right: 16px;
    left: 16px;
  }

  .visning-popup__card {
    padding: 32px 28px;
    max-width: 100%;
    width: 100%;
  }

  .visning-popup__heading {
    font-size: calc(1.125rem * var(--heading-scale));
  }

  /* --- Document list mobile --- */
  .document-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .document-item__download {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }

  .subpage-two-col__narrow {
    max-width: 100%;
  }

  .subpage-two-col__links {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
}
/* WordPress admin bar fix */
body.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) { body.admin-bar .site-header { top: 46px; } }
