html, body {
    max-width: 100%;
}

/* Opt-in: [eftheia_latest_episodes full_bleed="yes"] or
   [eftheia_season_tabs full_bleed="yes"]. Widens the carousel a fixed
   80px past its normal box on each side using plain negative margins —
   no viewport-relative (100vw) math, so it can't misalign inside
   nested Elementor containers the way that trick did. It won't reach
   the true browser edge on a wide screen, but it reliably spills into
   some of the surrounding margin everywhere, which is the same
   technique used by sites like weforum.org for this look. */
.eftheia-yt-full-bleed {
    width: calc(100% + 160px);
    max-width: calc(100% + 160px);
    margin-left: -80px;
    margin-right: -80px;
}

@media (max-width: 700px) {
    .eftheia-yt-full-bleed {
        width: calc(100% + 40px);
        max-width: calc(100% + 40px);
        margin-left: -20px;
        margin-right: -20px;
    }
}

.eftheia-yt-full-bleed .eftheia-yt-carousel-heading,
.eftheia-yt-full-bleed .eftheia-yt-carousel-nav {
    padding-left: 80px;
    padding-right: 80px;
    box-sizing: border-box;
}

@media (max-width: 700px) {
    .eftheia-yt-full-bleed .eftheia-yt-carousel-heading,
    .eftheia-yt-full-bleed .eftheia-yt-carousel-nav {
        padding-left: 20px;
        padding-right: 20px;
    }
}

.eftheia-yt-carousel-wrap {
    max-width: 100%;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    margin: 24px 0;
}

/* Elementor's own flex columns/containers default to min-width:auto too —
   if one of them is the direct ancestor of our widget, it needs the same
   override or the carousel content can push it wider than the layout. */
.e-con:has(.eftheia-yt-carousel-wrap),
.elementor-column:has(.eftheia-yt-carousel-wrap),
.elementor-widget-wrap:has(.eftheia-yt-carousel-wrap) {
    min-width: 0;
}

.eftheia-yt-carousel-heading {
    margin: 0 0 14px;
    font-size: 20px;
    font-weight: 700;
}

.eftheia-yt-carousel {
    max-width: 100%;
    width: 100%;
    min-width: 0;
}

.eftheia-yt-carousel-track {
    display: flex;
    min-width: 0;
    gap: 0 !important;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.eftheia-yt-carousel-track::-webkit-scrollbar {
    display: none;
}

/* Card — flush edge-to-edge tiles with a thin divider, like a photo strip.
   all:unset strips any inherited theme/link defaults (padding, border,
   radius, shadow) before we reapply only what we want.
   Width is slightly under 50% so 2 full cards show plus a sliver of the
   next one peeking in from the right edge (desktop). */
.eftheia-yt-carousel-track a.eftheia-yt-card {
    all: unset;
    position: relative;
    box-sizing: border-box;
    display: block;
    flex: 0 0 44%;
    width: 44%;
    height: 380px;
    border-right: 1px solid rgba(255,255,255,0.18);
    background-size: cover;
    background-position: center;
    background-color: #10151c;
    scroll-snap-align: start;
    cursor: pointer;
    transition: filter 0.2s ease;
}

.eftheia-yt-carousel-track a.eftheia-yt-card:first-child {
    border-left: 1px solid rgba(255,255,255,0.18);
}

.eftheia-yt-carousel-track a.eftheia-yt-card:hover {
    filter: brightness(1.12);
}

.eftheia-yt-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,0.9) 100%);
}

.eftheia-yt-card-title {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    color: #fff;
    font-weight: 700;
    font-size: 17px;
    line-height: 1.28;
    letter-spacing: -0.01em;
    z-index: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Arrows below the carousel */
.eftheia-yt-carousel-nav {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
}

.eftheia-yt-carousel-nav button.eftheia-yt-arrow {
    all: unset;
    display: inline-block;
    color: #000;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.15s ease;
}

.eftheia-yt-carousel-nav button.eftheia-yt-arrow:hover:not(:disabled) {
    color: #ff6a00;
}

.eftheia-yt-carousel-nav button.eftheia-yt-arrow:disabled {
    opacity: 0.35;
    cursor: default;
}

/* Featured episode */
.eftheia-yt-featured {
    position: relative;
    max-width: 100%;
    margin: 24px 0;
}

.eftheia-yt-live-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    background: #e11d2e;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 4px;
}

.eftheia-yt-featured-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.eftheia-yt-featured-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    background-color: #111;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.eftheia-yt-play-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(0,0,0,0.55);
    position: relative;
}

.eftheia-yt-play-icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 54%;
    transform: translate(-50%, -50%);
    border-left: 18px solid #fff;
    border-top: 11px solid transparent;
    border-bottom: 11px solid transparent;
}

.eftheia-yt-featured-title {
    margin-top: 12px;
    font-size: 22px;
    font-weight: 700;
}

/* Season tabs */
.eftheia-yt-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.eftheia-yt-tab-btn {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.15);
    background: #fff;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
}

.eftheia-yt-tab-btn.is-active {
    background: #111;
    color: #fff;
    border-color: #111;
}

.eftheia-yt-tab-panel {
    display: none;
}

.eftheia-yt-tab-panel.is-active {
    display: block;
}

.eftheia-yt-admin-notice {
    padding: 10px 14px;
    background: #fff3cd;
    border: 1px solid #ffe69c;
    border-radius: 6px;
    font-size: 14px;
}

@media (max-width: 600px) {
    .eftheia-yt-carousel-track a.eftheia-yt-card {
        flex: 0 0 88%;
        width: 88%;
        height: 300px;
    }
}
