/* =================================================================
 * Venetes - Hebergement Carousel
 * Beekom Studio - https://beekom.fr
 * ================================================================= */

.venetes-widget {
    --venetes-slot-width: 200px;
    --venetes-mobile-card-width: 280px;
    --venetes-card-gap: 4px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.venetes-widget *,
.venetes-widget *::before,
.venetes-widget *::after {
    box-sizing: border-box;
}

/* ---------------- Title ---------------- */
.venetes-title-wrap {
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.venetes-title {
    margin: 0 0 24px 0;
}

/* ---------------- Layout ---------------- */
.venetes-content {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 32px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.venetes-left {
    flex: 0 0 25%;
    max-width: 25%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.venetes-right {
    flex: 1 1 0;
    min-width: 0;
    max-width: 100%;
    display: flex;
    flex-direction: column;
}

.venetes-description {
    margin: 0 0 24px 0;
}

.venetes-cta {
    display: inline-block;
    align-self: flex-start;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

/* ---------------- Carousel ---------------- */
.venetes-carousel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    position: relative;
}

.venetes-track {
    width: max-content;
    display: flex;
    flex-direction: row;
    gap: var(--venetes-card-gap);
    transform: translate3d(var(--venetes-offset, 0px), 0, 0);
    transition: transform 0.55s cubic-bezier(0.4, 0.0, 0.2, 1);
    will-change: transform;
}

/* ---------------- Card (desktop) ---------------- */
.venetes-card {
    position: relative;
    flex-shrink: 0;
    width: var(--venetes-slot-width);
    height: 520px;
    overflow: hidden;
    cursor: pointer;
    transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.venetes-card.is-active {
    width: calc(var(--venetes-slot-width) * 2 + var(--venetes-card-gap));
    cursor: default;
}

.venetes-card-link {
    display: block;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.venetes-card-image {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.venetes-card-image img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center center;
    display: block;
    transform: scale(1.08);
    transform-origin: center center;
    transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.venetes-card.is-active .venetes-card-image img {
    transform: scale(1);
}

.venetes-card-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    transition: background 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.venetes-card-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 60px 18px 28px;
    background-image: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.35) 45%,
        rgba(0, 0, 0, 0) 100%
    );
    pointer-events: none;
}

.venetes-card-name {
    margin: 0;
}

/* Desktop: details collapsed by default, expand with stagger when active */
.venetes-card-content .venetes-card-details {
    margin: 0;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(10px);
    transition:
        max-height 0.65s cubic-bezier(0.22, 1, 0.36, 1),
        margin-top 0.5s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.45s ease 0.25s,
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.25s;
}

.venetes-card.is-active .venetes-card-content .venetes-card-details {
    max-height: 8em;
    margin-top: 8px;
    opacity: 1;
    transform: translateY(0);
}

.venetes-card.is-active .venetes-card-image::after {
    background: rgba(0, 0, 0, 0.18);
}

/* ---------------- Navigation arrows ---------------- */
.venetes-nav {
    display: flex;
    align-items: center;
    margin-top: 20px;
    width: 100%;
}

.venetes-nav--split {
    justify-content: space-between;
}

.venetes-nav--center,
.venetes-nav.is-grouped {
    justify-content: center;
    gap: 24px;
}

.venetes-nav--right {
    justify-content: flex-end;
}

.venetes-nav--left {
    justify-content: flex-start;
}

.venetes-arrow {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-color: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding: 8px;
    margin: 0;
    cursor: pointer;
    color: inherit;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease, color 0.2s ease;
    border-radius: 0;
}

.venetes-arrow:hover,
.venetes-arrow:focus,
.venetes-arrow:focus-visible,
.venetes-arrow:active {
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    border-color: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

.venetes-arrow:hover {
    opacity: 0.8;
}

.venetes-arrow.is-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.venetes-arrow svg {
    width: 22px;
    height: 22px;
    display: block;
}

.venetes-arrow i {
    font-size: 22px;
}

/* =================================================================
 *  TABLET (<= 1024px) — layout stacks, but cards keep desktop overlay
 * ================================================================= */
@media (max-width: 1099px) {
    .venetes-content {
        flex-direction: column;
        gap: 20px;
    }

    .venetes-left,
    .venetes-right {
        flex: 1 1 auto;
        max-width: 100%;
    }

    .venetes-title-wrap {
        justify-content: flex-start;
    }
}

/* =================================================================
 *  MOBILE (<= 767px) — 1 card + peek, text BELOW photo (in flow)
 * ================================================================= */
@media (max-width: 767px) {
    /* Carousel: clip horizontally (hide off-screen cards) but allow vertical overflow (card-content below image) */
    .venetes-widget,
    .venetes-carousel {
        overflow-x: clip !important;
        overflow-y: visible !important;
    }

    /* Nav arrows: push down to clear the card-content that overflows visually below the carousel.
       Carousel's layout height = image only (content overflows but doesn't grow parent),
       so nav needs extra margin to land BELOW the overflowed content. */
    .venetes-nav {
        margin-top: 115px !important;
    }

    .venetes-track {
        gap: 12px;
        transition: transform 0.45s cubic-bezier(0.4, 0.0, 0.2, 1);
    }

    /* Card becomes a simple block, image and content stack naturally */
    .venetes-card,
    .venetes-card.is-active {
        width: var(--venetes-mobile-card-width);
        height: auto;
        overflow: visible;
        cursor: grab;
    }

    /* Link auto-sizes to its content (the image) */
    .venetes-card-link {
        display: block;
        width: 100%;
        height: auto;
    }

    /* Image: in-flow, fills card width with 3:4 portrait ratio, capped at 55vh on mobile */
    .venetes-card-image {
        position: relative;
        inset: auto;
        width: 100%;
        aspect-ratio: 3 / 4;
        max-height: 55vh;
    }

    .venetes-card-image img,
    .venetes-card.is-active .venetes-card-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover;
        transform: scale(1);
    }

    /* No overlay tint on mobile photo */
    .venetes-card-image::after {
        display: none;
    }

    /* Reposition card-content: from absolute overlay to static in-flow below image */
    .venetes-card-content {
        position: static !important;
        display: block !important;
        padding: 16px 0 0 0 !important;
        background-image: none !important;
        background: transparent !important;
        z-index: auto !important;
        pointer-events: auto !important;
        opacity: 1 !important;
        visibility: visible !important;
        overflow: visible !important;
        max-height: none !important;
        transform: none !important;
        clip-path: none !important;
        filter: none !important;
    }

    /* Nuclear reset on the name h3 — hardcoded values, no inheritance, no theme cascade */
    .venetes-card-content .venetes-card-name,
    .venetes-card.is-active .venetes-card-content .venetes-card-name,
    .venetes-card:not(.is-active) .venetes-card-content .venetes-card-name {
        position: static !important;
        display: block !important;
        font-size: 18px !important;
        font-weight: 600 !important;
        line-height: 1.3 !important;
        color: #1a1a1a !important;
        -webkit-text-fill-color: #1a1a1a !important;
        -webkit-background-clip: border-box !important;
        background-clip: border-box !important;
        margin: 0 !important;
        padding: 0 !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        max-height: none !important;
        overflow: visible !important;
        text-decoration: none !important;
        text-indent: 0 !important;
        clip-path: none !important;
        filter: none !important;
        background: transparent !important;
        text-shadow: none !important;
    }

    /* Nuclear reset on the details p — hardcoded values, no inheritance */
    .venetes-card-content .venetes-card-details,
    .venetes-card.is-active .venetes-card-content .venetes-card-details,
    .venetes-card:not(.is-active) .venetes-card-content .venetes-card-details {
        position: static !important;
        display: block !important;
        font-size: 14px !important;
        font-weight: 400 !important;
        line-height: 1.4 !important;
        color: #555555 !important;
        -webkit-text-fill-color: #555555 !important;
        -webkit-background-clip: border-box !important;
        background-clip: border-box !important;
        margin: 4px 0 0 0 !important;
        padding: 0 !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        max-height: none !important;
        overflow: visible !important;
        text-decoration: none !important;
        text-indent: 0 !important;
        clip-path: none !important;
        filter: none !important;
        background: transparent !important;
        text-shadow: none !important;
    }

    /* Link wrapper must not block its children visually */
    .venetes-card-link {
        color: #1a1a1a !important;
        -webkit-text-fill-color: #1a1a1a !important;
        -webkit-background-clip: border-box !important;
        background-clip: border-box !important;
        text-decoration: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        overflow: visible !important;
    }
}

/* =================================================================
 *  Editor preview
 * ================================================================= */
.elementor-editor-active .venetes-card,
.elementor-editor-active .venetes-track {
    transition: none;
}
