/*
 * Tablet landscape — iPad / Android tablet rotated (~768–1366 × 560–900).
 * Phones in landscape are excluded via min-height: 560px.
 */

@media (orientation: landscape) and (min-width: 768px) and (max-width: 1366px) and (min-height: 560px) and (max-height: 900px) {
    /* ------------------------------------------------------------------ */
    /* Header — collapse three tall rows so content fits the short viewport */
    /* ------------------------------------------------------------------ */

    .tourbin-promo-topbar__inner {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 10px;
        height: 32px;
        min-height: 32px;
        padding: 0 14px;
    }

    .tourbin-promo-topbar__text {
        flex: 0 1 auto;
        min-width: 0;
        font-size: 12px;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .tourbin-promo-topbar__cta {
        flex: 0 0 auto;
        height: 26px;
        min-height: 26px;
        padding: 2px 12px;
        font-size: 12px;
    }

    .tourbin-contact-nav-row__inner {
        height: 40px;
        min-height: 40px;
        padding-block: 0;
        flex-wrap: nowrap;
        gap: 10px;
    }

    .tourbin-contact-nav-row__logo {
        width: 72px;
        height: 16px;
    }

    .tourbin-contact-nav-row__phones {
        gap: 10px;
        font-size: 12px;
    }

    .tourbin-contact-nav-row__phone {
        min-height: 32px;
    }

    .tourbin-contact-nav-row__support-label {
        font-size: 11px;
    }

    .tourbin-header-main {
        flex-wrap: nowrap;
        height: 48px;
        min-height: 48px;
        padding-top: 4px;
        padding-bottom: 4px;
        align-items: center;
        justify-content: space-between;
        overflow: visible;
    }

    .tourbin-header-main__utilities {
        width: auto;
        flex: 0 0 auto;
        justify-content: flex-start;
        gap: 8px;
        margin-inline-start: 0;
    }

    .tourbin-header-main__menu-toggle {
        width: 40px;
        height: 40px;
        margin-inline-start: 0;
    }

    .tourbin-header-main__offers-pill {
        width: auto;
        max-width: 160px;
        min-width: 0;
        height: 40px;
        min-height: 40px;
        padding-inline: 12px;
        font-size: 0.8125rem;
    }

    .tourbin-header-main__search-toggle {
        width: 40px;
        height: 40px;
    }

    .tourbin-header-main__search-panel {
        margin-top: 0;
    }

    .tourbin-header-main__dropdowns {
        gap: 16px;
        padding-left: 12px;
        height: auto;
    }

    .tourbin-header-dropdown__trigger {
        height: 36px;
        font-size: 13px;
    }

    /* Drawer uses short viewport — keep it scrollable, not taller than the screen */
    .tourbin-mega-menu__inner {
        max-height: calc(100vh - 8px);
        padding-block: 16px;
    }

    .tourbin-mega-menu__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }

    /* ------------------------------------------------------------------ */
    /* Hero — two columns so search stays above the fold                  */
    /* ------------------------------------------------------------------ */

    .home .tourbin-hero,
    .tourbin-hero-block .tourbin-hero,
    .tourbin-single-tour .tourbin-hero,
    .tourbin-single-post .tourbin-hero,
    .tourbin-secret-single-page .tourbin-hero {
        margin-top: 0;
        padding-bottom: 0.75rem;
    }

    .tourbin-hero__stage {
        display: grid;
        grid-template-columns: minmax(140px, 200px) minmax(0, 1fr);
        grid-template-areas:
            "mascot content"
            "mascot search"
            "crumbs crumbs"
            "cards cards";
        align-items: center;
        column-gap: 1.25rem;
        row-gap: 0.45rem;
        padding: 0.85rem 1.5rem 1rem;
    }

    .tourbin-hero__mascot-wrap,
    .tourbin-hero__wordmark,
    .tourbin-hero__content,
    .tourbin-hero__subheadline,
    .tourbin-hero__search-form,
    .tourbin-hero__crumbs,
    .tourbin-hero__cards,
    .tourbin-hero__lift {
        order: 0;
    }

    .tourbin-hero__mascot-wrap {
        grid-area: mascot;
        width: 150px;
        height: 168px;
        inset: auto;
        justify-self: center;
        align-self: end;
    }

    .home .tourbin-hero__wordmark,
    .tourbin-front-page .tourbin-hero__wordmark {
        display: none;
    }

    .tourbin-hero--single .tourbin-hero__wordmark {
        display: flex;
        grid-area: unset;
        align-items: center;
        justify-content: center;
        font-size: 1.75rem;
        text-align: center;
        width: auto;
    }

    .tourbin-hero__content {
        grid-area: content;
        max-width: none;
        width: 100%;
        text-align: right;
        justify-self: stretch;
    }

    .tourbin-hero__eyebrow,
    .tourbin-hero__headline {
        text-align: right;
        white-space: normal;
    }

    .tourbin-hero__eyebrow {
        font-size: 0.875rem;
    }

    .tourbin-hero__headline {
        font-size: 1.375rem;
    }

    .tourbin-hero__subheadline {
        display: none;
    }

    .tourbin-hero__search-form {
        grid-area: search;
        width: 100%;
        max-width: none;
        margin-inline: 0;
        min-height: 52px;
        height: auto;
    }

    .tourbin-hero__crumbs {
        grid-area: crumbs;
        max-width: 100%;
        width: 100%;
        transform: none;
        justify-self: start;
    }

    .tourbin-hero__crumbs .tourbin-breadcrumbs__list {
        font-size: 0.8125rem;
        color: #00000083;
        justify-content: flex-start;
    }

    .tourbin-hero__crumbs .tourbin-breadcrumbs__list a:hover {
        color: #131313;
    }

    .tourbin-hero__crumbs .tourbin-breadcrumbs__item--current {
        color: #131313;
        font-weight: 600;
    }

    .tourbin-hero--single .tourbin-hero__crumbs {
        position: static;
        top: auto;
        transform: none;
        left: auto;
    }

    .tourbin-hero__lift {
        display: contents;
    }

    .tourbin-hero__cards {
        grid-area: cards;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px 12px;
        row-gap: 10px;
        width: 100%;
        max-width: none;
        margin-inline: 0;
        padding: 0.35rem 0 0;
    }

    /* Single landing: stack mascot + title in the center — never split L/R */
    .tourbin-hero--single .tourbin-hero__stage {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        grid-template-columns: unset;
        grid-template-areas: none;
        column-gap: unset;
        row-gap: 0.5rem;
        padding: 0.85rem 1.25rem 1.25rem;
    }

    .tourbin-hero--single .tourbin-hero__mascot-wrap {
        grid-area: unset;
        justify-self: center;
        align-self: center;
        order: 1;
        width: 140px;
        height: 156px;
    }

    .tourbin-hero--single .tourbin-hero__wordmark {
        grid-area: unset;
        justify-self: center;
        order: 2;
    }

    .tourbin-hero--single .tourbin-hero__content {
        grid-area: unset;
        order: 2;
    }

    .tourbin-hero--single .tourbin-hero__crumbs {
        grid-area: unset;
        position: static;
        top: auto;
        left: auto;
        transform: none;
        justify-self: center;
        order: 3;
        width: max-content;
        max-width: calc(100% - 2rem);
    }

    .tourbin-hero--single .tourbin-hero__crumbs .tourbin-breadcrumbs__list {
        justify-content: center;
        text-align: center;
    }

    .tourbin-hero--single .tourbin-hero__cards {
        grid-area: unset;
        order: 4;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        width: 100%;
        max-width: none;
    }

    .tourbin-hero.is-card-active,
    .tourbin-hero--single.is-card-active,
    .tourbin-single-tour .tourbin-hero.is-card-active,
    .tourbin-single-post .tourbin-hero.is-card-active,
    .tourbin-secret-single-page .tourbin-hero.is-card-active {
        z-index: 53;
    }

    .tourbin-hero.is-card-active .tourbin-hero__mascot-wrap,
    .tourbin-hero.is-card-active .tourbin-hero__wordmark,
    .tourbin-hero.is-card-active .tourbin-hero__content,
    .tourbin-hero.is-card-active .tourbin-hero__crumbs {
        position: relative;
        inset: auto;
        transform: none;
        z-index: 27;
    }

    .tourbin-hero.is-card-active .tourbin-hero__card-unit.is-active {
        z-index: 27;
    }

    .tourbin-hero__card-unit {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        width: 100% !important;
        height: auto !important;
        transform: none !important;
        gap: 4px;
    }

    .tourbin-hero__card-unit.is-active {
        transform: none !important;
    }

    .tourbin-hero__card {
        aspect-ratio: 16 / 10;
    }

    .tourbin-hero__card-maximize {
        display: inline-flex;
        width: 1.6rem;
        height: 1.6rem;
        top: 0.35rem;
        left: 0.35rem;
        border-radius: 0.45rem;
    }

    .tourbin-hero__card-unit--video .tourbin-video-chip__expand {
        display: none;
    }

    .tourbin-hero__card-label {
        font-size: 11px;
    }

    .tourbin-single-tour__shell,
    .tourbin-single-post__shell,
    .tourbin-secret-single__shell {
        margin-top: 1.25rem;
    }

    /* ------------------------------------------------------------------ */
    /* Home sections — use the extra width, spend less height             */
    /* ------------------------------------------------------------------ */

    .tourbin-front-page > section {
        padding-block: 2rem;
    }

    .tourbin-stories-intro__stage {
        display: grid;
        grid-template-columns: minmax(0, 1.1fr) minmax(220px, 0.9fr);
        align-items: center;
        gap: 1.25rem 1.5rem;
        padding-bottom: 1.25rem;
    }

    .tourbin-stories-intro__cards {
        grid-column: 1 / -1;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        max-width: none;
        width: 100%;
        gap: 0.75rem;
    }

    .tourbin-stories-intro__mascot-wrap {
        width: min(180px, 100%);
        margin-inline: auto;
    }

    .tourbin-tour-carousel__filters,
    .tourbin-tour-archive__destinations:not(.is-collapsible)
        .tourbin-tour-archive__filters.tourbin-tour-carousel__filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        padding-inline: 0.5rem;
        margin-block-end: 1.25rem;
    }

    .tourbin-tour-archive__destinations.is-collapsible
        .tourbin-tour-archive__filters.tourbin-tour-carousel__filters {
        flex-wrap: wrap;
        overflow: hidden;
        padding-inline: 0;
        margin-block-end: 0;
    }

    .tourbin-tour-carousel__filters::-webkit-scrollbar,
    .tourbin-tour-archive__destinations:not(.is-collapsible)
        .tourbin-tour-archive__filters.tourbin-tour-carousel__filters::-webkit-scrollbar {
        display: none;
    }

    .tourbin-tour-carousel__item,
    .tourbin-tour-slide {
        flex-basis: min(280px, 38vw);
        width: min(280px, 38vw);
        height: 300px;
    }

    .tourbin-secrets-row__item {
        flex-basis: min(380px, 46vw);
        width: min(380px, 46vw);
    }

    .tourbin-secrets-row__item .tourbin-secret-card {
        height: 420px;
        min-height: 420px;
        max-width: none;
    }

    .tourbin-discover__hero {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }

    /* ------------------------------------------------------------------ */
    /* Archives / listing                                                 */
    /* ------------------------------------------------------------------ */

    .tourbin-tour-archive__filter-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .tourbin-tour-archive__filter-bar::-webkit-scrollbar {
        display: none;
    }

    .tourbin-tour-archive__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
    }

    .tourbin-content-page--blog .tourbin-blog-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tourbin-content-page--blog
        .tourbin-blog-grid
        > :last-child:nth-child(3n + 1):nth-last-child(1) {
        grid-column: auto;
        max-width: none;
    }

    /* ------------------------------------------------------------------ */
    /* Inner pages — keep two columns on landscape width                  */
    /* ------------------------------------------------------------------ */

    /* Sidebar is first in DOM (RTL right). Keep it the narrow column. */
    .tourbin-single-tour__layout,
    .tourbin-secret-single__layout {
        grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1.4fr);
        gap: 1.25rem;
    }

    .tourbin-contact-panel__grid {
        grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
    }

    .tourbin-contact-nav-apps {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .tourbin-contact-nav-apps__list {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        width: 100%;
    }

    .tourbin-contact-map-stage,
    .tourbin-content-page--contact .tourbin-contact-map-stage {
        max-height: min(42vh, 340px);
    }

    .tourbin-content-page--about .tourbin-about__highlights-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tourbin-content-page--about .tourbin-about__team-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    /* ------------------------------------------------------------------ */
    /* Footer CTA — card layout, no desktop slide-in over the columns     */
    /* ------------------------------------------------------------------ */

    .tourbin-footer {
        --tourbin-footer-progress: 1;
    }

    .tourbin-footer__cta {
        margin-bottom: 0;
        padding: 12px 16px 8px;
    }

    .tourbin-footer__cta-stage {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        max-width: min(100% - 2rem, 920px);
        gap: 12px;
    }

    .tourbin-footer__cta-panel--yellow,
    .tourbin-footer__cta-panel--teal {
        flex: 1 1 0;
        width: auto;
        min-width: 0;
        transform: none;
    }

    .tourbin-footer__main {
        padding-top: 72px;
    }
}

/* iPad-class width still uses the hamburger; keep utilities on one row. */
@media (orientation: landscape) and (min-width: 768px) and (max-width: 1024px) and (min-height: 560px) and (max-height: 900px) {
    .tourbin-contact-nav-row__nav-list {
        display: none;
    }

    .tourbin-header-main__dropdowns {
        display: none;
    }

    .tourbin-header-main__menu-toggle {
        display: inline-flex;
    }

    .tourbin-header-main__utilities {
        width: 100%;
        justify-content: flex-start;
        direction: ltr;
    }

    .tourbin-header-main__menu-toggle {
        margin-inline-start: auto;
    }
}

/* Wider landscape tablets already have desktop nav — just tighten gaps. */
@media (orientation: landscape) and (min-width: 1025px) and (max-height: 900px) {
    .tourbin-header-main__dropdowns {
        display: flex;
    }

    .tourbin-header-main__menu-toggle {
        display: none;
    }

    .tourbin-contact-nav-row__nav-list {
        display: flex;
        gap: 18px;
        font-size: 13px;
    }
}
