:root {
    --bg: #f5f5f7;
    --primary: #5b2333;
    --primary-dark: #3b1520;
    --accent: #c9a66b;
    --text: #222;
    --light: #ffffff;

    --border: #ddd;
    --muted: #666;
    --muted-bg: #fafafa;
    --past-bg: #f0f0f0;

    /* Z-index lag */
    --z-flipbook: 5000;
    --z-burger: 4000;
    --z-topbar: 3000;
    --z-sidebar: 2500;
    --z-hero: 2000;
    --z-topnav: 1000;
    --z-content: 1;
}


/* ---------------------------------------------------
   GLOBALT
--------------------------------------------------- */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
}

.icon {
    display: inline-block;
    width: 22px;
    margin-right: 6px;
    font-size: 16px;
    vertical-align: middle;
}

.icon-check {
    color: #2ecc71;
    font-weight: bold;
}
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 2000;
}

.overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* ---------------------------------------------------
   TOPNAV
--------------------------------------------------- */
.topnav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--primary);
    padding: 12px 20px;
    color: var(--light);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.topnav .logo {
    font-size: 22px;
    font-weight: bold;
}

.nav-links {
    display: flex;
    gap: 18px;
}

.nav-links a {
    color: var(--light);
    text-decoration: none;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 4px;
}

.nav-links a:hover {
    background: var(--primary-dark);
}

.nav-links .admin {
    background: var(--accent);
    color: #000;
    border-radius: 4px;
    padding: 6px 12px;
}

/* Mobil */
.burger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.burger span {
    width: 26px;
    height: 3px;
    background: var(--light);
    border-radius: 3px;
}

/* ---------------------------------------------------
   Billeder på siden
--------------------------------------------------- */
.billedebox {
    display: inline-block;
    text-align: left;
    margin-right: 20px;
}

.billedebox img {
    height: 400px;
    width: auto;
}

/* ---------------------------------------------------
   FORSIDE CARDS
--------------------------------------------------- */
.front-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* præcis 3 kolonner */
    gap: 20px;
    margin-top: 20px;
}

.front-card {
    background: var(--light);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.10);
    border-left: 6px solid var(--primary);
    text-decoration: none;
    color: var(--text);
    transition: transform 0.15s ease;
}



.front-card:hover {
    transform: translateY(-4px);
}

.front-card h3 {
    margin: 0 0 8px 0;
    color: var(--primary-dark);
}

.front-card .card-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.front-card .card-text {
    flex: 1;
}

.front-card .card-image {
    width: 140px;
    flex-shrink: 0;
}

.front-card .card-image img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    margin: 0; /* fjerner margin-bottom fra din gamle regel */
}



/* ---------------------------------------------------
   LAUG-KNAPPER
--------------------------------------------------- */
.laug-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

.laug-btn {
    background: var(--primary);
    color: white;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s ease;
}



/* ---------------------------------------------------
   TOPBAR & SIDEBAR
--------------------------------------------------- */
.topbar {
    display: none;
    background: var(--primary);
    color: var(--light);
    padding: 10px 15px;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 4000;
}

.burger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    z-index: 5000;
}

.burger span {
    width: 26px;
    height: 3px;
    background: var(--light);
    border-radius: 3px;
}


.sidebar {
    width: 240px;
    background: var(--primary);
    color: var(--light);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    padding-top: 80px;
    box-shadow: 2px 0 8px rgba(0,0,0,0.25);
    transition: transform 0.3s ease;
    transform: translateX(-100%);
    z-index: 3000;
}

.sidebar.open {
    transform: translateX(0);
}


.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar li a {
    display: block;
    padding: 10px 20px;
    color: var(--light);
    text-decoration: none;
    font-size: 15px;
    border-left: 3px solid transparent;
}

.sidebar li a:hover {
    background: var(--primary-dark);
    border-left-color: var(--accent);
}

/* ---------------------------------------------------
   CONTENT
--------------------------------------------------- */
.content {
    margin-left: 260px;
    padding: 25px;
    position: relative !important;
    overflow: visible !important;
    z-index: 1 !important;
}

.card {
    background: var(--light);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

/* ---------------------------------------------------
   TABELLER
--------------------------------------------------- */
table {
    border-collapse: collapse;
    width: 100%;
    background: var(--light);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

th, td {
    padding: 8px 10px;
    font-size: 14px;
}

th {
    background: var(--primary);
    color: var(--light);
    text-align: left;
}

tr:nth-child(even) td {
    background: var(--muted-bg);
}

/* ---------------------------------------------------
   FORMULARER
--------------------------------------------------- */
button, .btn {
    background: var(--light);
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 8px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    text-decoration: none;
    border-radius: 999px;

}

button:hover, .btn:hover {
    background: var(--primary);
	color: var(--light);
}

input, select {
    padding: 8px 14px;
    border-radius: 4px;
    border: 2px solid var(--primary);
    margin-bottom: 8px;
    width: 100%;
    max-width: 320px;
}

input.error {
    border: 2px solid #c00 !important;
    background: #ffecec;
}

.form-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.form-row label {
    width: 160px;
    font-weight: bold;
    padding-right: 12px;
}

.form-row input,
.form-row select {
    flex: 1;
    min-width: 250px;
    max-width: 320px;
}

/* ---------------------------------------------------
   AKTIVITETSKORT
--------------------------------------------------- */
.activity-card {
    display: flex;
    background: var(--light);
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 14px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.10);
    border-left: 6px solid var(--primary);
    transition: transform 0.15s ease;
    width: 100%;
}

.activity-card:hover {
    transform: translateY(-3px);
}

.activity-card.past {
    background: var(--past-bg);
    border-left-color: #999;
    opacity: 0.85;
}

.activity-date {
    width: 90px;
    text-align: center;
    margin-right: 18px;
    padding-right: 18px;
    border-right: 1px solid var(--border);
}

.activity-date strong {
    font-size: 28px;
    color: var(--primary-dark);
}

.activity-date span {
    font-size: 14px;
    color: var(--muted);
}

.activity-info h4 {
    margin: 0 0 8px 0;
    color: var(--primary-dark);
    font-size: 18px;
}

.activity-info p {
    margin: 4px 0;
    font-size: 15px;
    display: flex;
    align-items: center;
}

/* ---------------------------------------------------
   Tekst sider som cards
--------------------------------------------------- */


.tekst-card {
    background: var(--light);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.10);
    border-left: 6px solid var(--primary);
    line-height: 1.7;
    font-size: 1.05rem;
    margin-bottom: 25px;
}

.tekst-card p {
    margin-bottom: 1.2em;
	
}
.tekst-card strong {
    font-weight: bold;
}

/* ---------------------------------------------------
   GRID
--------------------------------------------------- */

.activity-list,
.vold-grid,
.dagbog-grid,
.archive-grid {
    display: grid;
    gap: 20px;
}

.activity-list {
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
}

.vold-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.dagbog-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.archive-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.month-heading {
    grid-column: 1 / -1;
    margin: 25px 0 10px;
}
/* ---------------------------------------------------
   Voldstafetten thumbnails 
--------------------------------------------------- */


.vold-card {
    background: var(--light);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.10);
    border-left: 6px solid var(--primary);
    text-align: center;
    transition: transform 0.15s ease;
}


.vold-thumb {
    width: 100%;
    height: 140px;
    background: var(--muted-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin-bottom: 12px;
}

.vold-card h4 {
    margin: 10px 0 15px 0;
    color: var(--primary-dark);
}

/* ---------------------------------------------------
   HEADER
--------------------------------------------------- */
.main-header {
    height: 100px;
    background: var(--primary);
    color: var(--light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 2000;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* ---------------------------------------------------
    SCROLLBOX TIL ADMIN PANELET
--------------------------------------------------- */
.scrollbox {
    max-height: 300px; /* Justér højden efter behov */
    overflow-y: auto;
    border: 1px solid #ccc;
    padding: 5px;
}

/* ---------------------------------------------------
   FLIPBOOK
--------------------------------------------------- */
#flipbook {
    width: 900px;
    height: 600px;
    margin: 20px auto;
    background: white;
    position: relative;
    overflow: visible !important;
    z-index: 5000 !important;
}

#flipbook .turn-page-wrapper {
    overflow: visible !important;
}

#flipbook .page img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
}
/* ---------------------------------------------------
   SPLIT HERO
--------------------------------------------------- */
.hero-split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--primary);
    color: var(--light);
    padding: 50px 40px;
    border-bottom: 6px solid var(--accent);
    gap: 40px;
    position: relative;
    z-index: var(--z-hero);
}

}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    margin: 0 0 10px 0;
    font-size: 2.4rem;
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.hero-btn {
    background: var(--accent);
    color: #000;
    padding: 12px 22px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
}

.hero-btn:hover {
    opacity: 0.9;
}

.hero-image {
    flex: 1;
    text-align: right;
}

.hero-image img {
    max-width: 320px;
    width: 100%;
    height: auto;
    border-radius: 8px;
}


/* ---------------------------------------------------
   MOBILOPTIMERING (SAMLET)
--------------------------------------------------- */

@media (max-width: 900px) {

    /* HERO SPLIT */
    .hero-split {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
        gap: 20px;
    }

    .hero-image img {
        max-width: 240px;
        width: 100%;
        height: auto;
        margin-top: 10px;
    }
}

@media (max-width: 768px) {

    /* FRONT GRID – 1 kolonne på mobil */
    .front-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* CARD LAYOUT */
    .front-card .card-content {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .front-card .card-image img {
        width: 120px;
        height: 120px;
    }

    /* TOPMENU / BURGERMENU */
    .topnav {
        display: none;
    }

    .topbar {
        display: flex;
    }

    .burger {
        display: flex; /* ← DENNE MANGLEDE */
    }

    /* SIDEBAR */
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    /* CONTENT */
    .content {
        margin-left: 0;
    }
}
