/**
 * Vendors We Love — Immersive Discovery Gallery
 * Hero, gallery grid, filters, search, luxurious spacing
 */

/* -------------------------------------------------------------------------
   Page shell
   ------------------------------------------------------------------------- */
.resources-page--immersive {
    min-height: 100vh;
    padding-top: 0;
    padding-bottom: 0;
    background: #0a0908;
    color: rgba(255, 255, 255, 0.92);
}

.resources-page__empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.55);
    font-size: 1.05rem;
    padding: 4rem 1.5rem 6rem;
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* -------------------------------------------------------------------------
   Full-bleed hero
   ------------------------------------------------------------------------- */
.ea-resource-hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 6.5rem 1.5rem 3rem;
    margin-bottom: 0;
    overflow: hidden;
}

@media (min-width: 768px) {
    /* Shorter hero; title/search/filters vertically centered on the background band */
    .ea-resource-hero {
        align-items: center;
        justify-content: center;
        min-height: clamp(19rem, 52vh, 36rem);
        padding: 6.25rem 2rem 2.25rem;
    }

    .ea-resource-hero__title {
        margin-bottom: 0.75rem;
    }

    .ea-resource-hero__subtitle {
        margin-bottom: 1.35rem;
    }

    .ea-resource-hero__controls {
        gap: 1.25rem;
    }
}

/* Mobile: full-bleed media behind title → search → filters; readable scrim; filters in 2 rows (3+2) */
@media (max-width: 767px) {
    .ea-resource-hero {
        align-items: stretch;
        justify-content: flex-end;
        min-height: min(92dvh, 38rem);
        padding: 5rem 1.25rem 2.5rem;
        overflow: hidden;
    }

    .ea-resource-hero__media {
        position: absolute;
        inset: 0;
        width: auto;
        height: auto;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .ea-resource-hero__scrim {
        background: linear-gradient(
            180deg,
            rgba(6, 5, 4, 0.42) 0%,
            rgba(6, 5, 4, 0.58) 35%,
            rgba(6, 5, 4, 0.82) 65%,
            rgba(6, 5, 4, 0.9) 100%
        );
    }

    .ea-resource-hero__content {
        position: relative;
        z-index: 3;
        margin-top: auto;
        width: 100%;
    }

    .ea-resource-hero__title {
        font-size: clamp(1.85rem, 8vw, 2.35rem);
        margin: 0 0 0.65rem;
    }

    .ea-resource-hero__subtitle {
        margin: 0 0 1.25rem;
        font-size: 0.9rem;
        line-height: 1.55;
    }

    .ea-resource-hero__controls {
        gap: 1.15rem;
    }

    /* Two rows: 3 compact pills, then 2 centered (must beat later .resources-filter-bar__track flex rules) */
    .ea-resource-hero .resources-filter-bar__track {
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 0.55rem 0.45rem;
        width: 100%;
        max-width: 100%;
        overflow: visible;
        padding: 0.05rem 0 0.1rem;
        scroll-snap-type: none;
        -webkit-overflow-scrolling: auto;
        flex-wrap: unset;
    }

    .ea-resource-hero .resources-filter-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
        min-height: 2.65rem;
        max-width: 100%;
        margin: 0;
        justify-self: stretch;
        padding: 0.52rem 0.45rem;
        font-size: 0.72rem;
        font-weight: 600;
        letter-spacing: 0.07em;
        line-height: 1.2;
        white-space: normal;
        hyphens: auto;
        border-radius: 999px;
    }

    .ea-resource-hero .resources-filter-btn:nth-child(1) {
        grid-column: 1 / 3;
    }

    .ea-resource-hero .resources-filter-btn:nth-child(2) {
        grid-column: 3 / 5;
    }

    .ea-resource-hero .resources-filter-btn:nth-child(3) {
        grid-column: 5 / 7;
    }

    .ea-resource-hero .resources-filter-btn:nth-child(4) {
        grid-column: 2 / 4;
    }

    .ea-resource-hero .resources-filter-btn:nth-child(5) {
        grid-column: 4 / 6;
    }
}

.ea-resource-hero__media {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 100% 70% at 50% 20%, rgba(196, 143, 86, 0.08) 0%, transparent 55%),
        linear-gradient(180deg, #12100e 0%, #0a0908 100%);
}

.ea-resource-hero__bg-video,
.ea-resource-hero__bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.ea-resource-hero__bg-iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 177.78vh;
    min-width: 100%;
    height: 56.25vw;
    min-height: 100%;
    transform: translate(-50%, -50%);
    border: 0;
    pointer-events: none;
}

.ea-resource-hero__bg-oembed {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ea-resource-hero__bg-oembed iframe {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 120%;
    min-height: 120%;
    border: 0;
    pointer-events: none;
}

.ea-resource-hero__scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        180deg,
        rgba(6, 5, 4, 0.45) 0%,
        rgba(6, 5, 4, 0.55) 35%,
        rgba(6, 5, 4, 0.82) 100%
    );
    pointer-events: none;
}

.ea-resource-hero__grain {
    position: absolute;
    inset: 0;
    z-index: 2;
    opacity: 0.07;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    pointer-events: none;
    mix-blend-mode: overlay;
}

.ea-resource-hero__content {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 42rem;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.ea-resource-hero__title {
    font-family: "Playfair Display", Georgia, "Times New Roman", serif !important;
    font-size: clamp(2.25rem, 7vw, 3.25rem);
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.12;
    color: #fdfaf6;
    text-shadow: 0 4px 40px rgba(0, 0, 0, 0.55);
    margin: 0 0 1.25rem;
}

.ea-resource-hero__subtitle {
    font-family: "IBM Plex Sans Condensed", Arial, Helvetica, sans-serif !important;
    font-size: clamp(0.95rem, 2.8vw, 1.1rem);
    font-weight: 400;
    line-height: 1.65;
    letter-spacing: 0.03em;
    color: rgba(255, 255, 255, 0.78);
    margin: 0 0 2.5rem;
    max-width: 34em;
    margin-left: auto;
    margin-right: auto;
}

.ea-resource-hero__controls {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    align-items: stretch;
}

.ea-resource-hero__search-wrap {
    display: block;
    width: 100%;
}

.ea-resource-hero__search {
    width: 100%;
    padding: 1rem 1.25rem;
    font-family: "IBM Plex Sans Condensed", Arial, Helvetica, sans-serif !important;
    font-size: 1rem;
    letter-spacing: 0.04em;
    color: #f5f1ea;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(196, 143, 86, 0.35);
    border-radius: 4px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.ea-resource-hero__search::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.ea-resource-hero__search:focus {
    outline: none;
    border-color: rgba(196, 143, 86, 0.75);
    box-shadow: 0 0 0 3px rgba(196, 143, 86, 0.15);
}

/* -------------------------------------------------------------------------
   Filter bar (hero)
   ------------------------------------------------------------------------- */
.ea-resource-hero .resources-filter-bar {
    margin: 0;
    padding: 0;
}

/* Tablet/desktop: wrapped pill row (mobile ≤767 uses grid above) */
@media (min-width: 768px) {
    .ea-resource-hero .resources-filter-bar__track {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.6rem;
        overflow: visible;
        padding: 0.35rem 0 0.5rem;
        scroll-snap-type: none;
        -webkit-overflow-scrolling: auto;
        scrollbar-width: none;
    }
}

.ea-resource-hero .resources-filter-bar__track::-webkit-scrollbar {
    display: none;
}

.resources-filter-btn {
    flex: 0 0 auto;
    scroll-snap-align: start;
    font-family: "IBM Plex Sans Condensed", Arial, Helvetica, sans-serif !important;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.7rem 1.1rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(0, 0, 0, 0.28);
    color: rgba(255, 255, 255, 0.88);
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
    white-space: nowrap;
}

.resources-filter-btn:hover {
    border-color: rgba(196, 143, 86, 0.5);
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.resources-filter-btn.is-active {
    border-color: rgba(196, 143, 86, 0.9);
    background: linear-gradient(145deg, rgba(196, 143, 86, 0.28) 0%, rgba(28, 24, 20, 0.95) 100%);
    color: #fffef8;
    box-shadow:
        0 0 0 1px rgba(196, 143, 86, 0.2),
        0 10px 32px rgba(0, 0, 0, 0.4);
}

.resources-filter-btn:focus-visible {
    outline: 2px solid rgba(196, 143, 86, 0.85);
    outline-offset: 3px;
}

/* -------------------------------------------------------------------------
   Gallery wrapper
   ------------------------------------------------------------------------- */
.ea-resource-gallery-wrap {
    position: relative;
    z-index: 1;
    background: linear-gradient(180deg, #0c0b0a 0%, #0f0e0c 40%, #080706 100%);
}

.ea-resource-gallery {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 3.5rem;
    padding: 3.5rem 1.5rem 5.5rem;
    max-width: 1480px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) and (max-width: 1023px) {
    .ea-resource-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2.5rem 1.5rem;
        padding: 4rem 2rem 6rem;
    }
}

@media (min-width: 1024px) {
    .ea-resource-gallery {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 2rem 1.35rem;
        padding: 4.5rem 2.25rem 7rem;
    }
}

/* -------------------------------------------------------------------------
   Card — uniform tiles (loop video uses same cell size as stills)
   ------------------------------------------------------------------------- */
.ea-resource-card {
    scroll-margin-top: max(7.75rem, calc(env(safe-area-inset-top, 0px) + 6.75rem));
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: clamp(26.5rem, 62vw, 32rem);
    border-radius: 6px;
    overflow: hidden;
    background: linear-gradient(165deg, rgba(26, 23, 20, 0.98) 0%, rgba(12, 11, 10, 0.99) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow:
        0 28px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    opacity: 0;
    transform: translateY(1.75rem);
    transition:
        opacity 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        border-color 0.45s ease,
        box-shadow 0.45s ease;
}

.ea-resource-card.is-ea-revealed {
    opacity: 1;
    transform: translateY(0);
}

.ea-resource-card.is-ea-revealed:hover,
.ea-resource-card.is-ea-revealed:focus-within {
    border-color: rgba(196, 143, 86, 0.55);
    box-shadow:
        0 36px 72px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(196, 143, 86, 0.12),
        0 0 48px rgba(180, 130, 60, 0.12);
    transform: translateY(-4px);
}

.ea-resource-card__media {
    position: relative;
    flex-shrink: 0;
    aspect-ratio: 16 / 11;
    overflow: hidden;
    background: #050403;
}

/* Loop video wrapper (accessibility + fill); inner video/iframe unchanged */
.ea-resource-card__loop-media {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.ea-resource-card__loop-media .ea-resource-card__bg-video,
.ea-resource-card__loop-media .ea-resource-card__bg-iframe,
.ea-resource-card__loop-media .ea-resource-card__bg-oembed {
    pointer-events: none;
}

/* Ken Burns: single transform layer so image / video / iframe stay in sync */
.ea-resource-card__media-ken {
    position: absolute;
    inset: 0;
    overflow: hidden;
    transform: scale(1) translate(0, 0);
    transform-origin: center center;
    transition: transform 5s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform;
}

.ea-resource-card.is-ea-revealed:hover .ea-resource-card__media-ken,
.ea-resource-card.is-ea-revealed:focus-within .ea-resource-card__media-ken {
    transform: scale(1.1) translate(2%, 2%);
}

.ea-resource-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.02);
}

.ea-resource-card__bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
    transform: scale(1.04);
}

.ea-resource-card__bg-iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 177.78vh;
    min-width: 100%;
    height: 56.25vw;
    min-height: 100%;
    border: 0;
    transform: translate(-50%, -50%) scale(1.04);
    pointer-events: none;
}

.ea-resource-card__bg-oembed {
    position: absolute;
    inset: 0;
}

.ea-resource-card__bg-oembed iframe {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(1.06) !important;
    width: 140% !important;
    height: 140% !important;
    min-width: 100%;
    min-height: 100%;
    border: 0 !important;
    pointer-events: none;
}

.ea-resource-card__placeholder {
    width: 100%;
    height: 100%;
    min-height: 200px;
    background:
        linear-gradient(135deg, rgba(196, 143, 86, 0.06) 0%, transparent 55%),
        repeating-linear-gradient(
            -38deg,
            rgba(255, 255, 255, 0.025) 0,
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px,
            transparent 10px
        );
}

.ea-resource-card__media-shine {
    pointer-events: none;
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        130deg,
        transparent 38%,
        rgba(255, 255, 255, 0.07) 50%,
        transparent 62%
    );
    opacity: 0;
    transition: opacity 0.55s ease;
}

.ea-resource-card.is-ea-revealed:hover .ea-resource-card__media-shine,
.ea-resource-card.is-ea-revealed:focus-within .ea-resource-card__media-shine {
    opacity: 1;
}

.ea-resource-card__body {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.ea-resource-card__body-inner {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    padding: 2rem 1.75rem 2.25rem;
    opacity: 0.96;
    transition: opacity 0.45s ease;
}

@media (max-width: 1023px) {
    .ea-resource-card__body-inner {
        padding: 2.25rem 1.5rem 2.5rem;
    }
}

.ea-resource-card.is-ea-revealed:hover .ea-resource-card__body-inner,
.ea-resource-card.is-ea-revealed:focus-within .ea-resource-card__body-inner {
    opacity: 1;
}

.ea-resource-card__film-rule {
    height: 2px;
    margin: 0 1.75rem 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(196, 143, 86, 0.55) 25%,
        rgba(196, 143, 86, 0.85) 50%,
        rgba(196, 143, 86, 0.55) 75%,
        transparent
    );
    opacity: 0.85;
}

@media (min-width: 1024px) {
    .ea-resource-card__film-rule {
        margin: 0 2rem 0;
    }
}

.ea-resource-card__type {
    font-size: 0.65rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(196, 143, 86, 0.72);
    margin: 0 0 0.5rem;
}

.ea-resource-card__title {
    font-family: "Playfair Display", Georgia, "Times New Roman", serif !important;
    font-style: normal !important;
    font-weight: 500;
    font-size: clamp(1.35rem, 3vw, 1.65rem);
    line-height: 1.22;
    letter-spacing: 0.01em;
    color: #f7f4ef;
    margin: 0;
}

.ea-resource-card__title-btn {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    font: inherit;
    font-family: inherit !important;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    color: inherit;
    text-align: left;
    transition: color 0.25s ease;
}

.ea-resource-card__title-btn:hover,
.ea-resource-card__title-btn:focus-visible {
    color: rgba(196, 143, 86, 0.95);
}

.ea-resource-card__title-btn:focus-visible {
    outline: 2px solid rgba(196, 143, 86, 0.75);
    outline-offset: 3px;
}

.ea-resource-card__city {
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.42);
    margin: 0.65rem 0 0;
}

.ea-resource-card__desc,
.ea-resource-card__desc.resource-description {
    font-size: 0.98rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.62);
    margin: 1.1rem 0 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.ea-resource-card__learn-wrap {
    margin: 0.85rem 0 0;
    flex-shrink: 0;
}

.ea-resource-card__learn-more {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    font-family: "IBM Plex Sans Condensed", Arial, Helvetica, sans-serif !important;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(196, 143, 86, 0.88);
    text-decoration: underline;
    text-underline-offset: 0.22em;
    transition: color 0.25s ease;
}

.ea-resource-card__learn-more:hover,
.ea-resource-card__learn-more:focus-visible {
    color: rgba(212, 159, 102, 0.98);
}

.ea-resource-card__learn-more:focus-visible {
    outline: 2px solid rgba(196, 143, 86, 0.65);
    outline-offset: 3px;
}

.ea-resource-card__actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1.25rem;
}

@media (min-width: 480px) {
    .ea-resource-card__actions {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: stretch;
    }
}

.ea-resource-card__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: "IBM Plex Sans Condensed", Arial, Helvetica, sans-serif !important;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    text-decoration: none !important;
    border-radius: 4px;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease;
}

.ea-resource-card__btn--film {
    min-height: 52px;
    padding: 0.9rem 1.35rem;
    width: 100%;
    background: linear-gradient(135deg, #c48f56 0%, #b87d45 100%);
    color: #1a1510 !important;
    border: 1px solid rgba(255, 246, 220, 0.35);
    box-shadow: 0 4px 22px rgba(0, 0, 0, 0.35);
}

.ea-resource-card__btn--film:hover {
    background: linear-gradient(135deg, #d49f66 0%, #c48f56 100%);
    color: #120f0c !important;
}

.ea-resource-card__btn--site {
    min-height: 48px;
    padding: 0.78rem 1.15rem;
    width: 100%;
    background: transparent;
    color: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.ea-resource-card__btn--site:hover {
    border-color: rgba(196, 143, 86, 0.55);
    color: #fff !important;
    background: rgba(255, 255, 255, 0.05);
}

.ea-resource-card__btn-icon {
    font-size: 0.65rem;
    line-height: 1;
    opacity: 0.9;
}

.ea-resource-card__external {
    font-size: 0.9rem;
    line-height: 1;
    opacity: 0.75;
}

@media (min-width: 480px) {
    .ea-resource-card__btn--film,
    .ea-resource-card__btn--site {
        width: auto;
        flex: 1 1 auto;
        min-width: 0;
    }

    .ea-resource-card__btn--film {
        min-height: 48px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ea-resource-card,
    .ea-resource-card__img,
    .ea-resource-card__media-ken,
    .ea-resource-card__loop-video,
    .ea-resource-card .ea-resource-card__loop-iframe,
    .ea-resource-card__body-inner,
    .resources-filter-btn {
        transition: none !important;
    }

    .ea-resource-card {
        opacity: 1 !important;
        transform: none !important;
    }

    .ea-resource-card.is-ea-revealed:hover,
    .ea-resource-card.is-ea-revealed:focus-within {
        transform: none;
    }

    .ea-resource-card.is-ea-revealed:hover .ea-resource-card__media-ken,
    .ea-resource-card.is-ea-revealed:focus-within .ea-resource-card__media-ken {
        transform: none;
    }
}

/* -------------------------------------------------------------------------
   Watch Film — in-page modal (YouTube, Vimeo, MP4)
   ------------------------------------------------------------------------- */
body.ea-watch-modal-open,
body.ea-resource-detail-open {
    overflow: hidden;
}

/* -------------------------------------------------------------------------
   Vendor detail — read more (full blurb + Visit Website)
   ------------------------------------------------------------------------- */
.ea-resource-detail-modal {
    position: fixed;
    inset: 0;
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}

.ea-resource-detail-modal[hidden] {
    display: none !important;
}

.ea-resource-detail-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 3, 2, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
}

.ea-resource-detail-modal__dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(520px, 100%);
    max-height: min(88vh, 40rem);
    margin: auto;
    padding: 1.75rem 1.5rem 1.5rem;
    background: linear-gradient(165deg, rgba(22, 19, 16, 0.98) 0%, rgba(8, 7, 6, 0.99) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    box-shadow:
        0 40px 80px rgba(0, 0, 0, 0.65),
        0 0 0 1px rgba(196, 143, 86, 0.08);
    color: rgba(255, 255, 255, 0.9);
}

.ea-resource-detail-modal__title {
    font-family: "Playfair Display", Georgia, "Times New Roman", serif !important;
    font-weight: 500;
    font-size: clamp(1.35rem, 4vw, 1.75rem);
    line-height: 1.2;
    margin: 0 2.5rem 1rem 0;
    color: #f7f4ef;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid rgba(196, 143, 86, 0.2);
}

.ea-resource-detail-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.35);
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.ea-resource-detail-modal__close:hover,
.ea-resource-detail-modal__close:focus-visible {
    border-color: rgba(196, 143, 86, 0.45);
    color: #fff;
    background: rgba(196, 143, 86, 0.12);
}

.ea-resource-detail-modal__scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1.25rem;
    padding-right: 0.25rem;
}

.ea-resource-detail-modal__body {
    font-size: 0.98rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.72);
}

.ea-resource-detail-modal__body p {
    margin: 0 0 1rem;
}

.ea-resource-detail-modal__body p:last-child {
    margin-bottom: 0;
}

.ea-resource-detail-modal__footer {
    flex-shrink: 0;
    padding-top: 0.25rem;
}

.ea-resource-detail-modal__site {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    padding: 0.95rem 1.5rem;
    font-family: "IBM Plex Sans Condensed", Arial, Helvetica, sans-serif !important;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none !important;
    color: #1a1510 !important;
    background: linear-gradient(135deg, #c48f56 0%, #b87d45 100%);
    border: 1px solid rgba(255, 246, 220, 0.35);
    border-radius: 4px;
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.4);
    transition: filter 0.2s ease, transform 0.15s ease;
}

.ea-resource-detail-modal__site:hover {
    filter: brightness(1.06);
}

.ea-resource-detail-modal__site--hidden {
    display: none !important;
}

.ea-watch-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}

.ea-watch-modal[hidden] {
    display: none !important;
}

.ea-watch-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 3, 2, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
}

.ea-watch-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(960px, 100%);
    max-height: min(90vh, 100dvh - 2rem);
    overflow: auto;
    padding: 1.35rem 1.25rem 1.25rem;
    margin: auto;
    background: linear-gradient(165deg, rgba(28, 24, 20, 0.98) 0%, rgba(10, 9, 8, 0.99) 100%);
    border: 1px solid rgba(196, 143, 86, 0.55);
    border-radius: 8px;
    box-shadow:
        0 0 0 1px rgba(196, 143, 86, 0.12),
        0 24px 80px rgba(0, 0, 0, 0.65),
        0 0 72px rgba(160, 110, 50, 0.15);
    outline: none;
}

.ea-watch-modal__heading {
    font-family: "Playfair Display", Georgia, "Times New Roman", serif !important;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    font-weight: 500;
    line-height: 1.3;
    color: #faf6f0;
    margin: 0 2.75rem 1rem 0;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid rgba(196, 143, 86, 0.25);
}

.ea-watch-modal__close {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    width: 2.75rem;
    height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    line-height: 1;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(196, 143, 86, 0.35);
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.ea-watch-modal__close:hover {
    background: rgba(196, 143, 86, 0.15);
    border-color: rgba(196, 143, 86, 0.6);
    color: #fff;
}

.ea-watch-modal__close:focus-visible {
    outline: 2px solid rgba(196, 143, 86, 0.9);
    outline-offset: 2px;
}

.ea-watch-modal__aspect {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 4px;
    background: #000;
}

.ea-watch-modal__iframe,
.ea-watch-modal__video {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.ea-watch-modal__iframe.is-active,
.ea-watch-modal__video.is-active {
    display: block;
}

.ea-watch-modal__video.is-active {
    object-fit: contain;
    background: #000;
}

/* Mobile cinema: hide title row, maximize player; pairs with JS fullscreen + landscape lock */
@media (max-width: 767px) {
    .ea-watch-modal.ea-watch-modal--mobile-cinema {
        padding: 0;
        align-items: stretch;
        justify-content: stretch;
    }

    .ea-watch-modal.ea-watch-modal--mobile-cinema .ea-watch-modal__heading {
        display: none !important;
    }

    .ea-watch-modal.ea-watch-modal--mobile-cinema .ea-watch-modal__dialog {
        width: 100%;
        max-width: none;
        max-height: none;
        height: 100%;
        min-height: 100dvh;
        margin: 0;
        padding: max(0.35rem, env(safe-area-inset-top)) max(0.35rem, env(safe-area-inset-right)) max(0.35rem, env(safe-area-inset-bottom)) max(0.35rem, env(safe-area-inset-left));
        border-radius: 0;
        border-width: 0;
        box-shadow: none;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .ea-watch-modal.ea-watch-modal--mobile-cinema .ea-watch-modal__close {
        top: max(0.45rem, env(safe-area-inset-top));
        right: max(0.45rem, env(safe-area-inset-right));
    }

    .ea-watch-modal.ea-watch-modal--mobile-cinema .ea-watch-modal__aspect {
        flex: 1 1 auto;
        width: 100%;
        padding-bottom: 0;
        height: 100%;
        min-height: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 6px;
    }

    .ea-watch-modal.ea-watch-modal--mobile-cinema .ea-watch-modal__iframe.is-active,
    .ea-watch-modal.ea-watch-modal--mobile-cinema .ea-watch-modal__video.is-active {
        position: relative;
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        aspect-ratio: unset;
    }

    .ea-watch-modal.ea-watch-modal--mobile-cinema .ea-watch-modal__video.is-active {
        object-fit: contain;
    }
}

/* When device is already landscape on small screens, give video full width */
@media (max-width: 767px) and (orientation: landscape) {
    .ea-watch-modal.ea-watch-modal--mobile-cinema .ea-watch-modal__aspect {
        max-height: 100dvh;
    }
}
