/* Bali2026 – børnevenligt rejse-site */
:root {
  --bg: #fff8f0;
  --bg-deep: #e8f4f1;
  --card: #ffffff;
  --accent: #2a9d8f;
  --accent-dark: #1d7066;
  --coral: #e76f51;
  --sun: #f4a261;
  --text: #1a2f2c;
  --muted: #4a6b66;
  --radius: 16px;
  --shadow: 0 8px 24px rgba(26, 47, 44, 0.08);
  --font: "Nunito", system-ui, sans-serif;
  --font-display: "Fredoka", "Nunito", system-ui, sans-serif;
  --header-h: 4.25rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.65;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  min-height: 100vh;
  min-height: 100dvh;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent-dark);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--coral);
}

code {
  word-break: break-word;
}

:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 9999;
  padding: 0.75rem 1rem;
  background: var(--card);
  color: var(--text);
  font-weight: 700;
}

.skip-link:focus {
  left: max(1rem, env(safe-area-inset-left, 0px));
  top: max(1rem, env(safe-area-inset-top, 0px));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 248, 240, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid rgba(42, 157, 143, 0.25);
  min-height: var(--header-h);
  padding-top: env(safe-area-inset-top, 0px);
}

.site-header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0.65rem max(1.25rem, env(safe-area-inset-right, 0px)) 0.65rem
    max(1.25rem, env(safe-area-inset-left, 0px));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.site-logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.15rem, 3vw, 1.35rem);
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.site-logo span {
  color: var(--accent);
}

.nav-toggle {
  display: none;
}

.nav-toggle-label {
  display: none;
  cursor: pointer;
  font-weight: 700;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  background: var(--card);
  border: 2px solid var(--accent);
  color: var(--accent-dark);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: center;
}

.nav a {
  font-weight: 700;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav a:hover {
  background: rgba(42, 157, 143, 0.15);
  color: var(--accent-dark);
}

.nav a[aria-current="page"] {
  background: var(--accent);
  color: #fff;
}

@media (max-width: 720px) {
  .nav-toggle-label {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-top: 0.5rem;
  }

  .nav-toggle:checked ~ .nav {
    display: flex;
  }

  .nav a {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem max(1.25rem, env(safe-area-inset-right, 0px)) max(3rem, env(safe-area-inset-bottom, 0px))
    max(1.25rem, env(safe-area-inset-left, 0px));
}

.hero {
  text-align: center;
  padding: 2rem 1rem 2.5rem;
  background: linear-gradient(135deg, #fff4e6 0%, #d8f0ec 100%);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
  border: 2px dashed rgba(231, 111, 81, 0.35);
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--coral);
  color: #fff;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  line-height: 1.2;
  margin: 0 0 0.75rem;
  color: var(--accent-dark);
}

.hero-lead {
  font-size: clamp(1.05rem, 2.5vw, 1.2rem);
  max-width: 36ch;
  margin: 0 auto 1rem;
  color: var(--muted);
}

.hero-dates {
  font-weight: 800;
  color: var(--text);
  margin: 0;
}

.hero--split {
  padding: 0;
  overflow: hidden;
  text-align: left;
}

.hero--split .hero__inner {
  display: grid;
  gap: 0;
  align-items: stretch;
}

.hero--split .hero__text {
  padding: 1.75rem 1.25rem 1.5rem;
  text-align: center;
}

.hero__visual {
  margin: 0;
  background: var(--bg-deep);
  min-height: 200px;
}

.hero__visual img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: min(56vh, 420px);
  object-fit: cover;
  border-radius: 0;
}

@media (min-width: 720px) {
  .hero--split .hero__inner {
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: stretch;
  }

  .hero--split .hero__text {
    padding: 2rem 1.15rem 2rem 1.75rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .hero__visual img {
    max-height: none;
    min-height: 280px;
  }
}

.home-dest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.85rem;
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}

.home-dest-tile {
  position: relative;
  display: block;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  border: 2px solid rgba(42, 157, 143, 0.18);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.home-dest-tile:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 12px 28px rgba(26, 47, 44, 0.12);
}

.home-dest-tile:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.home-dest-tile img {
  aspect-ratio: 4/3;
  object-fit: cover;
  width: 100%;
  height: 100%;
  display: block;
}

.home-dest-tile__label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.45rem 0.65rem 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
  background: linear-gradient(180deg, transparent 0%, rgba(255, 248, 240, 0.88) 40%, rgba(255, 248, 240, 0.98) 100%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.25;
}

.home-dest-tile__label small {
  display: block;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 0.15rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.5vw, 1.75rem);
  color: var(--accent-dark);
  margin: 0 0 1rem;
  scroll-margin-top: calc(var(--header-h) + 12px);
}

.home-dest-subline {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--muted);
}

.home-dest-subline a {
  font-weight: 800;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
  border: 1px solid rgba(42, 157, 143, 0.12);
}

.card h2,
.card h3 {
  font-family: var(--font-display);
  margin-top: 0;
  color: var(--text);
}

.card h3 {
  font-size: 1.2rem;
  color: var(--accent-dark);
}

.trip-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.trip-strip li {
  padding: 0;
  margin: 0;
}

.trip-strip-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  box-sizing: border-box;
  background: var(--bg-deep);
  border-radius: 12px;
  padding: 0.75rem;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid rgba(42, 157, 143, 0.2);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.trip-strip-link:hover {
  border-color: var(--accent);
  background: #fff;
}

.trip-strip-link:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.trip-strip small {
  display: block;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.6rem 1.2rem;
  font-family: var(--font);
  font-weight: 800;
  font-size: 1rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-dark);
  color: #fff;
}

.btn-secondary {
  background: #fff;
  color: var(--accent-dark);
  border: 2px solid var(--accent);
}

.fact-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 600px) {
  .fact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.fact-box {
  background: linear-gradient(145deg, #fff 0%, #f0faf8 100%);
  border-left: 5px solid var(--sun);
  padding: 1rem 1.1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.fact-box strong {
  color: var(--coral);
}

.page-intro {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 55ch;
}

.hotel-block {
  margin-bottom: 2rem;
}

.hotel-meta {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.hotel-photos {
  margin: 0.75rem 0 1rem;
}

.hotel-photos .media-grid {
  margin-bottom: 0.75rem;
}

.hotel-photos > .media-figure:last-child {
  margin-bottom: 0;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}

.hotel-tour-links {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 2px dotted rgba(42, 157, 143, 0.28);
}

.hotel-tour-links-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--accent-dark);
}

.hotel-tour-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hotel-tour-links li {
  margin-bottom: 0.45rem;
}

.hotel-tour-links li:last-child {
  margin-bottom: 0;
}

.hotel-tour-links a {
  font-weight: 700;
  color: var(--accent-dark);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.hotel-tour-links a:hover {
  color: var(--coral);
}

.hotel-tour-links a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.tag-list li {
  background: rgba(244, 162, 97, 0.25);
  color: var(--text);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.tour-item {
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px dotted rgba(42, 157, 143, 0.25);
}

.tour-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.tour-when {
  font-weight: 800;
  color: var(--coral);
  margin: 0 0 0.35rem;
}

.checklist {
  padding-left: 1.2rem;
}

.checklist li {
  margin-bottom: 0.35rem;
}

.map-layout {
  display: grid;
  gap: 1.25rem;
}

/* Mobil: liste først (vælg sted → se kort), højere kort */
@media (max-width: 799px) {
  .map-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "list"
      "map";
  }

  .map-layout-list {
    grid-area: list;
  }

  .map-layout-map {
    grid-area: map;
  }
}

@media (min-width: 800px) {
  .map-layout {
    grid-template-columns: 1fr 280px;
    align-items: start;
  }
}

.map-layout-map {
  min-width: 0;
}

#bali-map {
  width: 100%;
  border-radius: var(--radius);
  border: 3px solid var(--accent);
  z-index: 1;
  height: min(420px, 55vh);
  height: min(420px, 55dvh);
}

@media (max-width: 799px) {
  #bali-map {
    height: min(480px, 65dvh);
    min-height: 300px;
  }

  .map-layout-map {
    overscroll-behavior: contain;
  }

  .leaflet-container {
    font-size: 16px;
  }

  .leaflet-control-zoom a {
    min-width: 36px;
    min-height: 36px;
    line-height: 34px;
    font-size: 1.35rem;
  }
}

.map-detail {
  margin-top: 1rem;
  padding: 1rem 1.15rem;
  border-radius: 12px;
  background: var(--bg-deep);
  border: 2px solid rgba(42, 157, 143, 0.25);
}

.map-detail-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 0.35rem;
  color: var(--accent-dark);
}

.map-detail-meta {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--muted);
}

.map-detail-text {
  margin: 0 0 0.75rem;
  line-height: 1.5;
}

.map-detail-more {
  margin: 0;
  font-size: 0.95rem;
}

@media (min-width: 800px) {
  .map-detail {
    display: none !important;
  }
}

.map-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.map-list li {
  margin-bottom: 0.5rem;
}

.map-list button {
  width: 100%;
  text-align: left;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 2px solid rgba(42, 157, 143, 0.35);
  background: var(--card);
  cursor: pointer;
  min-height: 44px;
  color: var(--text);
}

.map-list button:hover,
.map-list button:focus-visible {
  border-color: var(--accent);
  background: var(--bg-deep);
}

.map-list button.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent-dark);
}

.dict-box {
  background: #fffbeb;
  border: 2px solid var(--sun);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin-top: 1.5rem;
}

.dict-box h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
}

.dict-box dl {
  margin: 0;
}

.dict-box dt {
  font-weight: 800;
  color: var(--accent-dark);
}

.dict-box dd {
  margin: 0 0 0.65rem 1rem;
}

.site-footer {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem max(1.25rem, env(safe-area-inset-right, 0px)) max(2rem, env(safe-area-inset-bottom, 0px))
    max(1.25rem, env(safe-area-inset-left, 0px));
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 2px solid rgba(42, 157, 143, 0.2);
}

.site-footer a {
  color: var(--muted);
}

.leaflet-control-attribution {
  font-size: 11px !important;
}

/* Billeder og video (Wikimedia m.fl.) */
.media-figure {
  margin: 0 0 1rem;
}

.media-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 2px solid rgba(42, 157, 143, 0.2);
}

.media-cap {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.45rem;
  line-height: 1.45;
}

.media-cap a {
  color: var(--muted);
  word-break: break-word;
}

.media-note {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
  margin: 0 0 0.5rem;
}

.hotel-photo-own img {
  box-shadow: 0 12px 32px rgba(26, 47, 44, 0.1);
}

.media-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .media-grid--split {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.video-wrap {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid rgba(42, 157, 143, 0.25);
  background: #000;
}

.video-wrap video {
  display: block;
  width: 100%;
  height: auto;
}

.video-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.35rem 0 0;
}

.hotel-block .media-figure {
  margin-top: 0.5rem;
}

.media-figure--limit-tall img {
  max-height: min(520px, 70vh);
  width: 100%;
  object-fit: contain;
  background: var(--bg-deep);
}

/* Flyrejse (forside) */
.flight-sub {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--accent-dark);
  margin: 1.25rem 0 0.6rem;
}

.flight-sub:first-of-type {
  margin-top: 0.5rem;
}

.flight-legs {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

.flight-legs li {
  margin-bottom: 0.75rem;
  padding-left: 0.15rem;
}

.flight-route {
  display: block;
  font-weight: 800;
  color: var(--text);
}

.flight-meta {
  display: block;
  font-size: 0.95rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.flight-layover {
  padding: 0.6rem 0.75rem;
  background: rgba(244, 162, 97, 0.2);
  border-radius: 10px;
  border-left: 4px solid var(--sun);
}

.flight-note {
  font-size: 0.98rem;
  color: var(--muted);
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-deep);
  border-radius: 10px;
}

.flight-facts li {
  margin-bottom: 0.5rem;
}

/* Tabel: transport mellem hoteller */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0.5rem 0 0.75rem;
}

.transport-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.transport-table th,
.transport-table td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid rgba(42, 157, 143, 0.2);
  text-align: left;
  vertical-align: top;
}

.transport-table thead th {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent-dark);
  background: rgba(232, 244, 241, 0.85);
}

.transport-table tbody tr:hover {
  background: rgba(255, 248, 240, 0.9);
}

/* Mobil: ingen vandret scroll — stablet “kort” pr. række (data-label på td) */
@media (max-width: 720px) {
  .transport-table-wrap {
    overflow-x: visible;
  }

  .transport-table-wrap .transport-table {
    min-width: 0;
    display: block;
    font-size: 1rem;
  }

  .transport-table-wrap .transport-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .transport-table-wrap .transport-table tbody,
  .transport-table-wrap .transport-table tbody tr {
    display: block;
    width: 100%;
  }

  .transport-table-wrap .transport-table tbody tr {
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    background: var(--bg-deep);
    border: 2px solid rgba(42, 157, 143, 0.2);
    border-radius: 12px;
    border-bottom: 2px solid rgba(42, 157, 143, 0.2);
  }

  .transport-table-wrap .transport-table tbody tr:hover {
    background: rgba(232, 244, 241, 0.65);
  }

  .transport-table-wrap .transport-table td {
    display: block;
    width: 100%;
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(42, 157, 143, 0.15);
    text-align: left;
  }

  .transport-table-wrap .transport-table td:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .transport-table-wrap .transport-table td::before {
    content: attr(data-label);
    display: block;
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--accent-dark);
    margin-bottom: 0.2rem;
  }
}

.transport-footnote {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0.75rem 0 0;
}

/* Balis historie (kronologi) */
.history-era {
  margin-bottom: 2.25rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px dotted rgba(42, 157, 143, 0.25);
}

.history-era:last-of-type {
  border-bottom: none;
  margin-bottom: 1rem;
  padding-bottom: 0;
}

.history-time {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--coral);
  margin: 0 0 0.35rem;
  letter-spacing: 0.02em;
}

.history-era h2 {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 1.45rem);
  color: var(--accent-dark);
  margin: 0 0 0.75rem;
}

.history-source-note {
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
  margin: 1.5rem 0 0;
  max-width: 55ch;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn:active {
    transform: none;
  }
}
