/**
 * KHX Botanica Engine - Frontend Stylesheet
 * Indeholder regler for forside-gitter (4x3 slider) samt single-botanica profilvisning.
 */

/* ==========================================================================
   1. FORSIDE: GRID & SLIDER LAYOUT (4 x 3)
   ========================================================================== */

.khx-forside-container,
.khx-encyklopaedi-wrap {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    position: relative;
}

/* Fast 4-kolonne gitter med overflow-beskyttelse */
.khx-arter-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 16px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 15px 0 25px 0;
}

/* Kort-elementer i gitteret */
.khx-card-link,
.khx-arter-grid > * {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.khx-card-link img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Filter-chips (Kategorier) */
.khx-kategori-chips,
.khx-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-top: 15px;
}

/* Responsiv skalering af gitteret */
@media (max-width: 1100px) {
    .khx-arter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 768px) {
    .khx-arter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 480px) {
    .khx-arter-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    }
}


/* ==========================================================================
   2. ENKELTPROFIL: SINGLE BOTANICA LAYOUT
   ========================================================================== */

.khx-botanica-profile {
    max-width: 900px;
    margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #2c3338;
}

.khx-profile-hero {
    display: flex;
    gap: 30px;
    margin-bottom: 25px;
}

.khx-hero-media img {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.khx-badges-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.khx-badge {
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    background: #f0f0f1;
    color: #2c3338;
}

.khx-badge-kategori {
    background: #e8f4fd;
    color: #006097;
}

.khx-badge-spiselig {
    background: #eaf6ea;
    color: #1e6b24;
}

.khx-profile-title {
    font-size: 32px;
    margin: 0 0 5px 0;
}

.khx-profile-latin {
    font-size: 16px;
    color: #646970;
    margin: 0 0 15px 0;
}

.khx-profile-teaser {
    font-size: 15px;
    line-height: 1.6;
    color: #3c434a;
}

/* Modul intro & højdepunkter */
.khx-modul-intro-highlights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.khx-highlight-card {
    background: #fafafa;
    border: 1px solid #e2e4e7;
    border-radius: 6px;
    padding: 15px;
}

.khx-highlight-card h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
}

/* Gæstelås */
.khx-guest-lockout {
    background: #fffdf5;
    border: 2px dashed #f0b849;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    margin: 30px 0;
}

.khx-lockout-actions {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Årshjul */
.khx-wheel-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 6px;
    margin: 15px 0 30px 0;
}

.khx-wheel-month {
    text-align: center;
    padding: 10px 4px;
    background: #f0f0f1;
    border-radius: 4px;
    font-size: 12px;
}

.khx-wheel-month.active {
    background: #007017;
    color: #fff;
    font-weight: bold;
}

/* Responsiv profil-tilpasning */
@media (max-width: 680px) {
    .khx-profile-hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .khx-badges-bar {
        justify-content: center;
    }
    
    .khx-modul-intro-highlights {
        grid-template-columns: 1fr;
    }
    
    .khx-wheel-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}