/* Locations VC element — styling toevoegen.
   Hergebruikt tt-page-surface (beige bg + decoratieve shapes) en
   tt-course-page__title / tt-course-page__subtitle uit general/course.css. */

.locations {
    padding-bottom: 198px;
}

.locations .divider_curves {
    color: var(--beige, #fdefda);
}

.locations .tt-course-page__title {
    font-size: 52px;
    line-height: 60px;
    margin-bottom: 5px;
}

.locations .tt-course-page__subtitle {
    font-size: 20px;
    line-height: 36px;
    margin-bottom: 24px;
}

.locations .locations__text,
.locations .locations__text p {
    font-size: 16px;
    line-height: 28px;
}

.locations .locations__text {
    margin-bottom: 53px;
}

.locations__text a {
    color: var(--pink);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}

.locations__text a:hover {
    text-decoration: underline;
}

.locations__previews {
    margin-bottom: 75px;
}

.locations .locations__previews-title {
    font-size: 28px;
    line-height: 36px;
    font-weight: 700;
    margin: 0 0 30px;
}

.locations__previews-carousel {
    position: relative;
}

.locations__previews-viewport {
    /* Vaste 1050px (5 × 170 + 4 × 50) op groot scherm; daaronder vloeiend
       meeschalen, maar nooit breder dan de ruimte tussen de pijltjes
       (120px gereserveerd) zodat de thumbnails er niet overheen vallen. */
    width: 100%;
    max-width: min(1050px, calc(100% - 150px));
    margin: 0 auto;
    overflow-x: clip;
    overflow-y: visible;
}

.locations__previews-list {
    --lp-gap: 50px;
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: var(--lp-gap);
    transition: transform 0.3s ease;
    will-change: transform;
}

.locations__previews-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 39px;
    padding: 0;
    background: transparent;
    border: 0;
    color: var(--orange);
    cursor: pointer;
    z-index: 2;
    transition: opacity 0.2s ease;
    -webkit-user-select: none;
    user-select: none;
}

.locations__previews-nav[aria-disabled="true"] {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

.locations__previews-nav:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 4px;
}

.locations__previews-nav--prev {
    left: 30px;
}

.locations__previews-nav--next {
    right: 30px;
    transform: translateY(-50%) scaleX(-1);
}

.locations__previews-nav svg {
    display: block;
    width: 100%;
    height: 100%;
}

.locations__previews-dots {
    list-style: none;
    margin: 50px 0 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.locations__previews-dots > li {
    display: block;
    line-height: 0;
}

.locations__previews-dot {
    display: block;
    width: 8px;
    height: 8px;
    background: var(--orange, #F3950B);
    border-radius: 30px;
    cursor: pointer;
    transition: width 0.3s ease;
    -webkit-user-select: none;
    user-select: none;
}

.locations__previews-dot[aria-current="true"] {
    width: 20px;
}

.locations__previews-dot:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 4px;
}

.locations__previews-item {
    position: relative;
    /* 5 per regel: (100% − 4 tussenruimtes) / 5. Schaalt mee met de viewport. */
    flex: 0 0 calc((100% - 4 * var(--lp-gap)) / 5);
    max-width: calc((100% - 4 * var(--lp-gap)) / 5);
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.locations__previews-name {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-block;
    text-align: center;
    white-space: nowrap;
    font-size: 18px;
    line-height: 27px;
    font-weight: 700;
    background: #fff;
    border-radius: 15px;
    padding: 12px;
}

.locations__previews-image {
    display: block;
    /* Vult het (vloeiende) item; border valt binnen de breedte. Op groot
       scherm is het item 170px → 142px binnenmaat, identiek aan voorheen. */
    box-sizing: border-box;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: 14px solid var(--blue, #1A75BB);
    border-radius: 50%;
}

/* 768–991px: 2 thumbnails per regel (JS zet visible=2, bullets passen mee aan). */
@media (max-width: 991px) {
    .locations__previews-item {
        flex-basis: calc((100% - var(--lp-gap)) / 2);
        max-width: calc((100% - var(--lp-gap)) / 2);
    }
}

/* ≤767px: 1 thumbnail per regel, gecentreerd en begrensd zodat hij niet
   te groot wordt (JS zet visible=1, bullets passen mee aan). */
@media (max-width: 767px) {
    .locations {
        padding-top: 14px;
    }

    /* Breadcrumbs + titel + ondertitel gecentreerd, specifiek voor dit element. */
    .locations .tt-course-page__breadcrumbs {
        margin-bottom: 32px;
    }

    .locations .tt-course-page__breadcrumbs .tt-breadcrumbs__list {
        justify-content: center;
    }

    .locations .tt-course-page__title {
        text-align: center;
        font-size: 34px;
        line-height: 41px;
        margin-bottom: 19px;
    }

    .locations .tt-course-page__subtitle {
        text-align: center;
        font-size: 16px;
        line-height: 26px;
        margin-bottom: 28px;
    }

    .locations .locations__text {
        text-align: center;
        margin-bottom: 47px;
    }

    .locations .locations__previews-title {
        font-size: 20px;
        line-height: 29px;
        text-align: center;
        margin-bottom: 22px;
    }

    .locations__previews-item {
        flex-basis: 100%;
        max-width: 100%;
    }

    /* Pijltjes tegen de zijkanten. */
    .locations__previews-nav--prev {
        left: 0;
    }

    .locations__previews-nav--next {
        right: 0;
    }

    .locations__item {
        padding-bottom: 32px;
    }

    /* Primaire knop full width, telefoonnummer eronder gecentreerd. */
    .locations__item-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .locations__item-button--primary {
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
        text-align: center;
    }

    .locations__item-button--secondary {
        align-self: center;
        text-align: center;
    }

    /* Vaste thumbnail: 142×142 binnenmaat + 15px border erbovenop (content-box
       → totaal 172×172), gecentreerd in het volle-breedte item. */
    .locations__previews-image {
        box-sizing: content-box;
        width: 142px;
        height: 142px;
        max-width: none;
        border-width: 15px;
        margin-left: auto;
        margin-right: auto;
    }
}

.locations__list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 960px) {
    .locations__list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .locations__list {
        grid-template-columns: 1fr;
    }
}

.locations__item {
    background: #fff;
    border-radius: 15px;
    padding: 24px;
}

.locations__item-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.locations__item-icon {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--lighter-green, #DDF1E1);
    color: var(--green, #1FA238);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.locations__item-icon svg {
    max-width: 30px;
    max-height: 30px;
    width: auto;
    height: auto;
}

.locations .locations__item-name {
    font-size: 25px;
    line-height: 36px;
    font-weight: 700;
    margin: 0;
}

.locations__item-map-link {
    position: relative;
    display: block;
    margin-bottom: 24px;
}

.locations__item-map {
    display: block;
    max-width: 100%;
    height: auto;
}

.locations__item-map-overlay {
    position: absolute;
    top: 12px;
    left: 12px;
    min-width: 200px;
    max-width: calc(100% - 24px);
    background: #fff;
    border-radius: 4px;
    padding: 10px 14px;
    box-shadow: 0 2px 8px rgba(10, 38, 54, 0.18);
    pointer-events: none; /* klikken vallen door naar de <a> */
}

.locations__item-map-overlay-heading {
    font-size: 13px;
    line-height: 18px;
    font-weight: 700;
    color: var(--font-color);
}

.locations__item-map-overlay-address {
    font-size: 10px;
    line-height: 13px;
    color: var(--font-color);
    opacity: 0.75;
    margin-top: 2px;
}

.locations .locations__item-description,
.locations .locations__item-description p {
    font-size: 14px;
    line-height: 23px;
}

.locations .locations__item-description strong {
    font-size: 16px;
    line-height: 28px;
}

.locations__item-description {
    margin-bottom: 24px;
}

.locations__item-description > *:last-child,
.locations__item-description p:last-child {
    margin-bottom: 0;
}

.locations__item-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
}

.locations__item-button--secondary {
    color: var(--font-color);
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    transition: color 0.3s ease;
}

.locations__item-button--secondary:hover {
    color: var(--pink);
    text-decoration: none;
}
