/* =========================================
   ACADEMY CSS - PBJJF Academy
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Ropa+Sans:wght@400;700&display=swap');

/* =========================================
   NAVBAR ACADEMY - Match parent exactly
   ========================================= */
.navbar-academy {
    background-color: var(--dark-bg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 0.8rem 0;
    border-bottom: 2px solid var(--brand-orange);
}

.navbar-academy .navbar-brand img {
    height: 35px;
    object-fit: contain;
}

.navbar-academy .navbar-brand span {
    font-family: 'Ropa Sans', 'Inter', sans-serif;
    font-style: italic;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--brand-orange);
    font-size: 0.95rem;
}

.navbar-academy .nav-link {
    font-family: 'RopaSans', 'Inter', sans-serif;
    font-style: italic;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-main-light) !important;
    padding: 0.5rem 1.2rem !important;
    transition: color 0.3s ease;
    position: relative;
}

.navbar-academy .nav-link:hover {
    color: var(--brand-orange) !important;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--brand-orange);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
}

/* =========================================
   GAMIFICATION BAR
   ========================================= */
.academy-gamification-bar {
    background: linear-gradient(135deg, #F9A42F 0%, #E09020 100%);
    color: white;
    padding: 10px 0;
    box-shadow: 0 4px 15px rgba(249, 164, 47, 0.3);
}

.gamification-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.gamification-item i {
    font-size: 1.2rem;
}

.gamification-progress {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.gamification-progress .progress {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    overflow: hidden;
}

.gamification-progress .progress-bar {
    background: #1E1E1E;
    transition: width 0.5s ease;
}

/* =========================================
   HERO SECTION
   ========================================= */
.academy-hero {
    position: relative;
    height: 55vh;
    min-height: 480px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.academy-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 15, 15, 0.85) 0%, rgba(15, 15, 15, 0.25) 100%);
    z-index: 1;
}

.academy-hero-content {
    position: relative;
    z-index: 2;
    color: white;
    padding: 0 20px;
}

.academy-hero h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    line-height: 1.1;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    color: white;
}

.academy-hero p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 650px;
    margin-bottom: 1rem;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* =========================================
   COURSE CARDS
   ========================================= */
.course-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(249, 164, 47, 0.2);
    border-color: var(--brand-orange);
}

.course-thumbnail {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.course-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.course-card:hover .course-thumbnail img {
    transform: scale(1.1);
}

.course-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--brand-orange);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.course-badge.dificuldade-iniciante {
    background: #10B981;
}

.course-badge.dificuldade-intermediario {
    background: #3B82F6;
}

.course-badge.dificuldade-avancado {
    background: #F59E0B;
}

.course-badge.dificuldade-elite {
    background: #EF4444;
}

.course-body {
    padding: 1.5rem;
}

.course-title {
    font-family: 'Ropa Sans', 'Montserrat', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.course-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #6C757D;
}

.course-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.course-meta-item i {
    color: var(--brand-orange);
}

.course-description {
    color: #4A5568;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #E5E7EB;
}

.course-xp {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #F59E0B;
    font-weight: 700;
}

.course-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1E1E1E;
}

.course-price small {
    font-size: 0.85rem;
    color: #6C757D;
    font-weight: 600;
}

/* =========================================
   VIDEO PLAYER
   ========================================= */
.lesson-container {
    background: #1E1E1E;
    border-radius: 16px;
    overflow: hidden;
}

.vdocipher-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
}

.vdocipher-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0;
}

.lesson-header {
    background: #2A2A2A;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--brand-orange);
}

.lesson-title {
    color: white;
    font-family: 'Ropa Sans', 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
}

.lesson-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
}

/* =========================================
   CHECKPOINT MODAL
   ========================================= */
.checkpoint-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.checkpoint-modal-content {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: slideIn 0.3s ease;
}

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

.checkpoint-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #F9A42F 0%, #E09020 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.checkpoint-timer {
    font-size: 3rem;
    font-weight: 800;
    color: var(--brand-orange);
    font-family: 'Ropa Sans', 'Montserrat', sans-serif;
    margin: 1rem 0;
}

.checkout-timer.warning {
    color: #F59E0B;
    animation: warningPulse 0.5s infinite;
}

@keyframes warningPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* =========================================
   LEADERBOARD
   ========================================= */
.leaderboard-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    background: #F8F9FA;
    transition: all 0.3s ease;
}

.leaderboard-item:hover {
    background: white;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.leaderboard-rank {
    width: 40px;
    height: 40px;
    background: var(--brand-orange);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Ropa Sans', 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
}

.leaderboard-rank.rank-1 {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    font-size: 1.3rem;
}

.leaderboard-rank.rank-2 {
    background: linear-gradient(135deg, #C0C0C0 0%, #808080 100%);
}

.leaderboard-rank.rank-3 {
    background: linear-gradient(135deg, #CD7F32 0%, #8B4513 100%);
}

.leaderboard-user {
    flex: 1;
    margin-left: 1rem;
}

.leaderboard-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--brand-orange);
}

.leaderboard-name {
    font-weight: 600;
    color: #1E1E1E;
    margin-bottom: 0.25rem;
}

.leaderboard-belt {
    font-size: 0.85rem;
    color: #6C757D;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 991.98px) {
    .navbar-academy .navbar-nav {
        background: #2A2A2A;
        padding: 1rem;
        border-radius: 0 0 16px 16px;
        margin-top: 10px;
    }

    .gamification-progress {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .academy-hero h1 {
        font-size: 2rem;
    }

    .course-thumbnail {
        height: 150px;
    }
}

/* =========================================
   LOGIN/CADASTRO LAYOUT FIX
   ========================================= */
.login-form-wrapper {
    padding: 40px 25px;
    align-items: flex-start !important;
}

.login-form-wrapper::-webkit-scrollbar {
    width: 6px;
}

.login-form-wrapper::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
}

.login-card {
    padding-top: 10px;
    padding-bottom: 10px;
}

/* =========================================
   UTILITIES
   ========================================= */
.text-gradient {
    background: linear-gradient(135deg, #F9A42F 0%, #E09020 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.badge-xp {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.8rem;
}
