*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --text:        #444;
  --text-muted:  #757575;
  --heading:     #515151;
  --link:        #21759b;
  --link-hover:  #0f3647;
  --milk:        #faf6f0;
  --panel:       #fffef9;
  --border:      #ededed;
  --border-soft: #e6e6e6;
  --meta:        #5e5e5e;
  --radius:      12px;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.714285714;
  color: var(--text);
  min-height: 100vh;
  padding: clamp(32px, 6vw, 64px);
  background-color: #ccc;
  background-image: url("../billeder/baggrund.png");
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

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

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

.page.site {
  width: min(780px, 100%);
  margin: 0 auto;
  padding: 0 24px;
  background: var(--panel);
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.08);
  border-radius: var(--radius);
}

.site-header {
  padding: 24px 0;
  border-bottom: 1px solid var(--border-soft);
}

.site-header hgroup { text-align: center; }

.site-title {
  font-size: 24px;
  line-height: 1.29;
  margin-bottom: 14px;
  font-weight: 700;
}

.site-title a {
  color: var(--heading);
  text-decoration: none;
}

.site-title a:hover { color: var(--link); }

.site-description {
  font-size: 13px;
  line-height: 1.85;
  color: var(--text-muted);
  font-weight: 400;
}

.main-navigation {
  margin-top: 20px;
  text-align: center;
}

.nav-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 24px;
  list-style: none;
}

.nav-menu a {
  color: var(--meta);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nav-menu a:hover,
.nav-menu a[aria-current="page"] {
  color: var(--link);
}

.site-content { margin-top: 24px; }

article {
  border-bottom: 4px double var(--border);
  margin-bottom: 48px;
  padding-bottom: 24px;
}

.entry-header {
  margin-bottom: 24px;
  padding: 0 22px;
}

.entry-title {
  font-size: 22px;
  line-height: 1.27;
  font-weight: 700;
  color: var(--heading);
}

.entry-content p { margin-bottom: 24px; }

.text-frame {
  padding: 20px 22px;
  background: var(--milk);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.text-frame > :last-child {
  margin-bottom: 0;
}

.text-frame p,
.text-frame ul,
.text-frame ol,
.text-frame h2 {
  margin-bottom: 24px;
}

.text-frame h2:first-child {
  margin-top: 0;
}

.entry-content h2 {
  font-size: 18px;
  line-height: 1.33;
  font-weight: 700;
  color: var(--heading);
  margin: 32px 0 16px;
}

.entry-content h2:first-child { margin-top: 0; }

.meta-line {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.info-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
  margin: 24px 0;
  border-radius: var(--radius);
  overflow: hidden;
}

.info-cell {
  background: var(--milk);
  padding: 16px 18px;
}

.info-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.info-value {
  font-size: 14px;
  color: var(--heading);
  font-weight: 600;
}

.section-links {
  margin-top: 8px;
  border-top: 1px solid var(--border);
}

.section-link {
  display: block;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.section-link h2 {
  font-size: 16px;
  margin: 0 0 6px;
}

.section-link p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin: 24px 0;
}

.column-box {
  padding: 20px;
  background: var(--milk);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}

.section-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--link);
  margin-bottom: 8px;
  font-weight: 600;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}

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

.card {
  border: 1px solid var(--border-soft);
  padding: 18px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  border-radius: var(--radius);
}

.card h3 {
  font-size: 15px;
  color: var(--heading);
  margin-bottom: 8px;
  font-weight: 700;
}

.card p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

.route-list { margin: 16px 0 0; }

.route-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  font-size: 14px;
}

.route-item:last-child { border-bottom: 1px solid var(--border); }

.route-name { color: var(--text); }

.route-dist {
  color: var(--text-muted);
  font-size: 13px;
  white-space: nowrap;
}

.route-legend {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-muted);
}

.route-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
}

.route-swatch {
  flex-shrink: 0;
  min-width: 72px;
  padding: 4px 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  color: #fff;
}

.route-swatch--blue { background: #1565c0; }
.route-swatch--lightblue { background: #4fc3f7; color: #1a3a4a; }
.route-swatch--green { background: #388e3c; }
.route-swatch--purple { background: #7b1fa2; }
.route-swatch--black { background: #212121; }
.route-swatch--orange { background: #ef6c00; }
.route-swatch--yellow { background: #fdd835; color: #4a4000; }
.route-swatch--red { background: #c62828; }

.map-figure {
  margin: 0;
  border: 1px solid var(--border-soft);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
}

.entry-content > .map-figure {
  margin: 24px 0;
}

.map-figure--static {
  margin-top: 32px;
  cursor: default;
}

.map-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.map-gallery {
  display: grid;
  grid-template-columns: minmax(0, 548fr) minmax(0, 1024fr);
  gap: 3px;
  margin: 24px 0;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--border-soft);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  align-items: start;
}

.map-gallery .map-figure {
  margin: 0;
  border: none;
  box-shadow: none;
  border-radius: 0;
  overflow: hidden;
  background: #fff;
}

.map-gallery .map-figure:first-child {
  grid-row: 1 / span 2;
}

.map-gallery .map-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.map-caption {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-soft);
}

.contact-block a.email {
  font-size: 16px;
  font-weight: 600;
}

.site-footer {
  padding: 24px 0 32px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  border-radius: 0 0 var(--radius) var(--radius);
}

.billeder-gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 0;
}

.billeder-card {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  font: inherit;
  color: inherit;
}

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

.billeder-card--contain img {
  aspect-ratio: 1;
  object-fit: contain;
  background: var(--milk);
}

.billeder-empty {
  font-size: 13px;
  color: var(--text-muted);
}

.photo-gallery {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 24px 0;
}

.photo-item {
  margin: 0;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.photo-item img {
  display: block;
  width: 100%;
  height: auto;
}

.photo-placeholder {
  aspect-ratio: 4 / 3;
  background: #f4f4f4;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
}

.photo-caption {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-soft);
}

.photo-caption:empty {
  display: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 20, 20, 0.88);
}

.lightbox[hidden] {
  display: none;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-inner {
  position: relative;
  max-width: min(920px, 100%);
  max-height: 100%;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.lightbox-inner--map {
  max-width: min(var(--lightbox-max-width, 920px), calc(100vw - 48px));
}

.lightbox-image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 48px);
  width: auto;
  height: auto;
  margin: 0 auto;
}

.billeder-card--map {
  display: block;
  max-width: var(--map-preview-width, 420px);
  margin: 24px auto;
  cursor: zoom-in;
}

.billeder-card--map img {
  width: 100%;
  height: auto;
}

.lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--heading);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.lightbox-close:hover {
  background: #fff;
}

.badested-index {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 24px 0;
}

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

.badested-card {
  display: block;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  color: inherit;
  text-decoration: none;
}

.badested-card:hover .badested-card-title {
  color: var(--link);
}

.badested-card img,
.badested-card-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.badested-card-thumb--empty {
  background: #f4f4f4;
}

.badested-card--map img {
  object-fit: contain;
  background: #f4f4f4;
}

.badested-card-title {
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--heading);
}

.badested-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 24px 0;
}

.badested-photo-grid .billeder-card img {
  aspect-ratio: 1;
  object-fit: cover;
  width: 100%;
  height: auto;
}

.map-placeholder {
  aspect-ratio: 16 / 10;
  background: #f4f4f4;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  margin: 8px 0 32px;
}

@media (max-width: 768px) {
  body {
    background-attachment: scroll;
    padding: 20px 16px;
  }

  .page.site { padding: 0 16px; }
  .info-strip { grid-template-columns: 1fr 1fr; }
  .columns { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .card-grid--two { grid-template-columns: 1fr; }
  .nav-menu { gap: 4px 16px; }

  .map-gallery {
    grid-template-columns: 1fr;
  }

  .map-gallery .map-figure:first-child {
    grid-row: auto;
  }

  .badested-index,
  .badested-photo-grid {
    grid-template-columns: 1fr;
  }

  .badested-index--three {
    grid-template-columns: 1fr;
  }
}
