/* =========================================================
   Vaarmarkt Home Listings v1.0.0
   Mobile first, server-side rendered.
   ========================================================= */

.vm-hl {
    --vm-hl-blue: #004e8e;
    --vm-hl-blue-dark: #023e6f;
    --vm-hl-blue-mid: #0e6ba8;
    --vm-hl-pill: #eaf2f9;
    --vm-hl-pill-border: #c6dbed;
    --vm-hl-text: #1f2933;
    --vm-hl-muted: #4b5563;
    --vm-hl-bg: #f9f6f1;
    --vm-hl-card: #ffffff;
    --vm-hl-border: #ebe5dc;

    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 10px 42px 20px;
    color: var(--vm-hl-text);
}

.vm-hl,
.vm-hl * {
    box-sizing: border-box;
}

.vm-hl__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.vm-hl__eyebrow {
    margin-bottom: 4px;
    color: var(--vm-hl-muted);
    font-family: Inter, Arial, sans-serif;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.vm-hl__title {
    margin: 0;
    color: var(--vm-hl-blue);
    font-family: Manrope, Inter, Arial, sans-serif;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -.02em;
}

.vm-hl__all {
    flex: 0 0 auto;
    color: var(--vm-hl-blue) !important;
    font-family: Inter, Arial, sans-serif;
    font-size: 13px;
    line-height: 1.3;
    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap;
}

.vm-hl__all:hover {
    text-decoration: underline !important;
    text-underline-offset: 3px;
}

.vm-hl__track {
    display: flex;
    gap: 14px;
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    padding: 2px 26px 12px 0;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 0;
    scroll-padding-right: 26px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.vm-hl__track::-webkit-scrollbar {
    display: none;
}

.vm-hl-card {
    flex: 0 0 calc(100% - 42px);
    min-width: 0;
    scroll-snap-align: start;
}

.vm-hl-card__link {
    display: flex;
    height: 100%;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--vm-hl-border);
    border-radius: 10px;
    background: var(--vm-hl-card);
    color: inherit !important;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(31, 41, 51, .10);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.vm-hl-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #eeeae3;
}

.vm-hl-card__image,
.vm-hl-card__placeholder {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.vm-hl-card__image {
    max-width: none !important;
    object-fit: cover;
    transition: transform .25s ease;
}

.vm-hl-card__body {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    flex-direction: column;
    padding: 13px 14px 14px;
}

.vm-hl-card__category {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    margin: 0;
    padding: 5px 10px;
    border: 1px solid rgba(198, 219, 237, .95);
    border-radius: 999px;
    background: rgba(234, 242, 249, .96);
    color: var(--vm-hl-blue);
    font-family: Inter, Arial, sans-serif;
    font-size: 11px;
    line-height: 1.15;
    font-weight: 600;
    backdrop-filter: blur(2px);
}

.vm-hl-card__title {
    margin: 0;
    color: var(--vm-hl-blue-dark);
    font-family: Manrope, Inter, Arial, sans-serif;
    font-size: 18px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: -.015em;
}

.vm-hl-card__specs {
    margin-top: 5px;
    color: var(--vm-hl-muted);
    font-family: Inter, Arial, sans-serif;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 400;
}

.vm-hl-card__foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 12px;
}

.vm-hl-card__location {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    overflow: hidden;
    color: var(--vm-hl-muted);
    font-family: Inter, Arial, sans-serif;
    font-size: 13px;
    line-height: 1.3;
    font-weight: 400;
    white-space: nowrap;
}

.vm-hl-card__location-icon {
    flex: 0 0 15px;
    width: 15px;
    height: 15px;
    margin-right: 6px;
    color: #4b5563;
}

.vm-hl-card__location span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vm-hl-card__price {
    flex: 0 0 auto;
    color: var(--vm-hl-blue);
    font-family: Inter, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 700;
    white-space: nowrap;
}

.vm-hl-card__link:focus-visible {
    outline: 2px solid var(--vm-hl-blue-mid);
    outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
    .vm-hl-card__link:hover {
        transform: translateY(-2px);
        border-color: #dce6ef;
        box-shadow: 0 5px 14px rgba(31, 41, 51, .10);
    }

    .vm-hl-card__link:hover .vm-hl-card__image {
        transform: scale(1.02);
    }
}

@media (min-width: 768px) {
    .vm-hl {
        padding: 36px 28px 52px;
    }

    .vm-hl__title {
        font-size: 28px;
    }

    .vm-hl__track {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
        overflow: visible;
        padding: 0;
        scroll-snap-type: none;
    }

    .vm-hl-card {
        min-width: 0;
    }
}

@media (min-width: 1024px) {
    .vm-hl {
        width: 100%;
        max-width: 1200px;
        padding: 42px 0 60px;
    }

    .vm-hl__head {
        margin-bottom: 20px;
    }

    .vm-hl__track {
        grid-template-columns: repeat(var(--vm-hl-columns, 4), minmax(0, 1fr));
        gap: 18px;
    }

    .vm-hl-card__title {
        font-size: 17px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vm-hl-card__link,
    .vm-hl-card__image {
        transition: none;
    }
}


/* v1.0.1 - admin diagnosemelding */
.vm-hl--error {
    padding-top: 18px;
    padding-bottom: 18px;
    color: #8a2d2d;
    font-family: Inter, Arial, sans-serif;
    font-size: 14px;
}


/* =========================================================
   v1.0.5 - titel 800, standaard diepte en mobiele CTA
   ========================================================= */

.vm-hl__mobile-cta-wrap {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.vm-hl__mobile-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid #c6dbed;
    border-radius: 999px;
    background: #ffffff;
    color: #004e8e !important;
    font-family: Inter, Arial, sans-serif;
    font-size: 14px;
    line-height: 1;
    font-weight: 600;
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(31, 41, 51, .07);
}

.vm-hl__mobile-cta:hover,
.vm-hl__mobile-cta:focus-visible {
    background: #eaf2f9;
    text-decoration: none !important;
}

@media (max-width: 767px) {
    .vm-hl__all {
        display: none;
    }
}

@media (min-width: 768px) {
    .vm-hl__mobile-cta-wrap {
        display: none;
    }
}


/* =========================================================
   v1.0.6 - vereenvoudigde sectiekop + transparante labels
   ========================================================= */

.vm-hl__subtitle {
    margin: 5px 0 0;
    color: #4b5563;
    font-family: Inter, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.45;
    font-weight: 400;
}

.vm-hl-card__category {
    background: rgba(255, 255, 255, .85) !important;
    border-color: rgba(198, 219, 237, .75) !important;
    color: #004e8e !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

@media (max-width: 767px) {
    .vm-hl__head {
        align-items: flex-start;
    }

    .vm-hl__title {
        font-size: 28px;
        line-height: 1.15;
    }

    .vm-hl__subtitle {
        font-size: 16px;
    }

    .vm-hl__track {
        gap: 12px;
        padding-right: 24px;
        scroll-padding-right: 24px;
    }

    .vm-hl-card {
        flex-basis: calc(100% - 44px);
    }

    .vm-hl__mobile-cta-wrap {
        justify-content: stretch;
        margin-top: 18px;
        padding-right: 10px;
    }

    .vm-hl__mobile-cta {
        width: 100%;
    }
}


/* =========================================================
   v1.0.7 - subtitle + duidelijkere lichte kaartschaduw
   ========================================================= */

.vm-hl-card__link {
    box-shadow:
        0 2px 4px rgba(31, 41, 51, .06),
        0 6px 16px rgba(31, 41, 51, .10) !important;
}

@media (hover: hover) and (pointer: fine) {
    .vm-hl-card__link:hover {
        box-shadow:
            0 3px 6px rgba(31, 41, 51, .08),
            0 8px 20px rgba(31, 41, 51, .13) !important;
    }
}


/* =========================================================
   v1.0.8 - mobiele CTA in zoekknop-stijl + zachtere schaduw
   ========================================================= */

@media (max-width: 767px) {
    .vm-hl-card__link {
        box-shadow:
            0 1px 2px rgba(31, 41, 51, .04),
            0 3px 8px rgba(31, 41, 51, .06) !important;
    }

    .vm-hl__mobile-cta-wrap {
        justify-content: center;
        padding-right: 10px;
    }

    .vm-hl__mobile-cta {
        width: auto;
        min-width: 150px;
        min-height: 40px;
        padding: 0 24px;
        border: 0 !important;
        border-radius: 999px;
        background: #fc8708 !important;
        color: #ffffff !important;
        font-family: Inter, Arial, sans-serif;
        font-size: 16px;
        line-height: 1;
        font-weight: 600;
        text-decoration: none !important;
        box-shadow:
            0 1px 2px rgba(35, 30, 25, .08),
            0 3px 8px rgba(35, 30, 25, .14);
        transition:
            background-color .2s ease,
            box-shadow .2s ease,
            transform .1s ease;
    }

    .vm-hl__mobile-cta:hover,
    .vm-hl__mobile-cta:focus-visible {
        background: #e97700 !important;
        color: #ffffff !important;
        box-shadow:
            0 1px 3px rgba(35, 30, 25, .12),
            0 4px 10px rgba(35, 30, 25, .14);
        text-decoration: none !important;
    }

    .vm-hl__mobile-cta:active {
        transform: scale(.98);
    }
}


/* =========================================================
   v1.0.9 - mobiele marges, grotere kaart en smallere CTA
   ========================================================= */

@media (max-width: 767px) {
    .vm-hl {
        padding-left: 20px !important;
        padding-right: 10px !important;
        padding-top: 20px !important;
        padding-bottom: 28px !important;
    }

    .vm-hl__head {
        margin-bottom: 14px;
    }

    .vm-hl__track {
        gap: 12px;
        padding-right: 22px !important;
        padding-bottom: 8px;
        scroll-padding-right: 22px !important;
    }

    .vm-hl-card {
        flex: 0 0 calc(100% - 18px) !important;
    }

    .vm-hl__mobile-cta-wrap {
        justify-content: center !important;
        margin-top: 14px !important;
        padding-right: 0 !important;
    }

    .vm-hl__mobile-cta {
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        min-height: 40px;
        padding: 0 22px !important;
        font-size: 15px !important;
        white-space: nowrap;
    }
}


/* v1.0.10 - mobiele zijmarges */
@media (max-width: 767px) {
    .vm-hl {
        padding-left: 16px !important;
        padding-right: 8px !important;
    }
}

/* v1.0.11 - minimale gelijke mobiele zijmarge */
@media (max-width: 767px) {
    .vm-hl {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .vm-hl__track {
        gap: 10px !important;
        padding-right: 8px !important;
        scroll-padding-left: 0 !important;
        scroll-padding-right: 8px !important;
    }

    .vm-hl-card {
        flex: 0 0 calc(100% - 24px) !important;
    }

    .vm-hl__mobile-cta-wrap {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* v1.0.12 - mobiel geen zijmarges */
@media (max-width: 767px) {
    .vm-hl {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .vm-hl__track {
        padding-left: 0 !important;
        padding-right: 0 !important;
        scroll-padding-left: 0 !important;
        scroll-padding-right: 0 !important;
    }

    .vm-hl__head,
    .vm-hl__mobile-cta-wrap {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}
