/**
 * ADJ Foro Oposiciones Justicia - Estilos Frontend
 * Replica el diseño actual de la página del foro en administraciondejusticia.com
 * Version: 1.0.0
 */

/* ============================================================
   CONTENEDOR PRINCIPAL
   ============================================================ */
.adj-foro-contenedor {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    font-family: inherit;
}

/* ============================================================
   CADA HILO DEL FORO
   ============================================================ */
.adj-foro-hilo {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px 30px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease;
}

.adj-foro-hilo:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* ============================================================
   CABECERA DEL HILO (etiqueta + categoría)
   ============================================================ */
.adj-foro-hilo-cabecera {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.adj-foro-hilo-etiqueta {
    display: inline-block;
    background: #1a3c5e;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 3px;
    line-height: 1.4;
}

.adj-foro-hilo-categoria {
    display: inline-block;
    background: #e8f4fd;
    color: #1a3c5e;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 3px;
    line-height: 1.4;
}

/* ============================================================
   TÍTULO DEL HILO
   ============================================================ */
.adj-foro-hilo-titulo {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 15px 0;
    padding: 0;
    line-height: 1.3;
}

/* ============================================================
   PREGUNTA
   ============================================================ */
.adj-foro-hilo-pregunta {
    margin-bottom: 15px;
}

.adj-foro-hilo-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.adj-foro-hilo-autor {
    font-size: 14px;
    font-weight: 700;
    color: #333333;
}

.adj-foro-hilo-fecha {
    font-size: 13px;
    color: #888888;
    font-style: normal;
}

.adj-foro-hilo-texto-pregunta {
    font-size: 15px;
    line-height: 1.6;
    color: #444444;
}

.adj-foro-hilo-texto-pregunta p {
    margin: 0 0 10px 0;
}

.adj-foro-hilo-texto-pregunta p:last-child {
    margin-bottom: 0;
}

/* ============================================================
   RESPUESTA
   ============================================================ */
.adj-foro-hilo-respuesta {
    border-top: 1px solid #eeeeee;
    padding-top: 15px;
    margin-top: 15px;
}

.adj-foro-hilo-num-respuestas {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    color: #1a3c5e;
    margin-bottom: 10px;
}

.adj-foro-hilo-num-respuestas em {
    font-weight: 400;
    font-style: italic;
}

.adj-foro-hilo-texto-respuesta {
    font-size: 15px;
    line-height: 1.6;
    color: #444444;
    padding-left: 15px;
    border-left: 3px solid #1a3c5e;
}

.adj-foro-hilo-texto-respuesta p {
    margin: 0 0 10px 0;
}

.adj-foro-hilo-texto-respuesta p:last-child {
    margin-bottom: 0;
}

.adj-foro-hilo-texto-respuesta a {
    color: #1a3c5e;
    text-decoration: underline;
    font-weight: 500;
}

.adj-foro-hilo-texto-respuesta a:hover {
    color: #2d5f8a;
}

/* ============================================================
   PAGINACIÓN
   ============================================================ */
.adj-foro-paginacion {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 20px;
}

.adj-foro-paginacion ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.adj-foro-paginacion ul li {
    display: inline-block;
    margin: 0;
    padding: 0;
}

.adj-foro-paginacion ul li a,
.adj-foro-paginacion ul li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.adj-foro-paginacion ul li a {
    background: #f5f5f5;
    color: #333333;
    border: 1px solid #dddddd;
}

.adj-foro-paginacion ul li a:hover {
    background: #1a3c5e;
    color: #ffffff;
    border-color: #1a3c5e;
}

.adj-foro-paginacion ul li span.current {
    background: #1a3c5e;
    color: #ffffff;
    border: 1px solid #1a3c5e;
    font-weight: 700;
}

.adj-foro-paginacion ul li .dots {
    background: transparent;
    border: none;
    color: #888888;
}

/* ============================================================
   MENSAJE DE FORO VACÍO
   ============================================================ */
.adj-foro-vacio {
    text-align: center;
    padding: 40px 20px;
    font-size: 16px;
    color: #888888;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px dashed #dddddd;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media screen and (max-width: 768px) {

    .adj-foro-hilo {
        padding: 18px 20px;
        margin-bottom: 18px;
    }

    .adj-foro-hilo-titulo {
        font-size: 17px;
    }

    .adj-foro-hilo-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .adj-foro-hilo-texto-pregunta,
    .adj-foro-hilo-texto-respuesta {
        font-size: 14px;
    }

    .adj-foro-hilo-texto-respuesta {
        padding-left: 12px;
    }

    .adj-foro-paginacion ul {
        gap: 4px;
    }

    .adj-foro-paginacion ul li a,
    .adj-foro-paginacion ul li span {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
}

@media screen and (max-width: 480px) {

    .adj-foro-hilo {
        padding: 15px;
        border-radius: 6px;
    }

    .adj-foro-hilo-cabecera {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .adj-foro-hilo-titulo {
        font-size: 16px;
    }
}

/* ============================================================
   BUSCADOR DEL FORO
   ============================================================ */
.adj-foro-buscador {
    margin-bottom: 30px;
}

.adj-foro-buscador-interior {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 8px 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.adj-foro-buscador-interior:focus-within {
    border-color: #1a3c5e;
    box-shadow: 0 0 0 3px rgba(26, 60, 94, 0.1);
}

.adj-foro-buscador-icono {
    font-size: 18px;
    margin-right: 10px;
    flex-shrink: 0;
}

.adj-foro-buscador-input {
    flex: 1;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    font-size: 15px;
    font-family: inherit;
    color: #1d2327;
    padding: 8px 0 !important;
    box-shadow: none !important;
    -webkit-appearance: none;
    margin: 0 !important;
}

.adj-foro-buscador-input::placeholder {
    color: #a7aaad;
    font-style: italic;
}

.adj-foro-buscador-limpiar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: #f0f0f1;
    color: #646970;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease;
    padding: 0;
    margin-left: 8px;
}

.adj-foro-buscador-limpiar:hover {
    background: #d63638;
    color: #ffffff;
}

.adj-foro-buscador-contador {
    margin: 10px 0 0;
    padding: 0;
    font-size: 13px;
    font-weight: 600;
    font-style: italic;
}

/* ============================================================
   PAGINACIÓN MEJORADA
   ============================================================ */
.adj-foro-paginacion {
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.adj-foro-paginacion ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
}

.adj-foro-paginacion li {
    margin: 0;
}

.adj-foro-paginacion a,
.adj-foro-paginacion span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 4px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #ffffff;
    color: #1a3c5e;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.adj-foro-paginacion a:hover {
    background: #1a3c5e;
    color: #ffffff;
    border-color: #1a3c5e;
}

.adj-foro-paginacion span.current {
    background: #1a3c5e;
    color: #ffffff;
    border-color: #1a3c5e;
    font-weight: 700;
}

/* Responsive buscador */
@media screen and (max-width: 480px) {

    .adj-foro-buscador-interior {
        padding: 6px 12px;
    }

    .adj-foro-buscador-input {
        font-size: 14px;
    }
}
