:root {
  --bg: #f7f4ef;
  --surface: #fffcf8;
  --text: #2c241c;
  --text-muted: #6b6258;
  --accent: #7a5c42;
  --accent-hover: #5f4733;
  --accent-soft: #c4a882;
  --border: #e3dcd2;
  --shadow: 0 4px 24px rgba(44, 36, 28, 0.07);
  --ad-width: 160px;
  --content-max: 720px;
}

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

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* Centreret kolonne – navbar, intro-indhold og liste */
.site-center {
  width: 100%;
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* Navbar */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.875rem 0;
}

.navbar .site-center {
  max-width: calc(var(--content-max) + var(--ad-width) * 2 + 5rem);
}

.navbar-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-shrink: 0;
}

.navbar-nav__link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
}

.navbar-nav__link:hover,
.navbar-nav__link--active {
  color: var(--accent);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--accent);
  text-decoration: none;
}

.navbar-brand:hover {
  color: var(--accent-hover);
}

.navbar-logo {
  display: block;
  flex-shrink: 0;
}

.navbar-logo img {
  display: block;
  height: 52px;
  width: auto;
  max-width: 140px;
}

/* Fullscreen intro */
.hero-intro {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

.hero-intro__inner {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.hero-intro h1 {
  font-size: clamp(2rem, 6vw, 3.25rem);
  line-height: 1.15;
  margin: 0 0 1.5rem;
  color: var(--accent);
  font-weight: 700;
}

.hero-intro p {
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  max-width: 38em;
  margin-left: auto;
  margin-right: auto;
}

.hero-intro a {
  color: var(--accent);
  font-weight: 600;
}

.hero-intro a:hover {
  color: var(--accent-hover);
}

/* Indhold (starter under intro) */
.content-area {
  padding: 2.5rem 0 4rem;
}

.list-with-ads {
  position: relative;
}

.list-with-ads__content {
  min-width: 0;
}

.ad-side {
  display: none;
}

@media (min-width: 1100px) {
  .list-with-ads {
    display: grid;
    grid-template-columns: var(--ad-width) minmax(0, 1fr) var(--ad-width);
    grid-template-areas: "ad-left list ad-right";
    gap: 1.5rem;
    align-items: start;
    max-width: calc(var(--content-max) + var(--ad-width) * 2 + 5rem);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .ad-side {
    display: block;
    position: sticky;
    top: 1.5rem;
    width: var(--ad-width);
  }

  .ad-side--left {
    grid-area: ad-left;
  }

  .ad-side--right {
    grid-area: ad-right;
  }

  .list-with-ads__content {
    grid-area: list;
  }
}

.ad-placeholder {
  background: #ebe6de;
  border: 2px dashed #c5bbb0;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 1rem 0.5rem;
}

.ad-placeholder span {
  font-weight: 600;
  margin-top: 0.5rem;
}

.ad-placeholder--skyscraper {
  min-height: 600px;
}

.ad-placeholder--landscape {
  width: 100%;
  max-width: 728px;
  min-height: 70px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
}

.page-main {
  padding-top: 0;
  padding-bottom: 0;
}

/* Søgning */
.search-wrap {
  margin-bottom: 2rem;
}

.search-wrap label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  text-align: center;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%236b6258' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242 1.156a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") no-repeat 1rem center;
  background-size: 1rem;
}

.search-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
}

.search-meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  text-align: center;
}

/* Sektioner */
.clip-section {
  margin-bottom: 0;
}

.clip-section__title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
  margin: 0 0 1rem;
}

.clip-section__title--hidden {
  display: none;
}

.section-divider {
  height: 0;
  border: none;
  border-top: 2px solid var(--border);
  margin: 2.5rem auto;
  max-width: 12rem;
  opacity: 0.85;
}

.section-divider--hidden {
  display: none;
}

/* Klip-liste */
.clip-list {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 0;
}

.clip-list thead {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.clip-list tbody tr {
  display: grid;
  grid-template-columns: 3rem 1fr;
  grid-template-rows: auto auto;
  gap: 0.25rem 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s ease;
}

.clip-list tbody tr:last-child {
  border-bottom: none;
}

.clip-list tbody tr:hover,
.clip-list tbody tr:focus-visible {
  background: #faf7f2;
}

.clip-list tbody tr:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.clip-list .col-icon {
  grid-row: 1 / 3;
  align-self: center;
  text-align: center;
  font-size: 1.5rem;
  color: var(--accent);
}

.clip-list .col-icon i {
  display: inline-block;
}

.clip-list .col-name {
  font-weight: 600;
  font-size: 1.05rem;
  align-self: end;
}

.clip-list .col-desc {
  grid-column: 2;
  font-size: 0.9rem;
  color: var(--text-muted);
  align-self: start;
}

.clip-list .col-name::after {
  content: " ›";
  color: var(--text-muted);
  font-weight: 400;
}

.no-results {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  display: none;
}

.no-results.visible {
  display: block;
}

/* Bund-reklame under liste */
.list-bottom-ad {
  margin-top: 2rem;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44, 36, 28, 0.45);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--surface);
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(44, 36, 28, 0.18);
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.modal--with-example {
  max-width: 720px;
}

.modal-overlay.open .modal {
  transform: scale(1);
}

.modal-header {
  padding: 1.5rem 1.5rem 0;
  text-align: center;
}

.modal-icon {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.modal-icon i {
  display: inline-block;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.35rem;
}

.modal-content {
  display: block;
}

.modal--with-example .modal-content {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 0 1.5rem;
}

.modal-main {
  flex: 1;
  min-width: 0;
}

.modal--with-example .modal-header {
  padding: 1.5rem 0 0;
  text-align: left;
}

.modal--with-example .modal-body {
  padding: 1rem 0 1rem;
}

.modal-example {
  flex: 0 0 min(240px, 42%);
  margin: 0;
  padding: 1.5rem 0 0;
}

.modal-example__media {
  margin: 0;
}

.modal-example__media img,
.modal-example__media video {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
}

.modal-body {
  padding: 1rem 1.5rem 1rem;
}

.modal-body p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.modal-body p:last-child {
  margin-bottom: 0;
}

.modal-body a {
  color: var(--accent);
  font-weight: 600;
}

.modal-ad {
  padding: 0 1.5rem 1rem;
}

.modal-close {
  display: block;
  width: calc(100% - 3rem);
  margin: 0 1.5rem 1.5rem;
  padding: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.modal-close:hover {
  background: var(--accent-hover);
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

@media (max-width: 600px) {
  .modal--with-example .modal-content {
    flex-direction: column;
    padding: 0 1.25rem;
  }

  .modal-example {
    flex: none;
    width: 100%;
    padding-top: 0;
  }

  .navbar-inner {
    flex-wrap: wrap;
    justify-content: center;
  }

  .navbar-nav {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .clip-list tbody tr {
    grid-template-columns: 2.5rem 1fr;
    padding: 0.875rem 1rem;
  }

  .hero-intro__inner {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
}
