﻿.modal-video-news-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(4, 3, 10, 0.85);
    backdrop-filter: blur(20px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

    .modal-video-news-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }

.modal-video-news-container {
    position: relative;
    background: rgba(18, 16, 32, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    width: 90%;
    max-width: 800px;
    padding: 40px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), 0 0 100px rgba(99, 102, 241, 0.15);
    transform: scale(0.92) translateY(20px);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    height: 85vh;
    overflow: auto;
}

    .modal-video-news-container::-webkit-scrollbar {
        width: 6px;
    }

    .modal-video-news-container::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.02);
        border-radius: 10px;
    }

    .modal-video-news-container::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 10px;
    }

        .modal-video-news-container::-webkit-scrollbar-thumb:hover {
            background: rgba(16, 185, 129, 0.3);
        }

.modal-video-news-overlay.active .modal-video-news-container {
    transform: scale(1) translateY(0);
}

.modal-video-news-close {
    position: absolute;
    top: 24px;
    right: 28px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
    transition: all 0.2s ease;
}

    .modal-video-news-close:hover {
        color: #fff;
        background: rgba(239, 68, 68, 0.2);
        border-color: rgba(239, 68, 68, 0.4);
    }

.modal-video-news-header {
    text-align: center;
    margin-bottom: 24px;
    padding-right: 15px;
}

.modal-video-news-badge {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 12px;
}

.modal-video-news-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 8px 0;
    background: linear-gradient(90deg, #ff758c 0%, #ff7eb3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modal-video-news-header p {
    color: #94a3b8;
    font-size: 14px;
    margin: 0;
}

.modal-video-news-body {
    margin-bottom: 30px;
}

.modal-video-news-video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* Tỉ lệ 16:9 */
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

    .modal-video-news-video-wrapper video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.modal-video-news-footer {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    width: 100%;
}

    .modal-video-news-footer > a {
        text-decoration: none;
    }

.modal-video-news-btn-action {
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    padding: 14px 24px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
    text-align: center;
}

    .modal-video-news-btn-action:hover {
        transform: translateY(-2px);
    }

.modal-video-news-btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

    .modal-video-news-btn-primary:hover {
        box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
    }

.modal-video-news-btn-signup {
    background: #e67e22;
    color: white;
    box-shadow: 0 2px 8px rgba(88, 101, 242, 0.3);
}

    .modal-video-news-btn-signup:hover {
        box-shadow: 0 4px 14px rgba(88, 101, 242, 0.5);
    }

.modal-video-news-btn-discord {
    background: linear-gradient(135deg, #5865F2, #4752c4);
    color: white;
    box-shadow: 0 2px 8px rgba(88, 101, 242, 0.3);
}

    .modal-video-news-btn-discord:hover {
        box-shadow: 0 4px 14px rgba(88, 101, 242, 0.5);
    }

.wfit-content {
    width: fit-content;
}

.modal-video-news-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

    .modal-video-news-btn-secondary:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
    }

.modal-video-news-btn-accent {
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(225, 29, 72, 0.4);
}

    .modal-video-news-btn-accent:hover {
        box-shadow: 0 6px 20px rgba(225, 29, 72, 0.6);
    }


/* Mobile Portrait & Landscape */
@media (max-width: 768px) {
    .app-wrapper {
        padding: 16px;
    }

    .app-header {
        margin-bottom: 24px;
        padding-bottom: 12px;
    }

    .logo-text {
        font-size: 18px;
    }

    .hero-section h1 {
        font-size: 28px;
    }

    .subtitle {
        font-size: 14px;
    }

    /* Grid chuyển thành 1 cột */
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .dash-card {
        padding: 20px;
        border-radius: 16px;
    }

        .dash-card h2 {
            font-size: 20px;
        }

        .dash-card p {
            font-size: 14px;
            margin-bottom: 16px;
        }

    /* Tối ưu hóa Modal cho Mobile */
    .modal-video-news-container {
        width: 95%;
        padding: 24px 16px 20px 16px;
        border-radius: 20px;
    }

    .modal-video-news-close {
        top: 12px;
        right: 12px;
        width: 32px;
        height: 32px;
        font-size: 18px;
    }

    .modal-video-news-header {
        margin-bottom: 16px;
    }

        .modal-video-news-header h3 {
            font-size: 20px;
        }

        .modal-video-news-header p {
            font-size: 12px;
        }

    .modal-video-news-body {
        margin-bottom: 16px;
    }

        .modal-video-news-body::-webkit-scrollbar {
            width: 6px;
        }

        .modal-video-news-body::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.02);
            border-radius: 10px;
        }

        .modal-video-news-body::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 10px;
        }

            .modal-video-news-body::-webkit-scrollbar-thumb:hover {
                background: rgba(16, 185, 129, 0.3);
            }

    .modal-video-news-footer {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .modal-video-news-btn-action {
        width: 100%;
        padding: 14px 20px;
        font-size: 14px;
    }
}

/* Tablet (Màn hình từ 769px tới 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-section h1 {
        font-size: 38px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .modal-video-news-container {
        max-width: 650px;
        padding: 30px;
    }
}


.modal-video-news-training-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 350px;
    overflow-y: auto;
    padding-right: 8px;
}

    .modal-video-news-training-list::-webkit-scrollbar {
        width: 6px;
    }

    .modal-video-news-training-list::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.02);
        border-radius: 10px;
    }

    .modal-video-news-training-list::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 10px;
    }

        .modal-video-news-training-list::-webkit-scrollbar-thumb:hover {
            background: rgba(16, 185, 129, 0.3);
        }

.modal-video-news-training-card {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 18px;
    gap: 20px;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

    .modal-video-news-training-card:hover {
        transform: translateX(6px);
        border-color: rgba(16, 185, 129, 0.3);
        background: rgba(255, 255, 255, 0.04);
    }

.modal-video-news-training-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 12px;
    width: 60px;
    height: 60px;
    min-width: 60px;
    color: white;
    font-family: 'Outfit', sans-serif;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
}

.modal-video-news-day {
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
}

.modal-video-news-month {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 2px;
}

.modal-video-news-training-info {
    flex-grow: 1;
}

    .modal-video-news-training-info h4 {
        font-family: 'Outfit', sans-serif;
        font-size: 17px;
        font-weight: 700;
        margin: 0 0 6px 0;
        color: #fff;
        letter-spacing: 0.5px;
    }

    .modal-video-news-training-info p {
        font-size: 13px;
        color: #94a3b8;
        margin: 4px 0;
        display: flex;
        align-items: center;
        gap: 6px;
    }

@media (max-width: 480px) {
    .modal-video-news-training-card {
        flex-direction: row;
        padding: 12px;
        gap: 12px;
    }

    .modal-video-news-training-date {
        width: 50px;
        height: 50px;
        min-width: 50px;
    }

    .modal-video-news-day {
        font-size: 16px;
    }

    .modal-video-news-month {
        font-size: 9px;
    }

    .modal-video-news-training-info h4 {
        font-size: 14px;
    }

    .modal-video-news-training-info p {
        font-size: 11px;
    }
}


.modal-video-news-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 8px;
}

.modal-video-news-tab-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 600;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.25s ease;
}

    .modal-video-news-tab-btn:hover {
        color: #fff;
        background: rgba(255, 255, 255, 0.04);
    }

    .modal-video-news-tab-btn.active {
        color: #fff;
        background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    }

.modal-video-news-tab-content {
    display: none;
}

    .modal-video-news-tab-content.active {
        display: flex;
        flex-direction: column;
        animation: modalContentFadeIn 0.35s ease;
    }

@keyframes modalContentFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-video-news-date-group-header {
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.8px;
    margin-top: 20px;
    margin-bottom: 8px;
    padding-left: 8px;
    border-left: 3px solid #10b981;
    text-transform: uppercase;
}

#trainingListOnline .modal-video-news-date-group-header {
    border-left-color: #3b82f6;
}

.modal-video-news-date-group-header:first-child {
    margin-top: 0;
}

.modal-video-news-members-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    width: 100%;
}

.modal-video-news-member-card {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 14px;
    gap: 12px;
}

.modal-video-news-member-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: white;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

    .modal-video-news-member-avatar > img {
        width: 44px;
        height: 44px;
        border-radius: 50%;
    }

.modal-video-news-member-info h5 {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
}

.modal-video-news-member-info p {
    font-size: 11px;
    color: #94a3b8;
    margin: 0;
}

/* Danh sách tài liệu */
.modal-video-news-docs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-video-news-doc-item {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 16px;
    text-decoration: none;
    gap: 16px;
    transition: all 0.25s ease;
}

    .modal-video-news-doc-item:hover {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(168, 85, 247, 0.3);
        transform: translateX(4px);
    }

.modal-video-news-doc-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.modal-video-news-doc-details {
    flex-grow: 1;
}

    .modal-video-news-doc-details h6 {
        font-family: 'Outfit', sans-serif;
        font-size: 15px;
        font-weight: 600;
        color: #fff;
        margin: 0 0 4px 0;
    }

    .modal-video-news-doc-details p {
        font-size: 12px;
        color: #94a3b8;
        margin: 0;
    }

.modal-video-news-doc-action {
    font-size: 12px;
    font-weight: 600;
    color: #c084fc;
}

/* Responsive cho Ban dự án & Tài liệu */
@media (max-width: 768px) {
    .modal-video-news-members-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .modal-video-news-doc-item {
        padding: 12px;
        gap: 12px;
    }

    .modal-video-news-doc-details h6 {
        font-size: 13px;
    }

    .modal-video-news-doc-details p {
        font-size: 11px;
    }

    .modal-video-news-doc-action {
        display: none; /* Ẩn chữ Xem ngay trên mobile cho gọn */
    }
}


.modal-video-news-timeline {
    position: relative;
    padding-left: 24px;
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

    .modal-video-news-timeline::before {
        content: '';
        position: absolute;
        top: 5px;
        left: 7px;
        width: 2px;
        height: calc(100% - 10px);
        background: rgba(255, 255, 255, 0.08);
    }

.modal-video-news-timeline-item {
    position: relative;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.modal-video-news-timeline-time {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #94a3b8;
    min-width: 50px;
    text-align: right;
    padding-top: 2px;
}

.modal-video-news-timeline-dot {
    position: absolute;
    left: 3px;
    top: 7px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #6366f1;
    z-index: 1;
}

.modal-video-news-timeline-content {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 14px 18px;
}

    .modal-video-news-timeline-content h5 {
        font-family: 'Outfit', sans-serif;
        font-size: 15px;
        font-weight: 700;
        color: #fff;
        margin: 0 0 6px 0;
    }

    .modal-video-news-timeline-content p {
        font-size: 12px;
        color: #94a3b8;
        line-height: 1.5;
        margin: 0;
    }

.modal-video-news-week-schedule {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-video-news-week-card {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 14px;
    gap: 16px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

    .modal-video-news-week-card:hover {
        transform: translateX(4px);
        border-color: rgba(99, 102, 241, 0.3);
        background: rgba(255, 255, 255, 0.04);
    }

.modal-video-news-week-day {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 15px;
    flex-shrink: 0;
}

.modal-video-news-week-desc {
    flex-grow: 1;
}

    .modal-video-news-week-desc h5 {
        font-family: 'Outfit', sans-serif;
        font-size: 15px;
        font-weight: 700;
        color: #fff;
        margin: 0 0 4px 0;
    }

    .modal-video-news-week-desc p {
        font-size: 12px;
        color: #94a3b8;
        margin: 2px 0;
    }

@media (max-width: 480px) {
    .modal-video-news-timeline {
        padding-left: 16px;
    }

        .modal-video-news-timeline::before {
            left: 3px;
        }

    .modal-video-news-timeline-dot {
        left: -1px;
    }

    .modal-video-news-timeline-time {
        min-width: auto;
        text-align: left;
        margin-bottom: 4px;
    }

    .modal-video-news-timeline-item {
        flex-direction: column;
        gap: 4px;
        padding-left: 12px;
    }

    .modal-video-news-week-card {
        padding: 10px;
        gap: 10px;
    }

    .modal-video-news-week-day {
        width: 36px;
        height: 36px;
        font-size: 13px;
        border-radius: 8px;
    }

    .modal-video-news-week-desc h5 {
        font-size: 13px;
    }

    .modal-video-news-week-desc p {
        font-size: 11px;
    }
}

.modal-video-news-program-card:hover {
    border-color: rgba(99, 102, 241, 0.4) !important;
}

/* ==========================================================================
   CSS CHO NÚT PREV/NEXT VIDEO TRONG MODAL (GLASSMORPHISM & MICRO-ANIMATIONS)
   ========================================================================== */
.modal-video-news-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 12, 30, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.75);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

    .modal-video-news-nav:hover {
        background: linear-gradient(135deg, rgba(99, 102, 241, 0.85) 0%, rgba(168, 85, 247, 0.85) 100%);
        border-color: rgba(255, 255, 255, 0.25);
        color: #ffffff;
        transform: translateY(-50%) scale(1.1);
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.6);
    }

    .modal-video-news-nav:active {
        transform: translateY(-50%) scale(0.95);
    }

.modal-video-news-nav-prev {
    left: 16px;
}

.modal-video-news-nav-next {
    right: 16px;
}

/* Responsive adjustment for Mobile screens */
@media (max-width: 768px) {
    .modal-video-news-nav {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }

    .modal-video-news-nav-prev {
        left: 8px;
    }

    .modal-video-news-nav-next {
        right: 8px;
    }
}

#programTabBtnWeek {
    display: none;
}

#modalBtnJoinProject {
    display: none;
}

.modal-video-news-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

#programModalDesc {
    color: yellow;
    font-style: italic;
}
