/* ========================================================================== */
/* Safari Connect Hub — Homepage v1.10.391 final compatibility layer       */
/* Loads after legacy homepage refinements so the approved current homepage   */
/* wins without changing Traveler or marketplace business logic.              */
/* ========================================================================== */

/* -------------------------------------------------------------------------- */
/* Canonical Tour cards: four desktop slots, no homepage-only card distortion. */
/* -------------------------------------------------------------------------- */
body.home .tmc-home-tours__grid,
body.home .tmc-home-tours__grid--count-4{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    max-width:none!important;
}
body.home .tmc-home-tours__grid--count-3{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    max-width:1020px!important;
}
body.home .tmc-home-tours__grid--count-2{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    max-width:800px!important;
}
body.home .tmc-home-tours__grid--count-1{
    grid-template-columns:minmax(0,390px)!important;
    max-width:390px!important;
}
body.home .tmc-home-tours__item,
body.home .tmc-home-tours__item>.tmc-tour-card{
    min-width:0!important;
    width:100%!important;
}

/* -------------------------------------------------------------------------- */
/* Featured Safari Operators — approved image-led homepage card.              */
/* -------------------------------------------------------------------------- */
body.home .tod-featured-operators--homepage{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    max-width:1240px!important;
    padding:66px 32px 72px!important;
    position:relative!important;
}
body.home .tod-featured-operators--homepage .tod-home-featured-heading{
    grid-column:1!important;
    grid-row:1!important;
    margin:0 0 28px!important;
    max-width:760px!important;
}
body.home .tod-featured-operators--homepage .tod-home-featured-heading__eyebrow{
    margin-bottom:7px!important;
}
body.home .tod-featured-operators--homepage .tod-home-featured-heading h2{
    font-size:34px!important;
    line-height:1.06!important;
}
body.home .tod-featured-operators--homepage .tod-home-featured-heading p{
    margin-top:7px!important;
}
body.home .tod-featured-operators--homepage .tod-home-featured-footer{
    align-self:end!important;
    grid-column:2!important;
    grid-row:1!important;
    margin:0 0 30px 28px!important;
    text-align:right!important;
}
body.home .tod-featured-operators--homepage .tod-home-featured-footer a{
    align-items:center!important;
    border:0!important;
    color:#0b5b43!important;
    display:inline-flex!important;
    font-size:13px!important;
    font-weight:800!important;
    gap:8px!important;
    padding:0!important;
    text-decoration:none!important;
    white-space:nowrap!important;
}
body.home .tod-featured-operator-grid--homepage,
body.home .tod-featured-operator-grid--homepage:has(> :only-child),
body.home .tod-featured-operator-grid--homepage:has(> :nth-child(2):last-child),
body.home .tod-featured-operator-grid--homepage:has(> :nth-child(3):last-child){
    display:grid!important;
    gap:18px!important;
    grid-column:1/-1!important;
    grid-row:2!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    justify-content:stretch!important;
    max-width:none!important;
    width:100%!important;
}
body.home .tod-featured-operator-grid--homepage:has(> :only-child){
    grid-template-columns:minmax(280px,330px)!important;
}
body.home .tod-featured-operator-grid--homepage:has(> :nth-child(2):last-child){
    grid-template-columns:repeat(2,minmax(280px,330px))!important;
}
body.home .tod-featured-operator-grid--homepage:has(> :nth-child(3):last-child){
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    max-width:930px!important;
}
body.home .tod-featured-operator-grid--homepage > *{
    min-width:0!important;
    width:auto!important;
}
body.home .tod-home-operator-card--option3{
    background:#fff!important;
    border:1px solid #e6e8e3!important;
    border-radius:13px!important;
    box-shadow:0 8px 24px rgba(20,55,40,.08)!important;
    min-width:0!important;
    overflow:hidden!important;
    width:100%!important;
}
body.home .tod-home-operator-card--option3:hover{
    box-shadow:0 14px 30px rgba(20,55,40,.13)!important;
    transform:translateY(-2px)!important;
}
body.home .tod-home-operator-card--option3 .tod-home-operator-card__cover{
    height:156px!important;
}
body.home .tod-home-operator-card__featured{
    background:#fff8e8!important;
    border:1px solid rgba(190,142,40,.35)!important;
    border-radius:999px!important;
    color:#805f18!important;
    font-size:9px!important;
    font-weight:800!important;
    padding:6px 8px!important;
    right:10px!important;
    top:10px!important;
}
body.home .tod-home-operator-card--option3 .tod-home-operator-card__body{
    align-items:flex-start!important;
    padding:0 14px 14px!important;
    text-align:left!important;
}
body.home .tod-home-operator-card--option3 .tod-home-operator-card__avatar{
    border-width:3px!important;
    height:62px!important;
    margin:-31px 0 0!important;
    width:62px!important;
}
body.home .tod-home-operator-card--option3 .tod-home-operator-card__name{
    font-family:var(--asc-font-heading,"Barlow Condensed","Arial Narrow",Arial,sans-serif)!important;
    font-size:18px!important;
    font-weight:700!important;
    justify-content:flex-start!important;
    line-height:1.12!important;
    margin:9px 0 3px!important;
    text-align:left!important;
    width:100%!important;
}
body.home .tod-home-operator-card--option3 .tod-home-operator-card__verified{
    flex-basis:17px!important;
    height:17px!important;
    width:17px!important;
}
body.home .tod-home-operator-card--option3 .tod-home-operator-card__tagline{
    color:#68766f!important;
    font-size:11px!important;
    line-height:1.35!important;
    margin:0 0 8px!important;
    max-width:100%!important;
    min-height:0!important;
    text-align:left!important;
    -webkit-line-clamp:1!important;
}
body.home .tod-home-operator-card--option3 .tod-home-operator-card__meta,
body.home .tod-home-operator-card--option3 .tod-home-operator-card__meta.no-rating{
    align-items:center!important;
    border:0!important;
    display:flex!important;
    flex-wrap:wrap!important;
    gap:5px 12px!important;
    margin:0 0 12px!important;
    width:100%!important;
}
body.home .tod-home-operator-card--option3 .tod-home-operator-card__meta-item{
    border:0!important;
    color:#59665f!important;
    font-size:10.5px!important;
    justify-content:flex-start!important;
    min-height:0!important;
    padding:0!important;
}
body.home .tod-home-operator-card--option3 .tod-home-operator-card__meta-item i{
    color:#0b6a4e!important;
    font-size:11px!important;
}
/* The approved homepage card shows service area + reviews; Tour count is not a visual priority. */
body.home .tod-home-operator-card--option3 .tod-home-operator-card__meta-item:has(.fa-binoculars){
    display:none!important;
}
body.home .tod-home-operator-card--option3 .tod-home-operator-card__meta-rating{
    border:0!important;
    min-height:0!important;
}
body.home .tod-home-operator-card--option3 .tod-home-operator-card__meta-rating i{
    color:#ef9f18!important;
}
body.home .tod-home-operator-card--option3 .tod-home-operator-card__cta{
    background:#076247!important;
    border:1px solid #076247!important;
    border-radius:6px!important;
    color:#fff!important;
    font-size:12px!important;
    font-weight:800!important;
    gap:8px!important;
    justify-content:center!important;
    margin-top:auto!important;
    min-height:40px!important;
    padding:0 12px!important;
    width:100%!important;
}
body.home .tod-home-operator-card--option3 .tod-home-operator-card__cta:hover{
    background:#064d39!important;
    border-color:#064d39!important;
    color:#fff!important;
}
body.home .tod-home-operator-card--option3 .tod-home-operator-card__cta span:last-child{
    font-size:15px!important;
}
body.home .tmc-home-operator-carousel-controls{
    display:none;
}

/* -------------------------------------------------------------------------- */
/* Tablet                                                                     */
/* -------------------------------------------------------------------------- */
@media(max-width:1100px){
    body.home .tmc-home-tours__grid,
    body.home .tmc-home-tours__grid--count-3,
    body.home .tmc-home-tours__grid--count-4{
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
        max-width:none!important;
    }
    body.home .tod-featured-operator-grid--homepage,
    body.home .tod-featured-operator-grid--homepage:has(> :only-child),
    body.home .tod-featured-operator-grid--homepage:has(> :nth-child(2):last-child),
    body.home .tod-featured-operator-grid--homepage:has(> :nth-child(3):last-child){
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
        max-width:none!important;
    }
}

/* -------------------------------------------------------------------------- */
/* Mobile: operator cards become a deliberate swipe rail, not tiny grid cards. */
/* -------------------------------------------------------------------------- */
@media(max-width:767px){
    body.home .tmc-home-tours__grid,
    body.home .tmc-home-tours__grid--count-1,
    body.home .tmc-home-tours__grid--count-2,
    body.home .tmc-home-tours__grid--count-3,
    body.home .tmc-home-tours__grid--count-4{
        grid-template-columns:1fr!important;
        max-width:none!important;
    }
    body.home .tod-featured-operators--homepage,
    body.home .tod-featured-operators--homepage:has(.tod-featured-operator-grid--homepage > :only-child){
        display:block!important;
        padding:52px 18px 56px!important;
    }
    body.home .tod-featured-operators--homepage .tod-home-featured-heading{
        margin:0 0 20px!important;
        max-width:none!important;
    }
    body.home .tod-featured-operators--homepage .tod-home-featured-heading h2{
        font-size:30px!important;
    }
    body.home .tod-featured-operators--homepage .tod-home-featured-heading p{
        font-size:14px!important;
        line-height:1.55!important;
    }
    body.home .tod-featured-operators--homepage .tod-home-featured-footer{
        margin:20px 0 0!important;
        text-align:left!important;
    }
    body.home .tod-featured-operator-grid--homepage,
    body.home .tod-featured-operator-grid--homepage:has(> :only-child),
    body.home .tod-featured-operator-grid--homepage:has(> :nth-child(2):last-child),
    body.home .tod-featured-operator-grid--homepage:has(> :nth-child(3):last-child){
        display:flex!important;
        gap:14px!important;
        max-width:none!important;
        overflow-x:auto!important;
        overscroll-behavior-inline:contain!important;
        scroll-padding-inline:0!important;
        scroll-snap-type:x mandatory!important;
        scrollbar-width:none!important;
        width:100%!important;
        -webkit-overflow-scrolling:touch!important;
    }
    body.home .tod-featured-operator-grid--homepage::-webkit-scrollbar{display:none!important}
    body.home .tod-featured-operator-grid--homepage > *{
        flex:0 0 min(86vw,330px)!important;
        scroll-snap-align:start!important;
        width:min(86vw,330px)!important;
    }
    body.home .tod-featured-operator-grid--homepage:has(> :only-child) > *{
        flex-basis:100%!important;
        width:100%!important;
    }
    body.home .tod-home-operator-card--option3 .tod-home-operator-card__cover{
        height:170px!important;
    }
    body.home .tmc-home-operator-carousel-controls{
        align-items:center;
        display:flex;
        gap:12px;
        justify-content:space-between;
        margin:14px 0 0;
    }
    body.home .tmc-home-operator-carousel-button{
        align-items:center;
        background:#0b6248;
        border:0;
        border-radius:50%;
        color:#fff;
        display:inline-flex;
        flex:0 0 34px;
        font-size:22px;
        height:34px;
        justify-content:center;
        line-height:1;
        padding:0;
        width:34px;
    }
    body.home .tmc-home-operator-carousel-button:disabled{
        background:#dfe5e1;
        color:#8e9992;
        cursor:default;
    }
    body.home .tmc-home-operator-carousel-hint{
        color:#65736c;
        font-size:11px;
        font-weight:700;
    }
}
