/* ==========================================================================
   CURSO CERO - ESTILOS TÉCNICOS INTEGRADOS
   Diseño acorde a la identidad institucional de cursoselectricidad.com.es
   Paleta: Azul Marino (#061528 / #1e3a8a), Royal Blue (#2563eb), Oro (#f59e0b)
   ========================================================================== */

/* 1. Reset de Sobreescrituras de Botones Globales (Evitar morados) */
.curso-modulo-page .btn-primary,
.hero-curso-cero .btn-primary,
.modulo-item .btn-primary {
    background-color: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
}

.curso-modulo-page .btn-primary:hover,
.hero-curso-cero .btn-primary:hover,
.modulo-item .btn-primary:hover {
    background-color: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
}

.btn-warning {
    background-color: #f59e0b !important;
    border-color: #f59e0b !important;
    color: #0f172a !important;
}

.btn-warning:hover {
    background-color: #d97706 !important;
    border-color: #d97706 !important;
    color: #0f172a !important;
}

/* 2. Cabeceras Institucionales y Hero */
.hero-curso-cero {
    background: linear-gradient(135deg, #061528 0%, #0c2948 45%, #1e3a8a 85%, #2563eb 100%);
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.modulo-header {
    background: linear-gradient(135deg, #061528 0%, #0c2948 45%, #1e3a8a 85%, #2563eb 100%);
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.bg-gradient-purple,
.bg-gradient-primary,
.bg-gradient-tools,
.bg-gradient-safety,
.bg-gradient-emergency,
.bg-gradient-maintenance,
.bg-gradient-next {
    background: linear-gradient(135deg, #061528 0%, #0c2948 45%, #1e3a8a 85%, #2563eb 100%) !important;
}

.badge-curso-cero,
.badge-modulo {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    color: #ffffff;
    padding: 0.45rem 1.25rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.text-white-90 {
    color: rgba(255, 255, 255, 0.9);
}

/* 3. Franja de Métricas / Stats */
.stats-row {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    color: #ffffff;
    padding: 0.75rem 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: #f59e0b;
    margin-bottom: 0.35rem;
}

.stat-label {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #cbd5e1;
    font-weight: 600;
}

/* 4. Módulos y Acordeón del Temario (Página Principal) */
.modulo-accordion {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.modulo-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.modulo-link:hover {
    text-decoration: none;
    color: inherit;
}

.modulo-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 5px solid #2563eb;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    transition: all 0.25s ease;
}

.modulo-item:hover {
    border-left-color: #f59e0b;
    border-color: #cbd5e1;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.09);
    transform: translateY(-2px);
}

.modulo-header-card {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
}

.modulo-badge {
    background: #1e3a8a;
    color: #ffffff;
    padding: 0.35rem 0.85rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.modulo-header-card h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    flex-grow: 1;
}

.modulo-duration {
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 500;
    flex-shrink: 0;
}

/* 5. Bloques de Contenido de Lecciones */
.content-block {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 2.25rem;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
    margin-bottom: 2rem;
}

.content-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #061528 0%, #1e3a8a 50%, #2563eb 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: #fbbf24;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.2);
}

.section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1e3a8a;
    color: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-weight: 700;
    margin-right: 0.6rem;
    font-size: 0.95rem;
    vertical-align: middle;
}

/* 6. Cajas Destacadas (Highlight Box) */
.highlight-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #2563eb;
    border-radius: 12px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
}

.reason-item {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.reason-item:last-child {
    margin-bottom: 0;
}

.reason-icon {
    font-size: 2.25rem;
    flex-shrink: 0;
    line-height: 1;
}

.reason-content h3,
.reason-content h5 {
    color: #0f172a;
    font-weight: 700;
    margin-bottom: 0.35rem;
    font-size: 1.05rem;
}

.reason-content p {
    color: #475569;
    font-size: 0.96rem;
    line-height: 1.65;
    margin: 0;
}

/* 7. Bloques de Alerta y Notificación */
.alert-box {
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    font-size: 0.95rem;
    line-height: 1.65;
    margin: 1.5rem 0;
}

.alert-box i {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.alert-info {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-left: 4px solid #0284c7;
    color: #0369a1;
}

.alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

.alert-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    color: #92400e;
}

.alert-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-left: 4px solid #10b981;
    color: #065f46;
}

/* 8. Tarjetas de Componentes, Herramientas y Averías */
.component-card,
.tool-card,
.rule-card,
.emergency-card,
.annual-task,
.path-card,
.career-card,
.cert-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #2563eb;
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.25s ease;
    position: relative;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
}

.component-card:hover,
.tool-card:hover,
.rule-card:hover,
.emergency-card:hover,
.annual-task:hover,
.path-card:hover,
.career-card:hover,
.cert-card:hover {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
    border-color: #cbd5e1;
}

.component-card.critical,
.rule-card.critical,
.emergency-card.critical,
.annual-task.critical,
.tool-card.essential {
    border-left-color: #ef4444;
}

.component-card.important,
.rule-card.important,
.annual-task.important,
.tool-card.intermediate {
    border-left-color: #f59e0b;
}

.tool-card.advanced,
.career-card.highlighted,
.cert-card.important {
    border-left-color: #1e3a8a;
}

.component-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.72rem;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: #f1f5f9;
    color: #475569;
}

/* 9. Pasos y Procesos (Journey Steps) */
.journey-steps {
    position: relative;
    padding-left: 0.5rem;
}

.journey-step {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 2rem;
    position: relative;
}

.journey-step:last-child {
    margin-bottom: 0;
}

.journey-step::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 45px;
    bottom: -25px;
    width: 2px;
    background: #cbd5e1;
}

.journey-step:last-child::before {
    display: none;
}

.journey-number {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
    position: relative;
    z-index: 1;
}

.journey-text h3,
.journey-text h5 {
    color: #0f172a;
    font-weight: 700;
    margin-bottom: 0.35rem;
    font-size: 1.05rem;
}

.journey-text p {
    color: #475569;
    margin: 0;
    line-height: 1.6;
}

/* 10. Caja de Resumen del Módulo */
.summary-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #10b981;
    border-radius: 14px;
    padding: 2rem;
}

.summary-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.summary-list li {
    padding: 0.5rem 0 0.5rem 2rem;
    position: relative;
    color: #334155;
    font-weight: 500;
    line-height: 1.6;
}

.summary-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: 800;
    font-size: 1.25rem;
    line-height: 1.2;
}

/* 11. Navegación entre Módulos */
.modulo-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid #e2e8f0;
}

/* 12. Menú Lateral de Módulos (Sidebar Navigation) */
.sidebar-module-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-module-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    text-decoration: none;
    color: #475569;
    font-size: 0.92rem;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: 0.35rem;
    border: 1px solid transparent;
}

.sidebar-module-item:hover {
    background: #f1f5f9;
    color: #1e3a8a;
    text-decoration: none;
    transform: translateX(3px);
}

.sidebar-module-item.active {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
    font-weight: 700;
}

.sidebar-module-item .module-num {
    background: #e2e8f0;
    color: #334155;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.sidebar-module-item.active .module-num {
    background: #2563eb;
    color: #ffffff;
}

/* 13. Adaptación Responsive */
@media (max-width: 768px) {
    .stats-row {
        gap: 1rem;
    }
    
    .stat-item {
        flex: 1 1 45%;
        padding: 0.5rem;
    }
    
    .stat-number {
        font-size: 1.9rem;
    }
    
    .content-block {
        padding: 1.5rem;
    }
    
    .reason-item {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .modulo-navigation {
        flex-direction: column;
    }
    
    .modulo-navigation .btn {
        width: 100%;
    }
}

/* ==========================================================================
   Google AdSense Auto-Ads Exclusions para Curso Cero
   ========================================================================== */
.google-anno-skip,
.no-ads {
    position: relative;
}

.google-anno-skip .google-auto-placed,
.no-ads .google-auto-placed,
.modulo-header .google-auto-placed,
.hero-curso-cero .google-auto-placed,
.content-block .google-auto-placed,
.alert-box .google-auto-placed,
.highlight-box .google-auto-placed,
.summary-box .google-auto-placed,
.step-card .google-auto-placed,
.sidebar-sticky-wrapper .google-auto-placed,
.modulo-navigation .google-auto-placed {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

