fieldset {
    background-color: #FAFAFA;
    padding: 20px;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    margin-bottom: 20px;
    position: relative;
    padding-top: 35px;
}

legend {
    text-align: right;
    background: linear-gradient(180deg, #FFFFFF 0%, #FFDC79 100%);
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    padding: 5px 15px;
    position: absolute;
    top: -15px;
    right: 15px;
    font-weight: bold;
}

.boxcontainer {
    display: block;
    border: 1px solid #444444;
    box-shadow: 1px 1px 4px #000;
    margin-bottom: 15px;
    overflow: hidden; /* Zorgt dat floats netjes binnen de container blijven */
    box-sizing: border-box;
}

.titel, 
.titel_tekening, 
.titel_haar {
    height: 21px;
    padding: 3px;
    border-bottom: 2px solid #FFDC79;
    font-size: 18px;
    color: #000000;
    text-align: left;
    text-decoration: none;
    margin-bottom: 0;
}

/* Specifieke achtergrondkleuren per titel behouden in de nieuwe stijl */
.titel {
    background: #C5DEFA;
}

.titel_tekening {
    background: #FAFA00;
}

.titel_haar {
    background: #DEFAC5;
}

.toelichting, 
.toelichting_tekening, 
.toelichting_haar {
    font-size: 18px;
    color: #000000;
    text-align: left;
    text-decoration: none;
    background-color: #FFFFEE;
    padding: 10px;
    line-height: 1.5;
}

.tekstcontainer {
    float: left;
    max-width: 500px;
    width: 100%;
}

.fotocontainer {
    float: right;
}

.foto {
    border: 2px solid #FFDC79; /* Aangepast naar de nieuwe stijl accentkleur i.p.v. hard blauw */
    border-radius: 4px;
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Knoppen (Specifiek voor genereren en terug) --- */
input[name="submit-genereer"],
input[name="submit-terug"] {
    background-color: #0099FF;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    box-sizing: border-box;
    margin: 0 5px 10px 0;
}

input[name="submit-genereer"]:hover,
input[name="submit-terug"]:hover {
    background-color: #005C99;
}

input[name="submit-genereer"]:active,
input[name="submit-terug"]:active {
    transform: scale(0.97);
}

/* --- Mobielvriendelijk (Responsive) --- */
@media only screen and (max-width: 640px) {
    fieldset {
        padding-top: 40px;
    }
    legend {
        position: relative;
        top: 0;
        right: 0;
        text-align: center;
        width: auto;
        display: inline-block;
        margin-bottom: 10px;
    }
    .tekstcontainer, 
    .fotocontainer {
        float: none;
        max-width: 100%;
        width: 100%;
    }
    .foto {
        width: 100%;
        border-right: 2px solid #FFDC79;
        border-top: 2px solid #FFDC79;
        border-left: 2px solid #FFDC79;
        border-bottom: 2px solid #FFDC79;
    }
    .toelichting, 
    .toelichting_tekening, 
    .toelichting_haar {
        text-align: left;
    }
}