/* assets/css/modern_forum.css */
:root {
    --bg-main: #0f1115;       /* Fondo oscuro profundo */
    --bg-surface: #161920;    /* Superficie de tarjetas y filas */
    --bg-header: #0a0b0d;     /* Encabezado fijo superior */
    
    --border-color: #242936;  /* Líneas divisorias minimalistas */
    
    --text-primary: #f0f3f8;  /* Texto de alta legibilidad */
    --text-muted: #8a96a8;     /* Descripciones y metadatos secundarios */
    
    --accent: #006699;         /* Azul clásico de enlaces recuperado de FSDark */
    --accent-hover: #1a8cff;   /* Iluminación interactiva moderna */
    --accent-vlink: #5493b4;   /* Enlaces visitados tradicionales */
    
    --font-stack: "Noto Sans", helvetica, arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-stack);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

/* Encabezado Estilo Tablero Moderno */
.app-header {
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
}

.board-header-description {
    padding: 1em 0 0;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.05em;
}

.brand-logo img {
    max-height: 2rem;
}

.icon-logo {
    fill: var(--accent);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-item {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-item:hover, .nav-item.active {
    color: var(--accent-hover);
}

/* Área de Visualización Principal */
.app-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.forum-section {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.section-header {
    background-color: rgba(255, 255, 255, 0.02);
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.section-header h2 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Estructura GRID para Filas del Tablero */
.board-list {
  display: flex;
  flex-direction: column;
  gap: 1em;
  padding: 1em;
}

.board-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
    position: relative; /* Define el límite de posicionamiento para el pseudo-elemento expansión */
    z-index: 2; 
    pointer-events: none; /* Permite que el evento click atraviese los contenedores internos y active el enlace */
}

.board-details h3 a {
    pointer-events: auto; /* Restaura la funcionalidad interactiva del elemento de hipervínculo nativo */
}

/* Expansión del área de clic de la etiqueta ancla a todo el contenedor .board-row */
.board-details h3 a::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1; /* Cubre la superficie completa del artículo */
}

.status-icon-svg {
    width: 28px;  /* Dimensión horizontal modificable */
    height: 28px; /* Dimensión vertical modificable */
    display: inline-block;
    vertical-align: middle;
    fill: var(--text-muted);
}

.board-row:hover .status-icon-svg {
    fill: var(--accent-hover);
}

.board-details h3 a {
    color: var(--accent);
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 600;
}

.board-details h3 a:visited {
    color: var(--accent-vlink);
}

.board-details h3 a:hover {
    text-decoration: underline;
    color: var(--accent-hover);
}

.board-description {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.board-stats {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.board-stats strong {
    color: var(--text-primary);
}

.board-last-post {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
    text-align: right;
    color: var(--text-muted);
}

.board-last-post .last-post-time {
    color: var(--text-primary);
    font-weight: 500;
}

.app-footer {
    background-color: var(--bg-header);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 1rem;
    margin-top: 3rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Control Responsivo de la Grilla */
@media (max-width: 768px) {
    .board-row {
        gap: 0.75rem;
    }
    .board-description {
        display: none;
    }
    .board-stats {
        flex-direction: row;
        gap: 1rem;
    }
    .board-last-post {
        text-align: left;
    }
}

/* Lista de Tópicos (Grilla) */
.topic-list-header, .topic-row {
    display: grid;
    grid-template-columns: 3fr 150px 80px 80px 100px;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.topic-list-header {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

.col-activity {
    text-align: end;
}

.topic-row {
    position: relative; /* Contexto para el enlace estirado */
    transition: background-color 0.2s ease;
}

.board-row:hover, .topic-row:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Enlace Estirado (Click en toda la fila) */
.topic-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
}

.topic-link::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
}

/* Alineación de columnas de datos */
.topic-main { z-index: 2; /* Permite selección de texto si es necesario */ }
.topic-author { color: var(--text-muted); }
.topic-stats { 
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-muted); 
}
.topic-replies svg { color: #00a8ff; } 
.topic-views { color: #ff9f43; font-weight: 600; } 
.topic-activity { color: var(--text-muted); text-align: right; }

.loading-indicator {
    height: 40px;
    width: 100%;
}

@media (max-width: 768px) {
    .topic-list-header {
        display: none;
    }

    .topic-row {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        column-gap: 1.25rem;
        row-gap: 0.15rem;
        padding: 0.85rem 1rem;
    }

    .topic-main {
        grid-column: 1;
        grid-row: 1 / span 2;
        align-self: center;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        min-width: 0; 
    }

    .topic-author {
        display: none;
    }

    .topic-views {
        display: none;
    }

    .topic-replies {
        grid-column: 2;
        grid-row: 1;
        justify-content: flex-end;
        font-size: 0.9rem;
    }

    .topic-activity {
        grid-column: 2;
        grid-row: 2;
        text-align: right;
        font-size: 0.75rem;
        color: var(--text-muted);
        padding-top: 0.1rem;
    }
}