/* 
 * Hoofdstylesheet voor de bomen website
 * Hier komen alle CSS stijlen
 */ 

/* Algemene stijlen */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f0f7f0;
    color: #2c3e2c;
}

header {
    background-color: #2c5e2c;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    background-color: #3a7a3a;
    margin-left: 0.5rem;
    transition: background-color 0.3s ease;
}

nav a:hover {
    background-color: #4a8a4a;
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

footer {
    background-color: #2c5e2c;
    color: white;
    text-align: center;
    padding: 0.75rem;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 10;
}

/* Login formulier */
.login-form {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.login-form div {
    margin-bottom: 1rem;
}

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e2c;
    font-weight: bold;
}

.login-form input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.login-form button {
    width: 100%;
    padding: 0.75rem;
    background-color: #2c5e2c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.login-form button:hover {
    background-color: #3a7a3a;
}

/* Overzichtspagina */
.actions {
    margin-bottom: 2rem;
}

.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #2c5e2c;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.button:hover {
    background-color: #3a7a3a;
}

.button.small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.button.delete {
    background-color: #c53030;
}

.button.delete:hover {
    background-color: #dc2626;
}

.button.secondary {
    background-color: #718096;
}

.button.secondary:hover {
    background-color: #4a5568;
}

/* Tabel stijlen */
.bomen-overzicht {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.bomen-overzicht th,
.bomen-overzicht td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.bomen-overzicht th {
    background-color: #2c5e2c;
    color: white;
    font-weight: bold;
}

.bomen-overzicht tr:hover {
    background-color: #f0f7f0;
}

.acties {
    white-space: nowrap;
}

.acties .button {
    margin-right: 0.5rem;
}

.geen-data {
    text-align: center;
    color: #718096;
    padding: 2rem;
}

/* Boom formulier */
.boom-formulier {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 100px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e2c;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group input[type="file"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f8f9fa;
}

.form-group.checkbox {
    display: flex;
    align-items: center;
}

.form-group.checkbox label {
    margin-left: 0.5rem;
    font-weight: normal;
}

.form-group.checkbox input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
}

.huidige-foto {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.huidige-foto p {
    margin: 0 0 0.5rem 0;
    color: #718096;
}

.huidige-foto img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 4px;
}

.form-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

/* Foutmeldingen */
.error {
    background-color: #c53030;
    color: white;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Boom detail pagina */
.boom-detail {
    max-width: 1000px;
    margin: 2rem auto 0 auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(44,94,44,0.08);
    padding: 2rem;
}

.boom-detail-hoofd {
    width: 100%;
    max-height: 350px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 2rem;
    background: #f0f7f0;
}

.boom-detail-columns {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.boom-detail-links {
    flex: 2;
    min-width: 250px;
}

.boom-detail-rechts {
    flex: 1;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.boom-detail-rechts figure {
    margin: 0;
    background: #f0f7f0;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.boom-detail-rechts img {
    width: 100%;
    max-height: 140px;
    object-fit: cover;
    border-radius: 6px;
}

.boom-detail-rechts figcaption {
    margin-top: 0.5rem;
    color: #256029;
    font-size: 1rem;
}

.boom-galerij {
    margin-top: 2.5rem;
}

.boom-galerij h2 {
    margin-bottom: 1rem;
}

.galerij-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.5rem;
}

.galerij-grid figure {
    margin: 0;
    background: #f0f7f0;
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
}

.galerij-grid img {
    width: 100%;
    max-height: 120px;
    object-fit: cover;
    border-radius: 6px;
}

.galerij-grid figcaption {
    margin-top: 0.5rem;
    color: #256029;
    font-size: 0.95rem;
}

/* Responsive design */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
    }

    nav {
        margin-top: 1rem;
    }

    nav a {
        display: inline-block;
        margin: 0.25rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .button {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .huidige-foto img {
        max-width: 100%;
    }
}

@media (max-width: 900px) {
    .boom-detail-columns {
        flex-direction: column;
        gap: 1rem;
    }
    .boom-detail-rechts {
        flex-direction: row;
        gap: 1rem;
    }
    .boom-detail-rechts figure {
        flex: 1;
    }
}

/* --- Stijl voor het overzicht van bomen --- */

.boom-overzicht {
    display: grid;
    /* Maak kolommen van minimaal 250px, vul de ruimte automatisch op */
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px; /* Ruimte tussen de kaarten */
    padding: 24px; /* Ruimte aan de randen van de container */
}

.boom-kaart {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden; /* Zorgt dat de afbeelding binnen de ronde hoekjes blijft */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    text-decoration: none; /* Haal de blauwe link-onderstreping weg */
    color: #333; /* Tekstkleur voor de naam */
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.boom-kaart:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.boom-kaart img {
    width: 100%;
    height: 200px; /* Vaste hoogte voor een strakke uitlijning */
    object-fit: cover; /* Zorgt dat de foto de ruimte vult zonder vervorming */
    display: block;
}

.boom-kaart h3 {
    margin: 0;
    padding: 16px;
    font-size: 1.1rem;
}

/* --- Boom detail nieuwe layout --- */

body, .boom-container {
    padding-bottom: 120px; /* Ruimte voor vaste footer */
}

.boom-container h1 {
    text-align: center;
}

.primaire-afbeeldingen {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 24px 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.primaire-afbeeldingen img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 8px;
    background: #f0f7f0;
    box-shadow: 0 2px 8px rgba(44,94,44,0.08);
}

.kenmerken-tekst {
    margin: 2rem 0;
    font-size: 1.1rem;
    color: #256029;
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
    margin-top: 16px;
}

.gallery-container img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
}

.pagina-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    padding: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    z-index: 1000;
}

.pagina-footer a.button {
    background-color: #2c5e2c;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(44,94,44,0.08);
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
    border: none;
    display: inline-block;
}

.pagina-footer a.button:hover {
    background-color: #256029;
    box-shadow: 0 4px 12px rgba(44,94,44,0.18);
    transform: translateY(-2px) scale(1.04);
}