@import url('https://fonts.googleapis.com/css2?family=Noto+Serif:ital,wght@0,100..900;1,100..900&display=swap');

/* -------------------------------------------------- */
/* BASIS                                              */
/* -------------------------------------------------- */

body {
    position: relative;
    overflow-x: hidden;
    background-image: url(../images/Achtergrond.png);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    color: white;
    font-family: 'Noto Serif', Arial, sans-serif;
    padding: 20px;
    margin: 0;
}

/* Achtergrond fixed op mobiel */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url(../images/Achtergrond.png);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    z-index: -1;
}

/* -------------------------------------------------- */
/* BUTTONS                                            */
/* -------------------------------------------------- */

.btn-primary {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    text-align: center;
}
.btn-primary:hover {
    background-color: #0056b3;
}

/* -------------------------------------------------- */
/* TITEL & TERUG LINK                                 */
/* -------------------------------------------------- */

h2 {
    color: #94FF29;
    text-align: center;
    margin-top: 100px;
    font-size: 2em;
}

.back {
    color: #94FF29;
    font-weight: bold;
    text-decoration: none;
    font-size: 16px;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.3s ease;
    display: inline-block;
}
.back:hover {
    background: #94FF29;
    color: #222;
}

/* -------------------------------------------------- */
/* FILTER / INFO                                      */
/* -------------------------------------------------- */

.recept_top {
    font-size: 16px;
    padding: 8px;
    margin-top: 5px;
    width: 98%;
}

/* -------------------------------------------------- */
/* GRID (CSS GRID)                                    */
/* -------------------------------------------------- */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 30px;
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.item {
    text-align: center;
}

.item a {
    display: block;
    text-decoration: none;
    color: #94FF29;
}

.item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border: 1px transparent none;
    border-radius: 15px;
    cursor: pointer;
    display: block;
    transition: transform 0.4s ease;
}

.item a:hover img {
    transform: scale(1.05);
}

/* -------------------------------------------------- */
/* CAPTION                                            */
/* -------------------------------------------------- */

.caption {
    margin-top: 8px;
    color: #FF9966;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: clamp(0.8rem, 2vw, 1.1rem);
}

/* -------------------------------------------------- */
/* POPUP + OVERLAY + ANIMATIE                         */
/* -------------------------------------------------- */

.popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 999;
}

.popup {
    display: block;
    position: relative;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    max-width: 90vw;
    max-height: 75vh;
    overflow-y: auto;
    margin: 40px auto;
    animation: popupFade 0.35s ease-out;
    transform-origin: center;
}

@keyframes popupFade {
    0% { opacity: 0; transform: scale(0.85); }
    100% { opacity: 1; transform: scale(1); }
}

.popup pre {
    white-space: pre-wrap;
    margin: 0;
    font-size: 1rem;
}

.popup button {
    float: right;
    margin-left: 10px;
    font-size: 1rem;
}

/* -------------------------------------------------- */
/* GEEN RESULTATEN                                    */
/* -------------------------------------------------- */

.no-recepten {
    text-align: center;
    font-size: 20px;
    color: #ccc;
    margin-top: 40px;
}

/* -------------------------------------------------- */
/* RESPONSIVE BREAKPOINTS                             */
/* -------------------------------------------------- */

/* 📱 Telefoons */
@media (max-width: 480px) {
    h2 {
        font-size: 1.5em;
        margin-top: 40px;
    }

    .item img {
        height: 160px;
    }

    .recept_top {
        font-size: 14px;
    }

    .popup {
        padding: 15px;
        max-height: 80vh;
        font-size: 0.9rem;
    }
}

/* 📱📱 Grote telefoons & kleine tablets */
@media (max-width: 768px) {
    .item img {
        height: 180px;
    }
}

/* 📱➡️💻 Tablets liggend */
@media (max-width: 1024px) {
    /* CSS Grid regelt de kolommen automatisch */
}

/* 💻 Laptops */
@media (max-width: 1400px) {
    /* CSS Grid regelt de kolommen automatisch */
}