.videos-page {
    padding: 44px 0 70px;
    color: var(--text);
}

.videos-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.videos-head h1 {
    margin: 0 0 8px;
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -.4px;
}

.videos-head p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
    max-width: 62ch;
}

.videos-tools {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
}

.videos-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid rgba(15, 46, 87, .16);
    border-radius: 14px;
    padding: 10px 12px;
    min-width: 320px;
    box-shadow: 0 10px 24px rgba(2, 8, 23, .06);
}

.videos-search input {
    width: 100%;
    border: 0;
    outline: none;
    font-size: 14px;
    color: var(--text);
    background: transparent;
}

.videos-search button {
    border: 0;
    background: rgba(15, 46, 87, .06);
    color: var(--blue);
    width: 32px;
    height: 32px;
    border-radius: 10px;
    cursor: pointer;
}

.videos-filter select {
    border: 1px solid rgba(15, 46, 87, .16);
    border-radius: 14px;
    padding: 11px 12px;
    background: #fff;
    color: var(--text);
    font-size: 14px;
    box-shadow: 0 10px 24px rgba(2, 8, 23, .06);
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.video-card {
    background: #fff;
    border: 1px solid rgba(15, 46, 87, .12);
    border-radius: calc(var(--radius) + 2px);
    box-shadow: 0 10px 24px rgba(2, 8, 23, .08);
    overflow: hidden;
    transition: transform .12s ease, box-shadow .16s ease;
    margin-bottom: 30px;
}

.video-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(2, 8, 23, .12);
}

.video-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background: rgba(15, 46, 87, .06);
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.play-badge {
    position: absolute;
    inset: auto auto 12px 12px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(15, 46, 87, .92);
    color: #fff;
    box-shadow: 0 10px 20px rgba(15, 46, 87, .22);
    font-size: 16px;
}

.video-body {
    padding: 14px 14px 16px;
}

.video-tag {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(227, 75, 75, .10);
    border: 1px solid rgba(227, 75, 75, .22);
    color: #b42323;
    font-weight: 750;
    font-size: 12px;
}

.video-title {
    margin: 10px 0 8px;
    font-size: 16px;
    letter-spacing: -.2px;
}

.video-desc {
    margin: 0 0 12px;
    color: var(--muted);
    line-height: 1.6;
    font-size: 14px;
}

.video-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 14px;
    border-radius: 12px;
    border: 1px solid rgba(15, 46, 87, .18);
    background: rgba(15, 46, 87, .04);
    color: var(--blue);
    font-weight: 800;
    cursor: pointer;
}

.video-open:hover {
    background: rgba(15, 46, 87, .08);
}

/* Modal */
.video-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 9999;
}

.video-modal[aria-hidden="false"] {
    display: block;
}

.video-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 8, 23, .65);
}

.video-modal__panel {
    position: relative;
    width: min(980px, calc(100% - 28px));
    margin: 6vh auto 0;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(2, 8, 23, .35);
    overflow: hidden;
}

.video-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: rgba(15, 46, 87, .08);
    color: var(--blue);
    cursor: pointer;
    z-index: 2;
}

.video-modal__frame {
    aspect-ratio: 16 / 9;
}

.video-modal__frame iframe {
    width: 100%;
    height: 100%;
    display: block;
}

@media (max-width: 980px) {
    .videos-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .videos-search {
        min-width: 100%;
    }

    .videos-grid {
        grid-template-columns: 1fr;
    }
}

.video-modal {
    position: fixed;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.video-modal.active {
    display: flex;
}

.video-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.75);
}

.video-modal-content {
    position: relative;
    width: 80%;
    max-width: 900px;
    background: #000;
    border-radius: 14px;
    overflow: hidden;
    z-index: 2;
}

.video-modal-content iframe {
    width: 100%;
    height: 500px;
    display: block;
}

.video-close {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 28px;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
}

/* ============================= */
/* CONTAINER */
/* ============================= */

.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 60px auto;
}

/* ============================= */
/* VIDEO CARD */
/* ============================= */

.video-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: 0.35s ease;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
}

.video-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 55px rgba(15, 23, 42, 0.12);
}

/* ============================= */
/* THUMB */
/* ============================= */

.video-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.video-card:hover .video-thumb img {
    transform: scale(1.07);
}

/* ============================= */
/* PLAY BUTTON */
/* ============================= */

.play-btn {
    position: absolute;
    left: 20px;
    bottom: 20px;
    width: 54px;
    height: 54px;
    background: #0f2e57;
    border-radius: 50%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.play-btn::after {
    content: "";
    position: absolute;
    left: 21px;
    top: 17px;
    border-left: 16px solid #fff;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
}

/* ============================= */
/* CONTENT */
/* ============================= */

.video-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.video-badge {
    display: inline-block;
    background: #ffe8e8;
    color: #c62828;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 30px;
    margin-bottom: 14px;
}

.video-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
    color: #0b1220;
}

.video-desc {
    font-size: 15px;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.video-link {
    align-self: flex-start;
    border: 1px solid #d1d5db;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    transition: 0.25s ease;
    background: #fff;
}

.video-card:hover .video-link {
    background: #0f2e57;
    color: #fff;
    border-color: #0f2e57;
}

/* ============================= */
/* MODAL */
/* ============================= */

.video-modal {
    position: fixed;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.video-modal.active {
    display: flex;
}

.video-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
}

.video-modal-content {
    position: relative;
    width: 85%;
    max-width: 950px;
    background: #000;
    border-radius: 18px;
    overflow: hidden;
    z-index: 2;
    animation: modalFade 0.25s ease;
}

.video-modal-content iframe {
    width: 100%;
    height: 520px;
    display: block;
}

.video-close {
    position: absolute;
    top: -45px;
    right: 0;
    font-size: 30px;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
}

/* ============================= */
/* ANIMATION */
/* ============================= */

@keyframes modalFade {
    from {
        transform: scale(0.96);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================= */
/* RESPONSIVE */
/* ============================= */

@media (max-width: 1200px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .video-modal-content iframe {
        height: 300px;
    }
}
