/**
 * FLDM Institucional - Hoja de Estilos de Cursos Enriquecidos de Formación Profesional
 * Ubicación: public/css/components/professional-education-course.css
 * Cumple con diseño institucional, cero overflow y responsividad total (1440px, 768px, 390px).
 */

/* =========================================================
   CONTENEDOR PRINCIPAL Y TOKENS TIPOGRÁFICOS
   ========================================================= */
.fldm-course-container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
    font-family: var(--font-body, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    color: var(--text-main, #0F172A);
}

.fldm-course-container * {
    box-sizing: border-box;
    max-width: 100%;
}

/* =========================================================
   BADGES Y CABECERA DEL CURSO
   ========================================================= */
.course-badges-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.course-badge-category {
    background: rgba(139, 35, 50, 0.08);
    color: var(--fldm-guinda, #8B2332);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 12px;
    border-radius: 4px;
}

.course-badge-modality {
    background: #FEF3C7;
    color: #92400E;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 12px;
    border-radius: 4px;
}

.course-badge-status {
    background: #DCFCE7;
    color: #166534;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 12px;
    border-radius: 4px;
}

.course-main-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(28px, 3.8vw, 40px);
    line-height: 1.25;
    color: var(--text-main, #0F172A);
    font-weight: 700;
    margin: 0 0 20px;
    overflow-wrap: anywhere;
    word-break: normal;
}

.course-main-excerpt {
    font-size: 18px;
    line-height: 1.65;
    color: var(--fldm-gris-text, #475569);
    border-left: 3px solid var(--fldm-guinda, #8B2332);
    padding-left: 18px;
    margin-bottom: 32px;
    font-style: italic;
    overflow-wrap: anywhere;
}

/* =========================================================
   BARRA DE ACCIONES PRINCIPALES (CTA REGISTRO + FOLLETO)
   ========================================================= */
.course-actions-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 36px;
    padding: 16px 20px;
    background: var(--bg-neutral, #F8FAFC);
    border: 1px solid var(--border-color, #E2E8F0);
    border-radius: 8px;
}

.btn-course-register {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--fldm-guinda, #8B2332);
    color: #FFFFFF !important;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 12px 26px;
    border-radius: 6px;
    text-decoration: none !important;
    transition: background 0.15s ease, transform 0.1s ease;
    box-shadow: 0 2px 6px rgba(139, 35, 50, 0.2);
}

.btn-course-register:hover {
    background: var(--fldm-guinda-dark, #5F1822);
    color: #FFFFFF !important;
    transform: translateY(-1px);
}

.btn-course-brochure {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #FFFFFF;
    color: var(--fldm-guinda, #8B2332) !important;
    border: 1.5px solid var(--fldm-guinda, #8B2332);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 11px 22px;
    border-radius: 6px;
    text-decoration: none !important;
    transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.btn-course-brochure:hover {
    background: rgba(139, 35, 50, 0.06);
    color: var(--fldm-guinda-dark, #5F1822) !important;
    transform: translateY(-1px);
}

/* =========================================================
   GRID FICHA TÉCNICA E INVERSIÓN
   ========================================================= */
.course-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.course-card-meta {
    background: #FFFFFF;
    border: 1px solid var(--border-color, #E2E8F0);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.course-card-meta-header {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border-color, #E2E8F0);
    padding-bottom: 14px;
    margin-bottom: 18px;
}

.course-card-meta-header svg {
    color: var(--fldm-guinda, #8B2332);
    flex-shrink: 0;
}

.course-card-meta-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main, #0F172A);
    margin: 0;
}

.course-meta-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.course-meta-item-full {
    grid-column: 1 / -1;
}

.course-meta-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--fldm-guinda, #8B2332);
    margin-bottom: 4px;
}

.course-meta-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main, #0F172A);
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.course-meta-value small {
    font-size: 13px;
    font-weight: normal;
    color: var(--fldm-gris-text, #64748B);
}

/* Tarjeta de Inversión */
.pricing-display-box {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pricing-regular-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.pricing-sale-box {
    background: #FEF3C7;
    border: 1px solid #FCD34D;
    border-radius: 6px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pricing-sale-badge {
    font-size: 11px;
    font-weight: 800;
    color: #92400E;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.pricing-sale-amount {
    font-size: 24px;
    font-weight: 800;
    color: #92400E;
    line-height: 1;
}

.pricing-regular-crossed {
    text-decoration: line-through;
    color: var(--fldm-gris-text, #64748B);
    font-size: 16px;
    font-weight: 500;
}

.pricing-deadline-note {
    font-size: 12px;
    color: #92400E;
    font-weight: 600;
    margin-top: 4px;
}

.pricing-currency-badge {
    font-size: 14px;
    font-weight: 600;
}

.pricing-regular-label {
    font-size: 14px;
    color: var(--fldm-gris-text, #64748B);
}

.pricing-regular-amount {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main, #0F172A);
}

.pricing-regular-currency {
    font-size: 14px;
}

.pricing-contact-note {
    font-size: 15px;
    color: var(--fldm-gris-text, #64748B);
    font-style: italic;
}

.pricing-register-wrap {
    margin-top: 10px;
}

.btn-course-register-block {
    width: 100%;
    text-align: center;
}

.course-actions-bar-bottom {
    margin-top: 40px;
}

/* =========================================================
   SECCIÓN DOCENTE(S)
   ========================================================= */
.course-instructors-section {
    margin-bottom: 44px;
}

.course-section-heading {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(22px, 2.5vw, 26px);
    line-height: 1.35;
    color: var(--text-main, #0F172A);
    margin: 0 0 20px;
    font-weight: 700;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(139, 35, 50, 0.15);
}

.instructor-card-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.instructor-card {
    display: flex;
    gap: 24px;
    background: #FFFFFF;
    border: 1px solid var(--border-color, #E2E8F0);
    border-left: 4px solid var(--fldm-guinda, #8B2332);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.instructor-photo-wrapper {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    background: #E2E8F0;
    border: 3px solid #FFFFFF;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.instructor-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.instructor-avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 35, 50, 0.08);
    color: var(--fldm-guinda, #8B2332);
    font-size: 36px;
    font-weight: 700;
    font-family: 'Playfair Display', Georgia, serif;
}

.instructor-info {
    flex: 1;
    min-width: 0;
}

.instructor-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main, #0F172A);
    margin: 0 0 6px;
    line-height: 1.3;
}

.instructor-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--fldm-guinda, #8B2332);
    margin: 0 0 14px;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.instructor-bio-text {
    font-size: 15px;
    line-height: 1.7;
    color: #334155;
    overflow-wrap: break-word;
    word-break: normal;
}

.instructor-bio-text * {
    overflow-wrap: break-word;
}

.instructor-bio-text p {
    margin: 0 0 0.8em;
}

.instructor-bio-text p:last-child {
    margin-bottom: 0;
}

/* =========================================================
   CONTENIDO EDITORIAL DEL CURSO Y ESPACIADO CORREGIDO
   ========================================================= */
.course-editorial-body {
    font-size: 17px;
    line-height: 1.75;
    color: var(--text-main, #1E293B);
    margin-bottom: 48px;
}

.course-editorial-body h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(22px, 2.5vw, 26px);
    line-height: 1.35;
    color: var(--text-main, #1E293B);
    margin: 2.2em 0 0.8em;
    font-weight: 700;
    overflow-wrap: anywhere;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color, #E2E8F0);
}

.course-editorial-body h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(19px, 2vw, 22px);
    line-height: 1.4;
    color: var(--text-main, #1E293B);
    margin: 1.8em 0 0.6em;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.course-editorial-body p {
    margin: 0 0 1.25em;
    line-height: 1.75;
    overflow-wrap: anywhere;
}

/* Corrección de espaciado en subtítulos/etiquetas como Objetivo y Contenidos clave */
.course-editorial-body .course-section-label,
.course-editorial-body p:has(> strong:only-child) {
    margin-top: 1.2em !important;
    margin-bottom: 0.25em !important;
    font-weight: 700 !important;
    color: var(--fldm-guinda, #8B2332) !important;
    font-size: 0.95em !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
}

.course-editorial-body .course-section-body {
    margin-bottom: 1.25em !important;
}

/* Listas ordenadas e inordenadas */
.course-editorial-body ul,
.course-editorial-body ol {
    margin: 0 0 1.5em;
    padding-left: 1.6em;
}

.course-editorial-body li {
    margin-bottom: 0.55em;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.course-editorial-body strong,
.course-editorial-body b {
    font-weight: 700;
    color: var(--text-main, #0F172A);
}

.course-editorial-body em,
.course-editorial-body i {
    font-style: italic;
}

.course-editorial-body a {
    color: var(--fldm-guinda, #8B2332);
    text-decoration: underline;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}

/* =========================================================
   RESPONSIVIDAD Y BREAKPOINTS (768px, 480px, 390px)
   ========================================================= */
@media (max-width: 768px) {
    .fldm-course-container {
        padding: 0 16px;
    }

    .course-meta-list {
        grid-template-columns: 1fr;
    }

    .instructor-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px 16px;
    }

    .instructor-info {
        text-align: left;
        width: 100%;
    }

    .course-overview-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .course-actions-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-course-register,
    .btn-course-brochure {
        width: 100%;
        text-align: center;
    }

    .instructor-photo-wrapper {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 390px) {
    .fldm-course-container {
        padding: 0 12px;
    }

    .course-main-title {
        font-size: 24px;
    }

    .course-card-meta {
        padding: 16px 12px;
    }
}
