/*
Theme Name: Skolekorps
Theme URI: https://example.com
Author: Ditt korps
Description: Skreddersydd WordPress-tema for skolekorps. Redigerbar font og logo via Tilpasning, meny på toppen, plass til sosiale medier-feed og nyheter fra forbundet.
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: skolekorps
*/

/* ---------- CSS-variabler (kan overstyres via Tilpasning) ---------- */
:root {
    --sk-primary: #173F35;
    --sk-accent: #e0a526;
    --sk-text: #22242a;
    --sk-bg: #ffffff;
    --sk-muted: #6b7280;
    --sk-border: #e5e7eb;
    --sk-font: 'Poppins', sans-serif;
    --sk-max-width: 1180px;
}

/* ---------- Reset / basics ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--sk-font);
    color: var(--sk-text);
    background: var(--sk-bg);
    line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sk-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; }
.sk-container {
    max-width: var(--sk-max-width);
    margin: 0 auto;
    padding: 0 24px;
}
.sk-section { padding: 64px 0; }
.sk-section-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: .5rem;
}
.sk-section-title::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 48px; height: 4px;
    background: var(--sk-accent);
    border-radius: 2px;
}

/* ---------- Toppbanner (logo + navn + tagline) ---------- */
.sk-topbanner {
    background: linear-gradient(135deg, var(--sk-primary), #0a221c);
    color: #fff;
}
.sk-topbanner-inner {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 28px 24px;
}
.sk-topbanner-logo { flex: 0 0 auto; }
.sk-topbanner-logo img {
    max-height: 84px;
    width: auto;
    border-radius: 50%;
    background: #fff;
}
.sk-topbanner-tekst {
    flex: 1 1 auto;
    text-align: center;
}
.sk-topbanner-tittel {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 .2em;
    line-height: 1.15;
    font-family: var(--sk-font);
}
.sk-topbanner-tagline {
    font-size: 1.05rem;
    opacity: .9;
    margin: 0;
}
@media (max-width: 680px) {
    .sk-topbanner-inner { gap: 16px; padding: 22px 20px; }
    .sk-topbanner-logo img { max-height: 56px; }
    .sk-topbanner-tittel { font-size: 1.4rem; }
    .sk-topbanner-tagline { font-size: .9rem; }
}

/* ---------- Header / topp-meny ---------- */
.sk-header {
    border-bottom: 1px solid var(--sk-border);
    position: sticky;
    top: 0;
    background: var(--sk-bg);
    z-index: 100;
}
.sk-header-inner {
    max-width: var(--sk-max-width);
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

/* Hovedmeny (registreres i functions.php og bygges i Utseende → Menyer) */
.sk-nav ul {
    list-style: none;
    display: flex;
    gap: 28px;
    margin: 0;
    padding: 0;
}
.sk-nav a {
    color: var(--sk-text);
    font-weight: 500;
}
.sk-nav a:hover { color: var(--sk-primary); text-decoration: none; }
.sk-nav .current-menu-item > a { color: var(--sk-primary); }

/* Mobilmeny */
.sk-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
}
@media (max-width: 780px) {
    .sk-menu-toggle { display: block; }
    .sk-header-inner { justify-content: space-between; }
    .sk-nav {
        display: none;
        width: 100%;
        order: 3;
    }
    .sk-nav.is-open { display: block; }
    .sk-nav ul { flex-direction: column; gap: 4px; padding: 12px 0; }
    .sk-header-inner { flex-wrap: wrap; }
}

/* ---------- To-kolonne seksjon (siste nytt / forbundsnytt) ---------- */
.sk-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}
@media (max-width: 780px) {
    .sk-columns { grid-template-columns: 1fr; }
}
.sk-feed-list { list-style: none; margin: 0; padding: 0; }
.sk-feed-list li {
    padding: 14px 0;
    border-bottom: 1px solid var(--sk-border);
}
.sk-feed-list li:last-child { border-bottom: none; }
.sk-feed-date {
    display: block;
    font-size: .82rem;
    color: var(--sk-muted);
    margin-bottom: 2px;
}
.sk-feed-list a { font-weight: 600; }
.sk-feed-tittel { display: block; margin-bottom: 4px; }
.sk-feed-utdrag { margin: 0; color: var(--sk-muted); font-size: .92rem; line-height: 1.5; }
.sk-empty-note { color: var(--sk-muted); font-style: italic; }

/* ---------- Kommende aktiviteter fra forbundet ("TV-skjerm") ---------- */
.sk-nmf-skjerm {
    position: relative;
    aspect-ratio: 16 / 10;
    max-height: 320px;
    border-radius: 16px;
    overflow: hidden;
    background: #0a221c;
    box-shadow: 0 14px 34px rgba(0,0,0,.2);
}
.sk-nmf-skjerm-slides {
    position: relative;
    width: 100%;
    height: 100%;
}
.sk-nmf-slide {
    position: absolute;
    inset: 0;
    display: block;
    background-color: #173F35;
    background-size: cover;
    background-position: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .6s ease;
    text-decoration: none;
    color: #fff;
}
.sk-nmf-slide.is-aktiv {
    opacity: 1;
    visibility: visible;
}
.sk-nmf-slide-overlay {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 16px 18px;
    background: linear-gradient(to top, rgba(0,0,0,.8) 0%, rgba(0,0,0,.35) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sk-nmf-slide-dato {
    display: inline-block;
    align-self: flex-start;
    background: var(--sk-accent);
    color: #22242a;
    font-weight: 700;
    font-size: .72rem;
    padding: 3px 10px;
    border-radius: 999px;
}
.sk-nmf-slide-tittel {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none;
}
.sk-nmf-slide-cta {
    font-size: .78rem;
    opacity: .85;
    text-decoration: none;
}
.sk-nmf-skjerm-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,.4);
    color: #fff;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease;
}
.sk-nmf-skjerm-nav:hover { background: rgba(0,0,0,.65); }
.sk-nmf-skjerm-prev { left: 10px; }
.sk-nmf-skjerm-next { right: 10px; }
.sk-nmf-skjerm-prikker {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}
.sk-nmf-prikk {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.45);
    cursor: pointer;
    padding: 0;
}
.sk-nmf-prikk.is-aktiv { background: #fff; }

@media (max-width: 780px) {
    .sk-nmf-skjerm { aspect-ratio: 16 / 9; max-height: none; }
}

/* ---------- Sosiale medier-seksjon ---------- */
.sk-social {
    background: #f7f8fa;
}
.sk-social-placeholder {
    border: 2px dashed var(--sk-border);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    color: var(--sk-muted);
}

/* "Følg oss"-kort (fungerer uten noen oppkobling) */
.sk-social-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}
@media (max-width: 680px) {
    .sk-social-cards { grid-template-columns: 1fr; }
}
.sk-social-card {
    background: #fff;
    border: 1px solid var(--sk-border);
    border-radius: 16px;
    padding: 28px;
    display: flex;
    align-items: center;
    gap: 18px;
    text-decoration: none;
    color: var(--sk-text);
    transition: box-shadow .15s ease, transform .15s ease;
}
.sk-social-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    transform: translateY(-2px);
    text-decoration: none;
}
.sk-social-icon {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.sk-social-icon svg { width: 26px; height: 26px; fill: currentColor; }
.sk-social-icon.sk-fb { background: #1877f2; }
.sk-social-icon.sk-ig {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}
.sk-social-icon.sk-tiktok { background: #000; }
.sk-social-card-body { flex: 1 1 auto; min-width: 0; }
.sk-social-card-kicker {
    display: block;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--sk-muted);
    margin-bottom: 2px;
}
.sk-social-card-name { font-weight: 700; font-size: 1.05rem; }
.sk-social-card-cta {
    flex: 0 0 auto;
    font-size: .85rem;
    font-weight: 600;
    color: var(--sk-primary);
    white-space: nowrap;
}

.sk-social-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 20px;
}
.sk-social-links a {
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--sk-primary);
    color: #fff;
    font-weight: 600;
}
.sk-social-links a:hover { opacity: .9; text-decoration: none; }

/* ---------- Grasrotandelen ("Støtt oss") ---------- */
.sk-grasrotandelen { background: #fff; }
.sk-grasrot-card {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 40px;
    align-items: center;
    background: #f7f8fa;
    border-radius: 20px;
    padding: 40px;
}
@media (max-width: 780px) {
    .sk-grasrot-card { grid-template-columns: 1fr; padding: 28px; }
}
.sk-grasrot-text p { margin: 0 0 14px; color: var(--sk-text); }
.sk-grasrot-orgnr {
    font-size: .95rem;
    color: var(--sk-muted);
}
.sk-grasrot-orgnr strong { color: var(--sk-text); letter-spacing: .02em; }
.sk-grasrot-cta {
    display: inline-block;
    margin-top: 6px;
    padding: 12px 22px;
    border-radius: 999px;
    background: var(--sk-accent);
    color: #22242a;
    font-weight: 700;
}
.sk-grasrot-cta:hover { opacity: .9; text-decoration: none; }
.sk-grasrot-sms {
    font-size: .95rem;
    color: var(--sk-muted);
}
.sk-grasrot-sms strong { color: var(--sk-text); letter-spacing: .02em; }
.sk-grasrot-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--sk-border);
    border-radius: 14px;
    padding: 18px;
}
.sk-grasrot-qr img {
    border-radius: 8px;
}
.sk-grasrot-qr-caption {
    font-size: .82rem;
    color: var(--sk-muted);
}
.sk-grasrot-stats-toggle {
    margin-top: 28px;
    border: 1px solid var(--sk-border);
    border-radius: 14px;
    padding: 4px 20px;
    background: #f7f8fa;
}
.sk-grasrot-stats-toggle summary {
    cursor: pointer;
    padding: 14px 0;
    font-weight: 600;
    color: var(--sk-primary);
    list-style: none;
}
.sk-grasrot-stats-toggle summary::-webkit-details-marker { display: none; }
.sk-grasrot-stats-toggle summary::before {
    content: "▸ ";
    display: inline-block;
    transition: transform .15s ease;
}
.sk-grasrot-stats-toggle[open] summary::before {
    transform: rotate(90deg);
}
.sk-grasrot-widget {
    background: #fff;
    border: 1px solid var(--sk-border);
    border-radius: 14px;
    overflow: hidden;
    padding: 6px;
    margin-bottom: 16px;
}
.sk-grasrot-widget iframe { display: block; border-radius: 10px; }

/* ---------- Aktiviteter / årshjul ---------- */
.sk-akt-intro { margin-bottom: 32px; color: var(--sk-text); }
.sk-akt-liste {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.sk-akt-kort {
    position: relative;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--sk-border);
    border-radius: 16px;
    padding: 22px 24px;
}
.sk-akt-neste {
    border-color: var(--sk-primary);
    box-shadow: 0 8px 24px rgba(23, 63, 53, .1);
    background: #f4f9f7;
}
.sk-akt-badge {
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--sk-primary);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 4px 12px;
    border-radius: 999px;
}
.sk-akt-dato {
    flex: 0 0 auto;
    width: 64px;
    text-align: center;
    background: var(--sk-primary);
    color: #fff;
    border-radius: 12px;
    padding: 10px 4px;
}
.sk-akt-neste .sk-akt-dato { background: var(--sk-accent); color: #22242a; }
.sk-akt-dag { display: block; font-size: 1.5rem; font-weight: 700; line-height: 1; }
.sk-akt-mnd { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }
.sk-akt-info { flex: 1 1 auto; min-width: 0; }
.sk-akt-tittel { margin: 0 0 4px; font-size: 1.15rem; }
.sk-akt-meta { margin: 0 0 8px; font-size: .9rem; color: var(--sk-muted); }
.sk-akt-arlig-tag {
    display: inline-block;
    background: var(--sk-border);
    color: var(--sk-text);
    font-size: .75rem;
    padding: 1px 8px;
    border-radius: 999px;
}
.sk-akt-tekst { color: var(--sk-text); }
.sk-akt-tekst p:last-child { margin-bottom: 0; }

@media (max-width: 560px) {
    .sk-akt-kort { flex-direction: column; gap: 10px; }
    .sk-akt-dato { width: auto; display: inline-flex; align-items: baseline; gap: 6px; border-radius: 999px; padding: 4px 14px; }
    .sk-akt-dag { font-size: 1rem; }
    .sk-akt-mnd { margin-top: 0; }
}

/* ---------- Støttespillere (egen side) ---------- */
.sk-stott-gruppe { margin-bottom: 36px; }
.sk-stott-gruppe:last-child { margin-bottom: 0; }
.sk-stott-gruppetittel {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 14px;
    color: var(--sk-text);
}
.sk-stott-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 18px;
}
.sk-stott-kort {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--sk-border);
    border-radius: 14px;
    padding: 18px;
    min-height: 100px;
    transition: box-shadow .15s ease, transform .15s ease;
}
a.sk-stott-kort:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); transform: translateY(-2px); }
.sk-stott-logo { max-width: 100%; max-height: 64px; width: auto; height: auto; object-fit: contain; }
.sk-stott-navn-fallback { font-weight: 600; color: var(--sk-text); text-align: center; }

/* ---------- Støttespillere (kompakt rad i bunnteksten) ---------- */
.sk-stott-footer { margin-bottom: 28px; padding-bottom: 28px; border-bottom: 1px solid rgba(255,255,255,.12); }
.sk-stott-footer-tittel {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #b7bbc6;
    margin: 0 0 14px;
}
.sk-stott-footer-rad {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 14px;
}
.sk-stott-footer-rad .sk-stott-kort {
    background: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    min-height: auto;
}
.sk-stott-footer-rad .sk-stott-logo { max-height: 36px; }
.sk-stott-footer-rad .sk-stott-navn-fallback { color: var(--sk-text); font-size: .85rem; }

/* ---------- Footer ---------- */
.sk-footer {
    background: var(--sk-text);
    color: #d9dce3;
    padding: 40px 24px;
    text-align: center;
    font-size: .9rem;
}
.sk-footer a { color: #fff; }

/* ---------- Generisk innhold (sider/innlegg) ---------- */
.sk-content { padding: 60px 0; }
.sk-content .sk-container { max-width: 820px; }
