:root {
  --color-primary:     #0D6E6E;
  --color-primary-light: #E0F2F1;
  --color-bg:          #FFFFFF;
  --color-bg-section:  #F7F8F9;
  --color-border:      #E2E5E8;
  --color-text:        #1A1F2E;
  --color-text-secondary: #5A6170;
  --color-error:       #C0392B;
  --color-success:     #27AE60;
  --color-sport:    #1565C0;
  --color-kultur:   #6A1B9A;
  --color-natur:    #2E7D32;
  --color-seniorer: #E65100;
  --color-offentlig:#37474F;
  --radius: 4px;
  --shadow-tile: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-tile-hover: 0 6px 20px rgba(0,0,0,0.12);
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

a { color: inherit; }
h1 { font-size: 2rem; font-weight: 700; margin-bottom: 1rem; }
h2 { font-size: 1.5rem; font-weight: 600; margin-bottom: .75rem; }
h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: .5rem; }
small, .meta { font-size: 0.875rem; color: var(--color-text-secondary); }
hr { border: none; border-top: 1px solid var(--color-border); margin: 1.5rem 0; }

.container { max-width: 1200px; margin: 0 auto; padding: 1.5rem 1.5rem 3rem; }
.container--narrow { max-width: 640px; }
.center-content { text-align: center; padding-top: 4rem; padding-bottom: 4rem; }

/* Navigation */
.nav {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav__logo { font-weight: 700; color: var(--color-primary); text-decoration: none; margin-right: 2rem; white-space: nowrap; }
.nav__links { display: flex; gap: 0; list-style: none; flex: 1; }
.nav__links a {
  padding: 0 1rem;
  height: 56px;
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--color-text);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.nav__links a.active, .nav__links a:hover {
  border-bottom-color: var(--color-primary);
  color: var(--color-primary);
}
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
  margin-left: auto;
}
.nav__hamburger span { display: block; width: 24px; height: 2px; background: var(--color-text); }

@media (max-width: 640px) {
  .nav__links { display: none; }
  .nav__links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 56px; left: 0; right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    z-index: 99;
  }
  .nav__links.open a { height: auto; padding: .75rem 1.5rem; border-bottom: 1px solid var(--color-border); border-left: none; }
  .nav__hamburger { display: flex; }
}

/* Tiles */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  padding: 1.5rem 0;
}
.tile {
  background: var(--color-bg);
  box-shadow: var(--shadow-tile);
  border-radius: 0;
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-tile-hover); }
.tile__img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; background: var(--color-bg-section); }
.tile__img--placeholder { background: var(--color-bg-section); }
.tile__body { padding: .875rem 1rem 1rem; }
.tile__dato { font-size: .8125rem; font-weight: 600; color: var(--color-primary); text-transform: uppercase; letter-spacing: .03em; margin-bottom: .375rem; }
.tile__titel { font-size: 1rem; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: .375rem; }
.tile__meta { font-size: .8125rem; color: var(--color-text-secondary); }
.tile--fremhaevet { grid-column: span 2; }
.tile--fremhaevet .tile__img { aspect-ratio: 16/6; }
@media (max-width: 640px) { .tile--fremhaevet { grid-column: span 1; } }

/* Aktor-sider */
.aktoer-header__billede { width: 100%; aspect-ratio: 3/1; object-fit: cover; }
.aktoer-info { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.5rem 0; border-bottom: 1px solid var(--color-border); }
.aktoer-info__logo { width: 64px; height: 64px; object-fit: contain; }
.aktoer-info__navn { font-size: 1.5rem; font-weight: 700; }
.fane-nav { display: flex; overflow-x: auto; border-bottom: 1px solid var(--color-border); padding: 0 1.5rem; gap: 0; }
.fane-nav a { padding: .75rem 1rem; white-space: nowrap; text-decoration: none; color: var(--color-text); border-bottom: 3px solid transparent; flex-shrink: 0; }
.fane-nav a.active { border-bottom-color: var(--color-primary); color: var(--color-primary); }
.aktoer-indhold { padding-top: 1.5rem; }
.aktoer-indhold h2 { margin-top: 1.5rem; }
.aktoer-indhold img { max-width: 100%; height: auto; }

/* Aktoer-grid (kategoriside) */
.aktoer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.25rem; padding: 1.5rem 0; }
.aktoer-kort { display: flex; flex-direction: column; align-items: center; padding: 1.25rem; border: 1px solid var(--color-border); text-decoration: none; color: inherit; transition: box-shadow .15s; text-align: center; position: relative; }
.aktoer-kort:hover { box-shadow: var(--shadow-tile-hover); }
.aktoer-kort__logo { width: 64px; height: 64px; object-fit: contain; margin-bottom: .75rem; }
.aktoer-kort__navn { font-weight: 600; }
.aktoer-kort__beskrivelse { font-size: .875rem; color: var(--color-text-secondary); margin-top: .5rem; }
.aktoer-kort__ekstern { position: absolute; top: .5rem; right: .5rem; font-size: 1rem; color: var(--color-text-secondary); }

/* Knapper */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem 1.25rem; border-radius: var(--radius); font-size: .9375rem; font-weight: 500; cursor: pointer; border: 2px solid transparent; text-decoration: none; transition: background .1s, color .1s; }
.btn--primary { background: var(--color-primary); color: #fff; }
.btn--primary:hover { background: #0a5858; }
.btn--secondary { background: #fff; color: var(--color-primary); border-color: var(--color-primary); }
.btn--secondary:hover { background: var(--color-primary-light); }
.btn--danger { background: var(--color-error); color: #fff; border-color: var(--color-error); }
.btn--danger:hover { background: #a93226; }

/* Formularer */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 500; margin-bottom: .375rem; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: .5rem .75rem; border: 1px solid var(--color-border); border-radius: var(--radius); font-size: 1rem; font-family: inherit; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-light); }
.form-error { color: var(--color-error); font-size: .875rem; margin-top: .25rem; }
.form-success { color: var(--color-success); font-size: .875rem; margin-top: .25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-actions { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin-top: 1.5rem; }

/* Messages */
.messages { max-width: 1200px; margin: 0 auto; padding: .75rem 1.5rem; }
.message { padding: .75rem 1rem; border-radius: var(--radius); margin-bottom: .5rem; }
.message--success { background: #d4edda; color: #155724; }
.message--error { background: #f8d7da; color: #721c24; }
.message--info { background: #d1ecf1; color: #0c5460; }
.message--warning { background: #fff3cd; color: #856404; }

/* Admin */
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; padding: 1.5rem 0; }
.admin-kort { display: block; padding: 1.5rem; border: 1px solid var(--color-border); text-decoration: none; color: inherit; }
.admin-kort:hover { box-shadow: var(--shadow-tile); }
.admin-kort--alert { border-color: var(--color-error); }
.admin-tabel { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.admin-tabel th, .admin-tabel td { text-align: left; padding: .625rem .75rem; border-bottom: 1px solid var(--color-border); }
.admin-tabel th { font-weight: 600; background: var(--color-bg-section); }
.foraeldet { background: #fff8e1; }
.badge { display: inline-block; padding: .1em .4em; border-radius: 3px; font-size: .75rem; font-weight: 600; }
.badge--warning { background: #fff3cd; color: #856404; }
.aktoer-liste { display: flex; flex-direction: column; gap: .75rem; margin-top: 1rem; }
.aktoer-liste-item { display: flex; justify-content: space-between; align-items: center; padding: .75rem 1rem; border: 1px solid var(--color-border); }
.fane-liste { display: flex; flex-direction: column; gap: .5rem; margin: 1rem 0; }
.fane-liste-item { display: flex; justify-content: space-between; align-items: center; padding: .625rem 1rem; border: 1px solid var(--color-border); }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; gap: .75rem; }
.empty-state { color: var(--color-text-secondary); padding: 2rem 0; }
.info-box { background: #e3f2fd; border-left: 4px solid #1565c0; padding: .75rem 1rem; margin-bottom: 1rem; }
.detalje-liste { display: grid; grid-template-columns: 140px 1fr; gap: .5rem .75rem; margin: 1rem 0; }
.detalje-liste dt { font-weight: 500; }
.handling-forms { display: flex; flex-direction: column; gap: 1.5rem; margin: 1.5rem 0; }
.beskrivelse-boks { background: var(--color-bg-section); padding: 1rem; border-radius: var(--radius); margin: 1rem 0; }
.checkbox-label { display: flex; align-items: center; gap: .5rem; font-weight: 400; cursor: pointer; margin-bottom: .375rem; }
.checkbox-label input { width: auto; }
.drag-handle { cursor: grab; color: var(--color-text-secondary); }

/* Arrangement detalje */
.arrangement-billede { width: 100%; max-height: 400px; object-fit: cover; margin-bottom: 1.5rem; }
.arrangement-detalje { max-width: 720px; }
.arrangement-meta { font-weight: 600; color: var(--color-primary); margin-bottom: .5rem; }
.arrangement-sted, .arrangement-aktoer, .arrangement-kontakt { margin: .5rem 0; color: var(--color-text-secondary); }
.arrangement-beskrivelse { margin: 1.5rem 0; line-height: 1.7; }
.arrangement-tilmelding { margin: 1.5rem 0; }
.arrangement-footer-link { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--color-border); }

/* Soeg */
.soeg-form { display: flex; gap: .75rem; align-items: flex-end; margin-bottom: 2rem; }
.soeg-form .form-group { flex: 1; margin-bottom: 0; }
.soeg-resultater { margin-top: 1rem; }
.soeg-resultat { padding: .75rem 0; border-bottom: 1px solid var(--color-border); }
.soeg-resultat__link { color: var(--color-primary); text-decoration: none; font-weight: 500; }
.soeg-resultat__link:hover { text-decoration: underline; }

/* Velkomst */
.velkomst { background: var(--color-primary-light); border-left: 4px solid var(--color-primary); padding: 1rem 1.25rem; margin: 1.5rem 0; }
.indsend-cta { background: var(--color-bg-section); padding: 2rem; margin-top: 2rem; text-align: center; }
.indsend-cta p { margin: .5rem 0 1rem; color: var(--color-text-secondary); }

/* Rediger-link */
.rediger-link { text-align: center; padding: 1rem; border-top: 1px solid var(--color-border); }
.rediger-link a { color: var(--color-primary); text-decoration: none; font-size: .875rem; }

/* Footer */
.footer { background: var(--color-bg-section); border-top: 1px solid var(--color-border); padding: 2rem 1.5rem; }
.footer .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; padding-bottom: 0; }
.footer nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer nav a { text-decoration: none; color: var(--color-text-secondary); font-size: .875rem; }
.footer nav a:hover { color: var(--color-primary); }

/* Spinner */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { display: inline-block; width: 1em; height: 1em; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin .6s linear infinite; }
