:root {
    --oe-blue: #00AEEF;
    --oe-blue-dark: #008ccb;
    --oe-navy: #29308F;
    --soft-blue: #E8F8FF;
    --sky-bg: #F4FBFF;
    --text: #24324B;
    --muted: #6E7890;
    --white: #FFFFFF;
    --danger: #EF4444;
    --success: #16A34A;
    --warning: #F59E0B;
    --shadow: 0 22px 55px rgba(0, 174, 239, 0.16);
    --soft-shadow: 0 16px 36px rgba(36, 50, 75, 0.10);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Be Vietnam Pro", "Segoe UI", Tahoma, Arial, Helvetica, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 8% 8%, rgba(0, 174, 239, 0.14), transparent 28%),
        radial-gradient(circle at 92% 0%, rgba(41, 48, 143, 0.10), transparent 24%),
        linear-gradient(180deg, #F8FDFF 0%, #EEF9FF 46%, #FFFFFF 100%);
    min-height: 100vh;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

body,
button,
input,
select,
textarea {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    min-height: 86px;
    padding: 14px clamp(18px, 4vw, 56px);
    display: grid;
    grid-template-columns: 210px minmax(220px, 1fr);
    gap: 26px;
    align-items: center;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(0, 174, 239, 0.14);
    box-shadow: 0 8px 24px rgba(41, 48, 143, 0.07);
}

.brand-ocean,
.brand-program {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.brand-ocean img {
    width: 180px;
    max-height: 68px;
    object-fit: contain;
}

.brand-program {
    justify-content: center;
}

.brand-program img {
    width: min(360px, 100%);
    max-height: 74px;
    object-fit: contain;
}


.page-shell {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 58px;
}

.hero {
    position: relative;
    overflow: hidden;
    border-radius: 36px;
    padding: clamp(26px, 5vw, 58px);
    margin-bottom: 34px;
    background:
        linear-gradient(135deg, rgba(0, 174, 239, 0.96), rgba(41, 48, 143, 0.94)),
        url("../ttg.webp") center/cover no-repeat;
    color: var(--white);
    box-shadow: var(--shadow);
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -50px -100px auto;
    width: 250px;
    height: 250px;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 50%;
}

.hero-small {
    padding: 34px clamp(24px, 4vw, 46px);
}

.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
    align-items: center;
    gap: 28px;
}

.hero h1 {
    margin: 8px 0 12px;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 0.98;
    letter-spacing: -1.8px;
}

.hero h1 span {
    color: #DFF8FF;
    text-shadow: 0 4px 0 rgba(0, 0, 0, 0.08);
}

.hero p {
    max-width: 760px;
    margin: 0 0 24px;
    font-size: 17px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.92);
}

.hero-visual {
    position: relative;
    z-index: 1;
    padding: 22px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.16);
}

.hero-visual img {
    width: 100%;
    display: block;
    filter: drop-shadow(0 20px 28px rgba(0, 0, 0, 0.22));
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--oe-blue);
    text-transform: uppercase;
    letter-spacing: 1.4px;
    font-size: 12px;
    font-weight: 900;
}

.hero .eyebrow {
    color: #FFFFFF;
    opacity: 0.92;
}

.page-title-bar {
    margin: 6px 0 28px;
    padding: 22px 26px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(0, 174, 239, 0.14);
    box-shadow: var(--soft-shadow);
}

.page-title-bar h1 {
    margin: 4px 0 6px;
    color: var(--oe-navy);
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.1;
    letter-spacing: -0.8px;
}

.page-title-bar p:last-child {
    margin: 0;
    max-width: 820px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.65;
}

.upload-layout {
    display: grid;
    grid-template-columns: 40% 60%;
    gap: 24px;
    align-items: stretch;
    margin-bottom: 36px;
}

.form-panel,
.preview-panel,
.filter-card {
    min-height: 60vh;
    padding: 26px;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(0, 174, 239, 0.16);
    box-shadow: var(--soft-shadow);
}

.panel-heading {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 24px;
}

.panel-heading h2,
.section-heading h2 {
    margin: 0;
    color: var(--oe-navy);
    font-size: 26px;
}

.bubble-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--soft-blue), #FFFFFF);
    box-shadow: inset 0 0 0 1px rgba(0, 174, 239, 0.16);
    font-size: 24px;
}

.contest-form,
.filter-form {
    display: grid;
    gap: 16px;
}

.contest-form label,
.filter-form label {
    display: grid;
    gap: 8px;
    font-weight: 800;
    color: var(--oe-navy);
}

input,
select {
    width: 100%;
    border: 1.5px solid rgba(0, 174, 239, 0.28);
    border-radius: 16px;
    padding: 14px 15px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    font: inherit;
    outline: none;
    transition: 0.18s ease;
}

input:focus,
select:focus {
    border-color: var(--oe-blue);
    box-shadow: 0 0 0 5px rgba(0, 174, 239, 0.12);
}

.form-note {
    margin: 0;
    padding: 13px 14px;
    border-radius: 16px;
    background: var(--soft-blue);
    color: var(--muted);
    line-height: 1.55;
    font-size: 14px;
}

.btn {
    appearance: none;
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 900;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.18s ease;
}

.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.btn-primary,
.btn-approve {
    color: #FFFFFF;
    background: linear-gradient(135deg, var(--oe-blue), var(--oe-navy));
    box-shadow: 0 14px 30px rgba(0, 174, 239, 0.25);
}

.btn-primary:hover,
.btn-approve:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 36px rgba(0, 174, 239, 0.32);
}

.btn-reject {
    color: #FFFFFF;
    background: linear-gradient(135deg, #FF6B6B, #DC2626);
}

.btn-delete {
    color: #FFFFFF;
    background: linear-gradient(135deg, #FB923C, #EA580C);
}

.btn-delete:hover,
.btn-reject:hover {
    transform: translateY(-1px);
}

.btn-light {
    background: #FFFFFF;
    color: var(--oe-navy);
    border: 1px solid rgba(0, 174, 239, 0.22);
}

.preview-panel {
    display: flex;
    flex-direction: column;
}

.preview-box {
    flex: 1;
    min-height: 420px;
    border-radius: 26px;
    border: 2px dashed rgba(0, 174, 239, 0.32);
    background:
        linear-gradient(135deg, rgba(232, 248, 255, 0.76), rgba(255, 255, 255, 0.94)),
        radial-gradient(circle at 20% 20%, rgba(0, 174, 239, 0.12), transparent 32%);
    display: grid;
    place-items: center;
    padding: 20px;
    overflow: hidden;
}

.preview-placeholder {
    text-align: center;
    color: var(--muted);
    max-width: 340px;
}

.preview-placeholder span,
.empty-box span {
    font-size: 42px;
}

.preview-placeholder p,
.empty-box p {
    line-height: 1.6;
    margin: 10px 0 0;
}

.section-heading {
    margin: 18px 0 20px;
}

.section-heading.with-count {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.count-pill {
    flex: 0 0 auto;
    padding: 10px 15px;
    border-radius: 999px;
    color: var(--oe-navy);
    background: #FFFFFF;
    box-shadow: var(--soft-shadow);
    font-weight: 900;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-items: start;
}

/* Grid album riêng cho trang index.php, ưu tiên không chồng card khi Facebook iframe nở muộn */
.public-video-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-items: start;
}

.public-video-grid .postcard {
    aspect-ratio: auto;
    min-height: 0;
    height: auto;
    width: 100%;
    overflow: hidden;
}

.public-video-grid .postcard-top {
    min-height: auto;
}

.public-video-grid .video-frame {
    flex: 0 0 auto;
    display: block;
    min-height: clamp(420px, 34vw, 760px);
    align-items: start;
    padding: 8px;
}

.public-video-grid .video-frame .fb-video,
.public-video-grid .video-frame span,
.public-video-grid .video-frame iframe {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
}

.public-video-grid .video-frame iframe {
    margin: 0 auto;
}

.public-video-grid .video-card.video-vertical .video-frame {
    background: linear-gradient(135deg, #E8F8FF, #FFFFFF);
}

.public-video-grid .video-card.video-horizontal .video-frame {
    background: linear-gradient(135deg, #FFFFFF, #E8F8FF);
}

.video-card.video-only {
    padding: 0;
    gap: 0;
    border: 1px solid rgba(0, 174, 239, 0.22);
    background: #ffffff;
}

.video-card.video-only::before {
    display: none;
}

.video-card.video-only:hover {
    transform: none;
}

.video-card.video-only .video-frame {
    width: 100%;
    min-height: 0;
    height: auto;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    background: #ffffff;
}

.video-card.video-only .fb-video,
.video-card.video-only .fb-video > span,
.video-card.video-only .fb-video iframe {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0;
    height: auto;
    margin: 0 auto;
}


.video-grid.empty-state,
.video-grid:has(.empty-box) {
    grid-template-columns: 1fr;
}

.empty-box {
    min-height: 220px;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 30px;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.82);
    border: 1px dashed rgba(0, 174, 239, 0.35);
    color: var(--muted);
}

.postcard {
    position: relative;
    aspect-ratio: 1 / 1;
    padding: 18px;
    border-radius: 30px;
    background:
        linear-gradient(#FFFFFF, #FFFFFF) padding-box,
        linear-gradient(135deg, rgba(0, 174, 239, 0.8), rgba(41, 48, 143, 0.72), rgba(255, 255, 255, 0.95)) border-box;
    border: 2px solid transparent;
    box-shadow: var(--soft-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: 0.2s ease;
}

.video-card.postcard,
.video-card .video-frame,
.video-card .card-click-layer,
.video-card .badge,
.video-card .btn {
    border-radius: 0 !important;
}

.postcard::before {
    content: "";
    position: absolute;
    right: -40px;
    top: -40px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(0, 174, 239, 0.16), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.postcard:hover {
    transform: translateY(-4px);
    box-shadow: 0 26px 50px rgba(0, 174, 239, 0.22);
}

.postcard-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    min-height: 62px;
    position: relative;
    z-index: 1;
}

.postcard h3 {
    margin: 0;
    color: var(--oe-navy);
    font-size: 20px;
    line-height: 1.15;
}

.postcard-top-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 6px;
    position: relative;
    z-index: 3;
}

.open-video-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 116px;
    min-height: 38px;
    padding: 9px 16px;
    border: 0;
    border-radius: 8px !important;
    background: linear-gradient(135deg, #00AEEF, #1565C0);
    box-shadow: 0 8px 18px rgba(0, 126, 190, 0.24);
    color: #fff !important;
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
    text-decoration: none !important;
    white-space: nowrap;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.open-video-btn::before {
    content: "▶";
    margin-right: 7px;
    font-size: 12px;
}

.open-video-btn:hover,
.open-video-btn:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 11px 23px rgba(0, 126, 190, 0.32);
    filter: brightness(1.05);
}

.open-video-btn:active {
    transform: translateY(0);
}

@media (max-width: 640px) {
    .open-video-btn {
        min-width: 104px;
        min-height: 36px;
        padding: 8px 12px;
        font-size: 13px;
    }
}

.badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.badge-pending {
    color: #965A00;
    background: #FFF4D8;
}

.badge-approved {
    color: #066E35;
    background: #DDFBEA;
}

.badge-rejected {
    color: #A91919;
    background: #FFE3E3;
}

.video-frame {
    flex: 1 1 auto;
    min-height: 0;
    border-radius: 22px;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #E9F9FF, #FFFFFF);
    box-shadow: inset 0 0 0 1px rgba(0, 174, 239, 0.16);
    position: relative;
    z-index: 1;
}

.video-frame .fb-video,
.preview-box .fb-video {
    width: 100% !important;
    max-width: 100%;
    text-align: center;
}

.video-frame iframe,
.preview-box iframe {
    max-width: 100% !important;
}

.postcard-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    position: relative;
    z-index: 1;
}

.postcard-info span {
    color: var(--oe-blue-dark);
}

.card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    position: relative;
    z-index: 2;
}

.card-actions-admin .btn-delete {
    grid-column: 1 / -1;
}

.video-card.is-removing {
    opacity: 0;
    transform: scale(0.96);
    pointer-events: none;
    transition: 0.22s ease;
}

.card-click-layer {
    position: absolute;
    inset: 0;
    z-index: 5;
    border-radius: 30px;
}


.filter-card {
    min-height: auto;
    margin-bottom: 26px;
}

.filter-form {
    grid-template-columns: minmax(240px, 1fr) 220px auto;
    align-items: end;
}

.filter-actions {
    display: flex;
    gap: 10px;
}

.message {
    display: none;
    margin: 14px 0;
    padding: 13px 15px;
    border-radius: 16px;
    font-weight: 800;
    line-height: 1.5;
}

.message.show {
    display: block;
}

.message.success {
    color: #066E35;
    background: #DDFBEA;
}

.message.error {
    color: #A91919;
    background: #FFE3E3;
}

.site-footer {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto 28px;
    padding: 22px;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--muted);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 174, 239, 0.14);
}


/* Modal thông báo/xác nhận thay cho alert(), confirm(), prompt() */
.ltg-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(36, 50, 75, 0.42);
    backdrop-filter: blur(10px);
}

.ltg-modal-backdrop.is-open {
    display: flex;
}

.ltg-modal {
    width: min(460px, 100%);
    border-radius: 28px;
    background:
        linear-gradient(#FFFFFF, #FFFFFF) padding-box,
        linear-gradient(135deg, rgba(0, 174, 239, 0.92), rgba(41, 48, 143, 0.78)) border-box;
    border: 2px solid transparent;
    box-shadow: 0 26px 70px rgba(36, 50, 75, 0.28);
    overflow: hidden;
    transform: translateY(8px) scale(0.98);
    opacity: 0;
    transition: 0.18s ease;
}

.ltg-modal-backdrop.is-open .ltg-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.ltg-modal-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 22px 24px 12px;
}

.ltg-modal-icon {
    width: 50px;
    height: 50px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: #FFFFFF;
    background: linear-gradient(135deg, var(--oe-blue), var(--oe-navy));
    font-size: 22px;
    box-shadow: 0 12px 26px rgba(0, 174, 239, 0.24);
}

.ltg-modal-title-wrap {
    min-width: 0;
}

.ltg-modal-eyebrow {
    margin: 0 0 2px;
    color: var(--oe-blue-dark);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.1px;
}

.ltg-modal-title {
    margin: 0;
    color: var(--oe-navy);
    font-size: 22px;
    line-height: 1.2;
}

.ltg-modal-close {
    margin-left: auto;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 999px;
    background: var(--soft-blue);
    color: var(--oe-navy);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.ltg-modal-body {
    padding: 0 24px 20px;
}

.ltg-modal-message {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
    white-space: pre-line;
}

.ltg-modal-input {
    margin-top: 16px;
}

.ltg-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px 24px;
}

.ltg-modal-danger .ltg-modal-icon {
    background: linear-gradient(135deg, #FF6B6B, #DC2626);
    box-shadow: 0 12px 26px rgba(239, 68, 68, 0.2);
}

.ltg-modal-success .ltg-modal-icon {
    background: linear-gradient(135deg, #34D399, #16A34A);
    box-shadow: 0 12px 26px rgba(22, 163, 74, 0.2);
}

.ltg-modal-warning .ltg-modal-icon {
    background: linear-gradient(135deg, #FBBF24, #F59E0B);
    box-shadow: 0 12px 26px rgba(245, 158, 11, 0.2);
}

@media (max-width: 1100px) {
    .topbar {
        grid-template-columns: 170px 1fr;
    }

    .brand-program {
        justify-content: flex-end;
    }


    .upload-layout,
    .home-hero {
        grid-template-columns: 1fr;
    }

    .form-panel,
    .preview-panel {
        min-height: auto;
    }

    .video-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .public-video-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-form {
        grid-template-columns: 1fr 1fr;
    }

    .filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .topbar {
        position: static;
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 14px;
    }

    .brand-ocean img {
        width: 160px;
    }

    .brand-program img {
        width: 300px;
    }


    .page-shell {
        width: min(100% - 20px, 1240px);
        padding-top: 18px;
    }

    .hero,
    .page-title-bar,
    .form-panel,
    .preview-panel,
    .filter-card {
        border-radius: 24px;
    }

    .video-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .public-video-grid {
        grid-template-columns: 1fr;
    }

    .filter-form {
        grid-template-columns: 1fr;
    }

    .section-heading.with-count {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* Phân trang trang chủ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 26px;
}

.pagination-link,
.pagination-ellipsis {
    min-width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 900;
    text-decoration: none;
}

.pagination-link {
    color: var(--oe-navy);
    background: #FFFFFF;
    border: 1px solid rgba(0, 174, 239, 0.22);
    box-shadow: 0 8px 20px rgba(41, 48, 143, 0.08);
    transition: 0.18s ease;
}

.pagination-link:hover,
.pagination-link.is-active {
    color: #FFFFFF;
    background: linear-gradient(135deg, var(--oe-blue), var(--oe-navy));
    transform: translateY(-1px);
}

.pagination-link.is-disabled {
    opacity: 0.38;
    pointer-events: none;
}

.pagination-arrow {
    font-size: 25px;
    line-height: 1;
}

.pagination-ellipsis {
    color: var(--muted);
}


/* Branch filter and pinned video enhancements */
.public-filter-card {
    margin-bottom: 30px;
}

.public-filter-form {
    grid-template-columns: minmax(260px, 1fr) auto;
}

.pinned-heading {
    margin-top: 26px;
}

.pinned-video-grid {
    margin-bottom: 34px;
    padding: 18px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(255, 244, 216, 0.72), rgba(232, 248, 255, 0.82));
    border: 1px solid rgba(245, 158, 11, 0.26);
    box-shadow: var(--soft-shadow);
}

.pinned-video-grid .postcard {
    box-shadow: 0 22px 50px rgba(245, 158, 11, 0.18);
}

.card-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex: 0 0 auto;
}

.badge-pinned {
    color: #92400E;
    background: #FEF3C7;
    border: 1px solid rgba(245, 158, 11, 0.32);
}

.btn-pin {
    color: #FFFFFF;
    background: linear-gradient(135deg, #FBBF24, #F59E0B);
}

.btn-unpin {
    color: var(--oe-navy);
    background: #FFF7D6;
    border: 1px solid rgba(245, 158, 11, 0.28);
}

.card-actions-admin {
    grid-template-columns: 1fr 1fr;
}

.card-actions-admin .btn-delete {
    grid-column: 1 / -1;
}

@media (max-width: 720px) {
    .public-filter-form {
        grid-template-columns: 1fr;
    }

    .card-badges {
        align-items: flex-start;
    }
}


/* Public index: hide approval badges and normalize pinned badge text */
.mode-public .badge-approved,
.mode-public .badge-rejected,
.mode-public .badge-pending {
    display: none !important;
}

.mode-public .badge-pinned {
    font-size: 0 !important;
}

.mode-public .badge-pinned::after {
    content: "📌 Được ghim";
    font-size: 12px;
    line-height: 1;
}

/* Featured videos carousel */
.featured-slider {
    position: relative;
    margin-bottom: 34px;
    padding: 18px 18px 14px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(255, 244, 216, 0.72), rgba(232, 248, 255, 0.82));
    border: 1px solid rgba(245, 158, 11, 0.26);
    box-shadow: var(--soft-shadow);
    overflow: hidden;
}

.featured-slider-viewport {
    overflow: hidden;
    width: 100%;
}

.featured-slider-track {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    will-change: transform;
    transition: transform 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

.featured-slider-slide {
    width:350px;
    min-width:350px;
    max-width:350px;
    height:250px;

    flex: 0 0 calc((100% - 48px) / 3);
    min-width: 0;
}

.featured-slider-slide .postcard {
    width: 100%;
    min-height: 0;
    height: auto;
    overflow: hidden;
    box-shadow: 0 22px 50px rgba(245, 158, 11, 0.18);
}

.featured-slider-slide .postcard-top {
    min-height: auto;
}

.featured-slider-slide .video-frame {
    display: block;
    min-height: clamp(420px, 34vw, 760px);
    padding: 8px;
}

.featured-slider-slide .video-frame .fb-video,
.featured-slider-slide .video-frame span,
.featured-slider-slide .video-frame iframe {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
}

.featured-slider-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 16px;
}

.featured-slider-button {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: var(--oe-navy);
    background: #fff;
    box-shadow: 0 10px 25px rgba(14, 46, 81, 0.14);
    font: inherit;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.featured-slider-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(14, 46, 81, 0.2);
}

.featured-slider-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.featured-slider-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(14, 46, 81, 0.25);
    cursor: pointer;
    transition: width 220ms ease, background 220ms ease;
}

.featured-slider-dot.is-active {
    width: 28px;
    background: var(--oe-blue);
}

@media (max-width: 980px) {
    .featured-slider-slide {
    width:350px;
    min-width:350px;
    max-width:350px;
    height:250px;

        flex-basis: calc((100% - 24px) / 2);
    }
}

@media (max-width: 640px) {
    .featured-slider {
        padding: 12px 12px 14px;
    }

    .featured-slider-track {
        gap: 14px;
    }

    .featured-slider-slide {
    width:350px;
    min-width:350px;
    max-width:350px;
    height:250px;

        flex-basis: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .featured-slider-track {
        transition-duration: 1ms;
    }
}

.featured-slider-slide .video-card,.featured-slider-slide .postcard{height:250px;display:flex;flex-direction:column;}
.featured-slider-slide .video-frame{height:250px;flex:1;overflow:hidden;}
.featured-slider-slide .fb-video,.featured-slider-slide iframe{width:100%;height:100%;}


/* Featured slider: video 350x250, contestant name below */
.featured-slider-slide {
    width: 350px;
    min-width: 350px;
    max-width: 350px;
    height: auto;
}

.featured-slider-slide .mode-featured {
    width: 350px;
    height: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: visible;
    background: transparent;
    box-shadow: none;
}

.featured-slider-slide .mode-featured .video-frame {
    width: 350px;
    height: 250px;
    min-height: 250px;
    flex: 0 0 250px;
    padding: 0;
    overflow: hidden;
    border-radius: 14px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-slider-slide .mode-featured .video-frame .fb-video,
.featured-slider-slide .mode-featured .video-frame span,
.featured-slider-slide .mode-featured .video-frame iframe {
    width: 350px !important;
    max-width: 350px !important;
    height: 250px !important;
}

.featured-slider-slide .featured-student-name {
    width: 100%;
    margin: 12px 0 0;
    padding: 0 8px;
    text-align: center;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 800;
    color: var(--oe-navy);
}

.featured-slider-slide .featured-student-name a {
    color: inherit;
    text-decoration: none;
}

.featured-slider-slide .featured-student-name a:hover,
.featured-slider-slide .featured-student-name a:focus-visible {
    text-decoration: underline;
}

/* Featured slider: exactly three 350px videos visible on desktop */
.featured-slider-viewport {
    width: min(100%, 1098px);
    max-width: 1098px;
    margin-inline: auto;
}

.featured-slider-track {
    width: max-content;
    align-items: flex-start;
}

/* Public album: masonry video-only layout, height follows the Facebook iframe. */
.public-video-grid {
    display: block;
    column-count: 3;
    column-gap: 24px;
}

.public-video-grid .video-card.video-only {
    display: inline-block;
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 0 0 24px;
    break-inside: avoid;
    page-break-inside: avoid;
    overflow: hidden;
}

.public-video-grid .video-card.video-only .video-frame {
    display: block;
    height: auto;
    min-height: 0 !important;
    padding: 0;
}

.public-video-grid .video-card.video-only .fb-video,
.public-video-grid .video-card.video-only .fb-video > span,
.public-video-grid .video-card.video-only .fb-video iframe,
.public-video-grid .video-card.video-only .fb-video-iframe {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto;
    min-height: 0 !important;
}

.featured-slider-slide .video-card.video-only,
.featured-slider-slide .video-card.video-only .video-frame {
    height: auto !important;
    min-height: 0 !important;
    flex: 0 0 auto;
}

@media (max-width: 980px) {
    .public-video-grid {
        column-count: 2;
    }
}

@media (max-width: 640px) {
    .public-video-grid {
        column-count: 1;
    }
}

/* Final featured-slider override: pinned cards show a fixed video plus caption below. */
.featured-slider-slide .video-card.video-only.mode-featured {
    display: block !important;
    width: 350px !important;
    max-width: 350px !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.featured-slider-slide .video-card.video-only.mode-featured .video-frame {
    display: block !important;
    width: 350px !important;
    height: 250px !important;
    min-height: 250px !important;
    overflow: hidden !important;
    border: 1px solid rgba(125, 211, 252, .82);
    border-radius: 0;
    background: #05070a;
    box-shadow: 0 18px 44px rgba(14, 46, 81, .12);
}

.featured-slider-slide .video-card.video-only.mode-featured .fb-video,
.featured-slider-slide .video-card.video-only.mode-featured .fb-video > span,
.featured-slider-slide .video-card.video-only.mode-featured .fb-video iframe {
    width: 350px !important;
    max-width: 350px !important;
    height: 250px !important;
    min-height: 250px !important;
}

/* Final featured-slider override: pinned cards show a fixed video plus caption below. */
.featured-slider-slide .video-card.video-only.mode-featured {
    display: block !important;
    width: 350px !important;
    max-width: 350px !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.featured-slider-slide .video-card.video-only.mode-featured .video-frame {
    display: block !important;
    width: 350px !important;
    height: 250px !important;
    min-height: 250px !important;
    overflow: hidden !important;
    border: 1px solid rgba(125, 211, 252, .82);
    border-radius: 0;
    background: #05070a;
    box-shadow: 0 18px 44px rgba(14, 46, 81, .12);
}

.featured-slider-slide .video-card.video-only.mode-featured .fb-video,
.featured-slider-slide .video-card.video-only.mode-featured .fb-video > span,
.featured-slider-slide .video-card.video-only.mode-featured .fb-video iframe {
    width: 350px !important;
    max-width: 350px !important;
    height: 250px !important;
    min-height: 250px !important;
}

/* Video card overlay: contestant info and Facebook unavailable notice. */
.video-frame {
    position: relative;
}

.video-frame-meta {
    position: absolute;
    left: 12px;
    right: 58px;
    bottom: 12px;
    z-index: 4;
    display: grid;
    gap: 2px;
    width: fit-content;
    max-width: calc(100% - 82px);
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, .26);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(8, 21, 39, .78), rgba(8, 21, 39, .46));
    color: #fff;
    box-shadow: 0 12px 28px rgba(8, 21, 39, .22);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    pointer-events: none;
}

.video-frame.has-facebook-unavailable .video-frame-meta {
    display: none;
}

.video-frame-meta strong,
.video-frame-meta span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-frame-meta strong {
    font-size: 14px;
    font-weight: 900;
    line-height: 1.15;
}

.video-frame-meta span {
    color: rgba(255, 255, 255, .84);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
}

.facebook-unavailable-layer {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(19, 22, 27, .88);
    color: #fff;
    text-align: center;
}

.facebook-unavailable-layer[hidden] {
    display: none !important;
}

.facebook-unavailable-content {
    display: grid;
    justify-items: center;
    gap: 10px;
    max-width: 390px;
}

.facebook-unavailable-identity {
    display: grid;
    gap: 2px;
    max-width: min(100%, 310px);
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 12px;
    background: rgba(8, 21, 39, .52);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}

.facebook-unavailable-identity strong,
.facebook-unavailable-identity span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.facebook-unavailable-identity strong {
    font-size: clamp(13px, 1.3vw, 16px);
    font-weight: 900;
    line-height: 1.15;
}

.facebook-unavailable-identity span {
    color: rgba(255, 255, 255, .78);
    font-size: clamp(11px, 1.05vw, 13px);
    font-weight: 800;
    line-height: 1.2;
}

.facebook-unavailable-content > strong {
    font-size: clamp(13px, 1.45vw, 17px);
    font-weight: 850;
    line-height: 1.28;
}

.facebook-unavailable-content a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #1877f2;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 12px 24px rgba(24, 119, 242, .3);
}

.facebook-unavailable-content a:hover,
.facebook-unavailable-content a:focus-visible {
    filter: brightness(.95);
    transform: translateY(-1px);
}

.featured-slider-slide .video-card.video-only.mode-featured {
    display: block !important;
    width: 350px !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.featured-slider-slide .video-card.video-only.mode-featured .video-frame {
    display: block !important;
    width: 350px !important;
    height: 250px !important;
    min-height: 250px !important;
    overflow: hidden !important;
    border: 1px solid rgba(125, 211, 252, .82);
    border-radius: 0;
    background: #05070a;
    box-shadow: 0 18px 44px rgba(14, 46, 81, .12);
}

.featured-slider-slide .video-card.video-only.mode-featured .fb-video,
.featured-slider-slide .video-card.video-only.mode-featured .fb-video > span,
.featured-slider-slide .video-card.video-only.mode-featured .fb-video iframe {
    width: 350px !important;
    max-width: 350px !important;
    height: 250px !important;
    min-height: 250px !important;
}

.featured-video-caption {
    display: grid;
    gap: 3px;
    width: 100%;
    padding: 10px 4px 0;
    color: var(--oe-navy);
    text-align: center;
}

.featured-video-caption strong,
.featured-video-caption span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.featured-video-caption strong {
    font-size: 16px;
    font-weight: 900;
    line-height: 1.2;
}

.featured-video-caption span {
    color: #51677f;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
}

.featured-slider-slide {
    flex: 0 0 350px !important;
    width: 350px !important;
    min-width: 350px !important;
    max-width: 350px !important;
}

/* Top 10 branch ranking */
.branch-ranking {
    position: relative;
    margin: 34px 0 42px;
    padding: 28px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(255, 205, 86, 0.2), transparent 34%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 255, 0.96));
    box-shadow: 0 24px 60px rgba(14, 46, 81, 0.13);
}

.branch-ranking::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, #f6bf26, #f59e0b 32%, #0d6efd 72%, #0e2e51);
}

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

.branch-ranking-kicker {
    margin: 0 0 5px;
    color: #b87400;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.branch-ranking-header h2 {
    margin: 0;
    color: var(--oe-navy);
    font-size: clamp(23px, 2.5vw, 34px);
    line-height: 1.2;
}

.branch-ranking-header p:last-child {
    margin: 8px 0 0;
    color: #63758a;
    font-size: 14px;
}

.branch-ranking-icon {
    display: grid;
    flex: 0 0 68px;
    width: 68px;
    height: 68px;
    place-items: center;
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 20px;
    background: linear-gradient(145deg, #fff8dc, #fff);
    box-shadow: 0 14px 30px rgba(245, 158, 11, 0.17);
    font-size: 34px;
}

.branch-ranking-table-wrap {
    overflow: hidden;
    border: 1px solid #e5ebf3;
    border-radius: 18px;
    background: #fff;
}

.branch-ranking-table {
    width: 100%;
    border-collapse: collapse;
    color: #24384e;
}

.branch-ranking-table th {
    padding: 15px 20px;
    background: linear-gradient(135deg, #0e2e51, #154f82);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-align: left;
    text-transform: uppercase;
}

.branch-ranking-table th:first-child,
.branch-ranking-table td:first-child {
    width: 130px;
    text-align: center;
}

.branch-ranking-table th:last-child,
.branch-ranking-table td:last-child {
    width: 180px;
    text-align: right;
}

.branch-ranking-table td {
    padding: 14px 20px;
    border-bottom: 1px solid #edf1f6;
    background: rgba(255, 255, 255, 0.98);
    vertical-align: middle;
}

.branch-ranking-table tbody tr:last-child td {
    border-bottom: 0;
}

.branch-ranking-table tbody tr {
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.branch-ranking-table tbody tr:hover td {
    background: #f7faff;
}

.ranking-number {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    background: #edf3f9;
    color: var(--oe-navy);
    font-weight: 900;
}

.is-top-1 .ranking-number {
    background: linear-gradient(145deg, #ffe891, #f5b900);
    color: #6b4700;
    box-shadow: 0 8px 18px rgba(245, 185, 0, 0.28);
}

.is-top-2 .ranking-number {
    background: linear-gradient(145deg, #f5f7fa, #bfc8d3);
    color: #435060;
}

.is-top-3 .ranking-number {
    background: linear-gradient(145deg, #f1c19d, #bd7542);
    color: #572b0d;
}

.ranking-branch-name {
    font-size: 15px;
    font-weight: 800;
    color: var(--oe-navy);
}

.ranking-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 104px;
    padding: 7px 12px;
    border-radius: 999px;
    background: #edf6ff;
    color: #0968bd;
    font-size: 14px;
    font-weight: 900;
}

@media (max-width: 700px) {
    .branch-ranking {
        padding: 22px 15px 16px;
        border-radius: 20px;
    }

    .branch-ranking-header {
        align-items: flex-start;
    }

    .branch-ranking-icon {
        width: 52px;
        height: 52px;
        flex-basis: 52px;
        border-radius: 16px;
        font-size: 27px;
    }

    .branch-ranking-table-wrap {
        border: 0;
        background: transparent;
        overflow: visible;
    }

    .branch-ranking-table,
    .branch-ranking-table tbody,
    .branch-ranking-table tr,
    .branch-ranking-table td {
        display: block;
        width: 100%;
    }

    .branch-ranking-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    .branch-ranking-table tr {
        display: grid;
        grid-template-columns: 52px 1fr auto;
        align-items: center;
        gap: 10px;
        margin-bottom: 10px;
        padding: 12px;
        border: 1px solid #e7edf5;
        border-radius: 15px;
        background: #fff;
        box-shadow: 0 8px 22px rgba(14, 46, 81, 0.07);
    }

    .branch-ranking-table td,
    .branch-ranking-table td:first-child,
    .branch-ranking-table td:last-child {
        width: auto;
        padding: 0;
        border: 0;
        text-align: left;
    }

    .ranking-number {
        width: 40px;
        height: 40px;
    }

    .ranking-count {
        min-width: 0;
        padding: 6px 9px;
        font-size: 12px;
        white-space: nowrap;
    }
}

/* Compact home-page ranking and filter */
.branch-ranking-collapsible {
    margin: 22px auto 24px;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(14, 46, 81, .12);
    border-radius: 18px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 12px 34px rgba(14, 46, 81, .09);
}

.branch-ranking-collapsible::before { display: none; }

.branch-ranking-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
    cursor: pointer;
    list-style: none;
    background: linear-gradient(135deg, #fffaf0, #f5f9ff);
}

.branch-ranking-summary::-webkit-details-marker { display: none; }
.branch-ranking-summary::marker { display: none; content: ""; }

.branch-ranking-summary-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.branch-ranking-summary-copy strong {
    color: var(--oe-navy);
    font-size: 17px;
    line-height: 1.3;
}

.branch-ranking-summary-copy small {
    color: #718096;
    font-size: 12px;
}

.branch-ranking-summary-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    color: #0d6efd;
    font-size: 13px;
    font-weight: 800;
}

.summary-collapse { display: none; }
.branch-ranking-collapsible[open] .summary-expand { display: none; }
.branch-ranking-collapsible[open] .summary-collapse { display: inline; }
.summary-chevron { transition: transform .22s ease; }
.branch-ranking-collapsible[open] .summary-chevron { transform: rotate(180deg); }

.branch-ranking-content {
    padding: 0 14px 14px;
    animation: rankingReveal .2s ease;
}

@keyframes rankingReveal {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.branch-ranking-collapsible .branch-ranking-table-wrap {
    border: 0;
    border-radius: 12px;
    box-shadow: none;
}

.branch-ranking-collapsible .branch-ranking-table th {
    padding: 9px 12px;
    font-size: 11px;
}

.branch-ranking-collapsible .branch-ranking-table td {
    padding: 8px 12px;
    font-size: 13px;
}

.branch-ranking-collapsible .ranking-number {
    width: 28px;
    height: 28px;
    font-size: 12px;
}

.branch-ranking-collapsible .ranking-count {
    min-width: 42px;
    padding: 5px 9px;
    font-size: 12px;
}

.compact-filter-card {
    margin: 20px 0 28px;
    padding: 14px 16px;
    border: 1px solid rgba(14, 46, 81, .11);
    border-radius: 16px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 10px 28px rgba(14, 46, 81, .07);
}

.compact-filter-form {
    display: flex;
    align-items: end;
    gap: 12px;
}

.compact-filter-field {
    display: grid;
    flex: 1 1 auto;
    gap: 6px;
    min-width: 0;
}

.compact-filter-field span {
    color: #50657c;
    font-size: 12px;
    font-weight: 800;
}

.compact-filter-field input {
    width: 100%;
    min-height: 42px;
    padding: 9px 13px;
    border: 1px solid #d8e1eb;
    border-radius: 11px;
    background: #fff;
    color: var(--oe-navy);
    box-shadow: inset 0 1px 2px rgba(14,46,81,.03);
}

.compact-filter-field input:focus {
    outline: none;
    border-color: #7bb1ff;
    box-shadow: 0 0 0 3px rgba(13,110,253,.12);
}

.compact-filter-actions {
    display: flex;
    gap: 8px;
    flex: 0 0 auto;
}

.compact-filter-actions .btn {
    min-height: 42px;
    padding: 9px 16px;
    border-radius: 11px;
}

@media (max-width: 680px) {
    .branch-ranking-summary { align-items: flex-start; padding: 14px; }
    .branch-ranking-summary-copy strong { font-size: 15px; }
    .branch-ranking-summary-copy small { display: none; }
    .branch-ranking-summary-action { font-size: 0; }
    .summary-chevron { font-size: 18px; }

    .compact-filter-form { align-items: stretch; flex-direction: column; }
    .compact-filter-actions { width: 100%; }
    .compact-filter-actions .btn { flex: 1; }
}

/* Split Top 10 ranking into two balanced columns */
.branch-ranking-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.branch-ranking-columns .branch-ranking-table-wrap {
    min-width: 0;
}

@media (max-width: 820px) {
    .branch-ranking-columns {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Fallback an toàn cho link Facebook dạng share/fb.watch không thể nhúng iframe */
.facebook-video-fallback {
    width: 100%;
    min-height: 180px;
    height: 100%;
    padding: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-align: center;
    border: 1px solid rgba(24, 119, 242, .22);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(24, 119, 242, .08), rgba(255, 255, 255, .96));
    color: #334155;
}

.facebook-video-fallback a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 16px;
    border-radius: 999px;
    background: #1877f2;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(24, 119, 242, .22);
}

.facebook-video-fallback a:hover {
    transform: translateY(-1px);
    filter: brightness(.96);
}

[data-video-list-section] {
    scroll-margin-top: 18px;
    transition: opacity 0.18s ease;
}

[data-video-list-section].is-loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Final override: index album masonry, no fixed Facebook frame height. */
.public-video-grid {
    display: block !important;
    column-count: 3;
    column-gap: 24px;
}

.public-video-grid .video-card.video-only {
    display: inline-block !important;
    width: 100%;
    height: auto;
    min-height: 0 !important;
    margin: 0 0 24px;
    break-inside: avoid;
    page-break-inside: avoid;
}

.public-video-grid .video-card.video-only .video-frame,
.featured-slider-slide .video-card.video-only .video-frame {
    display: block !important;
    width: 100%;
    flex: none !important;
    height: auto;
    min-height: 0 !important;
    padding: 0;
    overflow: visible;
}

.public-video-grid .video-card.video-only .fb-video,
.public-video-grid .video-card.video-only .fb-video > span,
.public-video-grid .video-card.video-only .fb-video iframe,
.featured-slider-slide .video-card.video-only,
.featured-slider-slide .video-card.video-only .fb-video,
.featured-slider-slide .video-card.video-only .fb-video > span,
.featured-slider-slide .video-card.video-only .fb-video iframe {
    width: 100% !important;
    max-width: 100% !important;
    height: auto;
    min-height: 0 !important;
}

@media (max-width: 980px) {
    .public-video-grid {
        column-count: 2;
    }
}

@media (max-width: 640px) {
    .public-video-grid {
        column-count: 1;
    }
}

/* Final featured-slider override: pinned cards show a fixed video plus caption below. */
.featured-slider-slide .video-card.video-only.mode-featured {
    display: block !important;
    width: 350px !important;
    max-width: 350px !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.featured-slider-slide .video-card.video-only.mode-featured .video-frame {
    display: block !important;
    width: 350px !important;
    height: 250px !important;
    min-height: 250px !important;
    overflow: hidden !important;
    border: 1px solid rgba(125, 211, 252, .82);
    border-radius: 0;
    background: #05070a;
    box-shadow: 0 18px 44px rgba(14, 46, 81, .12);
}

.featured-slider-slide .video-card.video-only.mode-featured .fb-video,
.featured-slider-slide .video-card.video-only.mode-featured .fb-video > span,
.featured-slider-slide .video-card.video-only.mode-featured .fb-video iframe {
    width: 350px !important;
    max-width: 350px !important;
    height: 250px !important;
    min-height: 250px !important;
}
