/* =========================================================
   Estilos Scoped para el Módulo de Foros (second nature)
   ========================================================= */

/* --- Garantizar renderizado correcto de Material Symbols --- */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined' !important;
    font-weight: normal !important;
    font-style: normal !important;
    line-height: 1 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    display: inline-block !important;
    white-space: nowrap !important;
    word-wrap: normal !important;
    direction: ltr !important;
    -webkit-font-smoothing: antialiased;
    border: none !important;
    outline: none !important;
    background: none !important;
    vertical-align: middle;
}

/* Reset básico para botones dentro del módulo de foros */
.forum-container button,
.forum-detail-card button,
.comment-card button,
.comment-subcard button,
.forum-reply-box button {
    appearance: none !important;
    -webkit-appearance: none !important;
    font-family: inherit;
}

/* --- Layout & Contenedores --- */
.forum-container {
    max-width: 1060px;
    margin: 2.5rem auto;
    padding: 0 1.25rem;
}

.forum-detail-container {
    max-width: 940px;
    margin: 2.5rem auto;
    padding: 0 1.25rem;
}

/* Botón Volver */
.forum-back-link {
    color: var(--text-muted) !important;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 1.75rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.forum-back-link:hover {
    color: var(--primary) !important;
    transform: translateX(-3px);
}

/* --- Hero & Encabezado Principal (Listado) --- */
.forum-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.forum-hero-text {
    flex: 1;
    min-width: 280px;
}

.forum-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    background: rgba(255, 170, 0, 0.12);
    color: var(--primary);
    border: 1px solid rgba(255, 170, 0, 0.25);
    margin-bottom: 0.75rem;
}

[data-theme="light"] .forum-badge-pill {
    background: rgba(212, 10, 78, 0.08);
    color: var(--primary);
    border-color: rgba(212, 10, 78, 0.2);
}

.forum-title {
    font-family: 'Raleway', sans-serif;
    font-size: 2.6rem;
    font-weight: 200 !important;
    text-transform: lowercase !important;
    letter-spacing: -1px;
    color: var(--text-main);
    line-height: 1.15;
    margin-bottom: 0.4rem;
}

.forum-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.5;
    max-width: 600px;
}

/* Botón de Acción Principal (Crear Tema) */
.forum-action-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    padding: 0.75rem 1.5rem !important;
    font-weight: 600 !important;
    font-size: 0.92rem !important;
    text-decoration: none !important;
    border: none !important;
    background: var(--primary) !important;
    color: #000000 !important;
    border-radius: 24px !important;
    cursor: pointer;
    transition: all 0.25s ease !important;
    box-shadow: 0 4px 15px rgba(255, 170, 0, 0.25) !important;
    line-height: 1 !important;
}

[data-theme="light"] .forum-action-btn {
    background: var(--primary) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(212, 10, 78, 0.25) !important;
}

.forum-action-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(255, 170, 0, 0.4) !important;
    filter: brightness(1.08);
}

[data-theme="light"] .forum-action-btn:hover {
    background: var(--secondary) !important;
    box-shadow: 0 6px 20px rgba(212, 10, 78, 0.35) !important;
}


/* --- Toolbar de Filtros y Búsqueda --- */
.forum-toolbar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .forum-toolbar {
    background: #ffffff;
    border-color: var(--border-color);
    box-shadow: var(--shadow-sm);
}

.forum-toolbar-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: center;
    justify-content: space-between;
}

/* Chips / Filtros de Categorías */
.forum-chip-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    flex: 1;
}

.forum-chip {
    padding: 0.45rem 1.1rem !important;
    border: 1px solid var(--border-color) !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    color: var(--text-muted) !important;
    text-decoration: none !important;
    background: rgba(255, 255, 255, 0.02) !important;
    transition: all 0.2s ease !important;
    border-radius: 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
}

[data-theme="light"] .forum-chip {
    background: #f4f4f7 !important;
    border-color: var(--border-color) !important;
    color: var(--text-muted) !important;
}

.forum-chip:hover {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
    background: rgba(255, 170, 0, 0.08) !important;
    transform: translateY(-1px);
}

[data-theme="light"] .forum-chip:hover {
    background: rgba(212, 10, 78, 0.08) !important;
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.forum-chip.active {
    background: rgba(255, 170, 0, 0.15) !important;
    color: var(--primary) !important;
    border-color: var(--primary) !important;
    font-weight: 600 !important;
}

[data-theme="light"] .forum-chip.active {
    background: rgba(212, 10, 78, 0.1) !important;
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}

/* Caja de Búsqueda */
.forum-search-box {
    display: flex;
    align-items: center;
    position: relative;
    min-width: 240px;
    flex: 1;
    max-width: 320px;
}

.forum-search-input {
    width: 100%;
    height: 40px;
    box-sizing: border-box;
    border-radius: 20px !important;
    border: 1px solid var(--border-color) !important;
    background: rgba(255, 255, 255, 0.03) !important;
    padding: 0 2.5rem 0 1rem !important;
    color: var(--text-main) !important;
    font-size: 0.9rem !important;
    outline: none !important;
    transition: all 0.2s ease !important;
}

[data-theme="light"] .forum-search-input {
    background: var(--bg-card-soft) !important;
    border-color: var(--border-color) !important;
    color: var(--text-main) !important;
}

.forum-search-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 1px var(--primary) !important;
}

.forum-search-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent !important;
    border: none !important;
    color: var(--text-muted) !important;
    cursor: pointer;
    padding: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.forum-search-btn:hover {
    color: var(--primary) !important;
}


/* --- Lista de Hilos & Cards (Listado) --- */
.forum-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.forum-card {
    /* Dark Theme Variables */
    --p-card-bg: radial-gradient(circle at 50% 360px, #512b18 0%, #202d35 60%, #0f161a 100%);
    --p-card-text: #f3f4f6;
    --p-card-border: #374151;
    --p-card-border-hover: #4b5563;
}

[data-theme="light"] .forum-card {
    /* Light Theme - Wine/Dark */
    --p-card-bg: linear-gradient(135deg, #7a003c 0%, #5a002b 40%, #350019 75%, #1a0010 100%);
    --p-card-text: #ffffff;
    --p-card-border: rgba(255, 255, 255, 0.15);
    --p-card-border-hover: rgba(255, 255, 255, 0.35);
}

.forum-card {
    background: var(--p-card-bg, var(--bg-card));
    border: 1px solid var(--p-card-border, var(--border-color));
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    color: var(--p-card-text, inherit);
}

[data-theme="light"] .forum-card {
    background: var(--p-card-bg, #ffffff);
    border-color: var(--p-card-border, rgba(0, 0, 0, 0.08));
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    color: var(--p-card-text, inherit);
}

.forum-card:hover {
    border-color: var(--p-card-border-hover, var(--primary));
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .forum-card:hover {
    border-color: var(--p-card-border-hover, var(--primary));
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Cabecera de la Card */
.forum-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.forum-author-info {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.forum-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary);
    overflow: hidden;
    flex-shrink: 0;
}

[data-theme="light"] .forum-avatar {
    background: rgba(212, 10, 78, 0.06);
    border-color: var(--border-color);
}

.forum-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.forum-meta-details {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.forum-author-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.forum-author-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--p-card-text, var(--text-main));
}

.forum-date {
    font-size: 0.8rem;
    color: var(--p-card-text, var(--text-muted));
    opacity: 0.8;
}

/* Badges de Rol */
.badge-role {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 12px;
}

.badge-pro {
    background: rgba(255, 170, 0, 0.12);
    color: var(--primary);
    border: 1px solid rgba(255, 170, 0, 0.3);
}

[data-theme="light"] .badge-pro {
    background: rgba(212, 10, 78, 0.1);
    color: var(--primary);
    border: 1px solid rgba(212, 10, 78, 0.25);
}

.badge-patient {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

[data-theme="light"] .badge-patient {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-muted);
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.badge-reply-to {
    font-size: 0.75rem;
    background: rgba(255, 170, 0, 0.1);
    color: var(--primary);
    padding: 0.2rem 0.65rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 170, 0, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

[data-theme="light"] .badge-reply-to {
    background: rgba(212, 10, 78, 0.08);
    color: var(--primary);
    border: 1px solid rgba(212, 10, 78, 0.2);
}

/* Botón de Reportar */
.forum-report-btn {
    background: transparent;
    border: none;
    color: #dc3545;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 1rem;
    font-size: 0.85rem;
    font-family: inherit;
    font-weight: normal;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    transition: transform 0.2s ease, background 0.2s ease;
}

[data-theme="light"] .forum-report-btn {
    background: #ffffff;
    border: 1px solid rgba(220, 53, 69, 0.2);
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

[data-theme="light"] .forum-report-btn:hover {
    transform: translateY(-1px);
}

/* Categoría Badge */
.forum-cat-badge {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.35rem 0.85rem;
    color: var(--p-card-text, var(--text-muted));
    font-weight: 600;
    border-radius: 20px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

[data-theme="light"] .forum-cat-badge {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* Contenido Principal de la Card en Listado */
.forum-card-link {
    text-decoration: none !important;
    color: inherit !important;
    display: block;
}

.forum-card-link * {
    text-decoration: none !important;
}

.forum-card-title {
    font-family: 'Raleway', sans-serif;
    font-size: 1.65rem;
    font-weight: 300 !important;
    letter-spacing: -0.5px;
    text-transform: lowercase !important;
    margin-bottom: 0.6rem;
    transition: color 0.2s ease;
    line-height: 1.25;
    color: var(--text-main);
}

.forum-card-link:hover .forum-card-title,
.forum-card:hover .forum-card-title {
    color: var(--primary) !important;
}

.forum-card-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    font-weight: 300;
}

/* Pie de la Card */
.forum-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.forum-card-stats {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.forum-stat-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
    color: var(--text-muted);
}

.forum-read-more {
    color: var(--primary) !important;
    text-decoration: none !important;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
    transition: gap 0.2s ease;
}

.forum-read-more:hover {
    gap: 0.55rem;
}


/* --- DETALLE DEL HILO PRINCIPAL (foro_detalle.html) --- */
.forum-detail-container {
    max-width: 840px;
    margin: 2rem auto 5rem auto;
    padding: 0 1.25rem;
    font-family: 'Raleway', 'Inter', -apple-system, sans-serif;
}

/* Navegación y Botón Volver - Estilo auth-btn-outline */
.forum-detail-nav {
    margin-bottom: 1.5rem;
}

.forum-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: 'Raleway', 'Inter', -apple-system, sans-serif;
    font-size: 0.82rem;
    font-weight: 300;
    letter-spacing: 0.5px;
    text-transform: lowercase;
    color: rgba(255, 255, 255, 0.75) !important;
    text-decoration: none !important;
    padding: 0.4rem 0.95rem;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.forum-back-link .material-symbols-outlined {
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.forum-back-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.forum-back-link:hover .material-symbols-outlined {
    transform: translateX(-2px);
}

[data-theme="light"] .forum-back-link {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
    color: #374151 !important;
}

[data-theme="light"] .forum-back-link:hover {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.2);
    color: #111827 !important;
}

/* Tarjeta Principal del Hilo - Idéntico al fondo y borde de .auth-modal-content */
.forum-detail-card {
    background: linear-gradient(160deg, #161618 0%, #0c0c0e 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: clamp(1.5rem, 3.5vw, 2.4rem);
    margin-bottom: 2rem;
    position: relative;
    box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.04);
    color: #ffffff;
}

[data-theme="light"] .forum-detail-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.08);
    color: #111827;
}

/* Header Superior de Metadatos */
.forum-detail-meta-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.forum-detail-meta-left {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 300;
}

[data-theme="light"] .forum-detail-meta-left {
    color: #6b7280;
}

.forum-detail-meta-left .post-community-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
    font-family: 'Raleway', sans-serif;
    font-weight: 300;
    letter-spacing: 0.4px;
    text-transform: lowercase;
    font-size: 0.74rem;
    padding: 0.22rem 0.65rem;
    border-radius: 20px;
}

.forum-detail-meta-left .badge-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
}

[data-theme="light"] .forum-detail-meta-left .post-community-badge {
    background: #f3f4f6;
    border-color: #e5e7eb;
    color: #374151;
}

[data-theme="light"] .forum-detail-meta-left .badge-dot {
    background: #6b7280;
}

.forum-detail-report-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.28rem 0.7rem;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: lowercase;
}

.forum-detail-report-btn .material-symbols-outlined {
    font-size: 0.85rem;
}

.forum-detail-report-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: translateY(-1px);
}

[data-theme="light"] .forum-detail-report-btn {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
    color: #6b7280;
}

[data-theme="light"] .forum-detail-report-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #111827;
    border-color: rgba(0, 0, 0, 0.16);
}

/* Título del Hilo - Estilo auth-modal-title */
.forum-detail-title {
    font-family: 'Raleway', sans-serif;
    font-size: clamp(1.75rem, 3.8vw, 2.25rem);
    font-weight: 200 !important;
    letter-spacing: -0.8px;
    line-height: 1.25;
    text-transform: lowercase !important;
    margin: 0 0 1.25rem 0;
    color: #ffffff;
    -webkit-font-smoothing: antialiased;
}

[data-theme="light"] .forum-detail-title {
    color: #111827;
}

/* Barra del Autor del Hilo */
.forum-detail-author-bar {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .forum-detail-author-bar {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

.forum-detail-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: 'Raleway', sans-serif;
    font-size: 1rem;
    font-weight: 300;
    color: #ffffff;
}

.forum-detail-author-avatar.anon-avatar {
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.6);
}

[data-theme="light"] .forum-detail-author-avatar {
    background: #f3f4f6;
    border-color: rgba(0, 0, 0, 0.1);
    color: #111827;
}

.forum-detail-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.forum-detail-author-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.forum-detail-author-name-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.forum-detail-author-name {
    font-family: 'Raleway', sans-serif;
    font-size: 0.96rem;
    font-weight: 300;
    letter-spacing: -0.2px;
    color: #ffffff;
    text-transform: lowercase;
}

[data-theme="light"] .forum-detail-author-name {
    color: #111827;
}

.forum-detail-author-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 200;
    letter-spacing: 0.2px;
    color: rgba(255, 255, 255, 0.55);
}

[data-theme="light"] .forum-detail-author-subtitle {
    color: #6b7280;
}

/* Imagen adjunta - Estilo auth-card-media */
.forum-detail-image-box {
    margin: 1.25rem 0 1.75rem 0;
    border-radius: 16px;
    overflow: hidden;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    max-height: 520px;
    text-align: center;
}

.forum-detail-img {
    width: 100%;
    max-height: 520px;
    object-fit: contain;
    display: block;
}

/* Cuerpo y Texto del Hilo */
.forum-detail-body {
    font-family: 'Inter', sans-serif;
    font-size: 1.02rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 200;
    letter-spacing: 0.15px;
}

[data-theme="light"] .forum-detail-body {
    color: #374151;
    font-weight: 300;
}

.forum-detail-text p {
    margin: 0 0 1.25rem 0;
}

.forum-detail-text p:last-child {
    margin-bottom: 0;
}

/* Footer de la tarjeta con contadores y compartir */
.forum-detail-card-footer {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .forum-detail-card-footer {
    border-top-color: rgba(0, 0, 0, 0.06);
}

.forum-detail-card-footer .post-action {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Raleway', 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 300;
    letter-spacing: 0.4px;
    text-transform: lowercase;
    border-radius: 7px;
    padding: 0.35rem 0.75rem;
}

.forum-detail-card-footer .post-action:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

[data-theme="light"] .forum-detail-card-footer .post-action {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
    color: #4b5563;
}

[data-theme="light"] .forum-detail-card-footer .post-action:hover {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.16);
    color: #111827;
}

/* --- CAJA DE RESPUESTA DIRECTA (Estilo .auth-modal-content) --- */
.forum-reply-box {
    background: linear-gradient(160deg, #161618 0%, #0c0c0e 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: clamp(1.4rem, 3.5vw, 2.2rem);
    margin-bottom: 2.75rem;
    box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.04);
    position: relative;
}

[data-theme="light"] .forum-reply-box {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.08);
}

.reply-box-head {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1.1rem;
}

.reply-box-head-icon {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.6);
}

[data-theme="light"] .reply-box-head-icon {
    color: #6b7280;
}

.forum-reply-box-title {
    font-family: 'Raleway', sans-serif;
    font-size: 1.35rem;
    font-weight: 200 !important;
    letter-spacing: -0.5px;
    color: #ffffff;
    text-transform: lowercase;
    margin: 0;
}

[data-theme="light"] .forum-reply-box-title {
    color: #111827;
}

.forum-reply-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.forum-reply-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.forum-textarea {
    width: 100% !important;
    min-height: 110px;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    border-radius: 14px !important;
    padding: 1rem 1.15rem !important;
    color: #ffffff !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 0.92rem !important;
    font-weight: 200 !important;
    letter-spacing: 0.2px;
    line-height: 1.6 !important;
    resize: vertical;
    outline: none !important;
    transition: all 0.2s ease;
    box-sizing: border-box !important;
    display: block !important;
}

.forum-textarea:focus {
    border-color: rgba(255, 255, 255, 0.22) !important;
    background: rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .forum-textarea {
    background: #f9fafb !important;
    border-color: #e5e7eb !important;
    color: #111827 !important;
    font-weight: 300 !important;
}

[data-theme="light"] .forum-textarea:focus {
    border-color: rgba(0, 0, 0, 0.25) !important;
    background: #ffffff !important;
}

/* Botón idéntico al .button del Auth Modal con Radial Gradient y Glow Inferior */
.forum-submit-btn {
    min-width: 120px;
    position: relative;
    cursor: pointer;
    padding: 10px 18px !important;
    border: 0 !important;
    border-radius: 7px !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12) !important;
    background: radial-gradient(
        ellipse at bottom,
        rgba(71, 81, 92, 1) 0%,
        rgba(11, 21, 30, 1) 45%
    ) !important;
    color: rgba(255, 255, 255, 0.75) !important;
    font-family: 'Raleway', 'Inter', -apple-system, sans-serif !important;
    font-size: 0.85rem !important;
    font-weight: 300 !important;
    letter-spacing: 0.5px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.45rem !important;
    text-transform: lowercase !important;
    text-decoration: none !important;
    outline: none !important;
    box-sizing: border-box !important;
    transition: all 0.6s cubic-bezier(0.15, 0.83, 0.66, 1) !important;
    overflow: hidden;
}

.forum-submit-btn::before {
    content: "";
    width: 70%;
    height: 1px;
    position: absolute;
    bottom: 0;
    left: 15%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 1) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    opacity: 0.2;
    transition: all 0.6s cubic-bezier(0.15, 0.83, 0.66, 1);
}

.forum-submit-btn:hover {
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22), 0 8px 24px -6px rgba(0, 0, 0, 0.6) !important;
}

.forum-submit-btn:hover::before {
    opacity: 1;
}

[data-theme="light"] .forum-submit-btn {
    background: radial-gradient(ellipse at bottom, #2d3748 0%, #111827 50%) !important;
    color: #ffffff !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15) !important;
}

.forum-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Raleway', 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 300;
    letter-spacing: 0.3px;
    text-transform: lowercase;
    color: rgba(255, 255, 255, 0.65);
    cursor: pointer;
    user-select: none;
    margin: 0;
}

[data-theme="light"] .forum-checkbox-label {
    color: #6b7280;
}

.forum-checkbox {
    width: 15px;
    height: 15px;
    accent-color: #4b5563;
    cursor: pointer;
}

.forum-auth-prompt {
    text-align: center;
    padding: 2.2rem 1.5rem;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
}

[data-theme="light"] .forum-auth-prompt {
    background: #f9fafb;
    border-color: #e5e7eb;
}

.forum-auth-prompt p {
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 1.25rem;
    font-family: 'Inter', sans-serif;
    font-weight: 200;
    font-size: 0.92rem;
}

[data-theme="light"] .forum-auth-prompt p {
    color: #6b7280;
}

/* --- SECCIÓN DESTACADA DE RESPUESTAS / COMENTARIOS --- */
.forum-responses-section {
    margin-top: 1rem;
    margin-bottom: 4rem;
}

.forum-responses-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .forum-responses-head {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

.responses-title-group {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.responses-head-icon {
    font-size: 1.35rem;
    color: rgba(255, 255, 255, 0.6);
}

[data-theme="light"] .responses-head-icon {
    color: #6b7280;
}

.forum-responses-title {
    font-family: 'Raleway', sans-serif;
    font-size: 1.6rem;
    font-weight: 200 !important;
    letter-spacing: -0.6px;
    color: #ffffff;
    text-transform: lowercase;
    margin: 0;
}

[data-theme="light"] .forum-responses-title {
    color: #111827;
}

.responses-count-pill {
    font-family: 'Raleway', sans-serif;
    font-size: 0.74rem;
    font-weight: 300;
    letter-spacing: 0.4px;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.75);
    text-transform: lowercase;
}

[data-theme="light"] .responses-count-pill {
    background: #f3f4f6;
    border-color: #e5e7eb;
    color: #4b5563;
}

.forum-comments-tree {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Tarjeta de Comentario Raíz - Estilo .auth-option-card */
.comment-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 1.35rem 1.6rem;
    margin-bottom: 0.65rem;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.comment-card:hover {
    border-color: rgba(255, 255, 255, 0.22);
    transform: translateY(-2px);
    box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.65);
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .comment-card {
    background: #f9fafb;
    border-color: #e5e7eb;
}

[data-theme="light"] .comment-card:hover {
    background: #ffffff;
    border-color: #d1d5db;
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.08);
}

/* Resalte sutil para especialistas (Psicólogos / Admin) - Sin colores chillones */
.comment-card-pro {
    border-left: 2px solid rgba(255, 255, 255, 0.4) !important;
    background: rgba(255, 255, 255, 0.045) !important;
}

[data-theme="light"] .comment-card-pro {
    border-left: 2px solid #374151 !important;
    background: #f3f4f6 !important;
}

/* Subcomentarios / Anidados */
.comment-subitem {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin-top: 0.75rem !important;
}

/* Encabezado del Comentario */
.comment-header-row {
    margin-bottom: 0.45rem;
}

.comment-author-group {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    font-size: 0.8rem;
}

.comment-author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: 'Raleway', sans-serif;
    font-size: 0.8rem;
    font-weight: 300;
    color: #ffffff;
    vertical-align: middle;
}

.comment-author-avatar.avatar-sm {
    width: 24px;
    height: 24px;
    font-size: 0.68rem;
}

[data-theme="light"] .comment-author-avatar {
    background: #e5e7eb;
    border-color: rgba(0, 0, 0, 0.1);
    color: #111827;
}

.comment-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.comment-author-avatar .material-symbols-outlined {
    font-size: 0.95rem;
    opacity: 0.75;
}

.comment-author-name {
    font-family: 'Raleway', sans-serif;
    font-size: 0.88rem;
    font-weight: 300;
    letter-spacing: -0.2px;
    color: #ffffff;
    text-transform: lowercase;
}

[data-theme="light"] .comment-author-name {
    color: #111827;
}

/* Badge sobrio para especialista (tipo auth-media-badge) */
.pro-role-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    font-family: 'Raleway', sans-serif;
    font-size: 0.7rem;
    font-weight: 300;
    letter-spacing: 0.4px;
    padding: 0.16rem 0.55rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.18);
    text-transform: lowercase;
}

.pro-role-pill .material-symbols-outlined {
    font-size: 0.74rem;
    opacity: 0.85;
}

[data-theme="light"] .pro-role-pill {
    background: #f3f4f6;
    color: #111827;
    border-color: #d1d5db;
}

.badge-op {
    font-family: 'Raleway', sans-serif;
    font-size: 0.68rem;
    font-weight: 300;
    letter-spacing: 0.4px;
    padding: 0.14rem 0.5rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.12);
    text-transform: lowercase;
}

[data-theme="light"] .badge-op {
    background: #f3f4f6;
    color: #4b5563;
    border-color: #e5e7eb;
}

.comment-time {
    font-family: 'Inter', sans-serif;
    font-size: 0.76rem;
    font-weight: 200;
    color: rgba(255, 255, 255, 0.45);
}

[data-theme="light"] .comment-time {
    color: #9ca3af;
}

/* Cuerpo del Comentario */
.comment-body {
    font-family: 'Inter', sans-serif;
    font-size: 0.94rem;
    line-height: 1.68;
    color: rgba(255, 255, 255, 0.82);
    white-space: pre-line;
    font-weight: 200;
    letter-spacing: 0.15px;
    margin-left: 2.6rem;
    margin-top: 0.35rem;
    margin-bottom: 0.65rem;
    word-break: break-word;
}

[data-theme="light"] .comment-body {
    color: #374151;
    font-weight: 300;
}

.comment-body-nested {
    font-size: 0.9rem;
    margin-left: 2rem;
}

/* Acciones del Comentario */
.comment-actions {
    margin-left: 2.6rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.25rem;
}

.comment-subitem .comment-actions {
    margin-left: 2rem;
}

.comment-action-btn {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: rgba(255, 255, 255, 0.6) !important;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.3rem !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 0.74rem !important;
    font-weight: 300 !important;
    letter-spacing: 0.3px;
    padding: 0.22rem 0.55rem !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
    line-height: 1 !important;
    text-transform: lowercase;
}

.comment-action-btn .material-symbols-outlined {
    font-size: 0.88rem !important;
}

.comment-action-btn:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-1px);
}

[data-theme="light"] .comment-action-btn {
    background: rgba(0, 0, 0, 0.02) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    color: #6b7280 !important;
}

[data-theme="light"] .comment-action-btn:hover {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #111827 !important;
    border-color: rgba(0, 0, 0, 0.16);
}

.comment-report-btn {
    color: rgba(255, 255, 255, 0.45) !important;
}

.comment-report-btn:hover {
    color: #ffffff !important;
}

/* Rama / Hilo Vertical */
.comment-tree-branch {
    margin-left: 0.95rem;
    padding-left: 1.1rem;
    border-left: 1.5px solid rgba(255, 255, 255, 0.07);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 0.65rem;
    transition: border-left-color 0.2s ease;
}

.comment-subitem .comment-tree-branch {
    margin-left: 0.75rem;
    padding-left: 0.95rem;
}

[data-theme="light"] .comment-tree-branch {
    border-left-color: rgba(0, 0, 0, 0.08);
}

.comment-tree-branch:hover {
    border-left-color: rgba(255, 255, 255, 0.25);
}

[data-theme="light"] .comment-tree-branch:hover {
    border-left-color: rgba(0, 0, 0, 0.22);
}

.comment-tree-branch-flat {
    margin-left: 0 !important;
    padding-left: 0 !important;
    border-left: none !important;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 0.65rem;
}

/* Caja Inline de Respuesta */
.reply-box-inline {
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
    margin-left: 2.6rem;
    padding: 0.95rem 1.15rem;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
}

.comment-subitem .reply-box-inline {
    margin-left: 2rem;
}

[data-theme="light"] .reply-box-inline {
    background: #f9fafb;
    border-color: #e5e7eb;
}

.reply-form {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    width: 100%;
}

.reply-textarea {
    min-height: 60px !important;
    padding: 0.65rem 0.85rem !important;
    font-size: 0.88rem !important;
    border-radius: 10px !important;
}

.reply-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
}

.btn-small {
    min-width: 80px !important;
    padding: 7px 14px !important;
    font-size: 0.78rem !important;
}

/* --- Modal Minimalista de Reporte (Estilo .auth-modal-content) --- */
.forum-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.25rem;
    box-sizing: border-box;
}

.forum-modal-card {
    background: linear-gradient(160deg, #161618 0%, #0c0c0e 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: clamp(1.4rem, 3.5vw, 2.2rem);
    max-width: 480px;
    width: 100%;
    box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.04);
    box-sizing: border-box;
    position: relative;
    font-family: 'Raleway', 'Inter', -apple-system, sans-serif;
}

[data-theme="light"] .forum-modal-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.2);
}

.forum-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.forum-modal-title {
    font-family: 'Raleway', sans-serif;
    font-size: 1.35rem;
    font-weight: 200;
    color: #ffffff;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: lowercase;
    letter-spacing: -0.5px;
}

[data-theme="light"] .forum-modal-title {
    color: #111827;
}

.forum-modal-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.forum-modal-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

[data-theme="light"] .forum-modal-close {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
    color: #6b7280;
}

.forum-modal-desc {
    font-family: 'Inter', sans-serif;
    font-size: 0.86rem;
    font-weight: 200;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.5;
    margin: 0 0 1.25rem 0;
    letter-spacing: 0.2px;
}

[data-theme="light"] .forum-modal-desc {
    color: #6b7280;
}

.forum-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.btn-cancel {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.75);
    border-radius: 7px;
    padding: 0.55rem 1.25rem;
    font-family: 'Raleway', 'Inter', sans-serif;
    font-size: 0.84rem;
    font-weight: 300;
    letter-spacing: 0.4px;
    text-transform: lowercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.28);
}

[data-theme="light"] .btn-cancel {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
    color: #4b5563;
}

[data-theme="light"] .btn-cancel:hover {
    color: #111827;
    background: rgba(0, 0, 0, 0.06);
}

.btn-report-submit {
    background: radial-gradient(
        ellipse at bottom,
        rgba(71, 81, 92, 1) 0%,
        rgba(11, 21, 30, 1) 45%
    );
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
    border: 0;
    border-radius: 7px;
    padding: 0.55rem 1.35rem;
    font-family: 'Raleway', 'Inter', sans-serif;
    font-size: 0.84rem;
    font-weight: 300;
    letter-spacing: 0.4px;
    text-transform: lowercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-report-submit:hover {
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25), 0 8px 20px -6px rgba(0, 0, 0, 0.6);
    transform: translateY(-1px);
}

[data-theme="light"] .btn-report-submit {
    background: radial-gradient(ellipse at bottom, #2d3748 0%, #111827 50%);
    color: #ffffff;
}




/* --- Estado Vacío --- */
.forum-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

[data-theme="light"] .forum-empty-state {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
}

.forum-empty-icon {
    font-size: 3.5rem !important;
    color: var(--text-muted);
    margin-bottom: 1rem;
    opacity: 0.6;
}

.forum-empty-title {
    font-size: 1.7rem;
    margin-bottom: 0.5rem;
}

.forum-empty-text {
    color: var(--text-muted);
    max-width: 450px;
    margin: 0.5rem auto 1.5rem;
    font-weight: 300;
    line-height: 1.6;
}
/* --- Hover Card del Autor --- */
.author-name-wrapper {
    position: relative;
    display: inline-block;
}

.user-hover-card {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 360px;
    max-width: calc(100vw - 32px);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
    pointer-events: none;
    overflow: hidden;
}

[data-theme="light"] .user-hover-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.author-name-wrapper:hover .user-hover-card,
.user-hover-card:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.hover-card-cover {
    position: relative;
    height: 135px;
    background: radial-gradient(circle at 80% 20%, rgba(56, 189, 248, 0.15) 0%, transparent 60%), linear-gradient(135deg, #1f2735 0%, #121721 55%, #0b0f15 100%);
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hover-card-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(15, 18, 24, 0.5) 100%);
    pointer-events: none;
}

[data-theme="light"] .hover-card-cover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .hover-card-cover::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 45%, rgba(255, 255, 255, 0.35) 100%);
}

.hover-card-content {
    padding: 0 1.5rem 1.4rem;
    position: relative;
}

.hover-card-avatar {
    position: relative;
    z-index: 2;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    border: 4px solid var(--bg-card);
    background: #181e28;
    margin-top: -38px;
    margin-bottom: 0.65rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.85rem;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .hover-card-avatar {
    border-color: #ffffff;
    background: #f1f5f9;
}

.hover-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hover-card-info {
    display: flex;
    flex-direction: column;
}

.hover-card-name {
    font-size: 1.25rem;
    margin: 0 0 0.35rem 0;
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.hover-card-info .badge-role {
    align-self: flex-start;
    margin-bottom: 0.65rem;
    font-size: 0.72rem;
    padding: 0.25rem 0.75rem;
    letter-spacing: 0.05em;
    font-weight: 600;
    text-transform: uppercase;
}

.hover-card-bio {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
    font-weight: 300;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* --- Adaptabilidad Responsiva --- */
@media (max-width: 768px) {
    .forum-container,
    .forum-detail-container {
        margin: 1.5rem auto;
        padding: 0 1rem;
    }

    .forum-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
        margin-bottom: 1.5rem;
    }

    .forum-title {
        font-size: 2.1rem;
    }

    .forum-detail-title {
        font-size: 1.8rem;
    }

    .forum-toolbar-form {
        flex-direction: column;
        align-items: stretch;
    }

    .forum-search-box {
        max-width: 100%;
        width: 100%;
    }

    .forum-card,
    .forum-detail-card,
    .comment-card {
        padding: 1.25rem;
    }

    .comment-tree-indent {
        margin-left: 0.5rem;
        padding-left: 0.5rem;
    }

    .forum-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}
/* =========================================================
   Rediseño Minimalista del Foro (Estilo Tarjetas Limpias)
   ========================================================= */

.foros-wrapper {
    max-width: 1240px;
    margin: 2.75rem auto 5rem auto;
    padding: 0 1.25rem;
}

.foros-header-masthead {
    text-align: center;
    margin-bottom: 2.75rem;
    position: relative;
}

.foros-main-title {
    font-family: 'Raleway', sans-serif;
    font-size: clamp(2rem, 4vw, 2.7rem);
    font-weight: 200;
    letter-spacing: -0.5px;
    text-transform: lowercase;
    color: var(--text-main, #ffffff);
    margin: 0 0 0.45rem 0;
    line-height: 1.2;
}

[data-theme="light"] .foros-main-title {
    color: #111827;
}

.foros-main-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--text-muted, rgba(255, 255, 255, 0.65));
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.5;
}

[data-theme="light"] .foros-main-subtitle {
    color: #6b7280;
}

/* Grid Principal del Foro */
.reddit-container {
    display: grid;
    grid-template-columns: 240px 1fr 310px;
    gap: 1.75rem;
    align-items: start;
    max-width: 1240px;
    margin: 0 auto;
}

@media (max-width: 1060px) {
    .reddit-container {
        grid-template-columns: 220px 1fr;
    }
    .reddit-sidebar-right {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .foros-wrapper {
        margin-top: 1.5rem;
        padding: 0 1rem;
    }
    .reddit-container {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }
    .reddit-sidebar-left {
        display: none !important;
    }
}

/* Sidebar General */
.reddit-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-section {
    background: transparent;
}

.sidebar-title {
    font-family: 'Raleway', sans-serif;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    opacity: 0.8;
    font-weight: 600;
    padding-left: 0.5rem;
    margin-bottom: 0.65rem;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.85rem;
    border-radius: 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 300;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.sidebar-link .material-symbols-outlined {
    font-size: 1.15rem;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    transform: translateX(2px);
}

.sidebar-link:hover .material-symbols-outlined {
    opacity: 1;
}

[data-theme="light"] .sidebar-link:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #111827;
}

.sidebar-link.active {
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
    font-weight: 500;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.sidebar-link.active .material-symbols-outlined {
    color: var(--primary);
    opacity: 1;
}

[data-theme="light"] .sidebar-link.active {
    background: #f3f4f6;
    color: #111827;
    font-weight: 500;
    border-color: rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

/* Crear Post Box (Tarjeta Minimalista de Entrada) */
.reddit-create-post-box {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: var(--bg-card, #111317);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    padding: 0.85rem 1.25rem;
    border-radius: 20px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
    transition: border-color 0.2s ease;
}

[data-theme="light"] .reddit-create-post-box {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.03);
}

.user-avatar-mini {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Raleway', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    color: #ffffff;
    flex-shrink: 0;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
}

[data-theme="light"] .user-avatar-mini {
    background: #f3f4f6;
    color: #111827;
    border-color: rgba(0, 0, 0, 0.08);
}

.user-avatar-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.create-post-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    border-radius: 12px;
    padding: 0.65rem 1.1rem;
    color: var(--text-muted);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 300;
    transition: all 0.2s ease;
    cursor: pointer;
}

[data-theme="light"] .create-post-input {
    background: #f9fafb;
    border-color: rgba(0, 0, 0, 0.08);
    color: #6b7280;
}

.create-post-input:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-main);
}

[data-theme="light"] .create-post-input:hover {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.2);
    color: #111827;
}

.create-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
    cursor: pointer;
}

.create-action-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
}

[data-theme="light"] .create-action-btn:hover {
    background: #f3f4f6;
    color: #111827;
}

/* Post Cards Feed (Tarjetas Limpias y Minimalistas) */
.reddit-post-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.reddit-post-card {
    display: block;
    background: var(--bg-card, #111317);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    border-radius: 20px;
    padding: 1.4rem 1.6rem;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

[data-theme="light"] .reddit-post-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.03);
}

.reddit-post-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

[data-theme="light"] .reddit-post-card:hover {
    border-color: rgba(0, 0, 0, 0.16);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
}

.post-content-area {
    padding: 0;
    flex: 1;
}

/* Header del Post */
.post-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.55rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.post-community-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.7rem;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    font-family: 'Inter', sans-serif;
    font-size: 0.74rem;
    font-weight: 400;
    color: var(--text-main);
}

[data-theme="light"] .post-community-badge {
    background: #f3f4f6;
    border-color: rgba(0, 0, 0, 0.07);
    color: #374151;
}

.post-community-badge .badge-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #10b981;
}

.post-dot {
    opacity: 0.35;
}

.post-author {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 300;
}

.post-author-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: 'Raleway', sans-serif;
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--text-main);
    vertical-align: middle;
}

[data-theme="light"] .post-author-avatar {
    background: #e5e7eb;
    border-color: rgba(0, 0, 0, 0.1);
    color: #111827;
}

.post-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-author-avatar .material-symbols-outlined {
    font-size: 0.82rem;
    opacity: 0.7;
}

.post-author .author-name {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 300;
    color: var(--text-main);
}

.pro-badge {
    font-size: 0.95rem;
    color: #10b981;
    font-variation-settings: 'FILL' 1;
    vertical-align: middle;
}

.post-time {
    font-weight: 300;
    opacity: 0.75;
    margin-left: auto;
}

/* Título y Contenido */
.post-body-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.post-title {
    font-family: 'Raleway', sans-serif;
    font-size: 1.25rem;
    font-weight: 300;
    letter-spacing: -0.3px;
    color: var(--text-main);
    margin: 0 0 0.5rem 0;
    line-height: 1.35;
    text-transform: lowercase;
    transition: color 0.2s ease;
}

.reddit-post-card:hover .post-title {
    color: var(--primary);
}

.post-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 300;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0 0 1rem 0;
    word-break: break-word;
}

.post-image-container {
    margin: 0.75rem 0 1rem 0;
    border-radius: 14px;
    overflow: hidden;
    max-height: 420px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .post-image-container {
    background: #f3f4f6;
    border-color: rgba(0, 0, 0, 0.06);
}

.post-image {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    display: block;
}

/* Footer de Acciones del Post */
.post-footer {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .post-footer {
    border-top-color: rgba(0, 0, 0, 0.05);
}

.post-action {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 100px;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 400;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.2s ease;
    cursor: pointer;
}

.post-action .material-symbols-outlined {
    font-size: 1rem;
}

.post-action:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="light"] .post-action {
    background: #f9fafb;
    border-color: rgba(0, 0, 0, 0.06);
    color: #6b7280;
}

[data-theme="light"] .post-action:hover {
    background: #f3f4f6;
    color: #111827;
    border-color: rgba(0, 0, 0, 0.12);
}

/* Widgets de la Barra Derecha (Estilo Tarjeta de Ejemplo) */
.sidebar-widget {
    background: var(--bg-card, #111317);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    border-radius: 20px;
    padding: 1.4rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

[data-theme="light"] .sidebar-widget {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.03);
}

.widget-header {
    margin-bottom: 0.85rem;
    padding: 0;
    background: transparent;
    border: none;
}

.widget-title {
    font-family: 'Raleway', sans-serif;
    font-size: 1.15rem;
    font-weight: 300;
    letter-spacing: -0.3px;
    color: var(--text-main);
    text-transform: lowercase;
    margin: 0;
}

.widget-body {
    padding: 0;
    font-family: 'Inter', sans-serif;
    font-size: 0.86rem;
    font-weight: 300;
    color: var(--text-muted);
    line-height: 1.5;
}

.widget-body p {
    margin: 0 0 1rem 0;
}

.widget-stats {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .widget-stats {
    background: #f9fafb;
    border-color: rgba(0, 0, 0, 0.06);
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-family: 'Raleway', sans-serif;
    font-weight: 400;
    font-size: 1.35rem;
    color: var(--text-main);
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 300;
    color: var(--text-muted);
    text-transform: lowercase;
}

.widget-divider {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin: 1.2rem 0;
}

[data-theme="light"] .widget-divider {
    border-top-color: rgba(0, 0, 0, 0.06);
}

.widget-btn-primary {
    display: block;
    width: 100%;
    text-align: center;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0.68rem 1.2rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: #ffffff;
    color: #111317;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.widget-btn-primary:hover {
    background: #f3f4f6;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .widget-btn-primary {
    background: #111827;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .widget-btn-primary:hover {
    background: #1f2937;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.rules-list {
    margin: 0;
    padding-left: 1.2rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.84rem;
    font-weight: 300;
    color: var(--text-muted);
    line-height: 1.6;
}

.rules-list li {
    margin-bottom: 0.6rem;
}
