/* === Atlungstad Golf – Offentlige turnering-sider ===
   Speiler hovedsidens designsystem: forest-palett, DM Serif Display + DM Sans. */

:root {
    --forest:   #1b4332;
    --mid:      #2d6a4f;
    --light:    #52b788;
    --pale:     #d8f3dc;
    --accent:   #40916c;
    --white:    #ffffff;
    --offwhite: #f8f9fa;
    --text:     #111827;
    --muted:    #6b7280;
    --border:   #e5e7eb;
    --danger:   #C0392B;
    --maxw:     1080px;
}

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

html { scroll-behavior: smooth; }
body {
    font-family: 'DM Sans', 'Segoe UI', Tahoma, sans-serif;
    background: var(--white);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

a { color: var(--mid); }

/* ── TOPBAR ─────────────────────────────── */
.topbar {
    background: var(--forest);
    padding: 10px max(24px, calc((100vw - 1280px)/2 + 24px));
    display: flex; justify-content: space-between; align-items: center;
    font-size: 13px; color: rgba(255,255,255,.7);
}
.topbar a { color: rgba(255,255,255,.7); text-decoration: none; transition: color .15s; }
.topbar a:hover { color: #fff; }
.topbar-left { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }

/* ── HEADER ─────────────────────────────── */
.site-header {
    position: sticky; top: 0; z-index: 1000;
    background: var(--white);
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.header-inner {
    max-width: 1280px; margin: 0 auto;
    display: flex; align-items: center;
    height: 72px; padding: 0 24px; gap: 18px;
}
.logo { flex-shrink: 0; display: block; }
.logo img { height: 48px; width: auto; display: block; }
.header-kicker {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 20px; color: var(--forest);
    border-left: 1px solid var(--border);
    padding-left: 18px;
}
.header-nav {
    display: flex; align-items: center; gap: 4px;
    margin-left: 24px;
}
.header-nav a {
    position: relative;
    padding: 8px 12px; font-size: 14px; font-weight: 500;
    color: var(--text); text-decoration: none;
    transition: color .15s;
}
.header-nav a::after {
    content: ''; position: absolute; left: 12px; right: 12px; bottom: 2px;
    height: 2px; background: var(--forest);
    transform: scaleX(0); transition: transform .2s;
}
.header-nav a:hover { color: var(--forest); }
.header-nav a:hover::after,
.header-nav a.active::after { transform: scaleX(1); }
.header-nav a.active { color: var(--forest); }

.header-actions { margin-left: auto; flex-shrink: 0; display: flex; gap: 10px; align-items: center; }
.btn-primary-nav {
    background: var(--forest); color: #fff;
    padding: 9px 20px; font-size: 13px; font-weight: 600;
    text-decoration: none; border-radius: 6px;
    transition: background .15s; white-space: nowrap;
}
.btn-primary-nav:hover { background: var(--mid); }

/* Hamburger */
.nav-toggle {
    display: none; flex-direction: column; justify-content: center; gap: 5px;
    width: 40px; height: 40px; padding: 8px;
    background: none; border: none; cursor: pointer; margin-left: auto;
}
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.header-nav-mobile { display: none; }

/* ── MAIN ───────────────────────────────── */
.public-main {
    flex: 1; width: 100%;
    max-width: var(--maxw); margin: 0 auto;
    padding: 48px 24px 64px;
    display: flex; flex-direction: column; gap: 48px;
}
.public-main.narrow { max-width: 760px; }

/* ── HERO ───────────────────────────────── */
.hero {
    position: relative; overflow: hidden;
    background:
        radial-gradient(1200px 400px at 80% -10%, rgba(82,183,136,.22), transparent 60%),
        linear-gradient(135deg, rgba(27,67,50,.45) 0%, rgba(13,40,24,.38) 100%),
        url('/img/Forsidebilde-cropped.jpeg') center/cover no-repeat;
    color: var(--white);
}
.hero-inner {
    max-width: var(--maxw); margin: 0 auto;
    padding: 72px 24px;
}
.hero-badge {
    display: inline-block; background: var(--light); color: var(--forest);
    font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    padding: 8px 16px; border-radius: 4px; margin-bottom: 24px;
}
.hero-title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: clamp(36px, 5vw, 60px); font-weight: 400;
    line-height: 1.1; margin-bottom: 18px; max-width: 720px;
}
.hero-title em { font-style: italic; color: var(--pale); }
.hero-sub {
    font-size: 18px; font-weight: 300; color: rgba(255,255,255,.8);
    line-height: 1.7; margin-bottom: 32px; max-width: 560px;
}
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-hero {
    padding: 14px 28px; font-size: 14px; font-weight: 700;
    text-decoration: none; border-radius: 6px; transition: all .15s;
}
.btn-hero-fill { background: var(--white); color: var(--forest); }
.btn-hero-fill:hover { background: var(--pale); }
.btn-hero-outline { border: 2px solid rgba(255,255,255,.4); color: #fff; background: transparent; }
.btn-hero-outline:hover { border-color: var(--light); color: var(--pale); }

/* ── SECTIONS ───────────────────────────── */
.public-section { width: 100%; }
.section-title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 28px; font-weight: 400; color: var(--forest);
    margin-bottom: 20px; padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}
.empty-msg { color: var(--muted); font-size: 15px; }

/* ── CTA-KORT (frivillig / komité) ──────── */
.cta-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0;
    border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}
.cta-card {
    display: flex; flex-direction: column;
    background: var(--white); color: inherit; text-decoration: none;
    padding: 32px 28px; border-right: 1px solid var(--border);
    transition: background .2s;
}
.cta-card:last-child { border-right: none; }
.cta-card:hover { background: var(--forest); }
.cta-card:hover h3, .cta-card:hover p, .cta-card:hover .cta-link { color: var(--white); }
.cta-card h3 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 22px; font-weight: 400; color: var(--forest);
    margin-bottom: 10px; transition: color .2s;
}
.cta-card p { font-size: 14px; line-height: 1.6; color: var(--muted); flex: 1; transition: color .2s; }
.cta-link { margin-top: 16px; font-weight: 600; font-size: 14px; color: var(--mid); transition: color .2s; }

/* ── TURNERINGSLISTE ────────────────────── */
.tournament-list {
    display: flex; flex-direction: column;
    border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff;
}
.tournament-row {
    display: flex; align-items: center; gap: 18px;
    padding: 16px 22px; border-bottom: 1px solid var(--border);
    transition: background .12s;
}
.tournament-row:last-of-type, .tournament-list > .tournament-row:last-child { border-bottom: none; }
.tournament-row:hover { background: var(--offwhite); }
.tournament-row-expandable { cursor: pointer; }
.tournament-date {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-width: 54px; background: var(--white); border: 1px solid var(--border);
    border-radius: 8px; padding: 8px 10px; line-height: 1;
}
.t-day { font-family: 'DM Serif Display', Georgia, serif; font-size: 22px; color: var(--forest); }
.t-month { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: 3px; }
.tournament-name { flex: 1; font-size: 16px; font-weight: 600; color: var(--text); }
.tournament-status { font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 20px; white-space: nowrap; }
.status-planned { background: var(--offwhite); color: var(--mid); border: 1px solid var(--border); }
.status-open    { background: var(--pale); color: var(--forest); }
.expand-arrow {
    width: 0; height: 0;
    border-left: 5px solid transparent; border-right: 5px solid transparent;
    border-top: 6px solid var(--forest); opacity: .55; transition: transform .15s;
}
.expand-arrow.open { transform: rotate(180deg); }
.tournament-info {
    display: none; padding: 18px 22px 22px 94px;
    border-bottom: 1px solid var(--border); background: var(--offwhite);
    font-size: 14px; line-height: 1.7; color: var(--text);
}
.tournament-info h1, .tournament-info h2, .tournament-info h3 {
    font-size: 16px; font-weight: 700; color: var(--forest); margin: 14px 0 6px;
}
.tournament-info p { margin-bottom: 10px; }
.tournament-info ul, .tournament-info ol { padding-left: 20px; margin-bottom: 10px; }
.tournament-info table { border-collapse: collapse; width: 100%; margin-bottom: 10px; }
.tournament-info th, .tournament-info td { border: 1px solid var(--border); padding: 6px 10px; }
.tournament-info th { background: var(--forest); color: #fff; }

/* ── INNHOLD + SIDEBAR (to kolonner) ────── */
.content-wrap {
    display: grid; grid-template-columns: 1fr 320px;
    gap: 48px; align-items: start;
}
.content-main { min-width: 0; }
.content-main .info-text,
.content-main .vol-form,
.content-main .vol-alert { max-width: 100%; }
.content-side { display: flex; flex-direction: column; gap: 24px; }
.side-card {
    background: var(--offwhite); border: 1px solid var(--border);
    border-radius: 10px; padding: 22px 24px;
}
.side-card h3 {
    font-size: 16px; font-weight: 600; color: var(--forest);
    margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--pale);
}
.side-card p { font-size: 14px; line-height: 1.65; color: var(--text); margin-bottom: 10px; }
.side-card p:last-child { margin-bottom: 0; }
.side-card ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.side-card li { font-size: 14px; line-height: 1.5; color: var(--text); padding-left: 20px; position: relative; }
.side-card li::before {
    content: ''; position: absolute; left: 2px; top: 7px;
    width: 7px; height: 7px; border-radius: 50%; background: var(--light);
}
.side-card a { color: var(--mid); text-decoration: none; font-weight: 600; }
.side-card a:hover { text-decoration: underline; }
.side-card-cta { background: var(--forest); border-color: var(--forest); }
.side-card-cta h3 { color: #fff; border-bottom-color: rgba(255,255,255,.18); }
.side-card-cta p { color: rgba(255,255,255,.8); }
.side-card-cta a { color: var(--pale); }

/* ── FREMHEVET NOTAT (f.eks. «ingen press») ── */
.note-box {
    background: var(--pale);
    border-left: 4px solid var(--forest);
    border-radius: 0 8px 8px 0;
    padding: 16px 20px; margin: 18px 0 4px;
    font-size: 15px; line-height: 1.65; color: var(--forest);
    max-width: 680px;
}
.note-box strong { color: var(--forest); }

/* ── INFO-TEKST (artikkel) ──────────────── */
.info-text { max-width: 680px; margin-bottom: 28px; line-height: 1.75; color: var(--text); }
.info-text p { margin-bottom: 16px; font-size: 16px; }
.info-text h3 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 22px; font-weight: 400; color: var(--forest); margin: 26px 0 10px;
}
.info-text ul { padding-left: 22px; margin-bottom: 16px; }
.info-text li { margin-bottom: 7px; font-size: 16px; }

/* ── SKJEMA ─────────────────────────────── */
.vol-form {
    background: var(--white); border: 1px solid var(--border);
    border-radius: 12px; padding: 28px; max-width: 640px;
}
.vol-field { margin-bottom: 20px; }
.vol-field > label { display: block; font-weight: 600; color: var(--forest); margin-bottom: 6px; font-size: 14px; }
.vol-form input[type="text"],
.vol-form input[type="email"],
.vol-form input[type="tel"],
.vol-form textarea {
    width: 100%; padding: 12px 14px;
    border: 1px solid #cbd5d1; border-radius: 8px;
    font-size: 16px; font-family: inherit; color: var(--text);
    transition: border-color .15s, box-shadow .15s;
}
.vol-form input:focus, .vol-form textarea:focus {
    outline: none; border-color: var(--mid); box-shadow: 0 0 0 3px rgba(45,106,79,.15);
}
.vol-form textarea { resize: vertical; line-height: 1.5; min-height: 110px; }
.vol-checks { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.vol-check { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--text); cursor: pointer; }
.vol-check input { width: 18px; height: 18px; accent-color: var(--forest); }
.vol-consent {
    align-items: flex-start; line-height: 1.5;
    background: var(--offwhite); border: 1px solid var(--border);
    border-radius: 8px; padding: 12px 14px;
}
.vol-consent input { margin-top: 2px; }
.vol-hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.vol-submit {
    background: var(--forest); color: #fff; border: none;
    padding: 14px 30px; border-radius: 8px;
    font-size: 16px; font-weight: 700; cursor: pointer; transition: background .15s;
}
.vol-submit:hover { background: var(--mid); }
.back-link { display: inline-block; color: var(--mid); text-decoration: none; font-size: 14px; font-weight: 600; }
.back-link:hover { text-decoration: underline; }

/* Alerts */
.vol-alert {
    background: #fdecea; border: 1px solid #f5b7b1; color: #922;
    border-radius: 8px; padding: 12px 16px; margin-bottom: 18px; max-width: 640px;
}
.vol-alert p { margin: 2px 0; }

/* Store statusbokser */
.vol-bigbox {
    background: var(--white); border: 1px solid var(--border);
    border-radius: 14px; padding: 40px 30px; text-align: center;
    max-width: 640px; margin: 0 auto;
}
.vol-bigbox h2 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 28px; font-weight: 400; color: var(--forest); margin-bottom: 12px;
}
.vol-bigbox-lead { font-size: 17px; color: var(--text); }
.vol-bigbox-strong {
    font-size: 18px; font-weight: 700; color: var(--text);
    background: #fff6e5; border: 2px solid #f0c060; border-radius: 8px;
    padding: 14px 16px; margin-top: 16px;
}
.vol-bigbox-info { border-top: 6px solid var(--forest); }
.vol-bigbox-ok   { border-top: 6px solid var(--light); }
.vol-bigbox-warn { border-top: 6px solid var(--danger); }

/* ── FULLT INNLEGG ──────────────────────── */
.post-full {
    background: var(--white); border: 1px solid var(--border);
    border-radius: 12px; padding: 40px; max-width: 760px; margin: 0 auto; width: 100%;
}
.post-tag { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.post-full-title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: clamp(26px, 4vw, 36px); font-weight: 400;
    line-height: 1.2; color: var(--text); margin-bottom: 8px;
}
.post-meta { font-size: 13px; color: var(--muted); }
.post-full-images { display: flex; flex-direction: column; gap: 12px; margin: 24px 0 28px; }
.post-full-images figure img { width: 100%; border-radius: 8px; display: block; }
.post-full-images figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; text-align: center; }
.post-full-body { font-size: 16px; line-height: 1.8; color: var(--text); }
.post-full-body h1, .post-full-body h2, .post-full-body h3 {
    font-family: 'DM Serif Display', Georgia, serif; font-weight: 400;
    color: var(--forest); margin: 26px 0 10px;
}
.post-full-body p { margin-bottom: 16px; }
.post-full-body ul, .post-full-body ol { padding-left: 22px; margin-bottom: 16px; }
.post-full-body li { margin-bottom: 5px; }
.post-full-body a { color: var(--mid); text-decoration: underline; }
.post-full-body img { max-width: 100%; height: auto; border-radius: 8px; margin: 16px 0; }
.post-full-body table { border-collapse: collapse; width: 100%; margin-bottom: 16px; }
.post-full-body th, .post-full-body td { border: 1px solid var(--border); padding: 8px 12px; }
.post-full-body th { background: var(--forest); color: #fff; }

/* ── FOOTER ─────────────────────────────── */
.site-footer { background: #111827; color: rgba(255,255,255,.55); margin-top: auto; }
.footer-main {
    max-width: 1280px; margin: 0 auto;
    display: grid; grid-template-columns: 1.8fr 1fr 1fr 1fr; gap: 48px; padding: 56px 24px;
}
.footer-logo { height: 42px; margin-bottom: 16px; opacity: .9; }
.footer-brand p { font-size: 13.5px; line-height: 1.8; max-width: 280px; }
.site-footer h5 {
    font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    color: var(--light); margin-bottom: 16px;
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 10px; }
.site-footer li a, .site-footer address a { font-size: 14px; color: rgba(255,255,255,.5); text-decoration: none; transition: color .15s; }
.site-footer li a:hover, .site-footer address a:hover { color: #fff; }
.site-footer address { font-style: normal; font-size: 14px; line-height: 1.9; }
.footer-bar {
    border-top: 1px solid rgba(255,255,255,.06);
    max-width: 1280px; margin: 0 auto; padding: 18px 24px;
    text-align: center; font-size: 12px; color: rgba(255,255,255,.3);
}

/* ── RESPONSIV ──────────────────────────── */
@media (max-width: 860px) {
    .footer-main { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 768px) {
    .topbar { display: none; }
    .header-kicker { display: none; }
    .header-nav, .header-actions { display: none; }
    .nav-toggle { display: flex; }
    .header-nav-mobile {
        display: none; flex-direction: column;
        border-top: 1px solid var(--border); background: var(--white);
    }
    .header-nav-mobile.open { display: flex; }
    .header-nav-mobile a {
        padding: 14px 24px; font-size: 16px; font-weight: 500;
        color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border);
    }
    .header-nav-mobile a.active { color: var(--forest); }

    .hero-inner { padding: 48px 20px; }
    .hero-btns { flex-direction: column; }
    .btn-hero { text-align: center; }

    .public-main { padding: 32px 16px 48px; gap: 36px; }
    .cta-grid { grid-template-columns: 1fr; }
    .cta-card { border-right: none; border-bottom: 1px solid var(--border); }
    .cta-card:last-child { border-bottom: none; }

    .content-wrap { grid-template-columns: 1fr; gap: 32px; }
    .tournament-info { padding-left: 22px; }
    .post-full { padding: 28px 20px; }
    .footer-main { grid-template-columns: 1fr; gap: 28px; padding: 40px 20px; }
}
