/* =================================================================== */
/* ===           COMPLETE RESPONSIVE STYLESHEET V2 (FIXED)         === */
/* =================================================================== */

/* =================================================================== */
/* ===           1. BASIS & MOBILE-FIRST STIJLEN (START)           === */
/* =================================================================== */

html {
    overflow-y: scroll;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    box-sizing: border-box;
}

*,
*:before,
*:after {
    box-sizing: inherit;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    color: #333;
    background-color: #f4f4f4;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    max-width: 1200px;
}

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

main section {
    padding: 50px 0;
    border-bottom: 1px solid #e0e0e0;
}

main section:last-of-type {
    border-bottom: none;
}

/* --- Hero Sectie --- */
.hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/images/banner-image.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 60px 0;
    margin-top: 60px;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero h2 {
    font-size: 32px;
    line-height: 1.2;
    margin: 0 0 15px 0;
}

.hero p {
    font-size: 18px;
    margin: 0 0 30px 0;
    opacity: 0.9;
}

/* --- Hero Zoekbalk (Mobile-First) --- */
.search-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 950px;
    margin: 0 auto;
    width: 100%;
}

.search-form>input[type="text"],
.search-form .location-input-container,
.search-form .radius-container {
    padding: 14px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    background-color: #ffffff;
    color: #333;
    display: flex;
    align-items: center;
}

.search-form ::placeholder {
    color: #888;
}

.location-input-container {
    position: relative;
}

.location-input-container input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    padding: 0;
    font-size: 16px;
}

.location-input-container .fa-crosshairs {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    cursor: pointer;
}

.radius-container {
    justify-content: space-between;
}

.radius-container label {
    white-space: nowrap;
}

.radius-container input[type="range"] {
    width: 100%;
}

.search-form button {
    padding: 15px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    background-color: #c0392b;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-form button:hover {
    background-color: #a52a2a;
}

/* --- Styling voor Geoapify zoeksuggesties --- */
.location-suggestions {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    z-index: 1001;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    cursor: pointer;
    color: #333;
    font-size: 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.suggestion-item i {
    color: #c0392b;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: #f5f5f5;
}

/* --- Rest van de Pagina Stijlen --- */
.cta-section {
    background-color: #ffffff;
    text-align: center;
}

.cta-section h3 {
    font-size: 26px;
    margin: 0 0 15px 0;
}

.cta-section p {
    max-width: 600px;
    margin: 0 auto 30px auto;
}

.btn {
    background-color: #c0392b;
    color: white;
    padding: 12px 28px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    display: inline-block;
    transition: background-color 0.2s, transform 0.2s;
}

.btn:hover {
    background-color: #a52a2a;
    transform: translateY(-2px);
}

.categories {
    background-color: #f4f4f4;
}

.categories .container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.categories .category {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-align: left;
}

.categories .category h4 {
    font-size: 20px;
    margin: 20px 0 10px 0;
    color: #c0392b;
    padding: 0 20px;
}

.categories .category p {
    padding: 0 20px 20px 20px;
}

.business-exposure {
    background-image: linear-gradient(rgba(40, 40, 40, 0.6), rgba(40, 40, 40, 0.6)), url('/images/banner-image.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    text-align: center;
}

.business-exposure h3 {
    font-size: 26px;
    margin: 0 0 15px 0;
}

.new-businesses {
    background-color: #ffffff;
    text-align: center;
}

.new-businesses h3 {
    font-size: 26px;
    margin: 0 0 30px 0;
}

.filters {
    margin-bottom: 40px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.filters button {
    background: #e9e9e9;
    color: #555;
    border: none;
    padding: 8px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
}

.filters button:hover {
    background-color: #c0392b;
    color: white;
}

.business-listings {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.listing {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-align: left;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.listing img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.listing-content {
    padding: 20px;
}

.listing h4 {
    font-size: 18px;
    margin: 0 0 10px 0;
}

footer {
    background-color: #a52a2a;
    color: #e0e0e0;
    padding-top: 50px;
}

.footer-bottom {
    background-color: #8c2323;
    padding: 20px 0;
    margin-top: 40px;
    font-size: 14px;
}

.footer-bottom .container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.social-icons a {
    color: #e0e0e0;
    margin: 0 10px;
    font-size: 20px;
}

/* --- TABLET & DESKTOP STIJLEN --- */
@media (min-width: 768px) {
    .container {
        width: 85%;
    }

    .hero h2 {
        font-size: 42px;
    }

    .search-form {
        flex-direction: row;
        background-color: white;
        border-radius: 8px;
        padding: 8px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        gap: 0;
        align-items: center;
    }

    .search-form>input[type="text"],
    .search-form .location-input-container,
    .search-form .radius-container {
        background-color: transparent;
        padding: 0 15px;
        border-radius: 0;
        border-right: 1px solid #e0e0e0;
        height: 50px;
    }

    .search-form>input[type="text"],
    .search-form .location-input-container {
        flex: 1;
        min-width: 180px;
    }

    .search-form .radius-container {
        border-right: none;
        padding-right: 20px;
        gap: 10px;
        flex-shrink: 0;
    }

    .search-form .radius-container input[type="range"] {
        width: 120px;
    }

    .search-form .radius-container label {
        color: #555;
    }

    .search-form button {
        flex-grow: 0;
        padding: 10px 25px;
        height: 50px;
    }

    .location-suggestions {
        top: 58px;
        left: 8px;
        right: 8px;
        width: auto;
    }

    .categories .container {
        flex-direction: row;
        align-items: stretch;
    }

    .categories .category {
        width: 33.33%;
    }

    .business-listings {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 20px;
    }

    .listing {
        width: calc(50% - 10px);
    }

    .footer-bottom .container {
        flex-direction: row;
        justify-content: space-between;
    }
}

@media (min-width: 1024px) {
    .container {
        width: 80%;
    }

    .listing {
        width: calc(33.33% - 14px);
    }

    footer .container {
        display: flex;
        justify-content: space-between;
        text-align: left;
    }
}

/* --- HEADER & NAVIGATIE --- */
header {
    background-color: #c0392b;
    color: white;
    padding: 0 15px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: 60px;
    display: flex;
    align-items: center;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

header .logo a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
}

header .logo img {
    height: 40px;
    margin-right: 10px;
}

header .logo h1 {
    margin: 0;
    font-size: 24px;
    font-weight: normal;
    line-height: 1;
}

header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

header nav ul li {
    margin-left: 20px;
}

header nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.2s;
}

header nav ul li a:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: transparent;
    border: 2px solid white;
    padding: 8px 12px;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.dropbtn:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 110%;
    right: 0;
    background-color: #ffffff;
    min-width: 240px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    z-index: 1001;
    padding: 8px 0;
    overflow: hidden;
    border: 1px solid #eee;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    transition: background-color 0.2s, color 0.2s;
}

.dropdown-content a:hover {
    background-color: #f5f5f5;
    color: #c0392b;
}

.btn-register {
    background-color: white;
    color: #c0392b !important;
    font-weight: bold;
}

.dropdown::after {
    content: "";
    position: absolute;
    display: block;

    /* Position it directly under the button */
    top: 100%;
    right: 0;

    /* Make it wide enough to catch your mouse moving to the menu */
    width: 240px;
    /* Matches your menu's min-width */
    height: 30px;
    /* Tall enough to cross the gap */

    /* Keep it invisible */
    background: transparent;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: white;
    font-size: 26px;
    cursor: pointer;
    padding: 5px;
}

@media (max-width: 991px) {
    .menu-toggle {
        display: block;
    }

    #main-nav {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: #c0392b;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    }

    #main-nav.nav-active {
        display: block;
    }

    #main-nav ul {
        flex-direction: column;
        align-items: stretch;
        padding: 0;
    }

    #main-nav ul li a {
        display: block;
        padding: 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    #main-nav .dropdown {
        width: 100%;
    }

    #main-nav .dropbtn {
        width: 100%;
        border: none;
        justify-content: center;
    }

    #main-nav .dropdown-content {
        position: static;
        display: block;
        background-color: rgba(0, 0, 0, 0.15);
        box-shadow: none;
        border: none;
        padding: 0;
    }

    #main-nav .dropdown-content a {
        padding-left: 40px;
        text-align: left;
        color: white;
    }

    #main-nav ul li a.btn-register {
        background-color: #ffffff;
        color: #c0392b !important;
        font-weight: bold;
        margin: 10px 15px;
        border-radius: 8px;
        border-bottom: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }
}