/* ✅ Algemene header stijl */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background-color: #2d2d2d;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* ✅ Eerste rij: Logo + Navigatie + Login */
.header-top {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 10px 20px;
    gap: 40px;
}

.header-left img.logo {
    height: 70px;
}

/* ✅ Navigatie */
.header-nav {
    display: flex;
    align-items: center;
    margin-left: 100px;
}

.header-nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    padding: 0;
    margin: 0;
}

.header-nav ul li a {
    text-decoration: none;
    color: white;
    font-size: 18px;
    font-weight: bold;
}

/* ✅ Inlog-/uitlogknoppen */
.header-right {
    margin-left: auto;
}

.header-right a {
    display: inline-block;
    padding: 8px 16px;
    background-color: #6eebea;
    color: black;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    border-radius: 20px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.header-right a:hover {
    background-color: #5ccac9;
    transform: scale(1.05);
}

/* ✅ Tweede rij: Filterbalk en Submenu */
.header-bottom {
    background-color: rgb(50, 90, 110);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 20px;
    border-top: 3px solid rgba(255, 255, 255, 0.3);
}

/* ✅ Filters */
.filters {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

.filters input,
.filters select {
    padding: 8px 12px;
    font-size: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    transition: all 0.3s ease-in-out;
}

/* ✅ Zoekknop */
.header-bottom button {
    width: 25px;
    height: 25px;
    background-color: #c0ff58;
    color: black;
    border: none;
    padding: 5px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.header-bottom button:hover {
    background-color: #5cd372;
    transform: scale(1.1);
}

/* ✅ Paginering */
.pagination {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
    flex: 1;
}

/* ✅ Submenu */
.submenu-list {
    display: flex;
    gap: 15px;
    list-style: none;
    align-items: flex-start; /* ✅ Links uitlijnen */
    padding-left: 0px; /* Extra marge voor leesbaarheid */
}

.submenu-list li a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    transition: background 0.3s ease;
}

.submenu-list li a:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ✅ Standaard weergave (desktop) - knoppen naast de datum */
.date-filter-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* ✅ Knoppen blijven klein op desktop */
.date-filter-wrapper button {
    width: 25px;
    height: 25px;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #c0ff58;
    border-radius: 0px;
    font-size: 12px;
}

/* ✅ Datumveld neemt ruimte in tussen de knoppen */
.date-filter-wrapper input[type="date"] {
    flex-grow: 1;
    max-width: 200px;
    text-align: center;
    padding: 8px;
}

/* ========== MEDIA: MOBIEL ========== */

@media (max-width: 768px) {
    .header-top {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 8px 10px;
        gap: 10px;
    }

    .header-left img.logo {
        height: 50px;
    }

    .header-nav {
        width: 100%;
        margin-left: 0;
        margin-top: 4px;
    }

    .header-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        padding: 0;
        margin: 0;
    }

    .header-nav ul li a {
        font-size: 14px;
        font-weight: normal;
        padding: 4px 6px;
    }

    .header-right {
        margin-left: 0;
    }

    .header-right a {
        padding: 6px 10px;
        font-size: 14px;
        border-radius: 14px;
    }

    .header-bottom {
        display: flex;
        flex-direction: column;
        align-items: stretch; /* 🔥 Zorgt dat children volledige breedte nemen */
        gap: 4px;
        padding: 4px 0px;
        margin-bottom: 0;
    }

    .header-filters {
        order: 1;
    }

    .header-submenu {
        order: 2;
        background-color: #2d3e50;
        overflow-x: auto;
        white-space: nowrap;
        padding: 5px 6px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        width: 100%; /* 🔥 Dit is essentieel! */
        max-width: 100%; /* Ook deze kan helpen */
        border-top: 2px solid rgba(255, 255, 255, 0.2); /* 🔥 De scheidingslijn */
    }

    .header-submenu::-webkit-scrollbar {
        display: none;                    /* 🔥 Verbergt scrollbar in WebKit (Chrome, Safari) */
    }

    .submenu-list {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: 4px;
        padding: 0;
        margin: 0;
        list-style: none;
        min-width: 1000px; /* 🔥 Forceer breedte zodat scroll actief wordt */
    }

    .submenu-list li {
        flex: 0 0 auto;
    }

    .submenu-list li a {
        font-size: 13px;
        padding: 6px 10px;
        background: rgba(255, 255, 255, 0.15);
        border-radius: 4px;
        white-space: nowrap;
        text-align: left;
        display: inline-block;
    }

    .filters {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }

    .filters input,
    .filters select {
        font-size: 13px;
        padding: 6px 8px;
        width: auto;
        max-width: 90px;
    }

    .date-filter-wrapper {
        gap: 6px;
    }

    .date-filter-wrapper input[type="date"] {
        font-size: 13px;
        max-width: 110px;
    }

    main {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
}

/* ========== MEDIA: IPHONE / SMALL DEVICES ========== */
@media (max-width: 480px) {
    .header-top {
        padding: 6px 6px;
        gap: 6px;
    }

    .header-left img.logo {
        height: 38px;
    }

    .header-nav ul {
        gap: 6px;
    }

    .header-nav ul li a {
        font-size: 12px;
        padding: 2px 4px;
    }

    .header-right a {
        padding: 4px 8px;
        font-size: 12px;
        border-radius: 12px;
    }

    .header-bottom {
        padding: 2px 0;
        gap: 2px;
    }

    .header-submenu {
        padding: 4px 6px;
    }

    .submenu-list {
        gap: 4px;
    }

    .submenu-list li a {
        font-size: 12px;
        padding: 4px 8px;
    }

    .filters {
        gap: 4px;
    }

    .filters input,
    .filters select {
        font-size: 12px;
        padding: 4px 6px;
        max-width: 80px;
    }

    .date-filter-wrapper {
        gap: 4px;
    }

    .date-filter-wrapper input[type="date"] {
        font-size: 12px;
        max-width: 100px;
    }
}
