/* Algemene opmaak */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
    position: relative;
}

/* Zoekbalk en filters */
.zoekformulier {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    background-color: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid grey;
}

/* Form-groepen */
.zoekformulier .form-group {
    margin-bottom: 10px;
}

/* Zoekbutton centreren en stijlen */
.zoekformulier .form-inline button.zoekenBtn {
    background-color: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    display: block;
    margin: auto;
    padding: 10px 20px;
    border-radius: 5px;
}

.zoekformulier .form-inline button.zoekenBtn:hover {
    background-color: #0056b3;
}

/* Boekenweergave */
.boeken-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: left;
    gap: 20px;
    padding: 20px;
    margin-top: 120px;
}

/* Boekkaart */
.boek {
    flex: 1 1 250px;
    max-width: 250px;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 15px;
    text-align: left;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.boek:hover {
    transform: translateY(-5px);
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.2);
}

/* Afbeeldingen in boeken */
.boek img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
}

/* Tekstopmaak in boeken */
.boek h3 {
    margin: 10px 0;
    font-size: 18px;
    font-weight: bold;
}

.boek p {
    margin: 5px 0;
    font-size: 14px;
    color: #555;
}

/* Beschrijving met overflow ellipsis */
.beschrijving {
    max-height: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Paginering */
.pagination {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    gap: 5px;
    padding: 10px;
    border-radius: 8px;
    background-color: transparent;
}

.pagination a {
    padding: 10px 15px;
    text-decoration: none;
    color: #007bff;
    border: 1px solid #007bff;
    border-radius: 5px;
    background-color: white;
    transition: background-color 0.2s, color 0.2s;
}

.pagination a:hover {
    background-color: #007bff;
    color: white;
}

.pagination a.active {
    background-color: #0056b3;
    color: white;
    border-color: #0056b3;
}

/* Terugkeren-knop */
.home-button {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #4a90e2;
    color: white;
    padding: 12px 18px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.home-button:hover {
    background: #357abd;
    transform: scale(1.05);
}

/* Toggle-knop pijltje */
.toggle-btn::after {
    content: "▼";
    display: inline-block;
    transition: transform 0.3s ease;
    font-size: 14px;
    margin-left: 8px;
}

/* Pijltje draaien bij toggle */
.zoekformulier.ingekapt .toggle-btn::after {
    transform: rotate(-90deg);
}

/* Optioneel: cursor pointer voor de toggle button */
.toggle-btn {
    cursor: pointer;
}

/* Optioneel: maak .zoekformulier wat smaller op kleine schermen */
@media (max-width: 600px) {
    .zoekformulier {
        width: 90%;
        left: 50%;
        transform: translateX(-50%);
        padding: 10px;
    }

.zoekformulier.ingekapt .toggle-btn::after {
    transform: rotate(-90deg);
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    margin-top: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}
}

/* Zoekcontent uit-/inklappen */
/* Zorg voor vloeiende overgang van max-height en opacity */
#zoekcontent {
    margin-top: 10px;
    overflow: hidden;
    max-height: 1000px; /* ruim genoeg om alles te tonen */
    opacity: 1;
    transition:
      max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
      opacity 0.3s ease;
}

/* Ingeklapte staat */
.zoekformulier.ingekapt #zoekcontent {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    margin-top: 0;
}

/* Dark mode styling */
.dark-mode {
    background-color: #121212 !important;
    color: #e0e0e0 !important;
}

.dark-mode .container,
.dark-mode header,
.dark-mode .zoekformulier,
.dark-mode .boek {
    background-color: #1e1e1e !important;
    border-color: #333 !important;
    color: #ccc !important;
    box-shadow: none !important;
}

/* Buttons in dark mode */
.dark-mode .boek a {
    background-color: #3a86ff !important;
    color: white !important;
}

.dark-mode .boek a:hover {
    background-color: #255bb5 !important;
}
