/* ===== RESET & BASIS ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    background: #fef7e9;
    color: #3d2b1f;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

/* ===== HEADER ===== */
header {
    background: #8bc34a;        /* frisgroen */
    padding: 20px 0;            /* lagere balk */
    text-align: center;
    border-bottom: 3px solid #5a8f2c;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 8px;
    color: #fff;
    text-shadow: 2px 2px 0 #3d2b1f;
    letter-spacing: 1px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

header p {
    font-size: 1.2rem;
    color: #fff;
    max-width: 700px;
    margin: 0 auto;
}

/* ===== FOOTER ===== */
footer {
    background: #3d2b1f;
    color: #fef7e9;
    text-align: center;
    padding: 20px 0;
    margin-top: auto;
    border-top: 3px solid #8bc34a;
}

/* ===== TERUG-KNOP (op detailpagina) ===== */
.terug-knop {
    display: inline-block;
    background: #8bc34a;
    color: white;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 50px;
    font-weight: 600;
    margin-bottom: 15px;
    transition: background 0.3s, transform 0.2s;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-size: 1rem;
}

.terug-knop:hover {
    background: #5a8f2c;
    transform: translateY(-2px);
}

.terug-knop:active {
    transform: translateY(0);
}

/* ===== GRID VOOR VERHAALOVERZICHT ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

/* ===== VERHAALKAARTEN ===== */
.verhaal-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 3px solid #8bc34a;
    display: flex;
    flex-direction: column;
}

.verhaal-card:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 30px rgba(90, 143, 44, 0.3);
}

/* Afbeeldingen worden volledig getoond (niet afgesneden) */
.verhaal-card img.card-img {
    width: 100%;
    height: 200px;
    object-fit: contain;        /* toont de hele afbeelding */
    object-position: center;
    background-color: #e6e6e6;  /* lichte achtergrond voor de balken */
    border-bottom: 2px solid #8bc34a;
    display: block;
}

.verhaal-card .content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.verhaal-card h2 {
    font-size: 1.8rem;
    color: #5a8f2c;
    margin-bottom: 15px;
    line-height: 1.2;
}

.verhaal-card .datum {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 10px;
}

.verhaal-card p {
    margin-bottom: 20px;
    color: #3d2b1f;
    flex: 1;
}

/* Afbeelding in verhaal-detail */
.story-image {
    float: left;
    margin: 0 20px 15px 0;
    max-width: 500px;
    height: auto;
    border-radius: 10px;
    border: 3px solid #8bc34a;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Op kleine schermen: afbeelding bovenaan, niet zwevend */
@media (max-width: 600px) {
    .story-image {
        float: none;
        display: block;
        margin: 0 auto 20px;
        max-width: 100%;
    }
}

/* ===== LEESVERDER KNOP ===== */
.lees-link {
    display: inline-block;
    background: #8bc34a;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    transition: background 0.3s, transform 0.2s;
    align-self: flex-start;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.lees-link:hover {
    background: #5a8f2c;
    transform: translateY(-2px);
}

/* ===== DETAILPAGINA ===== */
.verhaal-detail {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    margin: 40px 0;
    border: 3px solid #8bc34a;
}

.verhaal-detail h2 {
    font-size: 2.5rem;
    color: #5a8f2c;
    margin-bottom: 20px;
}

.verhaal-detail .datum {
    color: #999;
    margin-bottom: 20px;
    font-style: italic;
}

.verhaal-detail p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.verhaal-detail .personages {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px dashed #8bc34a;
    font-style: italic;
    color: #666;
}

.personage {
    display: inline-block;
    background: #8bc34a;
    color: white;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.9rem;
    margin-right: 8px;
    margin-bottom: 8px;
    font-weight: 600;
}

/* ===== FOUT- & LAADSTATUS ===== */
.error {
    color: #d9534f;
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 20px;
    border: 2px solid #d9534f;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #5a8f2c;
    font-size: 1.2rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.2rem;
    }

    header p {
        font-size: 1.1rem;
    }

    .grid {
        gap: 20px;
    }

    .verhaal-card h2 {
        font-size: 1.5rem;
    }

    .verhaal-detail {
        padding: 20px;
    }

    .verhaal-detail h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    header {
        padding: 15px 0;
    }

    .verhaal-card img.card-img {
        height: 160px;
    }
}
