/* ==========================================================================
   Laksefeber.dk — Design System
   Mobile-first, responsive, modern CSS with custom properties.
   ========================================================================== */

/* ---------- Custom Properties ---------- */
:root {
  /* Colors */
  --color-bg: #f5f5f0;
  --color-surface: #ffffff;
  --color-text: #2c2c2c;
  --color-text-muted: #666666;
  --color-primary: #2a6496;
  --color-primary-dark: #1e4b73;
  --color-accent: #c0392b;
  --color-border: #d4d4d4;
  --color-overlay: rgba(0, 0, 0, 0.85);

  /* Typography */
  --font-body: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-heading: Georgia, "Times New Roman", serif;
  --font-size-base: 1rem;
  --font-size-sm: 0.875rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 2rem;
  --font-size-3xl: 2.5rem;
  --line-height: 1.6;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Layout */
  --max-width: 1200px;
  --nav-width: 220px;
  --border-radius: 6px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;

  /* Blob Storage base URL */
  --blob-base: https://laksefebersa1m7no3ooe9.blob.core.windows.net/images;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

img,
picture,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

/* ---------- Base Typography ---------- */
body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--color-text);
  background-color: var(--color-bg);
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--color-text);
}
h1 { font-size: var(--font-size-3xl); margin-bottom: var(--space-lg); }
h2 { font-size: var(--font-size-2xl); margin-bottom: var(--space-md); }
h3 { font-size: var(--font-size-xl); margin-bottom: var(--space-sm); }

p {
  margin-bottom: var(--space-md);
}

/* ---------- Page Layout ---------- */
.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page__header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-md) var(--space-lg);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.header__logo {
  font-family: var(--font-heading);
  font-size: var(--font-size-xl);
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
}
.header__logo:hover {
  text-decoration: none;
  color: var(--color-primary);
}

/* ---------- Navigation ---------- */
.nav {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.nav__link {
  display: inline-block;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--border-radius);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text);
  transition: background var(--transition-fast), color var(--transition-fast);
}
.nav__link:hover,
.nav__link--active {
  background: var(--color-primary);
  color: #fff;
  text-decoration: none;
}

/* Language toggle */
.lang-toggle {
  font-size: 1.4rem;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.lang-toggle:hover {
  opacity: 0.75;
  text-decoration: none;
}

/* Dropdown navigation */
.nav__dropdown {
  position: relative;
}
.nav__dropdown__toggle {
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--border-radius);
  transition: background var(--transition-fast), color var(--transition-fast);
}
.nav__dropdown__toggle:hover,
.nav__dropdown--active .nav__dropdown__toggle {
  background: var(--color-primary);
  color: #fff;
}
.nav__dropdown__menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  min-width: 230px;
  z-index: 200;
  padding: var(--space-xs) 0;
}
.nav__dropdown__menu::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 0;
  right: 0;
  height: 4px;
}
.nav__dropdown:hover .nav__dropdown__menu,
.nav__dropdown--open .nav__dropdown__menu {
  display: block;
}
.nav__dropdown__item {
  display: block;
  padding: var(--space-sm) var(--space-md);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  white-space: nowrap;
}
.nav__dropdown__item:hover {
  background: var(--color-bg);
  color: var(--color-primary);
  text-decoration: none;
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--space-xs);
  color: var(--color-text);
}

/* ---------- Main Content ---------- */
.page__main {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
  width: 100%;
}

/* ---------- Section Cards (homepage) ---------- */
.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-xl);
}

.card {
  background: var(--color-surface);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.card__image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.card__body {
  padding: var(--space-lg);
}
.card__title {
  font-family: var(--font-heading);
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-sm);
}
.card__title a {
  color: var(--color-text);
}
.card__title a:hover {
  color: var(--color-primary);
  text-decoration: none;
}
.card__desc {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* ---------- Hero Slideshow ---------- */
.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--border-radius);
  margin-bottom: var(--space-2xl);
  background: #000;
}

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}
.hero__slide--active {
  opacity: 1;
}
.hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-2xl) var(--space-xl);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: #fff;
}
.hero__title {
  font-size: var(--font-size-2xl);
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
.hero__subtitle {
  font-size: var(--font-size-lg);
  opacity: 0.9;
}

/* ---------- Image Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-sm);
}

.gallery__item {
  cursor: pointer;
  border-radius: var(--border-radius);
  overflow: hidden;
  position: relative;
}
.gallery__item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform var(--transition-normal);
}
.gallery__item:hover img {
  transform: scale(1.05);
}
.gallery__item--full {
  grid-column: 1 / -1;
}
.gallery__item--full img {
  aspect-ratio: 16 / 7;
}
.gallery__item--half {
  grid-column: 1 / -1;
  width: 50%;
  margin: 0 auto;
}
.gallery__item--half img {
  aspect-ratio: 3 / 2;
}
.gallery__item--30 {
  grid-column: 1 / -1;
  width: 30%;
  margin: 0 auto;
}
.gallery__item--30 img {
  aspect-ratio: 3 / 2;
}
.gallery__item--40 {
  grid-column: 1 / -1;
  width: 40%;
  margin: 0 auto;
}
.gallery__item--40 img {
  aspect-ratio: 3 / 2;
}
.gallery__item--natural img {
  aspect-ratio: auto;
  object-fit: contain;
}
.gallery--2col {
  grid-template-columns: 1fr 1fr;
}
.gallery--3col {
  grid-template-columns: 1fr 1fr 1fr;
}
.gallery--1col {
  grid-template-columns: 1fr;
}

/* ---------- Article Row (text beside image) ---------- */
.article-row {
  display: flex;
  gap: var(--space-xl);
  align-items: flex-start;
  margin-bottom: var(--space-xl);
}
.article-row__text {
  flex: 0 0 340px;
}
.article-row__media {
  flex: 1;
  min-width: 0;
}

/* ---------- Button ---------- */
.btn {
  display: inline-block;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  transition: opacity var(--transition-normal);
}
.btn:hover { opacity: 0.85; }

/* ---------- Lightbox ---------- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--color-overlay);
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.lightbox--open {
  display: flex;
}
.lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--border-radius);
  cursor: zoom-in;
  transition: transform 0.1s ease;
  user-select: none;
}
.lightbox__close {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  padding: var(--space-sm);
}
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 2rem;
  padding: var(--space-md) var(--space-sm);
  cursor: pointer;
  border-radius: var(--border-radius);
  transition: background var(--transition-fast);
}
.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.3);
}
.lightbox__nav--prev { left: var(--space-md); }
.lightbox__nav--next { right: var(--space-md); }

/* ---------- Travel Map ---------- */
.travel-map-section {
  margin-bottom: var(--space-xl);
}
.travel-map-wrapper {
  background: var(--color-surface);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.travel-map {
  display: block;
  width: 100%;
  height: auto;
}
.travel-map__pin {
  cursor: pointer;
  outline: none;
  text-decoration: none;
}
.travel-map__dot {
  fill: var(--color-accent);
}
.travel-map__ring {
  fill: var(--color-accent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.travel-map__label {
  font-family: var(--font-body);
  font-size: 11px;
  fill: var(--color-text);
  paint-order: stroke fill;
  stroke: #fff;
  stroke-width: 3px;
  stroke-linejoin: round;
  pointer-events: none;
  transition: fill var(--transition-fast);
}
.travel-map__pin:hover .travel-map__ring,
.travel-map__pin:focus .travel-map__ring {
  opacity: 0.35;
}
.travel-map__pin:hover .travel-map__label,
.travel-map__pin:focus .travel-map__label {
  fill: var(--color-accent);
}

/* ---------- Travel Destination List ---------- */
.destination-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.destination {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: var(--space-lg);
  align-items: start;
  background: var(--color-surface);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.destination__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.destination__body {
  padding: var(--space-lg);
}
.destination__title {
  font-family: var(--font-heading);
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-xs);
}
.destination__year {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}
.destination__desc {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* ---------- Destination Year Cards (compact grid) ---------- */
.dest-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}
.dest-card {
  display: block;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-surface);
  color: var(--color-text);
  text-decoration: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.dest-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--color-text);
}
.dest-card__title {
  font-size: var(--font-size-base);
  font-family: var(--font-heading);
  margin-bottom: 0.1rem;
  color: var(--color-primary);
}
.dest-card__year {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: 0.1rem;
}
.dest-card__desc {
  font-size: var(--font-size-sm);
  margin-bottom: 0;
}

/* ---------- Info Links ---------- */
.info-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-xl);
  margin-bottom: var(--space-xl);
}
.info-links li::before {
  content: '\2192\00a0';
  color: var(--color-primary);
}
.info-links a {
  color: var(--color-text);
}
.info-links a:hover {
  color: var(--color-primary);
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}
.breadcrumbs a {
  color: var(--color-text-muted);
}
.breadcrumbs__sep {
  margin: 0 var(--space-xs);
}

/* ---------- Footer ---------- */
.page__footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* ---------- Utility ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.text-center { text-align: center; }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-lg { margin-bottom: var(--space-lg); }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  :root {
    --font-size-3xl: 1.75rem;
    --font-size-2xl: 1.5rem;
  }

  .nav-toggle { display: block; }

  .nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-md);
    box-shadow: var(--shadow-md);
  }
  .nav--open { display: flex; }

  .nav__link {
    padding: var(--space-sm) var(--space-md);
  }

  /* Mobile dropdown */
  .nav__dropdown { width: 100%; }
  .nav__dropdown__toggle {
    width: 100%;
    text-align: left;
    padding: var(--space-sm) var(--space-md);
  }
  .nav__dropdown:hover .nav__dropdown__menu { display: none; }
  .nav__dropdown--open .nav__dropdown__menu {
    display: block;
    position: static;
    box-shadow: none;
    border: none;
    border-left: 3px solid var(--color-border);
    margin-left: var(--space-md);
    padding: 0;
    min-width: unset;
  }
  .nav__dropdown__item {
    padding: var(--space-sm) var(--space-md);
  }

  .hero { aspect-ratio: 4 / 3; }

  .dest-grid { grid-template-columns: repeat(3, 1fr); }

  .destination {
    grid-template-columns: 1fr;
  }
  .destination__image {
    aspect-ratio: 16 / 9;
  }

  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .article-row {
    flex-direction: column;
  }
  .article-row__text {
    flex: none;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .section-grid {
    grid-template-columns: 1fr;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .dest-grid { grid-template-columns: repeat(2, 1fr); }
}
