/* Reset styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Algemene body stijlen */
body {
    font-family: Arial, sans-serif;
    background-color: rgba(255, 255, 255, 0.1);
    color: #333;
    line-height: 1.6;
    background-image: url('uploads/achtergrond_body.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

    body.dark-mode {
        background-color: #333;
        color: #f2f2f2;
    }

        body.dark-mode header {
            background-image: url('uploads/Header_banner_dark.jpg'); /* Donkere header afbeelding */
        }

        body.dark-mode main {
            background-image: url('uploads/achtergrond_body_dark.jpg'); /* Donkerdere achtergrond afbeelding */
            border: 1px solid #444;
        }

        body.dark-mode .card {
            background-color: rgba(255, 255, 255, 0.1);
        }

        body.dark-mode .button,
        body.dark-mode .logout-button {
            background-color: #555;
            color: #f2f2f2;
        }

            body.dark-mode .button:hover,
            body.dark-mode .logout-button:hover {
                background-color: #666;
            }

/* Header stijlen */
header {
    position: relative;
    background-image: url('uploads/Header_banner.jpg');
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 2rem 1rem;
    text-align: center;
    overflow: hidden;
}

    header::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 0;
    }

    header h1 {
        position: relative;
        font-size: 2.5rem;
        margin: 0;
        z-index: 1;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    }

.header-right {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    padding: 1rem;
}

/* Algemene knopstijl */
.button {
    padding: 10px 20px;
    font-size: 1rem;
    background-color: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    text-align: center;
    display: inline-block;
    margin: 10px 0;
}

    .button:hover {
        background-color: #45a049;
        color: #fff;
    }

/* Specifieke knopstijlen */
.logout-button {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 2px solid #fff;
    border-radius: 5px;
    background-color: transparent;
    position: relative;
    z-index: 1;
    transition: background-color 0.3s, color 0.3s;
}

    .logout-button:hover {
        background-color: #fff;
        color: #333;
    }

/* Switch stijlen */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
    margin-left: 10px;
}

    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 20px;
}

    .slider:before {
        position: absolute;
        content: "";
        height: 12px;
        width: 12px;
        left: 4px;
        bottom: 4px;
        background-color: white;
        transition: .4s;
        border-radius: 50%;
    }

input:checked + .slider {
    background-color: #2196F3;
}

    input:checked + .slider:before {
        transform: translateX(20px);
    }

/* Main stijlen */
main {
    position: relative;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    background-position: center;
    background-repeat: no-repeat;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

    main::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: url('uploads/uploads/achtergrond_body.jpg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        background-color: rgba(0, 0, 0, 0.6); /* Donkere overlay kleur */
        z-index: 1;
        border-radius: 5px;
    }

    main > * {
        position: relative;
        z-index: 2; /* Zorg dat de inhoud boven de overlay ligt */
    }


/* Zoek sectie stijlen */
.search {
    margin-bottom: 20px;
}

    .search h2 {
        font-size: 1.8rem;
        margin-bottom: 10px;
        color: #f2f2f2;
    }

    .search form {
        background-color: rgba(0, 0, 0, 0.5);
        display: flex;
        flex-direction: column;
        padding: 10px;
        border-radius: 5px;
    }

    .search input[type="text"] {
        background-color: rgba(0, 0, 0, 0.2);
        padding: 10px;
        font-size: 1rem;
        border: 1px solid #ccc;
        border-radius: 5px;
        color: #fff;
        margin-bottom: 10px;
    }

.search-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .search-buttons .button {
        width: 100%;
    }

/* Ontvangsten en nieuwe berichten secties */
.my-receipts,
.new-post {
    margin-bottom: 20px;
}

    .my-receipts h2,
    .new-post h2 {
        font-size: 1.8rem;
        margin-bottom: 10px;
        color: #f2f2f2;
    }

    .new-post .input-group {
        margin-bottom: 15px;
    }

    .new-post input[type="text"],
    .new-post input[type="file"],
    .new-post textarea {
        background-color: rgba(0, 0, 0, 0.5);
        width: 100%;
        padding: 10px;
        font-size: 1rem;
        border: 1px solid #fff;
        border-radius: 5px;
        color: #fff;
    }

    .new-post textarea {
        height: 150px;
    }

    .new-post button[type="submit"],
    .search-buttons button[type="submit"] {
        padding: 10px 20px;
        font-size: 1rem;
        background-color: #4CAF50;
        color: #fff;
        border: none;
        border-radius: 5px;
        cursor: pointer;
        transition: background-color 0.3s;
    }

        .new-post button[type="submit"]:hover,
        .search-buttons button[type="submit"]:hover {
            background-color: #45a049;
        }

/* Card stijlen */
.card-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.card {
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 300px;
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
}

.card-image {
    height: 150px;
    overflow: hidden;
}

    .card-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        filter: brightness(70%);
        cursor: pointer;
    }

/* Card content */
.card-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 200px;
    color: #fff;
    padding-bottom: 4rem; /* Extra padding aan de onderkant om ruimte te maken voor de knoppen */
}

    .card-content h3 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
        color: #e0e0e0;
    }

    .card-content .date {
        font-size: 0.9rem;
        color: #bbb;
        margin-top: auto;
    }

    .card-content p {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

/* Card actions */
.card-actions {
    display: flex;
    gap: 0.5rem;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.4);
    padding: 0.5rem;
    border-top: 1px solid #ddd;
    z-index: 1; /* Zorg ervoor dat knoppen boven de card-content staan */
}

    .card-actions .button {
        padding: 10px 20px;
        font-size: 0.9rem;
        border: none;
        border-radius: 5px;
        cursor: pointer;
        transition: background-color 0.3s;
        flex: 1;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
    }

        .card-actions .button.edit {
            background-color: rgba(76, 175, 80, 0.6); /* Groen met 60% dekking */
            color: #fff;
        }

            .card-actions .button.edit:hover {
                background-color: rgba(69, 160, 73, 0.8); /* Iets donkerder groen met 80% dekking */
            }

        .card-actions .button.delete {
            background-color: rgba(244, 67, 54, 0.8); /* Rood met 80% dekking */
            color: #fff;
        }

            .card-actions .button.delete:hover {
                background-color: rgba(198, 40, 40, 0.8); /* Iets donkerder rood met 80% dekking */
            }

/* Modal stijlen */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    max-height: 80%;
    margin: auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
}

    .modal-content img {
        display: block;
        max-width: 100%;
        max-height: 100%;
        margin: auto;
    }

#caption {
    color: #333;
    text-align: center;
    margin-top: 10px;
}

.close {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #a11111;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

    .close:hover,
    .close:focus {
        color: #bbb;
        text-decoration: none;
        cursor: pointer;
    }

/* Knoppen voor modal navigatie */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    transition: 0.6s ease;
    border: none;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 50%;
    z-index: 1001;
}

.prev {
    left: 0;
}

.next {
    right: 0;
}

    .prev:hover,
    .next:hover {
        background-color: rgba(0, 0, 0, 0.9);
    }

/* Responsieve stijlen voor modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
    }

    .prev, .next {
        font-size: 18px;
        padding: 10px;
    }
}

/* Algemeen */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

img {
    max-width: 100%;
    height: auto;
}
