/*
Theme Name: Lyng-Naldahl Kogebog Tema
Theme URI: https://lyng-naldahl.dk
Author: Flemming & Gemini
Description: Skræddersyet, minimalistisk og lynhurtigt kogebogs-tema til familien Lyng Naldahl. Bygget til maksimal overskuelighed på mobil, tablet og PC uden visuel støj.
Version: 2.0.0
Text Domain: lyng-kogebog-tema
*/

:root {
    --bg-page: #faf8f5;
    --bg-card: #ffffff;
    --bg-subtle: #f2efe9;
    --text-main: #1f1e1c;
    --text-muted: #66625b;
    --accent: #2c5e3b;
    --accent-light: #e8f0ea;
    --border: #e4e0d7;
    --radius: 10px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-page);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

/* Skjul evt. gammel plugin-styling der skabte rod */
.ln-single-recipe-bar,
.ln-single-tags-box {
    display: none !important;
}

/* TOP NAVIGATION */
.site-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 920px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.site-brand {
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.site-title {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0;
}

.site-tagline {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
}

.site-nav {
    display: flex;
    gap: 18px;
    align-items: center;
}

.site-nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.15s;
}

.site-nav a:hover {
    color: var(--accent);
}

/* MAIN CONTAINER */
.site-main {
    max-width: 920px;
    margin: 0 auto;
    padding: 28px 20px 60px;
}

/* FORSIDE: SØGEFELT & FILTER-BAR */
.search-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
    margin-bottom: 28px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.search-box-wrap {
    position: relative;
    display: flex;
    gap: 10px;
}

.cookbook-search-input {
    width: 100%;
    padding: 14px 18px;
    font-size: 1.1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--bg-page);
    color: var(--text-main);
    transition: border-color 0.15s, background 0.15s;
}

.cookbook-search-input:focus {
    outline: none;
    border-color: var(--accent);
    background: #fff;
}

.search-clear-btn {
    padding: 0 18px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-main);
    font-weight: 600;
    cursor: pointer;
    display: none;
    white-space: nowrap;
}

/* KATEGORI FANER (VANDRET, ROLIG RÆKKE) */
.cat-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.cat-tab {
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--bg-page);
    color: var(--text-main);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.cat-tab:hover {
    border-color: var(--accent);
}

.cat-tab.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.cat-tab-count {
    font-weight: 400;
    opacity: 0.75;
    margin-left: 3px;
    font-size: 0.85rem;
}

/* FOLD-UD INGREDIENS-FILTER (SKJULT SOM STANDARD FOR AT UNDGÅ ROD) */
.ing-drawer {
    margin-top: 14px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.ing-drawer summary {
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    user-select: none;
}

.ing-drawer summary:hover {
    color: var(--accent);
}

.ing-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.ing-chip {
    padding: 5px 11px;
    font-size: 0.85rem;
    background: var(--bg-subtle);
    border: 1px solid transparent;
    border-radius: 14px;
    cursor: pointer;
    color: var(--text-main);
}

.ing-chip:hover,
.ing-chip.active {
    background: var(--accent-light);
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
}

/* OPSKRIFTS-OVERSIGT OPBYGGET SOM EN RIGTIG KOGEBOG */
.filter-status {
    margin-bottom: 16px;
    font-size: 0.95rem;
    color: var(--accent);
    font-weight: 600;
    display: none;
}

.category-group {
    margin-bottom: 34px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
}

.category-group-title {
    margin: 0 0 14px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bg-subtle);
    font-size: 1.25rem;
    color: var(--accent);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.recipe-clean-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px 28px;
}

.recipe-clean-item {
    border-bottom: 1px dashed #eee;
}

.recipe-clean-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 4px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 1.02rem;
    transition: color 0.12s, padding-left 0.12s;
}

.recipe-clean-link:hover {
    color: var(--accent);
    padding-left: 8px;
}

.recipe-arrow {
    color: #ccc;
    font-size: 0.9rem;
}

.recipe-clean-link:hover .recipe-arrow {
    color: var(--accent);
}

/* ENKELT OPSKRIFT (SINGLE.PHP) - MODEL A */
.recipe-article {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 42px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.recipe-top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.back-link {
    text-decoration: none;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.95rem;
}

.back-link:hover {
    text-decoration: underline;
}

.print-btn {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.print-btn:hover {
    background: var(--border);
}

.recipe-header {
    margin-bottom: 24px;
}

.recipe-cat-badges {
    margin-bottom: 8px;
}

.recipe-cat-badge {
    display: inline-block;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 4px 10px;
    border-radius: 4px;
    margin-right: 6px;
    text-decoration: none;
}

.recipe-main-title {
    margin: 0;
    font-size: 2.1rem;
    line-height: 1.25;
    color: var(--text-main);
}

/* INDHOLD I OPSKRIFTEN (INGREDIENSBOKS & TEKST) */
.recipe-content h1,
.recipe-content h2,
.recipe-content h3,
.recipe-content h4 {
    color: var(--text-main);
    margin-top: 1.6em;
    margin-bottom: 0.6em;
    line-height: 1.3;
}

.recipe-content h1 { font-size: 1.45rem; }
.recipe-content h2 { font-size: 1.35rem; }
.recipe-content h3 { font-size: 1.2rem; }

/* Alle punktlister i opskrifter styles automatisk som tydelige ingrediens-bokse */
.recipe-content ul {
    background: var(--bg-page);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    padding: 18px 24px 18px 38px;
    margin: 20px 0;
}

.recipe-content ul li {
    margin-bottom: 6px;
    font-weight: 500;
}

/* Citater / anekdoter styles som rolige tip-bokse */
.recipe-content blockquote {
    margin: 28px 0;
    padding: 20px 26px;
    background: #fdfaf2;
    border: 1px solid #ece3ce;
    border-radius: 8px;
    color: #44403a;
    font-style: normal;
}

.recipe-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
}

.recipe-content figure,
.recipe-content .wp-caption {
    max-width: 100%;
    margin: 20px 0;
}

.recipe-content figcaption,
.recipe-content .wp-caption-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* INGREDIENS-TAGS I BUNDEN AF OPSKRIFTEN */
.recipe-footer-tags {
    margin-top: 36px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.recipe-footer-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 10px;
    display: block;
}

.recipe-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.recipe-tag-pill {
    text-decoration: none;
    font-size: 0.88rem;
    background: var(--bg-subtle);
    color: var(--text-main);
    padding: 4px 12px;
    border-radius: 14px;
    transition: background 0.15s;
}

.recipe-tag-pill:hover {
    background: var(--accent);
    color: #fff;
}

/* FOOTER */
.site-footer {
    text-align: center;
    padding: 24px 20px 40px;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
}

/* MOBIL TILPASNING */
@media (max-width: 680px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .site-tagline {
        display: none;
    }
    .recipe-clean-list {
        grid-template-columns: 1fr;
    }
    .recipe-article {
        padding: 22px 18px;
    }
    .recipe-main-title {
        font-size: 1.65rem;
    }
}

/* PRINT */
@media print {
    .site-header, .site-footer, .recipe-top-nav, .recipe-footer-tags, #wpadminbar {
        display: none !important;
    }
    body, .recipe-article {
        background: #fff;
        border: none;
        box-shadow: none;
        padding: 0;
    }
}
