/* ===== CURSOS STYLES (Netflix Dark Premium) ===== */

.cursos-body {
    background: #0a0a0f;
    color: #E8EAED;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Prevent body scroll, layout handles it */
}

/* NAVBAR ADJUSTMENTS */
.conta-nav {
    position: sticky;
    top: 0;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0 32px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
    flex-shrink: 0;
}

/* LAYOUT */
.cursos-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* SIDEBAR */
.cursos-sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.02);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-title {
    padding: 24px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9AA0A6;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.module-list {
    list-style: none;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.module-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.module-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.module-item.active {
    background: rgba(66, 133, 244, 0.1);
    border: 1px solid rgba(66, 133, 244, 0.2);
}

.module-item.active strong {
    color: #4285F4;
}

.module-icon {
    font-size: 1.5rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.module-info {
    display: flex;
    flex-direction: column;
}

.module-info strong {
    font-size: 0.95rem;
    font-weight: 600;
    color: #E8EAED;
}

.module-info span {
    font-size: 0.75rem;
    color: #9AA0A6;
    margin-top: 2px;
}

/* MAIN CONTENT */
.cursos-main {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    background: linear-gradient(180deg, rgba(10, 10, 15, 0) 0%, rgba(10, 10, 15, 1) 100%);
    scroll-behavior: smooth;
}

/* PLAYER AREA */
.player-container {
    background: #000;
    width: 100%;
}

.video-wrapper {
    width: 100%;
    /* 16:9 Aspect Ratio */
    aspect-ratio: 16 / 9;
    max-height: 70vh;
    background: #000;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
}

.video-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.video-details {
    padding: 32px 48px;
    max-width: 1200px;
    margin: 0 auto;
}

.video-title {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
}

.video-desc {
    font-size: 1rem;
    color: #9AA0A6;
    line-height: 1.6;
    max-width: 800px;
}

/* LESSONS LIST (NETFLIX GRID) */
.lessons-section {
    padding: 0 48px 48px;
    max-width: 1200px;
    margin: 0 auto;
}

.lessons-section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    margin-bottom: 24px;
}

.lessons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.lesson-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.lesson-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(66, 133, 244, 0.4);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
}

.lesson-card.active {
    border-color: #4285F4;
}

.lesson-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #1A1A1A;
    position: relative;
    overflow: hidden;
}

.lesson-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.lesson-card:hover .lesson-thumb img {
    opacity: 1;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lesson-card:hover .play-overlay {
    opacity: 1;
}

.play-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.lesson-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 6px;
    border-radius: 4px;
}

.lesson-card.active .play-overlay {
    opacity: 1;
    background: rgba(66, 133, 244, 0.2);
}

.lesson-card.active .play-btn {
    background: #4285F4;
    border-color: #4285F4;
}

.lesson-info {
    padding: 16px;
}

.lesson-title {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lesson-number {
    font-size: 0.8rem;
    color: #9AA0A6;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .video-details {
        padding: 24px;
    }
    
    .lessons-section {
        padding: 0 24px 24px;
    }
}

@media (max-width: 768px) {
    .cursos-body {
        height: auto;
        overflow: auto;
    }

    .cursos-layout {
        flex-direction: column;
        overflow: visible;
    }

    .cursos-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding: 16px 0;
        /* Scroll horizonral for modules on mobile */
    }

    .sidebar-title {
        display: none; /* Hide Module title on mobile to save space */
    }

    .module-list {
        flex-direction: row;
        overflow-x: auto;
        padding: 0 16px;
        scroll-snap-type: x mandatory;
    }

    .module-list::-webkit-scrollbar {
        display: none;
    }

    .module-item {
        flex-shrink: 0;
        scroll-snap-align: start;
        white-space: nowrap;
    }

    .video-wrapper {
        min-height: 30vh;
    }

    .video-title {
        font-size: 1.5rem;
    }

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