/* @author GustavoChaconDeveloper - github.com/GustavoChaconDeveloper */
/* ===== ACADEMY PAGE STYLES ===== */

/* Trava scroll ao abrir o modal de vídeo (inclui iOS Safari) */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* ── Stats Bar ──────────────────────────────────────────────────── */
.academy-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 32px auto 48px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    max-width: 520px;
    overflow: hidden;
}

.academy-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 18px 20px;
    position: relative;
}

.academy-stat + .academy-stat::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.academy-stat-value {
    font-family: 'Montserrat', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}

.academy-stat-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* ── Empty State ─────────────────────────────────────────────────── */
.academy-empty {
    display: none;
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
}

.academy-empty.visible {
    display: block;
}

.academy-empty-icon {
    font-size: 48px;
    color: rgba(255, 255, 255, 0.12);
    margin-bottom: 16px;
}

.academy-empty-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.3);
}

/* ── Section ─────────────────────────────────────────────────────── */
.academy-section {
    padding: 100px 20px 80px;
    min-height: 100vh;
}

.academy-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ── Hero Header ─────────────────────────────────────────────────── */
.academy-header {
    text-align: center;
    margin-bottom: 0;
}

.academy-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    padding: 8px 20px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.5px;
    margin-bottom: 22px;
}

.academy-badge i {
    font-size: 14px;
}

.academy-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 52px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.15;
    margin: 0 0 18px;
}

.academy-title-highlight {
    color: #ffffff;
    font-weight: 800;
    position: relative;
}

.academy-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ── Filter Bar ──────────────────────────────────────────────────── */
.academy-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 50px;
}

.academy-filter-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 22px;
    padding: 10px 22px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.65);
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.4px;
}

.academy-filter-btn:hover {
    border-color: rgba(255, 255, 255, 0.45);
    color: #ffffff;
}

.academy-filter-btn.active {
    background: #ffffff;
    border-color: #ffffff;
    color: #00133D;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.15);
}

/* ── Video Grid ──────────────────────────────────────────────────── */
.academy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* ── Video Card ──────────────────────────────────────────────────── */
.academy-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
}

.academy-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
    border-color: rgba(255, 255, 255, 0.22);
}

/* Animação de entrada */
.academy-card {
    animation: cardFadeIn 0.4s ease both;
}

.academy-card:nth-child(1)  { animation-delay: 0.04s; }
.academy-card:nth-child(2)  { animation-delay: 0.08s; }
.academy-card:nth-child(3)  { animation-delay: 0.12s; }
.academy-card:nth-child(4)  { animation-delay: 0.16s; }
.academy-card:nth-child(5)  { animation-delay: 0.20s; }
.academy-card:nth-child(6)  { animation-delay: 0.24s; }
.academy-card:nth-child(7)  { animation-delay: 0.28s; }
.academy-card:nth-child(8)  { animation-delay: 0.32s; }
.academy-card:nth-child(9)  { animation-delay: 0.36s; }

@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* hidden cards (filtered out) */
.academy-card.hidden {
    display: none;
}

/* ── Thumbnail ───────────────────────────────────────────────────── */
.academy-card-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #001133;
    cursor: pointer;
}

.academy-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease, filter 0.35s ease;
    filter: brightness(0.85);
}

.academy-card:hover .academy-card-thumbnail img {
    transform: scale(1.06);
    filter: brightness(0.7);
}

/* Play Button Overlay */
.academy-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.82);
    width: 62px;
    height: 62px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00133D;
    font-size: 18px;
    box-shadow: 0 0 32px rgba(255, 255, 255, 0.2), 0 4px 16px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    opacity: 0.75;
    pointer-events: none;
}

.academy-card:hover .academy-play-btn {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    background: #ffffff;
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.3), 0 6px 20px rgba(0, 0, 0, 0.5);
}

.academy-play-btn i {
    margin-left: 3px; /* visual center for play icon */
}

/* Duration Badge */
.academy-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    border-radius: 6px;
    padding: 3px 9px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    pointer-events: none;
}

/* Category Badge on thumbnail */
.academy-card-category {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 4px 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    pointer-events: none;
}

/* ── Card Content ────────────────────────────────────────────────── */
.academy-card-content {
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.academy-card-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.35;
    margin: 0;
}

.academy-card-excerpt {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.55;
    margin: 0;
    flex: 1;
}

.academy-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 6px;
}

.academy-card-author {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.45);
    display: flex;
    align-items: center;
    gap: 6px;
}

.academy-card-author i {
    color: rgba(255, 255, 255, 0.35);
}

.academy-watch-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 20px;
    padding: 7px 18px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.22s ease;
    flex-shrink: 0;
}

.academy-watch-btn:hover {
    background: #ffffff;
    color: #00133D;
    border-color: #ffffff;
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.15);
}

.academy-watch-btn i {
    font-size: 10px;
}

/* ── Video Modal ─────────────────────────────────────────────────── */
.academy-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 10, 30, 0.88);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.academy-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.academy-modal {
    background: #06111f;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    width: 100%;
    max-width: 880px;
    overflow: hidden;
    transform: scale(0.93) translateY(22px);
    transition: transform 0.36s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.75),
                inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.academy-modal-overlay.active .academy-modal {
    transform: scale(1) translateY(0);
}

/* Modal Header */
.academy-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    gap: 16px;
}

.academy-modal-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.academy-modal-category {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.38);
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.academy-modal-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.3;
}

.academy-modal-close {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    font-size: 14px;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.academy-modal-close:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* Modal Video */
.academy-modal-video {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.academy-modal-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Modal Description */
.academy-modal-desc {
    padding: 16px 24px 22px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.6;
    margin: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 992px) {
    .academy-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 22px;
    }

    .academy-title {
        font-size: 40px;
    }
}

@media (max-width: 700px) {
    .academy-section {
        padding: 80px 16px 60px;
    }

    .academy-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .academy-title {
        font-size: 32px;
    }

    .academy-subtitle {
        font-size: 15px;
    }

    .academy-header {
        margin-bottom: 40px;
    }

    .academy-filters {
        gap: 8px;
        margin-bottom: 36px;
    }

    .academy-filter-btn {
        padding: 8px 16px;
        font-size: 12px;
    }

    .academy-modal-title {
        font-size: 16px;
    }

    .academy-modal-header {
        padding: 16px 18px 14px;
    }

    .academy-modal-desc {
        padding: 14px 18px 18px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .academy-title {
        font-size: 26px;
    }

    .academy-badge {
        font-size: 12px;
    }

    .academy-card-title {
        font-size: 15px;
    }

    .academy-modal-overlay {
        padding: 12px;
    }

    .academy-modal {
        border-radius: 14px;
    }
}

/* ===== NOT-LOGGED MODAL ===== */
.not-logged-modal .modal-content {
    max-width: 450px;
    text-align: center;
    padding: 40px;
}

.not-logged-modal .modal-top-bar {
    justify-content: center;
    margin-bottom: 20px;
}

.not-logged-modal .modal-header {
    margin-bottom: 30px;
}

.not-logged-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(255, 107, 107, 0.1));
    border: 2px solid rgba(255, 107, 107, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px auto;
    animation: pulse-icon 2s ease-in-out infinite;
}

.not-logged-icon i {
    font-size: 36px;
    color: #ff6b6b;
}

@keyframes pulse-icon {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 20px 10px rgba(255, 107, 107, 0.1); }
}

.not-logged-modal .modal-title {
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 15px;
}

.not-logged-modal .modal-subtitle {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    max-width: 350px;
    margin: 0 auto;
}

.not-logged-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.not-logged-modal .not-logged-actions .btn-login-now {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px;
    width: 100%;
    max-width: 280px;
    padding: 16px 32px !important;
    background: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
    border: none !important;
    border-radius: 12px !important;
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4) !important;
    text-decoration: none !important;
    outline: none !important;
    -webkit-appearance: none;
    appearance: none;
}

.not-logged-modal .not-logged-actions .btn-login-now:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.5) !important;
    background: linear-gradient(135deg, #5b52f0, #8b47ff) !important;
}

.not-logged-modal .not-logged-actions .btn-login-now:active { transform: translateY(-1px); }

.not-logged-modal .not-logged-actions .btn-login-now i { font-size: 18px; color: #ffffff !important; }

.not-logged-signup-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.not-logged-signup-text a {
    color: #818cf8;
    text-decoration: none;
    font-weight: 600;
    margin-left: 5px;
    transition: color 0.3s ease;
}

.not-logged-signup-text a:hover {
    color: #a5b4fc;
    text-decoration: underline;
}

@media (max-width: 480px) {
    .not-logged-modal .modal-content { padding: 30px 20px; }
    .not-logged-icon { width: 70px; height: 70px; }
    .not-logged-icon i { font-size: 30px; }
    .not-logged-modal .modal-title { font-size: 22px; }
    .not-logged-modal .modal-subtitle { font-size: 14px; }
    .btn-login-now { padding: 14px 28px; font-size: 15px; }
}
