/* ============= ESTILOS GENERALES ============= */
body {
    font-family: 'Questrial', sans-serif;
    background: #f8f9fa;
    color: #003356;
    line-height: 1.6;
    margin: 0;
}

header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1rem 0;
}

.course-container {
    margin-top: 100px;
    max-width: 1200px;
    padding: 2rem;
    margin-left: auto;
    margin-right: auto;
}

/* ============= CABECERA DEL CURSO ============= */
.course-header h1 {
    font-family: 'Readex Pro', sans-serif;
    font-size: 2.4rem;
    color: #ffffff;
    margin-bottom: 1rem;
}

.course-price {
    font-size: 1.8rem;
    color: #2a90d4;
    margin: 1rem 0;
    font-weight: 600;
}

.login-benefits ul{
    list-style: none;
}

/* ============= SECCIÓN DEL VIDEO ============= */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    margin: 2rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.video-wrapper iframe {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ============= CONTENIDO DEL CURSO ============= */
.course-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
    margin-bottom: 2rem;
}

.payment-required {
    background: #fff3cd;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    margin: 2rem 0;
}

/* ============= PREGUNTAS/RESPUESTAS ============= */
.qa-section {
    margin-top: 3rem;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.ask-form textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 1rem;
    resize: vertical;
    min-height: 100px;
}

.pregunta-card {
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.respuesta-card {
    background: #fff;
    border-left: 4px solid #2a90d4;
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 4px;
}

/* ============= BOTONES Y ELEMENTOS INTERACTIVOS ============= */
.btn-comprar {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    background: #f8c32e;
    color: #003356;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-comprar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ============= RESPONSIVE DESIGN ============= */
@media (max-width: 1024px) {
    .course-container {
        padding: 1rem;
    }
    
    .course-header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    header {
        padding: 0.5rem 0;
    }
    
    .course-container {
        margin-top: 80px;
        padding: 1rem;
    }
    
    .video-wrapper {
        margin: 1rem 0;
    }
    
    .qa-section {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .course-header h1 {
        font-size: 1.75rem;
    }
    
    .course-price {
        font-size: 1.5rem;
    }
    
    .ask-form textarea {
        min-height: 80px;
        padding: 0.8rem;
    }
    
    .pregunta-card {
        padding: 1rem;
    }
}



.course-flex {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.video-section {
    flex: 2;
    min-width: 300px;
}

.chapter-list {
    flex: 1;
    min-width: 250px;
}

.chapter-list ul {
    list-style: none;
    padding-left: 0;
}

.chapter-list li {
    margin-bottom: 0.5rem;
}

.chapter-list button {
    width: 100%;
    padding: 0.5rem;
    background: #f1f1f1;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .course-flex {
        flex-direction: column;
    }

    .video-section, .chapter-list {
        min-width: 100%;
    }

    .chapter-list button {
        font-size: 1rem;
    }
}



.course-flex {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.video-section {
    flex: 2;
    min-width: 300px;
}

.chapter-list {
    flex: 1;
    min-width: 250px;
}

.chapter-list h3 {
    margin-top: 0;
    font-size: 1.2rem;
    color: #003356;
}

.chapter-ul {
    list-style: none;
    padding-left: 0;
}

.chapter-ul li {
    margin-bottom: 0.5rem;
}

.chapter-ul button {
    width: 100%;
    padding: 0.5rem;
    background: #f1f1f1;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: left;
    font-size: 1rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .course-flex {
        flex-direction: column;
    }

    .video-section, .chapter-list {
        width: 100%;
        min-width: unset;
    }

    .chapter-ul button {
        font-size: 1rem;
    }
}



.course-flex {
    display: flex;
    gap: 2rem;
    flex-wrap: nowrap;
    justify-content: space-between;
}

/* Tamaño del video (más grande en escritorio) */
.video-section {
    flex: 2;
    min-width: 0;
}

/* Lista de capítulos */
.chapter-list {
    flex: 1;
    min-width: 250px;
}

.chapter-ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.chapter-ul li {
    margin-bottom: 0.5rem;
}

.chapter-ul button {
    width: 100%;
    padding: 0.5rem;
    background: #f1f1f1;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    text-align: left;
}

/* ✅ MOBILE FIX: lista debajo del video */
@media (max-width: 768px) {
    .course-flex {
        flex-direction: column;
    }

    .video-section,
    .chapter-list {
        width: 100%;
    }

    .chapter-list {
        margin-top: 1.5rem;
    }
}



/* ----- CONTENEDOR RESPONSIVO DEL VIDEO Y CAPÍTULOS ----- */
.course-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

/* Secciones */
.video-section {
    flex: 2;
    min-width: 0;
    width: 100%;
}

.chapter-list {
    flex: 1;
    min-width: 0;
    width: 100%;
    display: block;
}

.chapter-list h3 {
    margin-top: 0;
}

.chapter-ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.chapter-ul li {
    margin-bottom: 0.5rem;
}

.chapter-ul button {
    width: 100%;
    padding: 0.5rem;
    background: #f1f1f1;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    text-align: left;
}

/* ----- VIDEO RESPONSIVO ----- */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    border-radius: 12px;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ----- RESPONSIVE FIX para móviles ----- */
@media (max-width: 768px) {
    .course-flex {
        flex-direction: column;
    }

    .video-section,
    .chapter-list {
        width: 100%;
    }

    .chapter-list {
        margin-top: 1rem;
    }

    .chapter-ul button {
        font-size: 1rem;
    }
}




.chapter-list {
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-top: 2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.chapter-list h3 {
    font-size: 1.3rem;
    color: #003456;
    margin-bottom: 1rem;
    text-align: center;
    border-bottom: 2px solid #003456;
    padding-bottom: 0.5rem;
}

.chapter-ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.chapter-ul li {
    margin-bottom: 0.8rem;
}

.chapter-ul button {
    width: 100%;
    background-color: #e9f5ff;
    border: 1px solid #b6dcff;
    border-left: 5px solid #007acc;
    color: #003456;
    font-size: 1rem;
    font-weight: bold;
    padding: 0.75rem 1rem;
    text-align: left;
    border-radius: 6px;
    transition: background-color 0.2s ease, transform 0.1s ease;
    cursor: pointer;
}

.chapter-ul button:hover {
    background-color: #d4ecff;
    transform: translateX(3px);
}


/* Añade al final del archivo CSS */

.course-description {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.course-description h3 {
    color: #003356;
    margin-top: 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

/* Ajustes para el layout */
.course-flex {
    display: flex;
    gap: 2rem;
    align-items: flex-start; /* Alinea los items en la parte superior */
}

.video-section {
    flex: 2;
    min-width: 0;
}

.chapter-list {
    flex: 1;
    min-width: 250px;
    position: sticky;
    top: 120px; /* Ajusta según la altura de tu header */
    align-self: flex-start;
}

@media (max-width: 768px) {
    .course-flex {
        flex-direction: column;
    }
    
    .chapter-list {
        position: static;
        width: 100%;
        margin-top: 1.5rem;
    }
}





/* ============= SECCIÓN PREGUNTAS Y RESPUESTAS ============= */
.qa-section {
    margin-top: 3rem;
    max-width: 800px; /* Limita el ancho máximo */
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}

.qa-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 2rem;
}

.qa-section h2 {
    text-align: center;
    color: #003356;
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.ask-form {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.ask-form h3 {
    margin-top: 0;
    color: #003356;
    font-size: 1.2rem;
}

.ask-form textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 1rem;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
    transition: border 0.3s ease;
}

.ask-form textarea:focus {
    border-color: #2a90d4;
    outline: none;
}

.qa-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.qa-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.qa-item.has-answer {
    border-left: 4px solid #2a90d4;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background-color: #2a90d4;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.user-name {
    font-weight: 600;
    color: #003356;
    display: block;
}

.question-date, .answer-date {
    font-size: 0.8rem;
    color: #64748b;
}

.question-content {
    line-height: 1.6;
    color: #334155;
    padding-left: 44px; /* Alinea con el avatar */
}

.answer-card {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1.2rem;
    margin-top: 1.2rem;
    border-left: 3px solid #2a90d4;
}

.answer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.instructor-badge {
    background: #2a90d4;
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.answer-content {
    color: #334155;
    line-height: 1.6;
}

.answer-form {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #e2e8f0;
}

.answer-form textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 0.8rem;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

/* Botones */
.btn-primary {
    background: #2a90d4;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #1e7ebf;
}

.btn-small {
    background: #f8fafc;
    color: #2a90d4;
    border: 1px solid #2a90d4;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-small:hover {
    background: #2a90d4;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .qa-container {
        padding: 1.2rem;
    }
    
    .ask-form {
        padding: 1rem;
    }
    
    .qa-item {
        padding: 1.2rem;
    }
    
    .question-content {
        padding-left: 0;
    }
}

@media (max-width: 480px) {
    .qa-section {
        padding: 0 0.5rem;
    }
    
    .user-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}


