/* Mobile composition for the FIL Lima hero. Desktop styles intentionally stay untouched. */
@media (max-width: 768px) {
    .vimeo-hero {
        width: calc(100% - 12px);
        min-height: 0;
        height: auto;
        margin: 6px auto 14px;
        padding: 22px 14px 20px;
        overflow: hidden;
        border-radius: 18px;
        background:
            linear-gradient(to bottom, rgba(240, 235, 230, 0) 68%, #F0EBE6 100%),
            radial-gradient(circle at 104% 48%, rgba(30, 77, 183, 0.1) 0 92px, transparent 93px),
            radial-gradient(circle at -8% 83%, rgba(41, 114, 95, 0.1) 0 72px, transparent 73px),
            var(--bg-color);
    }

    .hero-logo-wrap {
        position: relative;
        inset: auto;
        display: flex;
        justify-content: center;
        width: 100%;
        margin: 0 0 10px;
    }

    .hero-logo {
        height: 44px;
    }

    .hero-headline-wrap {
        width: 100%;
        margin: 0;
        padding: 0 6px;
    }

    .hero-title {
        max-width: 340px;
        margin: 0 auto;
        font-size: clamp(1.75rem, 7.6vw, 2.15rem);
        line-height: 1.04;
        letter-spacing: -1.15px;
        text-wrap: balance;
    }

    /* The covers become a swipeable shelf instead of five unreadably small thumbnails. */
    .hero-books-container {
        width: calc(100% + 28px);
        max-width: none;
        margin: 16px -14px 0;
        padding: 8px 22px 18px;
        justify-content: flex-start;
        gap: 14px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 22px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .hero-books-container::-webkit-scrollbar {
        display: none;
    }

    .hero-book-card {
        flex: 0 0 108px;
        width: 108px;
        max-width: none;
        border-radius: 8px;
        scroll-snap-align: start;
        box-shadow: 0 10px 22px rgba(24, 43, 77, 0.2), 0 3px 8px rgba(24, 43, 77, 0.12);
    }

    .hero-book-card:hover {
        transform: none;
    }

    .hero-info-grid {
        width: 100%;
        max-width: 360px;
        margin-top: 2px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
        align-items: stretch;
    }

    .hero-info-item {
        min-width: 0;
        min-height: 94px;
        padding: 12px;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 8px;
        border: 1px solid rgba(30, 77, 183, 0.1);
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.82);
        box-shadow: 0 5px 16px rgba(30, 58, 112, 0.07);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .hero-info-icon {
        width: 26px;
        height: 26px;
    }

    .hero-info-text {
        font-size: clamp(0.78rem, 3.35vw, 0.9rem);
        line-height: 1.16;
        letter-spacing: -0.2px;
    }

    .hero-mobile-event-card {
        display: block;
        width: 100%;
        max-width: 360px;
        margin-top: 10px;
        padding: 15px 16px 16px;
        border: 0;
        border-radius: 15px;
        color: #fff;
        background: linear-gradient(135deg, #173b82 0%, #1e4db7 58%, #3268d2 100%);
        box-shadow: none;
    }

    .hero-mobile-location,
    .hero-mobile-date,
    .hero-mobile-stand {
        color: #fff;
    }

    .hero-mobile-location {
        font-size: 0.86rem;
        line-height: 1.28;
        opacity: 0.95;
    }

    .hero-mobile-date {
        margin-top: 7px;
        font-size: 1rem;
    }

    .hero-mobile-stand {
        margin-top: 2px;
        font-size: 1.12rem;
    }

    .hero-mobile-event-card .text-green {
        color: #c9f58d;
    }

    .hero-mobile-event-card .text-blue {
        color: #fff;
    }

    /* Compact sponsors rail. Mobile has its own non-duplicated markup. */
    .Double-marquee {
        padding: 54px 0 38px;
        gap: 10px;
    }

    .marquee-left {
        min-height: 300px;
        margin-inline: 18px;
    }

    .marquee-left h2 {
        margin: 0;
    }

    .marquee-blob-container {
        width: min(62vw, 238px);
        top: 60%;
        left: 48%;
    }

    .marquee-right,
    .marquee-right--4col {
        display: none !important;
    }

    .marquee-mobile-list {
        display: grid;
        grid-template-rows: repeat(2, 108px);
        grid-auto-flow: column;
        grid-auto-columns: 108px;
        align-self: stretch;
        width: 100%;
        margin: 0;
        padding: 10px 18px 18px;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x proximity;
        scroll-padding-inline: 18px;
        overscroll-behavior-inline: contain;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .marquee-mobile-list::-webkit-scrollbar {
        display: none;
    }

    .marquee-mobile-item {
        width: 108px;
        height: 108px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 9px 7px;
        border: 1px solid rgba(30, 58, 112, 0.08);
        border-radius: 12px;
        background: #fff;
        scroll-snap-align: start;
        box-shadow: 0 3px 12px rgba(30, 58, 112, 0.05);
    }

    .marquee-mobile-item:nth-child(even) {
        background: #f8f6f2;
    }

    .marquee-mobile-category {
        max-width: 100%;
        padding: 3px 6px;
        border-radius: 999px;
        background: rgba(54, 81, 159, 0.08);
        color: #36519f;
        font-family: 'Epilogue', sans-serif;
        font-size: 0.5rem;
        font-weight: 700;
        line-height: 1;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .marquee-mobile-image {
        display: block;
        width: 100%;
        height: auto;
        max-width: 92px;
        max-height: 48px;
        object-fit: contain;
    }
}

@media (min-width: 769px) {
    .marquee-mobile-list {
        display: none;
    }
}

@media (max-width: 360px) {
    .hero-book-card {
        flex-basis: 100px;
        width: 100px;
    }

    .hero-info-item {
        min-height: 90px;
        padding: 11px;
    }

    .marquee-left {
        min-height: 280px;
        margin-inline: 16px;
    }

    .marquee-right,
    .marquee-right--4col,
    .marquee-mobile-list {
        grid-template-rows: repeat(2, 100px);
        grid-auto-columns: 100px;
        padding-inline: 16px;
    }

    .marquee-mobile-item {
        width: 100px;
        height: 100px;
    }

    .marquee-mobile-image {
        max-width: 86px;
        max-height: 44px;
    }
}
