/* ==============================================
   1. Estilos Globales y de Contenedor
   ============================================== */
:root {
    --primary-color: #3b82f6; /* Azul brillante */
    --secondary-color: #f59e0b; /* Naranja/Ámbar */
    --text-color: #1f2937; /* Gris oscuro para el texto */
    --light-bg: #f9fafb; /* Fondo general muy claro */
    --card-bg: #ffffff; /* Fondo de las tarjetas */
    --border-radius: 0.75rem;
    --card-shadow: 0 4px 10px rgba(0, 0, 0, 0.08); /* Sombra más uniforme y fuerte */
    --hover-shadow: 0 8px 15px rgba(0, 0, 0, 0.15); /* Sombra al pasar el ratón */
    --small-font: 0.8rem; /* Fuente más pequeña para comentarios (reducida un poco más) */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    background-color: var(--light-bg);
}

/* El contenedor principal que aplica el centrado y ancho (80%) */
.refran-single-wrapper {
    width: 80%;
    max-width: 1400px;
    margin: 3rem auto;
    padding: 1.5rem;
}

/* ==============================================
   2. Estilos de Cabecera y Título
   ============================================== */

.refran-single-wrapper h1.entry-title {
    color: #3e5f25;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.refran-single-description {
    text-align: center;
    color: #6b7280;
    font-style: italic;
    margin-bottom: 1.5rem;
}

/* ==============================================
   3. Estilos del Layout Principal (Traducciones y Datos Extras)
   ============================================== */

/* Contenedor de la cuadrícula interna para las traducciones (2 columnas) */
.translations-grid-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Traducciones se disponen internamente en 2 columnas */
    gap: 20px;

    /* ESTILOS DE LISTADO APLICADOS */
    padding: 20px;
    background-color: #ffd26d;
    border: 1px solid #d7393e;
    border-radius: var(--border-radius); /* Usar variable para consistencia */
}

/* Estilo para cada tarjeta individual de traducción */
.refran-translation-item {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    border-left: 4px solid var(--secondary-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.refran-translation-item:hover {
    box-shadow: var(--hover-shadow);
    transform: translateY(-2px);
}

.refran-translation-item h2 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

.refran-translation-item .refran-texto-principal {
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text-color);
    line-height: 1.5;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.refran-translation-item .refran-traduccion-en {
    font-size: 0.85rem;
    color: #4b5563;
    border-top: 1px dashed #f3f4f6;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

/* ==============================================
   4. Estilos de Comentarios (Compactación y Diseño en 2 Columnas)
   ============================================== */

.comments-two-column-wrapper {
    margin-top: 40px;
    max-width: 100%;
}

/* Contenedor general de comentarios */
#comments {
    /* AJUSTES DE ESTILO */
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    font-size: var(--small-font);
}

/* Asegura que los títulos y el contador ocupen todo el ancho */
#comments h2, #comments h3,
#comments .comments-title {
    font-size: 1.2rem;
    margin-top: 0.5rem;
}

/* ----------------------------------------------------------------------
   ⭐ REGLA CRÍTICA: Aplicar el diseño de 2 columnas al LISTADO de comentarios
   ---------------------------------------------------------------------- */
#comments ol.commentlist,
#comments ul.comment-list {
    /* Usamos Grid para distribuir los LI en 2 columnas */
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 30px !important; /* Espacio entre las columnas */

    padding: 0;
    margin: 0;
    list-style: none;
}

/* Aseguramos que cada comentario (li) ocupe su propia celda */
#comments ol.commentlist .comment,
#comments ul.comment-list li {
    /* Quitamos el ancho 100% que pudiera estar forzando el tema */
    width: auto !important;

    margin-bottom: 0; /* Ya tenemos el gap de 30px */
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
}

/* El formulario de respuesta y la paginación quedan debajo de la lista, como un flujo normal */
#comments #respond {
    padding: 0.5rem 0;
    margin-top: 2rem;
    border-top: 1px solid #e5e7eb;
}


.comment-content p,
.comment-author-link,
.comment-metadata {
    font-size: var(--small-font);
    line-height: 1.3;
}

.comment-author img.avatar {
    width: 30px;
    height: 30px;
}

/* ==============================================
   5. Adaptabilidad (Mobile Responsiveness)
   ============================================== */

@media (max-width: 1024px) {

    .translations-grid-wrapper {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 15px;
    }

    .refran-single-wrapper {
        margin: 1rem auto;
        padding: 0.5rem;
        width: 95%;
        max-width: none;
    }

    /* Comentarios en móvil: Vuelve a una sola columna vertical */
    #comments ol.commentlist,
    #comments ul.comment-list {
        grid-template-columns: 1fr !important; /* FORZAMOS UNA SOLA COLUMNA */
        gap: 20px;
    }
}