/**
 * Locations Slider Styles
 *
 * Animation types: fade, slide, zoom (configurable for photos)
 * Titles, contacts: always smooth fade
 * Map: single inline SVG with interactive markers
 */

/* =========================================
   KEYFRAME ANIMATIONS
   ========================================= */

/* --- Fade (universal) --- */
@-webkit-keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@-webkit-keyframes fadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}
@keyframes fadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

/* --- Slide (photos only, direction-aware) --- */
@-webkit-keyframes slideInFromRight {
    from { opacity: 0; -webkit-transform: translateX(50px); transform: translateX(50px); }
    to   { opacity: 1; -webkit-transform: translateX(0); transform: translateX(0); }
}
@keyframes slideInFromRight {
    from { opacity: 0; transform: translateX(50px); }
    to   { opacity: 1; transform: translateX(0); }
}
@-webkit-keyframes slideOutToLeft {
    from { opacity: 1; -webkit-transform: translateX(0); transform: translateX(0); }
    to   { opacity: 0; -webkit-transform: translateX(-50px); transform: translateX(-50px); }
}
@keyframes slideOutToLeft {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(-50px); }
}
@-webkit-keyframes slideInFromLeft {
    from { opacity: 0; -webkit-transform: translateX(-50px); transform: translateX(-50px); }
    to   { opacity: 1; -webkit-transform: translateX(0); transform: translateX(0); }
}
@keyframes slideInFromLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to   { opacity: 1; transform: translateX(0); }
}
@-webkit-keyframes slideOutToRight {
    from { opacity: 1; -webkit-transform: translateX(0); transform: translateX(0); }
    to   { opacity: 0; -webkit-transform: translateX(50px); transform: translateX(50px); }
}
@keyframes slideOutToRight {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(50px); }
}

/* --- Zoom (photos only) --- */
@-webkit-keyframes zoomFadeIn {
    from { opacity: 0; -webkit-transform: scale(1.08); transform: scale(1.08); }
    to   { opacity: 1; -webkit-transform: scale(1); transform: scale(1); }
}
@keyframes zoomFadeIn {
    from { opacity: 0; transform: scale(1.08); }
    to   { opacity: 1; transform: scale(1); }
}
@-webkit-keyframes zoomFadeOut {
    from { opacity: 1; -webkit-transform: scale(1); transform: scale(1); }
    to   { opacity: 0; -webkit-transform: scale(0.94); transform: scale(0.94); }
}
@keyframes zoomFadeOut {
    from { opacity: 1; transform: scale(1); }
    to   { opacity: 0; transform: scale(0.94); }
}

/* Radar sweep on .marker-highlight foreignObject > div is driven by JS (buildRadarGradient) */

/* --- Contact column stagger entrance --- */
@-webkit-keyframes contactColIn {
    from { opacity: 0; -webkit-transform: translateY(8px); transform: translateY(8px); }
    to   { opacity: 1; -webkit-transform: translateY(0); transform: translateY(0); }
}
@keyframes contactColIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =========================================
   WRAPPER
   ========================================= */

.bew-locations {
    width: 100%;
    position: relative;
}

/* =========================================
   TOP ROW: Image + Map
   ========================================= */

.bew-locations__top {
    display: flex;
    align-items: flex-end;
    width: 100%;
    position: relative;
}

/* --- Image Column --- */

.bew-locations__image-col {
    flex: 0 0 40%;
    max-width: 40%;
    position: relative;
    z-index: 2;
}

/* --- Navigation Arrows --- */

.bew-locations__nav {
    position: absolute;
    left: 0;
    bottom: 5%;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 80px;
    margin-left: -135px;
}

.bew-locations__arrow {
    background: none !important;
    background-color: transparent !important;
    border: none;
    outline: none;
    box-shadow: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;
}

.bew-locations__arrow:hover {
    background: transparent !important;
    background-color: transparent !important;
    transform: scale(1.18);
}

.bew-locations__arrow:focus,
.bew-locations__arrow:focus-visible {
    background: transparent !important;
    background-color: transparent !important;
    outline: none;
    box-shadow: none;
}

.bew-locations__arrow:active {
    background: transparent !important;
    background-color: transparent !important;
    transform: scale(0.92);
}

.bew-locations__arrow svg {
    width: 100px;
    height: auto;
    background: transparent !important;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.bew-locations__arrow svg path {
    stroke: white;
    fill: none;
    transition: stroke 0.3s ease;
}

/* --- Image Wrap --- */

.bew-locations__image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #d0d0d0;
}

.bew-locations__photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    pointer-events: none;
    -webkit-will-change: opacity, transform;
    will-change: opacity, transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.bew-locations__photo.is-active {
    opacity: 1;
    pointer-events: auto;
}

/* Photo: Fade */
.bew-locations__photo.is-active.enter-fade {
    -webkit-animation: fadeIn 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation: fadeIn 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.bew-locations__photo.is-leaving.leave-fade {
    opacity: 1;
    -webkit-animation: fadeOut 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation: fadeOut 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Photo: Slide */
.bew-locations__photo.is-active.enter-slide-next {
    -webkit-animation: slideInFromRight 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation: slideInFromRight 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.bew-locations__photo.is-active.enter-slide-prev {
    -webkit-animation: slideInFromLeft 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation: slideInFromLeft 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.bew-locations__photo.is-leaving.leave-slide-next {
    opacity: 1;
    -webkit-animation: slideOutToLeft 0.55s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation: slideOutToLeft 0.55s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.bew-locations__photo.is-leaving.leave-slide-prev {
    opacity: 1;
    -webkit-animation: slideOutToRight 0.55s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation: slideOutToRight 0.55s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Photo: Zoom */
.bew-locations__photo.is-active.enter-zoom {
    -webkit-animation: zoomFadeIn 0.75s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation: zoomFadeIn 0.75s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.bew-locations__photo.is-leaving.leave-zoom {
    opacity: 1;
    -webkit-animation: zoomFadeOut 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation: zoomFadeOut 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* --- Header on Map --- */

.bew-locations__header {
    position: absolute;
    top: 8%;
    left: 20px;
    z-index: 5;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: #1F3566;
    margin: 0;
    background: transparent;
    pointer-events: none;
    box-sizing: border-box;
}

/* --- Map Column --- */

.bew-locations__map-col {
    flex: 1 1 60%;
    position: relative;
    z-index: 1;
    margin-top: -60px;
    padding-left: 20px;
}

/* SVG map container */
.bew-locations__map-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
}

.bew-locations__map-wrap svg {
    width: 90%;
    height: auto;
    display: block;
}

/* SVG marker interactivity */
.bew-locations__map-wrap .location-marker {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.bew-locations__map-wrap .location-marker:hover {
    opacity: 0.75;
}

.bew-locations__map-wrap .location-marker.is-active {
    opacity: 1;
}

/* Highlight: positioned via JS animation (requestAnimationFrame) */
.bew-locations__map-wrap .marker-highlight {
    /* No CSS transition needed – JS handles smooth animation */
}

/* =========================================
   BOTTOM ROW: Name + Contact
   ========================================= */

.bew-locations__bottom {
    position: relative;
    padding-top: 15px;
    max-width: 66.666%;
}

/* --- Title / Contact Wrappers (prevent overlap) --- */

.bew-locations__titles-wrap,
.bew-locations__contacts-wrap {
    position: relative;
}

/* --- Title --- */

.bew-locations__title {
    font-size: 36px;
    font-weight: 700;
    color: white;
    margin: 0 0 20px 0;
    line-height: 1.2;
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    pointer-events: none;
    will-change: opacity;
}

.bew-locations__title.is-active {
    opacity: 1;
    position: relative;
    pointer-events: auto;
}

/* Title: Always pure fade */
.bew-locations__title.is-active.enter-fade {
    -webkit-animation: fadeIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
    animation: fadeIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}
.bew-locations__title.is-leaving.leave-fade {
    opacity: 1;
    z-index: 2;
    -webkit-animation: fadeOut 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation: fadeOut 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* --- Contact Info Grid --- */

.bew-locations__contact {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 30px;
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    pointer-events: none;
    will-change: opacity;
}

.bew-locations__contact.is-active {
    opacity: 1;
    position: relative;
    pointer-events: auto;
}

/* Contact: Fade with staggered columns */
.bew-locations__contact.is-active.enter-fade {
    -webkit-animation: fadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both;
    animation: fadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both;
}
.bew-locations__contact.is-active.enter-fade .bew-locations__contact-col:nth-child(1) {
    -webkit-animation: contactColIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.16s both;
    animation: contactColIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.16s both;
}
.bew-locations__contact.is-active.enter-fade .bew-locations__contact-col:nth-child(2) {
    -webkit-animation: contactColIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.24s both;
    animation: contactColIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.24s both;
}
.bew-locations__contact.is-active.enter-fade .bew-locations__contact-col:nth-child(3) {
    -webkit-animation: contactColIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.32s both;
    animation: contactColIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.32s both;
}
.bew-locations__contact.is-leaving.leave-fade {
    opacity: 1;
    z-index: 2;
    -webkit-animation: fadeOut 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation: fadeOut 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* --- Contact Column --- */

.bew-locations__contact-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
}

.bew-locations__icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-bottom: 2px;
    color: #1a2744;
}

.bew-locations__icon svg,
.bew-locations__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.bew-locations__contact-text {
    font-size: 13px;
    line-height: 1.6;
    color: white;
    word-break: break-word;
    overflow-wrap: break-word;
}

.bew-locations__contact-text strong {
    font-weight: 700;
    display: block;
}

.bew-locations__contact-text a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.bew-locations__contact-text a:hover {
    color: #a6ce39;
    text-decoration: underline;
}

/* =========================================
   RESPONSIVE: ≤1200px
   ========================================= */

@media (max-width: 1200px) {
    .bew-locations__header {
        font-size: 2rem;
    }

    .bew-locations__image-col {
        flex: 0 0 42%;
        max-width: 42%;
    }

    .bew-locations__map-col {
        margin-top: -40px;
    }

    .bew-locations__nav {
        margin-left: -100px;
        gap: 30px;
    }

    .bew-locations__arrow svg {
        width: 60px;
    }

    .bew-locations__title {
        font-size: 30px;
    }

    .bew-locations__contact {
        gap: 0 20px;
    }

    .bew-locations__contact-text {
        font-size: 12px;
    }
}

/* =========================================
   RESPONSIVE: ≤1024px
   ========================================= */

@media (max-width: 1024px) {
    .bew-locations__header {
        font-size: 1.75rem;
        top: 5%;
        left: 16px;
    }

    .bew-locations__image-col {
        flex: 0 0 45%;
        max-width: 45%;
    }

    .bew-locations__map-col {
        margin-top: -30px;
    }

    .bew-locations__nav {
        margin-left: 0;
        left: 16px;
        bottom: 16px;
        gap: 20px;
    }

    .bew-locations__arrow svg {
        width: 40px;
    }

    .bew-locations__bottom {
        max-width: 75%;
    }
}

/* =========================================
   RESPONSIVE: ≤768px (Tablet / Mobile)
   ========================================= */

@media (max-width: 768px) {
    .bew-locations__header {
        position: relative;
        top: auto;
        left: auto;
        font-size: 1.5rem;
        padding: 16px 16px 0;
        text-align: center;
    }

    .bew-locations {
        display: grid;
        grid-template-columns: 1fr 40%;
        grid-template-rows: auto auto;
        column-gap: 16px;
    }

    .bew-locations__bottom {
        max-width: 100% !important;
    }

    .bew-locations__top {
        display: contents;
    }

    .bew-locations__map-col {
        grid-column: 1 / -1;
        grid-row: 1;
        display: block;
        width: 100%;
        max-width: 100%;
        margin-top: 0;
        padding-left: 0;
    }

    .bew-locations__map-wrap svg {
        width: 100%;
    }

    .bew-locations__image-col {
        grid-column: 2;
        grid-row: 2;
        position: relative;
        width: auto;
        max-width: 100%;
        margin-top: -40px;
        margin-right: 16px;
        z-index: 3;
        align-self: start;
    }

    .bew-locations__image-wrap {
        aspect-ratio: 3 / 4;
        box-shadow: -6px 6px 24px rgba(0, 0, 0, 0.2);
    }

    .bew-locations__nav {
        position: absolute;
        left: 50%;
        top: 0;
        bottom: 0;
        transform: translateX(-50%);
        margin-left: 0;
        gap: 0;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
        width: auto;
        pointer-events: none;
    }

    .bew-locations__arrow {
        pointer-events: auto;
        padding: 8px;
    }

    .bew-locations__arrow--prev svg,
    .bew-locations__arrow--next svg {
        transform: rotate(90deg);
    }

    .bew-locations__arrow svg {
        width: 28px;
    }

    .bew-locations__bottom {
        grid-column: 1;
        grid-row: 2;
        padding-top: 20px;
        padding-left: 16px;
        padding-right: 0;
        max-width: 100%;
        align-self: start;
    }

    .bew-locations__title {
        font-size: 26px;
        margin-bottom: 16px;
    }

    .bew-locations__contact {
        grid-template-columns: 1fr !important;
        gap: 16px 0;
    }

    .bew-locations__contact-col {
        flex-direction: row;
        align-items: flex-start;
        gap: 12px;
    }

    .bew-locations__icon {
        width: 28px;
        height: 28px;
        min-width: 28px;
        margin-bottom: 0;
        margin-top: 2px;
    }

    .bew-locations__contact-text {
        font-size: 13px;
    }
}

/* =========================================
   RESPONSIVE: ≤480px (Small Mobile)
   ========================================= */

@media (max-width: 480px) {
    .bew-locations__header {
        font-size: 1.25rem;
        padding: 12px 12px 0;
    }

    .bew-locations {
        grid-template-columns: 1fr 35%;
    }

    .bew-locations__image-col {
        margin-top: -30px;
    }

    .bew-locations__title {
        font-size: 22px;
    }

    .bew-locations__contact-text {
        font-size: 12px;
    }

    .bew-locations__contact {
        gap: 12px 0;
    }

    .bew-locations__icon {
        width: 24px;
        height: 24px;
        min-width: 24px;
    }

    .bew-locations__arrow svg {
        width: 22px;
    }
}

/* =========================================
   RESPONSIVE: ≤380px (Very Small Mobile)
   ========================================= */

@media (max-width: 380px) {
    .bew-locations__header {
        font-size: 1.1rem;
        padding: 10px 10px 0;
    }

    .bew-locations {
        grid-template-columns: 1fr 32%;
        column-gap: 12px;
    }

    .bew-locations__image-col {
        margin-top: -20px;
    }

    .bew-locations__bottom {
        padding-left: 12px;
    }

    .bew-locations__title {
        font-size: 20px;
    }

    .bew-locations__contact-text {
        font-size: 11px;
    }
}

/* =========================================
   GRID VARIANT
   ========================================= */

.bew-locations--grid {
    display: block;
}

/* Header: override absolute positioning used by slider variant */
.bew-locations--grid .bew-locations__header {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    text-align: center;
    pointer-events: auto;
    margin-bottom: 16px;
}

/* --- Map section (centered above cards) --- */

.bew-locations__map-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 40px;
}

.bew-locations__map-section .bew-locations__map-wrap {
    max-width: 60%;
    width: 100%;
    display: flex;
    justify-content: center;
}

.bew-locations__map-section .bew-locations__map-wrap svg {
    width: 100%;
    height: auto;
    display: block;
}

/* --- Cards grid --- */

.bew-locations__cards-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

/* --- Individual card (link) --- */

.bew-locations__card {
    display: block;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    background: #d0d0d0;
    -webkit-tap-highlight-color: transparent;
}

.bew-locations__card-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #d0d0d0;
}

.bew-locations__card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.bew-locations__card:hover .bew-locations__card-image img {
    transform: scale(1.05);
}

/* Angled badge at bottom-left */
.bew-locations__card-label {
    position: absolute;
    bottom: 0;
    left: 0;
    background-color: #1F3566;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 9px 30px 9px 14px;
    -webkit-clip-path: polygon(0 0, 100% 0, calc(100% - 20px) 100%, 0 100%);
    clip-path: polygon(0 0, 100% 0, calc(100% - 20px) 100%, 0 100%);
    white-space: nowrap;
    line-height: 1.2;
}

/* =========================================
   GRID VARIANT RESPONSIVE: ≤1024px
   ========================================= */

@media (max-width: 1024px) {
    .bew-locations__map-section .bew-locations__map-wrap {
        max-width: 70%;
    }
}

/* =========================================
   GRID VARIANT RESPONSIVE: ≤768px
   ========================================= */

@media (max-width: 768px) {
    .bew-locations__map-section .bew-locations__map-wrap {
        max-width: 85%;
    }

    .bew-locations__cards-grid {
        gap: 12px;
    }
}

/* =========================================
   GRID VARIANT RESPONSIVE: ≤480px
   ========================================= */

@media (max-width: 480px) {
    .bew-locations__map-section .bew-locations__map-wrap {
        max-width: 100%;
    }

    .bew-locations__cards-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    .bew-locations__card-label {
        font-size: 12px;
        padding: 8px 24px 8px 12px;
    }
}
