/* Shared styles: news feed (front page), post pages, photo upload and admin. */
:root {
  --navy: #0a2350; --sea: #1d5fc4; --red: #e0262f; --spray: #f5f8fc;
  --granite: #5d6672; --ink: #0f1b2e; --line: #d5deea;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- news feed cards (front page) ---------- */
.feed { display: grid; gap: 22px; }
.feed-card {
  background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
}
.feed-card .feed-body { padding: 16px 20px 18px; }
.feed-when { margin: 0 0 4px; font-size: .9rem; color: var(--granite); }
.feed-card h3 { margin: 0 0 8px; font: italic 700 1.7rem/1.1 var(--display); color: var(--navy); }
.feed-card h3 a { color: inherit; text-decoration: none; }
.feed-card h3 a:hover { text-decoration: underline; }
.feed-card p { margin: 0 0 10px; }
.feed-imgs { display: grid; gap: 3px; grid-template-columns: repeat(2, 1fr); background: var(--line); }
.feed-imgs.n1 { grid-template-columns: 1fr; }
.feed-imgs a { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #e8eef6; }
.feed-imgs.n1 a { aspect-ratio: auto; max-height: 620px; }
.feed-imgs img { width: 100%; height: 100%; object-fit: cover; }
.feed-imgs .more { position: relative; }
.feed-imgs .more span {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(10, 35, 80, .55); color: #fff; font: italic 900 2rem/1 var(--display);
}
.feed-share { font-size: .95rem; }
.feed-more { margin-top: 18px; }
.tag-cta {
  margin-top: 26px; padding: 18px 20px; border-radius: 8px;
  background: var(--navy); color: #fff; display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between;
}
.tag-cta p { margin: 0; }
.tag-cta strong { font: italic 900 1.5rem/1 var(--display); letter-spacing: .01em; }
.tag-cta a.btn { background: var(--red); color: #fff; }

/* ---------- subpages (post, upload, admin) ---------- */
body.sub {
  margin: 0; background: var(--spray); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body); -webkit-text-size-adjust: 100%;
}
body.sub *, body.sub *::before, body.sub *::after { box-sizing: border-box; }
body.sub img { max-width: 100%; display: block; }
body.sub a { color: var(--sea); text-underline-offset: 3px; }
body.sub .wrap { width: min(100% - 32px, 1000px); margin-inline: auto; }
body.sub .narrow { max-width: 720px; }
.bar { background: var(--navy); padding: 14px 0; }
.bar .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
body.sub .bar a { color: #fff; font-weight: 700; text-decoration: none; }
body.sub .bar a:last-child { color: #cfdaf0; font-weight: 500; }
body.sub h1 { font: italic 900 clamp(2.2rem, 7vw, 3.4rem)/1.02 var(--display); color: var(--navy); margin: 28px 0 14px; }

.post { padding-bottom: 12px; }
.post-when { color: var(--granite); margin: 28px 0 0; }
.post-when + h1 { margin-top: 4px; }
.post-imgs { display: grid; gap: 14px; margin-top: 22px; }
.post-imgs figure { margin: 0; }
.post-imgs img { border-radius: 6px; width: 100%; height: auto; }
.post-imgs figcaption { font-size: .9rem; color: var(--granite); margin-top: 4px; }
.post-body .lead { font-size: 1.2rem; font-weight: 500; color: var(--navy); }
.post-body h2, .post-imgs h2 { font: italic 800 1.75rem/1.1 var(--display); color: var(--navy); margin: 30px 0 8px; }
.post-body figure { margin: 22px 0; }
.post-body figure img, .post-imgs img { border-radius: 6px; width: 100%; height: auto; }
.post-body figcaption, .post-imgs figcaption { font-size: .92rem; color: var(--granite); margin-top: 6px; line-height: 1.45; }
.post-body figcaption span, .post-imgs figcaption span { white-space: nowrap; opacity: .85; }
/* "Flere bilder" under a story: compact 2-column grid of square crops */
.post-imgs:has(> h2) { grid-template-columns: 1fr 1fr; gap: 10px; }
.post-imgs:has(> h2) > h2 { grid-column: 1 / -1; }
.post-imgs:has(> h2) img { aspect-ratio: 1; object-fit: cover; }
.post-imgs:has(> h2) figcaption { font-size: .8rem; }
.post-tag { border-top: 1px solid var(--line); padding: 18px 0 48px; }

/* buttons + forms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px; border: 0; border-radius: 4px; cursor: pointer;
  font: 700 1rem/1 var(--body); text-decoration: none;
  background: var(--sea); color: #fff;
}
.btn:hover { background: var(--navy); }
.btn-red { background: var(--red); }
.btn-red:hover { background: #b81d25; }
.btn-ghost { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); }
.btn-ghost:hover { background: var(--navy); color: #fff; }
.btn-small { padding: 9px 14px; font-size: .9rem; }
.btn[disabled] { opacity: .55; cursor: default; }
.field { display: grid; gap: 6px; margin: 0 0 16px; }
.field label { font-weight: 700; color: var(--navy); }
.field .hint { font-size: .9rem; color: var(--granite); }
.field input[type=text], .field input[type=password], .field textarea {
  font: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid #b9c6d8; border-radius: 6px; background: #fff; width: 100%;
}
.field textarea { min-height: 96px; resize: vertical; }
.check { display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 20px; }
.check input { width: 22px; height: 22px; margin-top: 2px; flex: none; }
.msg { padding: 12px 16px; border-radius: 6px; margin: 16px 0; }
.msg.ok { background: #e3f4e8; color: #134d26; }
.msg.bad { background: #fde6e7; color: #7c1218; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
