/* =========================================================
   LEYSAM TRIP LISTING
   ========================================================= */

.leysam-trip-listing {
    width: 100%;
}


/* =========================================================
   FILTERS
   ========================================================= */

.leysam-trip-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;

    gap: 10px;

    margin: 0 0 32px;
}


.leysam-trip-filter {
    appearance: none;

    padding: 10px 18px;

    border: 1px solid #e5c6aa;
    border-radius: 999px;

    background: #ffffff;

    color: #5c4b3f;

    font-size: 14px;
    line-height: 1.2;
    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}


.leysam-trip-filter:hover {
    border-color: #e87519;

    transform: translateY(-1px);
}


.leysam-trip-filter.is-active {
    border-color: #e87519;

    background: #e87519;

    color: #ffffff;
}


/* =========================================================
   ACTIVE EXPERIENCE
   ========================================================= */

.leysam-trip-active-experience {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 18px;

    max-width: 720px;

    margin: 0 auto 30px;

    padding: 14px 18px;

    border: 1px solid #efc69f;
    border-radius: 12px;

    background: #fff6ed;

    color: #5e4b3e;

    font-size: 14px;
}


.leysam-trip-active-experience[hidden] {
    display: none !important;
}


.leysam-trip-active-experience strong {
    color: #b7500b;
}


.leysam-trip-active-experience button {
    appearance: none;

    padding: 0;

    border: 0;

    background: transparent;

    color: #b7500b;

    font: inherit;
    font-weight: 800;

    cursor: pointer;
}


/* =========================================================
   GRID
   ========================================================= */

.leysam-trip-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    /*
     * Prevent cards in the same row from stretching
     * to the height of the tallest card.
     */
    align-items: start;

    gap: 28px 24px;

    width: 100%;
}


/* =========================================================
   CARD
   ========================================================= */

.leysam-trip-card {
    display: flex;
    flex-direction: column;

    min-width: 0;

    /*
     * Card height is determined by its own content.
     * This prevents the large empty cream area.
     */
    height: auto;
    align-self: start;

    overflow: hidden;

    border: 1px solid #f1c59d;
    border-radius: 20px;

    background:
        linear-gradient(
            145deg,
            #fff5e9 0%,
            #ffead5 100%
        );

    box-shadow:
        0 8px 28px
        rgba(166, 83, 18, 0.10);
}


.leysam-trip-card[hidden] {
    display: none !important;
}


/* =========================================================
   IMAGE
   ========================================================= */

.leysam-trip-card-image {
    position: relative;

    display: block;

    width: 100%;

    aspect-ratio: 16 / 10;

    overflow: hidden;

    background: #eadfd4;

    text-decoration: none;
}


.leysam-trip-card-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform 0.4s ease;
}


.leysam-trip-card:hover
.leysam-trip-card-image img {
    transform: scale(1.025);
}


.leysam-trip-card-image-placeholder {
    display: block;

    width: 100%;
    height: 100%;

    background:
        linear-gradient(
            145deg,
            #e8ddd2,
            #d7c3b1
        );
}


/* =========================================================
   DESTINATION BADGE
   ========================================================= */

.leysam-trip-card-destination {
    position: absolute;

    top: 20px;
    left: 20px;

    display: inline-flex;
    align-items: center;

    min-height: 40px;

    padding: 8px 18px;

    border: 1px solid
        rgba(255, 255, 255, 0.55);

    border-radius: 999px;

    background: #e87519;

    box-shadow:
        0 3px 12px
        rgba(0, 0, 0, 0.12);

    color: #ffffff;

    font-size: 13px;
    line-height: 1;
    font-weight: 800;

    letter-spacing: 0.08em;

    text-transform: uppercase;
}


/* =========================================================
   CONTENT
   ========================================================= */

.leysam-trip-card-content {
    display: flex;
    flex-direction: column;

    /*
     * Do not stretch the content area vertically.
     */
    flex: 0 0 auto;

    padding: 28px 30px 30px;
}


/* =========================================================
   TITLE
   ========================================================= */

.leysam-trip-card-title {
    margin: 0 0 14px;

    font-size: 28px;
    line-height: 1.12;
    font-weight: 800;
}


.leysam-trip-card-title a {
    color: #241c17;

    text-decoration: none;
}


.leysam-trip-card-title a:hover {
    color: #b7500b;
}


/* =========================================================
   DESCRIPTION
   ========================================================= */

.leysam-trip-card-description {
    margin: -2px 0 18px;

    color: #655b54;

    font-size: 15px;
    line-height: 1.55;
}


/* =========================================================
   DURATION / ACTIVITY PILLS
   ========================================================= */

.leysam-trip-card-meta {
    display: flex;
    flex-wrap: wrap;

    gap: 10px;

    margin: 0 0 24px;
}


.leysam-trip-card-meta span {
    display: inline-flex;
    align-items: center;

    min-height: 43px;

    padding: 9px 17px;

    border: 1px solid
        rgba(198, 133, 78, 0.22);

    border-radius: 999px;

    background:
        rgba(255, 255, 255, 0.67);

    color: #514941;

    font-size: 15px;
    line-height: 1.2;
}


.leysam-trip-card-meta strong {
    margin-right: 4px;

    color: #b7500b;

    font-weight: 800;
}


/* =========================================================
   NEXT DEPARTURE
   ========================================================= */

.leysam-trip-card-departure {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    /*
     * Removed margin-top: auto.
     *
     * That was one of the causes of the huge empty
     * space when a card became taller than its content.
     */
    margin-top: 0;

    padding: 20px 0;

    border-top: 1px solid
        rgba(160, 107, 65, 0.17);

    border-bottom: 1px solid
        rgba(160, 107, 65, 0.17);
}


.leysam-trip-card-departure span {
    color: #766b63;

    font-size: 15px;
}


.leysam-trip-card-departure strong {
    color: #a7470b;

    font-size: 15px;
    font-weight: 800;

    text-align: right;

    white-space: nowrap;
}


/* =========================================================
   FOOTER
   ========================================================= */

.leysam-trip-card-footer {
    display: grid;

    /*
     * Price receives the flexible space.
     * Button receives only the width it needs.
     */
    grid-template-columns:
        minmax(120px, 1fr)
        auto;

    align-items: center;

    gap: 16px;

    width: 100%;

    padding-top: 24px;
}


/* =========================================================
   PRICE
   ========================================================= */

.leysam-trip-card-price {
    display: flex;
    flex-direction: column;

    min-width: 0;
}


.leysam-trip-card-price > span {
    display: block;

    margin-bottom: 3px;

    color: #766b63;

    font-size: 14px;
    line-height: 1.2;
}


.leysam-trip-card-price > strong {
    display: block;

    color: #b7500b;

    font-size: 29px;
    line-height: 1.05;
    font-weight: 800;

    /*
     * £1,890 / £2,500 / etc. always remain
     * on one line.
     */
    white-space: nowrap;
}


.leysam-trip-card-price small {
    display: block;

    margin-top: 4px;

    color: #766b63;

    font-size: 13px;
    line-height: 1.2;

    white-space: nowrap;
}


.leysam-trip-price-request {
    max-width: none;

    font-size: 18px !important;
    line-height: 1.2 !important;

    white-space: normal !important;
}


/* =========================================================
   VIEW TRIP BUTTON
   ========================================================= */

.leysam-trip-card-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    gap: 9px;

    min-height: 50px;

    padding: 13px 20px;

    border-radius: 999px;

    background: #e87519;

    color: #ffffff !important;

    font-size: 13px;
    line-height: 1;
    font-weight: 800;

    letter-spacing: 0.04em;

    text-decoration: none !important;

    text-transform: uppercase;

    white-space: nowrap;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}


.leysam-trip-card-link:hover {
    background: #c85f0d;

    transform: translateY(-1px);
}


.leysam-trip-card-link span {
    font-size: 17px;
}


/* =========================================================
   EMPTY STATES
   ========================================================= */

.leysam-trip-filter-empty,
.leysam-trip-listing-empty {
    margin-top: 28px;

    padding: 28px;

    border: 1px solid #f0d4ba;
    border-radius: 16px;

    background: #fff8f1;

    text-align: center;
}


.leysam-trip-filter-empty[hidden] {
    display: none !important;
}


.leysam-trip-filter-empty p,
.leysam-trip-listing-empty p {
    margin: 0;

    color: #675f59;

    font-size: 16px;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1050px) {

    .leysam-trip-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        align-items: start;

        gap: 28px 22px;
    }


    .leysam-trip-card-content {
        padding:
            25px
            24px
            26px;
    }


    .leysam-trip-card-title {
        font-size: 26px;
    }


    .leysam-trip-card-footer {
        grid-template-columns:
            minmax(115px, 1fr)
            auto;

        gap: 14px;
    }


    .leysam-trip-card-link {
        padding:
            13px
            18px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .leysam-trip-filters {
        justify-content: flex-start;

        flex-wrap: nowrap;

        overflow-x: auto;

        margin-bottom: 26px;

        padding-bottom: 4px;

        scrollbar-width: none;

        -webkit-overflow-scrolling: touch;
    }


    .leysam-trip-filters::-webkit-scrollbar {
        display: none;
    }


    .leysam-trip-filter {
        flex: 0 0 auto;
    }


    .leysam-trip-active-experience {
        margin-bottom: 26px;

        padding: 13px 15px;
    }


    /* -----------------------------------------------------
       NORMAL MOBILE LISTING
       ----------------------------------------------------- */

    .leysam-trip-listing--grid
    .leysam-trip-grid {
        grid-template-columns: 1fr;

        align-items: start;

        gap: 28px;
    }


    /* -----------------------------------------------------
       MOBILE CAROUSEL

       Cards sit in one horizontal row.

       86% width leaves part of the next card visible.
       ----------------------------------------------------- */

    .leysam-trip-listing--carousel
    .leysam-trip-grid {
        display: flex;

        flex-wrap: nowrap;

        align-items: flex-start;

        width: 100%;

        gap: 16px;

        overflow-x: auto;
        overflow-y: hidden;

        padding:
            4px
            14%
            18px
            0;

        scroll-snap-type: x mandatory;
        scroll-padding-left: 0;

        scrollbar-width: none;

        -webkit-overflow-scrolling: touch;

        overscroll-behavior-inline: contain;
    }


    .leysam-trip-listing--carousel
    .leysam-trip-grid::-webkit-scrollbar {
        display: none;
    }


    .leysam-trip-listing--carousel
    .leysam-trip-card {
        flex:
            0
            0
            86%;

        width: 86%;
        min-width: 86%;

        /*
         * Critical:
         * each carousel card now uses its own natural
         * height instead of matching another card.
         */
        height: auto;

        align-self: flex-start;

        scroll-snap-align: start;
        scroll-snap-stop: always;
    }


    .leysam-trip-card {
        border-radius: 19px;
    }


    .leysam-trip-card-image {
        aspect-ratio: 16 / 10;
    }


    .leysam-trip-card-destination {
        top: 20px;
        left: 20px;

        min-height: 40px;

        padding: 8px 18px;

        font-size: 13px;
    }


    .leysam-trip-card-content {
        flex: 0 0 auto;

        padding:
            28px
            30px
            28px;
    }


    .leysam-trip-card-title {
        margin-bottom: 17px;

        font-size: 30px;
        line-height: 1.1;
    }


    .leysam-trip-card-description {
        margin-bottom: 20px;

        font-size: 16px;
        line-height: 1.55;
    }


    .leysam-trip-card-meta {
        margin-bottom: 24px;
    }


    .leysam-trip-card-meta span {
        min-height: 44px;

        padding: 10px 18px;

        font-size: 16px;
    }


    .leysam-trip-card-departure {
        margin-top: 0;

        padding: 20px 0;
    }


    .leysam-trip-card-departure span,
    .leysam-trip-card-departure strong {
        font-size: 15px;
    }


    /*
     * Two-column footer:
     *
     * £1,890        VIEW TRIP →
     *
     * The first column expands while the button
     * only takes the space it needs.
     */

    .leysam-trip-card-footer {
        grid-template-columns:
            minmax(125px, 1fr)
            auto;

        align-items: center;

        gap: 14px;

        padding-top: 24px;
    }


    .leysam-trip-card-price > strong {
        font-size: 30px;

        white-space: nowrap;
    }


    .leysam-trip-card-link {
        min-height: 50px;

        padding:
            13px
            18px;

        font-size: 12px;
    }

}


/* =========================================================
   SMALL PHONES
   ========================================================= */

@media (max-width: 430px) {

    .leysam-trip-listing--grid
    .leysam-trip-grid {
        gap: 28px;
    }


    /*
     * Slightly wider card on very small screens.
     * The next card still peeks into view.
     */

    .leysam-trip-listing--carousel
    .leysam-trip-card {
        flex:
            0
            0
            88%;

        width: 88%;
        min-width: 88%;
    }


    .leysam-trip-listing--carousel
    .leysam-trip-grid {
        padding-right: 12%;
    }


    .leysam-trip-card-content {
        padding:
            24px
            20px
            25px;
    }


    .leysam-trip-card-title {
        font-size: 27px;
    }


    .leysam-trip-card-footer {
        grid-template-columns:
            minmax(115px, 1fr)
            auto;

        gap: 12px;

        align-items: center;
    }


    .leysam-trip-card-price > strong {
        font-size: 28px;

        white-space: nowrap;
    }


    .leysam-trip-card-link {
        min-height: 48px;

        padding:
            12px
            16px;

        font-size: 11px;
    }

}


/* =========================================================
   VERY SMALL PHONES
   ========================================================= */

@media (max-width: 360px) {

    .leysam-trip-card-content {
        padding:
            22px
            18px
            23px;
    }


    .leysam-trip-card-footer {
        grid-template-columns:
            minmax(105px, 1fr)
            auto;

        gap: 9px;
    }


    .leysam-trip-card-price > strong {
        font-size: 26px;
    }


    .leysam-trip-card-link {
        padding:
            11px
            13px;

        font-size: 10px;
    }

}