/* ================================================================
   EEA Video CTA — Cinematic thumbnail + lightbox playback
   ================================================================ */

.eea-video {
    --eea-vid-navy:    #080872;
    --eea-vid-gold:    #C7A73E;
    --eea-vid-white:   #ffffff;
    --eea-vid-ease:    cubic-bezier(.2, .8, .2, 1);

    position: relative;
    width: 100%;
    padding: 80px 32px;
    font-family: 'Montserrat', 'Poppins', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    isolation: isolate;
}

.eea-video,
.eea-video *,
.eea-video *::before,
.eea-video *::after {
    box-sizing: border-box;
}

.eea-video p { margin: 0; }
.eea-video img { display: block; max-width: 100%; height: auto; }

/* Full-width breakout */
.eea-video--fullwidth {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
}

.eea-video__inner {
    position: relative;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

/* ================================================================
   FRAME (button) + THUMBNAIL
   ================================================================ */
.eea-video__frame {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    aspect-ratio: 21 / 9;
    min-height: 0 !important;
    background: var(--eea-vid-navy);
    border: 1px solid transparent;
    border-radius: 20px;
    overflow: hidden !important;
    cursor: pointer;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: 0 30px 80px -10px rgba(8, 8, 114, 0.25);
    transition: transform .5s var(--eea-vid-ease), box-shadow .5s var(--eea-vid-ease);
    appearance: none;
    -webkit-appearance: none;
    color: inherit;
    font: inherit;
    line-height: 0;          /* kill button text baseline gap */
    vertical-align: top;
}

/* Fallback height for browsers/contexts where aspect-ratio fails */
@supports not (aspect-ratio: 21 / 9) {
    .eea-video__frame::before {
        content: "";
        display: block;
        padding-bottom: 42.857%; /* 9/21 */
    }
}

.eea-video__frame:hover {
    transform: translateY(-4px);
    box-shadow: 0 40px 100px -10px rgba(8, 8, 114, 0.35);
}

.eea-video__thumb {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center center !important;
    z-index: 0;
    display: block !important;
    transition: transform 1.2s var(--eea-vid-ease);
}

.eea-video__frame:hover .eea-video__thumb {
    transform: scale(1.06);
}

.eea-video__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(8, 8, 114, 0.08), rgba(8, 8, 114, 0.32) 65%, rgba(8, 8, 114, 0.55));
    transition: background .4s var(--eea-vid-ease);
    pointer-events: none;
}

/* ================================================================
   PLAY BUTTON
   ================================================================ */
.eea-video__play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--eea-vid-gold);
    color: var(--eea-vid-navy);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: background .35s var(--eea-vid-ease), color .35s var(--eea-vid-ease), transform .35s var(--eea-vid-ease), box-shadow .35s var(--eea-vid-ease);
    box-shadow: 0 16px 40px rgba(199, 167, 62, 0.45), 0 0 0 0 rgba(199, 167, 62, 0.6);
}

.eea-video__play svg {
    width: 36%;
    height: 36%;
    transform: translateX(8%); /* visual center for play triangle */
}

.eea-video__frame:hover .eea-video__play {
    transform: translate(-50%, -50%) scale(1.08);
}

/* Pulsing rings */
.eea-video-pulse-yes .eea-video__play::before,
.eea-video-pulse-yes .eea-video__play::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(199, 167, 62, 0.6);
    animation: eea-vid-pulse 2.4s var(--eea-vid-ease) infinite;
}

.eea-video-pulse-yes .eea-video__play::after {
    animation-delay: 1.2s;
}

@keyframes eea-vid-pulse {
    0%   { transform: scale(1);    opacity: .7; }
    100% { transform: scale(1.9);  opacity: 0;  }
}

/* ================================================================
   TEXT OVERLAY  (positioned within frame)
   ================================================================ */
.eea-video__text {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    padding: 40px 56px;
    color: var(--eea-vid-white);
    pointer-events: none;
    text-align: left;
}

.eea-video-text-center        .eea-video__text { justify-content: center; align-items: center; text-align: center; }
.eea-video-text-top-left      .eea-video__text { justify-content: flex-start; align-items: flex-start; }
.eea-video-text-top-center    .eea-video__text { justify-content: flex-start; align-items: center; text-align: center; }
.eea-video-text-bottom-left   .eea-video__text { justify-content: flex-end; align-items: flex-start; }
.eea-video-text-bottom-center .eea-video__text { justify-content: flex-end; align-items: center; text-align: center; }

/* If text overlay is shown, dim the overlay a bit more for readability */
.eea-video__frame:has(.eea-video__text) .eea-video__overlay {
    background: linear-gradient(180deg, rgba(8, 8, 114, 0.32), rgba(8, 8, 114, 0.6));
}

.eea-video__eyebrow {
    display: inline-block;
    color: var(--eea-vid-gold);
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.eea-video__heading {
    margin: 0 0 12px;
    font-family: 'Baskervville', 'GFS Didot', Georgia, serif;
    font-size: clamp(24px, 4vw, 44px);
    font-weight: 600;
    line-height: 1.15;
    color: var(--eea-vid-white);
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.28);
    max-width: 720px;
}

.eea-video__desc {
    color: rgba(255, 255, 255, 0.88);
    font-size: 16px;
    line-height: 1.6;
    max-width: 560px;
    margin: 0;
}

/* ================================================================
   INLINE PLAY (replace thumbnail with embedded video)
   ================================================================ */
.eea-video--inline.is-playing .eea-video__frame {
    display: none;
}

.eea-video__inline-target {
    position: relative;
    width: 100%;
    aspect-ratio: 21 / 9;
    border-radius: 20px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 30px 80px -10px rgba(8, 8, 114, 0.25);
    display: none;
}

.eea-video--inline.is-playing .eea-video__inline-target {
    display: block;
}

.eea-video__inline-target iframe,
.eea-video__inline-target video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
}

/* ================================================================
   LIGHTBOX MODAL
   ================================================================ */
.eea-video__lightbox {
    position: fixed;
    inset: 0;
    background: rgba(8, 8, 114, 0.94);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s var(--eea-vid-ease), visibility .35s var(--eea-vid-ease);
}

.eea-video__lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.eea-video__lightbox-player {
    position: relative;
    width: 100%;
    max-width: 1100px;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
    transform: scale(0.96);
    transition: transform .45s var(--eea-vid-ease);
}

.eea-video__lightbox.is-open .eea-video__lightbox-player {
    transform: scale(1);
}

.eea-video__lightbox-frame {
    position: relative;
    width: 100%;
    height: 100%;
}

.eea-video__lightbox-frame iframe,
.eea-video__lightbox-frame video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
}

.eea-video__lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    color: var(--eea-vid-white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .3s var(--eea-vid-ease);
    z-index: 2;
    appearance: none;
    -webkit-appearance: none;
}

.eea-video__lightbox-close:hover {
    background: var(--eea-vid-gold);
    border-color: var(--eea-vid-gold);
    color: var(--eea-vid-navy);
    transform: rotate(90deg);
}

body.eea-video-lightbox-open {
    overflow: hidden;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
    .eea-video__play {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 768px) {
    .eea-video__play {
        width: 64px;
        height: 64px;
    }
    .eea-video__text {
        padding: 24px;
    }
    .eea-video__heading {
        font-size: clamp(22px, 5vw, 32px);
    }
    .eea-video__desc {
        font-size: 14px;
    }
    .eea-video__lightbox {
        padding: 24px 16px;
    }
    .eea-video__lightbox-close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .eea-video,
    .eea-video *,
    .eea-video *::before,
    .eea-video *::after {
        animation: none !important;
        transition: none !important;
    }
}
