:root {
    --header-bg: #ffffff;
    --primary-color: #10b981;
    /* Verde Vibrante Principal */
    --secondary-color: #065f46;
    /* Verde Escuro Profundo */
    --accent-color: #10b981;
    /* Verde de Destaque */
    --text-color: #1f2937;
    /* Cinza Escuro Moderno */
    --hover-color: #059669;
    /* Verde Hover */
    --search-bg: #f3f4f6;
    --border-color: #e5e7eb;
    --card-hover-bg: #ecfdf5;
    /* Fundo verde claro suave */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fc;
    /* Fundo geral levemente cinza */
}

.main-header {
    background-color: var(--header-bg);
    color: var(--text-color);
    padding: 0.5rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

.logo-container img {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.search-container {
    flex-grow: 1;
    max-width: 500px;
    margin: 0 2rem;
    position: relative;
}

.search-container .input-group {
    background: var(--search-bg);
    border: 1px solid #ced4da;
    border-radius: 50px;
    overflow: hidden;
    padding: 0;
}

.search-container input {
    border: none;
    padding: 0.4rem 1rem;
    width: 100%;
    background: transparent;
    color: #495057;
    font-size: 0.9rem;
}

.search-container input:focus {
    outline: none;
}

.search-container .btn-search {
    background: var(--primary-color);
    border: none;
    border-left: 1px solid #ddd;
    width: 40px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border-radius: 0 50px 50px 0;
    transition: background-color 0.2s;
}

.search-container .btn-search:hover {
    background-color: var(--accent-color);
}

.input-group-text {
    background: transparent;
    color: var(--primary-color);
    padding-left: 1rem;
}

.user-area .btn-area-aluno {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.user-area .btn-area-aluno:hover {
    background-color: var(--accent-color);
    transform: translateY(-1px);
}

.user-area .dropdown-menu {
    border-radius: 10px;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.header-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.header-nav a {
    color: #374151;
    /* Cinza escuro para melhor leitura */
    text-decoration: none;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    /* Pill shape no hover */
}

.header-nav a:hover {
    color: var(--primary-color);
    background-color: #ecfdf5;
    /* Fundo verde claro ao passar o mouse */
}

.header-nav i {
    font-size: 1.1rem;
}

/* =========================================
   GRID DE CURSOS (NOVO)
   ========================================= */

.section-title {
    color: #4a5fee;
    /* Azul vibrante estilo inspiração */
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    /* Responsivo */
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.course-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
    /* Altura igual */
}

/* Hover Effect - Card todo muda de cor */
.course-card:hover {
    background-color: var(--card-hover-bg);
    /* Azul bem clarinho */
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    border-color: #c7d2fe;
}

.course-image-container {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.course-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.course-card:hover .course-image-container img {
    transform: scale(1.05);
}

.badge-gratis {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #4f46e5;
    /* Roxo/Azul vibrante */
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 1;
}

.course-content {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.course-rating {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: #facc15;
    /* Amarelo Estrela */
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.course-rating span {
    color: #6b7280;
    /* Cinza para numero de votos */
    font-weight: 400;
    font-size: 0.8rem;
}

.course-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    /* Limitar linhas se titulo for muito grande */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-info {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.course-footer {
    margin-top: auto;
    text-align: center;
}

.btn-matricule {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background-color: white;
    color: #374151;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

/* No hover do card, o botão fica escuro */
.course-card:hover .btn-matricule {
    background-color: #1f2937;
    /* Escuro */
    color: white;
    border-color: #1f2937;
}

@media (max-width: 991px) {
    .header-top {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .search-container {
        width: 100%;
        margin: 0.5rem 0;
    }

    .header-nav ul {
        gap: 0.8rem;
        font-size: 0.85rem;
    }
}

/* =========================================
   PÁGINA DE DETALHES DO CURSO
   ========================================= */

.course-detail-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 4rem;
}

/* Sidebar de Navegação */
.course-sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background-color: #f3f4f6;
    color: var(--primary-color);
}

.sidebar-nav a i {
    font-size: 1.1rem;
    color: #9ca3af;
}

.sidebar-nav a:hover i,
.sidebar-nav a.active i {
    color: var(--primary-color);
}

/* Conteúdo Principal */
.course-main-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.course-hero-section {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.hero-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.hero-content {
    padding: 2rem;
}

.hero-badges {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.hero-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-warning {
    background-color: #fef3c7;
    color: #d97706;
}

.badge-info {
    background-color: #e0f2fe;
    color: #0284c7;
}

.badge-success {
    background-color: #dcfce7;
    color: #16a34a;
}

.course-title-large {
    font-size: 2rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.course-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 1.5rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.meta-label {
    font-size: 0.85rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.meta-value {
    font-weight: 600;
    color: #111827;
    font-size: 1rem;
}

.course-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid #e5e7eb;
    scroll-margin-top: 100px;
    /* Para scroll spy não cortar titulo */
}

.section-title-small {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--accent-color);
    display: inline-block;
}

.module-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.module-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 50px;
    /* Arredondado como imagem */
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s;
}

.module-item:hover {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.module-number {
    font-weight: 700;
    color: var(--primary-color);
    background: #e0f2fe;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.module-title {
    font-weight: 600;
    color: #374151;
    flex-grow: 1;
}

.cta-box {
    background: var(--primary-color);
    color: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    margin-top: 2rem;
}

.cta-box h3 {
    margin-bottom: 1rem;
    font-weight: 700;
}

.btn-cta-large {
    background: #fbbf24;
    /* Amarelo chamativo */
    color: #1f2937;
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-cta-large:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(251, 191, 36, 0.3);
    color: #1f2937;
}

@media (max-width: 900px) {
    .course-detail-layout {
        grid-template-columns: 1fr;
    }

    .course-sidebar {
        display: none;
        /* Esconde sidebar no mobile por enquanto */
    }
}

/* =========================================
   MODAL DE CARGA HORÁRIA
   ========================================= */

.card-carga-horaria {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 2rem 1rem;
    width: 200px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.card-carga-horaria:hover {
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    /* Sombra suave */
    border-color: #dee2e6;
    /* Borda sutil ao hover */
    transform: translateY(-5px);
}

.icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    /* Circulo com borda colorida estilo imagem user */
    border: 3px solid #06b6d4;
    /* Ciano/Azul claro */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: #06b6d4;
    font-size: 1.5rem;
}

.card-carga-horaria h3 {
    font-size: 1.5rem;
    color: #374151;
}

/* Botão Quero Essa preto estilo imagem */
.card-carga-horaria .btn-dark {
    background-color: #212529;
    border: none;
    transition: background-color 0.2s;
}

/* =========================================
   SALÃO DE AULA (CLASSROOM)
   ========================================= */

.classroom-layout {
    display: flex;
    gap: 2rem;
    padding: 2rem 0;
    min-height: 80vh;
}

/* Sidebar de Módulos */
.classroom-sidebar {
    width: 350px;
    flex-shrink: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    height: fit-content;
    max-height: calc(100vh - 100px);
    position: sticky;
    top: 2rem;
}

.classroom-sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.classroom-sidebar-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    color: #111827;
}

.module-list-scroll {
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.module-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    /* Arredondado como imagem */
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    color: #4b5563;
    text-decoration: none;
    transition: all 0.2s;
}

.module-link:hover {
    background: #f0f9ff;
    color: var(--primary-color);
}

.module-link.active {
    background: #2563eb;
    /* Azul forte destaque */
    color: white;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
    border-color: #2563eb;
}

.module-link.active .module-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.module-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    flex-shrink: 0;
}

.module-text {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
}

/* Conteúdo da Aula */
.classroom-content {
    flex-grow: 1;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    padding: 2.5rem;
    min-width: 0;
    /* Previne overflow em flex item */
}

/* Player Fake de Áudio */
.audio-player-mockup {
    background: #f3f4f6;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #e5e7eb;
}

.player-controls {
    display: flex;
    gap: 0.5rem;
}

.btn-play {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #10b981;
    /* Verde Play */
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-play:hover {
    transform: scale(1.1);
}

.player-track {
    flex-grow: 1;
    height: 6px;
    background: #d1d5db;
    border-radius: 3px;
    position: relative;
}


/* =========================================
   ÁREA DO ALUNO (STUDENT AREA)
   ========================================= */

.student-sidebar {
    border-right: 1px solid #e5e7eb;
}

.student-nav-link {
    color: #4b5563;
    font-weight: 500;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.student-nav-link:hover {
    background-color: #f3f4f6;
    color: var(--primary-color);
}

.student-nav-link.active {
    background-color: #eff6ff;
    color: var(--primary-color);
    font-weight: 600;
}

.player-progress {
    width: 30%;
    height: 100%;
    background: #10b981;
    border-radius: 3px;
    position: relative;
}

.player-thumb {
    width: 16px;
    height: 16px;
    background: white;
    border: 2px solid #10b981;
    border-radius: 50%;
    position: absolute;
    right: -8px;
    top: -5px;
    cursor: pointer;
}

.aula-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 0.5rem;
}

.aula-subtitle {
    color: #6b7280;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
}

.aula-body {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #374151;
}

/* Responsividade Classroom */
@media (max-width: 991px) {
    .classroom-layout {
        flex-direction: column;
    }

    .classroom-sidebar {
        width: 100%;
        position: static;
        max-height: 300px;
    }
}

/* =========================================
   FOOTER
   ========================================= */

footer h6 {
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    color: #1f2937;
    margin-bottom: 1.2rem;
}

footer ul li a {
    font-size: 0.9rem;
    transition: all 0.2s;
}

footer ul li a:hover {
    color: var(--accent-color) !important;
    padding-left: 5px;
}

.copyright-bar {
    background-color: #f3f4f6;
    /* Cinza claro */
    border-top: 1px solid #e5e7eb;
}

/* Botão de Ajuda no Footer */
.btn-action-footer {
    background: #65d448;
    /* Verde WhatsApp like */
    color: white;
    border: none;
    transition: all 0.3s ease;
}

.btn-action-footer:hover {
    background: #5ac13f;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(101, 212, 72, 0.3);
}

.btn-action-footer span {
    display: block;
}

.btn-action-footer span:first-child {
    font-size: 1rem;
}