/* Videos page layout */
.videos-page {
    padding: 40px 20px;
    max-width: 1400px;
    margin: 0 auto;
    box-sizing: border-box;
}

.videos-page-content {
    width: 100%;
}

.page-title {
    text-align: center;
    font-size: 48px;
    font-weight: 800;
    color: var(--color-brown);
    margin-bottom: 50px;
    font-family: 'Sora', sans-serif;
}

html.dark-mode .page-title {
    color: #ffffff;
}

.carousels-wrapper {
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.youtube-connected-group {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-radius: 22px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.09);
}

html.dark-mode .youtube-connected-group {
    background: rgba(20, 20, 20, 0.92);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
}

.youtube-connected-group .videos-section {
    margin: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.youtube-connected-group .videos-section + .videos-section {
    border-top: 1px solid rgba(79, 64, 95, 0.12);
}

html.dark-mode .youtube-connected-group .videos-section + .videos-section {
    border-top-color: rgba(255, 255, 255, 0.08);
}

.youtube-connected-group .youtube-connected-primary {
    padding-bottom: 24px;
}

.youtube-connected-group .youtube-connected-secondary {
    padding-top: 24px;
}

.youtube-connected-group .youtube-connected-secondary .carousel-header {
    margin-bottom: 26px;
}

.youtube-connected-group .youtube-connected-secondary .carousel-title {
    font-size: 28px;
}

.youtube-connected-group .videos-section.is-expanded {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.09);
}

html.dark-mode .youtube-connected-group .videos-section.is-expanded {
    background: rgba(20, 20, 20, 0.92);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
}

.videos-section {
    --edge-fade-rgb: 255, 255, 255;
    position: relative;
    padding: 38px 68px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.09);
}

html.dark-mode .videos-section {
    --edge-fade-rgb: 20, 20, 20;
    background: rgba(20, 20, 20, 0.92);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
}

.carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-bottom: 34px;
}

.carousel-title-container {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.carousel-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    color: var(--color-brown);
    font-family: 'Sora', sans-serif;
}

html.dark-mode .carousel-title {
    color: #ffffff;
}

.platform-icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
}

.platform-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Sora', sans-serif;
    line-height: 1.15;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.platform-cta:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}

.platform-cta:focus,
.platform-cta:active,
.platform-cta:visited {
    text-decoration: none;
}

.youtube-subscribe-btn {
    background: #ff0000;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(255, 0, 0, 0.13);
}

.youtube-subscribe-btn:hover,
.youtube-subscribe-btn:focus,
.youtube-subscribe-btn:active,
.youtube-subscribe-btn:visited {
    background: #ff0000 !important;
    color: #ffffff !important;
}

.platform-cta-stack {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    overflow: visible;
}

.platform-cta-meta {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    display: block;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    color: rgba(79, 64, 95, 0.82);
    opacity: 0.82;
    text-align: center;
    white-space: nowrap;
}

html.dark-mode .platform-cta-meta {
    color: rgba(255, 255, 255, 0.76);
}

.tiktok-follow-btn {
    background: var(--color-brown);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(79, 64, 95, 0.2);
    align-items: center;
}

.tiktok-follow-btn:hover,
.tiktok-follow-btn:focus,
.tiktok-follow-btn:active,
.tiktok-follow-btn:visited {
    background: var(--color-brown) !important;
    color: #ffffff !important;
}

html.dark-mode .tiktok-follow-btn {
    background: #ffffff;
    color: #111111;
}

.expand-btn {
    width: 48px;
    height: 48px;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid rgba(79, 64, 95, 0.34);
    border-radius: 14px !important;
    background: rgba(79, 64, 95, 0.12);
    color: var(--color-brown);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    position: relative;
    overflow: hidden;
    line-height: 0;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.expand-btn:hover {
    transform: translateY(-1px);
    background: rgba(79, 64, 95, 0.2);
    box-shadow: 0 10px 20px rgba(79, 64, 95, 0.12);
}

.expand-btn svg {
    position: absolute;
    inset: 0;
    margin: auto;
    display: block;
    width: 22px;
    height: 22px;
}

.expand-btn svg[hidden] {
    display: none !important;
}

html.light-mode .videos-section .expand-btn {
    background: rgba(79, 64, 95, 0.08) !important;
    border-color: rgba(79, 64, 95, 0.2) !important;
    color: var(--color-brown) !important;
    box-shadow: 0 8px 18px rgba(79, 64, 95, 0.08) !important;
}

html.light-mode .videos-section .expand-btn:hover {
    background: rgba(79, 64, 95, 0.13) !important;
    box-shadow: 0 10px 20px rgba(79, 64, 95, 0.1) !important;
}

html.dark-mode .expand-btn {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

html.dark-mode .expand-btn:hover {
    background: rgba(255, 255, 255, 0.16);
}

.empty-state {
    margin: 0;
    font-size: 16px;
    color: #6b6258;
}

html.dark-mode .empty-state {
    color: #b3b3b3;
}

/* Swiper */
.video-swiper {
    --edge-fade-width: 180px;
    --fade-bottom-space: 50px;
    --rail-center-y: 50%;
    width: 100%;
    position: relative;
    padding: 20px 50px 50px;
    overflow: hidden;
}

.video-swiper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: var(--edge-fade-width);
    height: calc(100% - var(--fade-bottom-space));
    pointer-events: none;
    z-index: 10;
    background: linear-gradient(
        to right,
        rgba(var(--edge-fade-rgb), 0) 0%,
        rgba(var(--edge-fade-rgb), 0.05) 10%,
        rgba(var(--edge-fade-rgb), 0.12) 20%,
        rgba(var(--edge-fade-rgb), 0.22) 30%,
        rgba(var(--edge-fade-rgb), 0.35) 40%,
        rgba(var(--edge-fade-rgb), 0.5) 50%,
        rgba(var(--edge-fade-rgb), 0.65) 60%,
        rgba(var(--edge-fade-rgb), 0.78) 70%,
        rgba(var(--edge-fade-rgb), 0.88) 80%,
        rgba(var(--edge-fade-rgb), 0.95) 90%,
        rgba(var(--edge-fade-rgb), 1) 100%
    );
    transition: opacity 0.3s ease;
}

.video-swiper.swiper-end::after,
.videos-section.is-expanded .video-swiper::after {
    opacity: 0;
}

.video-swiper.swiper-final-page::after,
.video-swiper.swiper-final-page.swiper-end::after {
    left: 0;
    right: auto;
    opacity: 1;
    background: linear-gradient(
        to left,
        rgba(var(--edge-fade-rgb), 0) 0%,
        rgba(var(--edge-fade-rgb), 0.05) 10%,
        rgba(var(--edge-fade-rgb), 0.12) 20%,
        rgba(var(--edge-fade-rgb), 0.22) 30%,
        rgba(var(--edge-fade-rgb), 0.35) 40%,
        rgba(var(--edge-fade-rgb), 0.5) 50%,
        rgba(var(--edge-fade-rgb), 0.65) 60%,
        rgba(var(--edge-fade-rgb), 0.78) 70%,
        rgba(var(--edge-fade-rgb), 0.88) 80%,
        rgba(var(--edge-fade-rgb), 0.95) 90%,
        rgba(var(--edge-fade-rgb), 1) 100%
    );
}

.video-swiper .swiper-pagination {
    bottom: 10px !important;
    left: 0 !important;
    width: 100% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transform: none;
}

.video-swiper .swiper-pagination:empty {
    display: none !important;
}

.video-swiper .swiper-pagination .swiper-pagination-fast-forward {
    display: none;
}

.video-swiper .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    margin: 0 5px !important;
    opacity: 0.4;
    background: var(--color-tan-medium, #a89785);
    transition: all 0.3s ease;
}

.video-swiper .swiper-pagination-bullet-active {
    opacity: 1;
    transform: scale(1.2);
    background: var(--color-brown, #584943);
}

html.dark-mode .video-swiper .swiper-pagination-bullet {
    background: #ffffff;
    opacity: 0.38;
}

html.dark-mode .video-swiper .swiper-pagination-bullet-active {
    background: #ffffff;
    opacity: 1;
}

@media (max-width: 768px) {
    .video-swiper .swiper-pagination {
        gap: 0;
    }

    .video-swiper .swiper-pagination .swiper-pagination-fast-forward {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 36px;
        height: 36px;
        margin-left: 16px;
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--color-tan-medium, #a89785);
        cursor: pointer;
        opacity: 0.72;
        transition: color 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
    }

    .video-swiper .swiper-pagination .swiper-pagination-fast-forward svg {
        display: block;
        width: 26px;
        height: 26px;
        overflow: visible;
    }

    .video-swiper .swiper-pagination .swiper-pagination-fast-forward:hover,
    .video-swiper .swiper-pagination .swiper-pagination-fast-forward:focus-visible {
        opacity: 1;
        transform: translateX(1px);
    }

    .video-swiper .swiper-pagination .swiper-pagination-fast-forward-active {
        color: var(--color-brown, #584943);
        opacity: 1;
    }

    html.dark-mode .video-swiper .swiper-pagination .swiper-pagination-fast-forward {
        color: rgba(255, 255, 255, 0.72);
    }

    html.dark-mode .video-swiper .swiper-pagination .swiper-pagination-fast-forward-active {
        color: #ffffff;
    }
}

.videos-section .swiper-button-next,
.videos-section .swiper-button-prev {
    position: absolute !important;
    top: 50% !important;
    width: 48px !important;
    height: 48px !important;
    margin: 0 !important;
    transform: translateY(-50%) !important;
    border-radius: 50% !important;
    background: rgba(79, 64, 95, 0.14) !important;
    box-shadow: 0 10px 24px rgba(79, 64, 95, 0.12) !important;
    color: var(--color-brown) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: transform 0.2s ease !important, box-shadow 0.2s ease !important;
    z-index: 14 !important;
}

.videos-section .swiper-button-prev {
    left: 14px !important;
}

.videos-section .swiper-button-next {
    right: 14px !important;
}

.videos-section .swiper-button-next:hover,
.videos-section .swiper-button-prev:hover {
    transform: translateY(-50%) scale(1.04) !important;
    background: rgba(79, 64, 95, 0.22) !important;
    box-shadow: 0 14px 28px rgba(79, 64, 95, 0.18) !important;
}

.videos-section .swiper-button-next:after,
.videos-section .swiper-button-prev:after {
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
}

html.dark-mode .videos-section .swiper-button-next,
html.dark-mode .videos-section .swiper-button-prev {
    background: rgba(54, 54, 54, 0.96) !important;
    color: #ffffff !important;
}

.video-swiper .swiper-wrapper {
    align-items: stretch;
}

.video-swiper .swiper-slide {
    display: flex;
    height: auto;
    flex-shrink: 0;
}

.youtube-full-section .swiper-slide {
    width: 350px !important;
}

.youtube-reels-section .swiper-slide {
    width: 250px !important;
}

.video-swiper .swiper-slide-view-all {
    display: flex;
    height: auto;
}

.youtube-full-section .swiper-slide-view-all.swiper-slide-view-all-compact {
    width: 180px !important;
}

.youtube-full-swiper {
    --edge-fade-width: 180px;
    --video-preinit-gap: 22px;
    padding-left: 20px;
    padding-right: 20px;
}

.youtube-reels-swiper {
    --edge-fade-width: 132px;
    --video-preinit-gap: 20px;
    padding-left: 20px;
    padding-right: 20px;
}

.tiktok-section .swiper-slide {
    width: 320px !important;
}

.tiktok-text-swiper {
    --edge-fade-width: 180px;
    --fade-bottom-space: 20px;
    --video-preinit-gap: 20px;
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 20px;
}

.tiktok-section .swiper-button-next,
.tiktok-section .swiper-button-prev {
    top: var(--rail-center-y) !important;
}

.video-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.video-carousel-view-all-card {
    position: relative;
    display: flex;
    flex: 1;
    min-height: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 24px;
    border-radius: 16px;
    text-decoration: none;
    background:
        linear-gradient(160deg, rgba(254, 197, 229, 0.42) 0%, rgba(255, 255, 255, 0.88) 48%, rgba(254, 197, 229, 0.96) 100%);
    border: 1px solid rgba(214, 150, 186, 0.34);
    box-shadow: 0 14px 34px rgba(214, 150, 186, 0.14);
    color: var(--color-brown, #584943);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.video-carousel-view-all-card.is-compact {
    padding: 24px 20px;
    gap: 16px;
}

.video-carousel-view-all-card:hover,
.video-carousel-view-all-card:focus-visible {
    transform: translateY(-3px);
    border-color: rgba(214, 150, 186, 0.52);
    box-shadow: 0 20px 40px rgba(214, 150, 186, 0.2);
    color: var(--color-brown, #584943);
}

.video-carousel-view-all-card:visited {
    color: var(--color-brown, #584943);
}

html.dark-mode .video-carousel-view-all-card {
    background:
        linear-gradient(165deg, rgba(189, 47, 47, 0.3) 0%, rgba(44, 17, 17, 0.96) 58%, rgba(24, 9, 9, 0.98) 100%);
    border-color: rgba(219, 93, 93, 0.28);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.4);
    color: #ffffff;
}

html.dark-mode .video-carousel-view-all-card:hover,
html.dark-mode .video-carousel-view-all-card:focus-visible,
html.dark-mode .video-carousel-view-all-card:visited {
    color: #ffffff;
}

html.dark-mode .video-carousel-view-all-card:hover,
html.dark-mode .video-carousel-view-all-card:focus-visible {
    border-color: rgba(235, 121, 121, 0.44);
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.5);
}

.video-carousel-view-all-title {
    margin: 0;
    font-weight: 700;
    font-family: 'Sora', sans-serif;
    font-size: clamp(2rem, 2.2vw, 2.6rem);
    line-height: 0.96;
    letter-spacing: -0.05em;
    text-align: center;
}

.video-carousel-view-all-card.is-compact .video-carousel-view-all-title {
    font-size: clamp(1.6rem, 1.9vw, 2.1rem);
}

.video-carousel-view-all-icon {
    display: inline-flex;
    width: 56px;
    height: 56px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: inherit;
    line-height: 1;
}

.platform-icon-shorts {
    width: 28px;
    height: 36px;
}

.video-carousel-view-all-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.14);
}

html.dark-mode .video-card {
    background: rgba(36, 36, 36, 0.96);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
}

.new-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 12;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #ffffff;
    background: linear-gradient(135deg, #ff4d8d 0%, #7c3aed 100%);
    box-shadow: none;
    overflow: visible;
}

.video-embed {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000000;
    overflow: hidden;
}

html.light-mode .video-embed,
html.light-mode .video-embed-portrait {
    background: #ffffff;
}

.video-embed > .video-preview,
.video-embed > .video-preview:hover,
.video-embed > .video-preview:focus,
.video-embed > .video-preview:active {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    appearance: none;
    -webkit-appearance: none;
    background: transparent !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-preview:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.72);
    outline-offset: -3px;
}

.video-thumbnail {
    position: absolute;
    inset: -1px;
    width: calc(100% + 2px);
    height: calc(100% + 2px);
    max-width: none;
    object-fit: cover;
    background: rgba(0, 0, 0, 0.08);
}

.video-play-button {
    display: block;
    flex: 0 0 auto;
    position: relative;
    z-index: 2;
    width: 68px;
    height: 48px;
    line-height: 0;
    transition: transform 0.25s ease;
}

.video-play-button.is-reel {
    width: 68px;
    height: 68px;
}

.video-preview:hover .video-play-button,
.video-preview:focus-visible .video-play-button {
    transform: scale(1.08);
}

.video-play-button svg {
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.36));
}

.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    z-index: 1;
}

.video-embed-portrait {
    aspect-ratio: 9 / 16;
    background: #000000;
}

.video-info {
    padding: 16px 18px 18px;
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
}

.video-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.42;
    color: var(--color-brown);
    min-height: 2.84em;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

html.dark-mode .video-title {
    color: #ffffff;
}

.video-date {
    margin: 0;
    margin-top: auto;
    font-size: 13px;
    color: #666666;
}

html.dark-mode .video-date {
    color: #b3b3b3;
}

.youtube-reel-card .video-info {
    min-height: 108px;
}

.youtube-reel-card .video-title {
    min-height: 4.26em;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

html.dark-mode .youtube-reel-card {
    background: #050505;
    color: #ffffff;
}

html.dark-mode .youtube-reel-card .video-info {
    background: linear-gradient(180deg, #050505 0%, #141414 100%);
}

html.dark-mode .youtube-reel-card .video-title {
    color: #ffffff;
}

html.dark-mode .youtube-reel-card .video-date {
    color: rgba(255, 255, 255, 0.72);
}

.tiktok-swiper .swiper-pagination {
    display: none !important;
}

.tiktok-link-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
    min-height: 220px;
    padding: 22px;
    border-radius: 18px;
    text-decoration: none;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(242, 235, 245, 0.96) 100%);
    border: 1px solid rgba(79, 64, 95, 0.14);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
    color: var(--color-brown);
}

.tiktok-link-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.12);
}

html.dark-mode .tiktok-link-card {
    background: linear-gradient(135deg, #101010 0%, #1a1a1a 100%);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
    color: #ffffff;
}

.tiktok-link-eyebrow {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(79, 64, 95, 0.82);
}

html.dark-mode .tiktok-link-eyebrow {
    color: #f7f2eb;
}

.tiktok-link-copy {
    margin: 0;
    flex: 1;
    font-size: 18px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    overflow: hidden;
}

.tiktok-link-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: auto;
}

.external-link-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    background: rgba(79, 64, 95, 0.1);
    color: inherit;
}

html.dark-mode .external-link-pill {
    background: rgba(255, 255, 255, 0.1);
}

/* Expanded section state */
.videos-section.is-expanded {
    position: fixed;
    inset: 0;
    z-index: 9999;
    width: 100vw;
    max-width: none;
    height: 100vh;
    margin: 0;
    padding: 56px 32px 28px;
    border-radius: 0;
    overflow-y: auto;
    animation: videos-section-expand 0.24s ease-out;
}

.videos-section.is-expanded .carousel-header {
    position: sticky;
    top: 0;
    z-index: 18;
    margin-bottom: 24px;
    padding-bottom: 18px;
    background: transparent;
}

.videos-section.is-expanded .video-swiper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

.videos-section.is-expanded .swiper-button-next,
.videos-section.is-expanded .swiper-button-prev,
.videos-section.is-expanded .swiper-pagination {
    display: none !important;
}

.videos-section.is-expanded .swiper-wrapper {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    transform: none !important;
}

.videos-section.is-expanded.youtube-reels-section .swiper-wrapper {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.videos-section.is-expanded .swiper-slide {
    width: auto !important;
    margin: 0 !important;
}

@keyframes videos-section-expand {
    from {
        opacity: 0.85;
        transform: scale(0.98);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .videos-section {
        padding: 32px 54px;
    }
}

@media (max-width: 1279px) {
    .videos-section.is-expanded {
        padding-top: calc(var(--jei-header-frame-bottom) + 28px);
    }

    .videos-section.is-expanded .carousel-header {
        position: relative;
        top: auto;
        margin-bottom: 28px;
        padding-bottom: 0;
    }

    .youtube-full-section .swiper-slide {
        width: 320px !important;
    }

    .youtube-reels-section .swiper-slide {
        width: 232px !important;
    }

    .youtube-full-swiper {
        --video-preinit-gap: 20px;
    }

    .youtube-reels-swiper {
        --video-preinit-gap: 18px;
    }
}

@media (max-width: 768px) {
    :root {
        --videos-mobile-header-clearance: calc(var(--jei-header-frame-bottom) + 15px);
    }

    .videos-page {
        padding: 20px 10px;
    }

    .page-title {
        font-size: 32px;
        margin-bottom: 30px;
    }

    .carousels-wrapper {
        gap: 22px;
    }

    .youtube-connected-group .youtube-connected-primary {
        padding-bottom: 18px;
    }

    .youtube-connected-group .youtube-connected-secondary {
        padding-top: 18px;
    }

    .youtube-connected-group .youtube-connected-secondary .carousel-title {
        font-size: 22px;
    }

    .videos-section {
        padding: 24px 18px 20px;
    }

    .carousel-header {
        align-items: flex-start;
    }

    .carousel-title {
        font-size: 24px;
    }

    .platform-cta {
        min-height: 38px;
        padding: 8px 14px;
        font-size: 13px;
    }

    .expand-btn {
        width: 44px;
        height: 44px;
    }

    .video-swiper {
        padding: 10px 30px 48px;
    }

    .videos-section .swiper-button-prev {
        left: 2px !important;
    }

    .videos-section .swiper-button-next {
        right: 2px !important;
    }

    .youtube-full-section .swiper-slide,
    .tiktok-section .swiper-slide {
        width: 280px !important;
    }

    .youtube-reels-section .swiper-slide {
        width: 214px !important;
    }

    .youtube-reels-swiper {
        --edge-fade-width: 88px;
        --video-preinit-gap: 16px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .youtube-full-swiper {
        --edge-fade-width: 112px;
        --video-preinit-gap: 18px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .tiktok-text-swiper {
        --edge-fade-width: 112px;
        --video-preinit-gap: 18px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .videos-section.is-expanded {
        inset: var(--videos-mobile-header-clearance) 0 0 0;
        width: 100%;
        height: auto;
        padding: 18px 16px calc(20px + var(--jei-safe-area-bottom));
        border-top-left-radius: 24px;
        border-top-right-radius: 24px;
    }

    .videos-section.is-expanded .swiper-wrapper,
    .videos-section.is-expanded.youtube-reels-section .swiper-wrapper {
        grid-template-columns: 1fr !important;
    }
}

/* Prevent connected cards before Swiper initializes */
.video-swiper:not(.swiper-initialized) .swiper-wrapper {
    display: flex;
    align-items: stretch;
    gap: var(--video-preinit-gap, 20px);
}

.video-swiper:not(.swiper-initialized) .swiper-slide {
    margin-right: 0 !important;
}
