/* =============================================
   FICHA TÉCNICA DEL SOLUCIONARIO
   ============================================= */

.ficha-tecnica-container {
    background-color: #fdfdfd;
    border: 1px solid #e0e0e0;
    border-left: 6px solid #ffd700;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    font-family: 'Open Sans', sans-serif;
    margin-bottom: 35px;
}

.ficha-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.ficha-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-box {
    background-color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    flex-shrink: 0;
}

.text-box {
    display: flex;
    flex-direction: column;
}

.ficha-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    font-weight: 600;
    margin-bottom: 3px;
}

.ficha-value {
    font-size: 16px;
    font-weight: 800;
    color: #222;
    line-height: 1.2;
}

.full-width {
    grid-column: 1 / -1;
    background: #fff8e1;
    padding: 15px;
    border-radius: 6px;
    margin-top: 5px;
}

/* =============================================
   BOTÓN ELEGANTE (navegación)
   ============================================= */

.boton-elegante {
    display: inline-flex;
    align-items: center;
    background-color: #ffd700;
    color: #222;
    padding: 14px 30px;
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
    transition: all 0.2s ease;
}

.boton-elegante:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 215, 0, 0.5);
    background-color: #ffdb1a;
    color: #222;
    text-decoration: none;
}

/* =============================================
   ÍNDICE DE TEMAS (grid con anclas)
   ============================================= */

.indice-temas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
    margin: 25px 0 45px 0;
    font-family: 'Open Sans', sans-serif;
}

.indice-tema-item {
    display: block;
    padding: 14px 18px;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #ffd700;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

/* Tema CON contenido */
.indice-tema-activo {
    background: #fdfdfd;
    color: #333;
    cursor: pointer;
}

.indice-tema-activo:hover {
    background: #fff8e1;
    color: #222;
    text-decoration: none;
    border-left-color: #f39c12;
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Tema SIN contenido (próximamente) */
.indice-tema-proximo {
    background: #f5f5f5;
    color: #aaa;
    border-left-color: #ddd;
    cursor: pointer;
}

.indice-tema-proximo:hover {
    background: #f0f0f0;
    text-decoration: none;
    color: #999;
}

/* Tab seleccionado (tema visible) */
.indice-tema-seleccionado {
    background: #ffd700 !important;
    color: #222 !important;
    border-left-color: #e6a800 !important;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
    transform: none;
}

.indice-tema-seleccionado:hover {
    transform: none;
    background: #ffdb1a !important;
}

/* =============================================
   SISTEMA DE TABS — Paneles de contenido
   ============================================= */

.tema-tabs-contenedor {
    margin-top: 10px;
    min-height: 200px;
}

.tema-tab-intro {
    text-align: center;
    padding: 40px 20px;
    background: #f9f9f9;
    border: 2px dashed #ddd;
    border-radius: 10px;
    color: #888;
    font-size: 16px;
}

.tema-tab-panel {
    animation: fadeInPanel 0.3s ease;
}

@keyframes fadeInPanel {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Bloque "Próximamente" dentro de un panel */
.tema-proximamente {
    text-align: center;
    padding: 50px 20px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 10px;
    color: #999;
}

.tema-proximamente-icono {
    font-size: 40px;
    display: block;
    margin-bottom: 12px;
}

.tema-proximamente p {
    color: #999 !important;
    font-size: 15px !important;
    margin-bottom: 8px !important;
}

/* =============================================
   EJERCICIOS INTERACTIVOS
   ============================================= */

.ej-tema-bloque {
    margin: 30px 0 50px 0;
    padding-top: 10px;
}

/* Barra de progreso */
.ej-progreso {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 25px 0 25px 0;
    padding: 14px 18px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #eee;
}

.ej-progreso-barra {
    flex: 1;
    height: 12px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.ej-progreso-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffd700, #f39c12);
    border-radius: 6px;
    transition: width 0.4s ease;
}

.ej-progreso-texto {
    font-size: 13px;
    color: #666;
    font-weight: 600;
    white-space: nowrap;
}

/* Cada ejercicio — card */
.ej-interactivo {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 22px 24px;
    margin-bottom: 18px;
    background: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.ej-interactivo:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.ej-interactivo.ej-correcto {
    border-color: #27ae60;
    background: #f0faf4;
}

.ej-interactivo.ej-incorrecto {
    border-color: #e74c3c;
}

.ej-cabecera {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.ej-nivel {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 0.8px;
}

.ej-basico { background: #e8f5e9; color: #2e7d32; }
.ej-medio { background: #fff3e0; color: #e65100; }
.ej-avanzado { background: #fce4ec; color: #c62828; }

.ej-enunciado {
    font-size: 16px;
    color: #333;
    margin-bottom: 16px !important;
    line-height: 1.6;
}

.ej-input-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.ej-input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    font-family: 'Open Sans', sans-serif;
    transition: border-color 0.2s;
    outline: none;
}

.ej-input:focus {
    border-color: #ffd700;
}

.ej-input.ej-input-ok {
    border-color: #27ae60;
    background: #f0faf4;
}

.ej-input.ej-input-mal {
    border-color: #e74c3c;
    background: #fef5f5;
}

.ej-btn-comprobar {
    padding: 10px 22px;
    background: #ffd700;
    color: #222;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Open Sans', sans-serif;
    transition: all 0.2s;
    white-space: nowrap;
}

.ej-btn-comprobar:hover {
    background: #ffdb1a;
    transform: translateY(-1px);
}

.ej-btn-comprobar:disabled {
    background: #ccc;
    cursor: default;
    transform: none;
}

.ej-feedback {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
}

.ej-feedback.ej-fb-ok {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #27ae60;
}

.ej-feedback.ej-fb-mal {
    background: #fef5f5;
    color: #c62828;
    border-left: 4px solid #e74c3c;
}

.ej-pista {
    margin-top: 12px;
    padding: 12px 16px;
    background: #fffde7;
    border-left: 4px solid #ffd700;
    border-radius: 4px;
    font-size: 14px;
    color: #555;
}

/* =============================================
   SOLUCIÓN PASO A PASO (dentro de cada card)
   ============================================= */

.ej-solucion-details {
    margin-top: 14px;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.ej-solucion-toggle {
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #0274be;
    padding: 8px 0;
    list-style: none;
    transition: color 0.2s;
    user-select: none;
}

.ej-solucion-toggle::-webkit-details-marker {
    display: none;
}

.ej-solucion-toggle::before {
    content: "▸ ";
    transition: transform 0.2s;
}

details[open] > .ej-solucion-toggle::before {
    content: "▾ ";
}

.ej-solucion-toggle:hover {
    color: #025a9e;
}

.ej-solucion-contenido {
    background: #f7fbff;
    border: 1px solid #e3effa;
    border-radius: 8px;
    padding: 16px 18px;
    margin-top: 8px;
}

.ej-paso {
    display: flex;
    gap: 10px;
    align-items: baseline;
    margin-bottom: 10px;
    line-height: 1.5;
}

.ej-paso:last-of-type {
    margin-bottom: 0;
}

.ej-paso-num {
    flex-shrink: 0;
    background: #0274be;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.ej-paso-texto {
    font-size: 14px;
    color: #333;
}

.ej-nota {
    margin-top: 12px;
    padding: 10px 14px;
    background: #fff8e1;
    border-left: 3px solid #f39c12;
    border-radius: 4px;
    font-size: 13px;
    color: #555;
    font-style: italic;
}

/* =============================================
   SECCIONES GENERALES — ESPACIADO
   ============================================= */

.single .entry-content h2 {
    margin-top: 50px;
    margin-bottom: 20px;
}

.single .entry-content h3 {
    margin-top: 45px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #ffd700;
}

.single .entry-content h4 {
    margin-top: 25px;
    margin-bottom: 10px;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media screen and (max-width: 600px) {
    .ej-input-row {
        flex-direction: column;
    }
    .ej-interactivo {
        padding: 16px;
    }
    .ficha-grid {
        grid-template-columns: 1fr;
    }
    .indice-temas-grid {
        grid-template-columns: 1fr;
    }
    .ej-paso {
        flex-direction: column;
        gap: 4px;
    }
}
