/* ========================================================================
   main.css - Estilos del Foro Geekcel
   ======================================================================== */

/* =========================================
   OCULTAR SIDEBAR Y FORZAR ANCHO COMPLETO
   ========================================= */
body .gf-container { max-width: 100%; margin: 0 auto; padding: 30px 0; min-height: 50vh; }
body:has(.gf-container) #secondary, body:has(.gf-container) .widget-area, 
body:has(.gf-container) .sidebar, body:has(.gf-container) aside { display: none !important; }
body:has(.gf-container) #primary, body:has(.gf-container) #main, 
body:has(.gf-container) .content-area, body:has(.gf-container) .col-md-8, 
body:has(.gf-container) .col-md-9 { width: 100% !important; max-width: 100% !important; flex: 0 0 100% !important; }
.gf-container { width: 100% !important; }

/* Barra Superior: Migas de pan + Buscador */
.gf-top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; flex-wrap: wrap; gap: 15px; background: #f8f9fa; padding: 10px 15px; border-radius: 6px; border: 1px solid #eaeaea; }
.gf-breadcrumbs { font-size: 13.5px; color: #666; margin: 0; }
.gf-breadcrumbs a { color: #1e73be; text-decoration: none; font-weight: 500; }
.gf-breadcrumbs a:hover { color: #f29c1f; text-decoration: underline; }
.gf-breadcrumbs span { color: #333; font-weight: 600; }

.gf-search-form form { 
    display: flex; 
    margin: 0; 
    box-shadow: 0 0 12px rgba(242, 156, 31, 0.4); 
    border-radius: 4px; 
    transition: box-shadow 0.3s ease;
}
.gf-search-form form:focus-within, .gf-search-form form:hover { 
    box-shadow: 0 0 16px rgba(242, 156, 31, 0.7); 
}
.gf-search-form input { border: 1px solid #ccc; border-radius: 4px 0 0 4px; padding: 8px 12px; font-size: 13px; outline: none; border-right: none; width: 200px; }
.gf-search-form input:focus { border-color: #f29c1f; }
.gf-search-form button { border: 1px solid #ccc; background: #fff; border-radius: 0 4px 4px 0; padding: 8px 12px; cursor: pointer; transition: 0.2s; }
.gf-search-form button:hover { background: #f29c1f; border-color:#f29c1f; color:#fff; }

/* Cabecera y Botón Regresar */
.gf-header-flex { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #eaeaea; margin-bottom: 25px; padding-bottom: 15px; }
.gf-title { font-size: 26px; margin: 0; color: #333; border: none; padding: 0; }
.gf-btn-back { display: inline-flex; align-items: center; font-size: 13px; color: #555; background: #fff; border: 1px solid #ccc; padding: 6px 14px; border-radius: 20px; text-decoration: none !important; font-weight: 600; transition: all 0.2s; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.gf-btn-back:hover { color: #f29c1f; border-color: #f29c1f; background: #fffdfa; transform: translateY(-1px); }

/* Títulos de Grupos en el Índice */
.gf-group-title { font-size: 20px; background: #2c3e50; color: #ffffff; padding: 12px 20px; border-radius: 6px 6px 0 0; margin: 30px 0 0 0; border-bottom: 3px solid #f29c1f; }

/* Cuadrícula de Categorías */
.gf-category-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0; border: 1px solid #e0e0e0; border-top: none; background: #fff; border-radius: 0 0 6px 6px; overflow: hidden; }
.gf-category-card { display: flex; align-items: center; background: #ffffff; padding: 20px; border-bottom: 1px solid #eee; border-right: 1px solid #eee; text-decoration: none !important; transition: background 0.2s; }
.gf-category-card:hover { background: #fdfdfd; }
.gf-cat-icon { width: 45px; height: 45px; margin-right: 18px; fill: #fce1b4; flex-shrink: 0; transition: fill 0.2s; }
.gf-category-card:hover .gf-cat-icon { fill: #f29c1f; }
.gf-cat-info { flex-grow: 1; }
.gf-category-title { margin: 0 0 5px 0 !important; font-size: 18px !important; color: #1e73be !important; font-weight: 600; }
.gf-cat-stats { font-size: 13px !important; color: #7f8c8d !important; }

/* Lista de Temas */
.gf-topics-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 40px; }
.gf-topic-card { display: flex; justify-content: space-between; align-items: center; background: #fff; padding: 15px 20px; border: 1px solid #eee; border-radius: 6px; transition: all 0.2s; box-shadow: 0 1px 2px rgba(0,0,0,0.02); }
.gf-topic-card:hover { background: #fdfdfd; border-color: #d1d1d1; box-shadow: 0 3px 6px rgba(0,0,0,0.04); }
.gf-topic-card-left { display: flex; align-items: center; }
.gf-topic-icon { width: 28px; height: 28px; fill: #cbd5e1; margin-right: 15px; flex-shrink: 0; transition: fill 0.2s; }
.gf-topic-card:hover .gf-topic-icon { fill: #1e73be; }
.gf-topic-title { margin: 0 0 5px 0 !important; font-size: 16px !important; }
.gf-topic-title a:hover { text-decoration: underline !important; }
.gf-topic-date { font-size: 12px; color: #999; }
.gf-topic-badge { background: #f0f0f0; color: #555; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: bold; border: 1px solid #e2e2e2; }

/* Botones de Acción (Citar, Editar, Borrar, Gracias) */
.gf-post-actions { 
    display: flex; 
    gap: 8px; 
    align-items: center; 
    justify-content: flex-end; 
    margin-top: 20px; 
    padding-top: 15px; 
    border-top: 1px dashed #eaeaea; 
}
.gf-btn-delete { font-size: 11px; color: #b32d2e; background: #f8d7da; padding: 3px 8px; border-radius: 4px; text-decoration: none !important; border: 1px solid #f5c6cb; transition: background 0.2s; }
.gf-btn-delete:hover { background: #b32d2e; color: #fff; }

.gf-btn-quote, .gf-btn-edit { font-size: 11px; padding: 4px 10px; border-radius: 4px; cursor: pointer; transition: background 0.2s; }
.gf-btn-quote { color: #1e73be; background: #e6f0fa; border: 1px solid #b3d4f5; }
.gf-btn-quote:hover { background: #1e73be; color: #fff; }

.gf-btn-edit { color: #666; background: #f5f5f5; border: 1px solid #ddd; }
.gf-btn-edit:hover { background: #f29c1f; color: #fff; border-color: #f29c1f; }

.gf-btn-gracias { display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-size: 11px; color: #666; background: #fff; padding: 4px 10px; border-radius: 4px; border: 1px solid #ccc; cursor: pointer; transition: all 0.2s; }
.gf-btn-gracias svg { width: 14px; height: 14px; fill: #ccc; transition: fill 0.2s; }
.gf-btn-gracias:hover { border-color: #f29c1f; color: #333; }
.gf-btn-gracias:hover svg { fill: #f29c1f; }
.gf-btn-gracias.gf-active { border-color: #f29c1f; color: #d35400; background: #fffdfa; }
.gf-btn-gracias.gf-active svg { fill: #f29c1f; }

/* Diseño del Post */
.gf-post-wrapper { display: flex; background: #ffffff; border: 1px solid #e0e0e0; border-radius: 6px; margin-bottom: 20px; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
.gf-reply-wrapper { margin-left: 20px; border-left: 4px solid #f29c1f; }

/* Sidebar CENTRADA */
.gf-post-sidebar { 
    width: 170px; 
    background: #f8f9fa; 
    padding: 20px 15px; 
    border-right: 1px solid #e0e0e0; 
    flex-shrink: 0; 
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.gf-avatar-img { border-radius: 50%; width: 70px; height: 70px; object-fit: cover; border: 3px solid #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.1); margin-bottom: 12px; }

/* Autor, Insignia y Roles */
.gf-author-info-wrap { display: flex; flex-direction: column; align-items: center; width: 100%; }
.gf-author-name { display: block; font-weight: bold; color: #2c3e50; font-size: 14.5px; word-break: break-word; line-height: 1.3; }

.gf-author-role { display: block; font-size: 10px; color: #888; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; font-weight: 600; }
.role-admin { color: #D4AF37 !important; }

.gf-author-verified-subtitle {
    display: inline-block;
    font-size: 10px;
    color: #1D9BF0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    background: #e8f5fd;
    padding: 3px 6px;
    border-radius: 4px;
    margin-top: 5px;
}

.gf-verified-badge { 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-left: 3px;
    position: relative;
    top: -2px;
}
.gf-verified-badge svg {
    width: 100%;
    height: 100%;
    fill: #1D9BF0; 
}

/* Estadísticas */
.gf-author-stats {
    margin-top: 15px;
    font-size: 11.5px;
    color: #777;
    background: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid #eaeaea;
    width: 100%;
    box-sizing: border-box;
    line-height: 1.5;
}
.gf-author-stats strong { color: #f29c1f; }

.gf-post-main-content { padding: 20px 25px; flex-grow: 1; min-width: 0; }
.gf-post-meta { display: block; font-size: 12px; color: #999; margin-bottom: 15px; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.gf-post-text { font-size: 15px; line-height: 1.6; color: #333; }
.gf-post-text p { margin-bottom: 15px; }

/* Interfaz de EDICIÓN EN LÍNEA */
.gf-edit-container { background: #fbfbfc; border: 1px solid #e2e8f0; padding: 15px; border-radius: 6px; }
.gf-edit-input-title { width: 100%; padding: 10px; border: 1px solid #cbd5e1; border-radius: 4px; font-family: inherit; font-size: 16px; font-weight: bold; margin-bottom: 15px; box-sizing: border-box; color: #333; }
.gf-edit-input-title:focus { outline: none; border-color: #f29c1f; box-shadow: 0 0 0 2px rgba(242,156,31,0.2); }
.gf-edit-textarea { width: 100%; min-height: 120px; padding: 10px; border: 1px solid #cbd5e1; border-radius: 4px; font-family: inherit; font-size: 14px; margin-bottom: 15px; resize: vertical; box-sizing: border-box; }
.gf-edit-textarea:focus { outline: none; border-color: #f29c1f; box-shadow: 0 0 0 2px rgba(242,156,31,0.2); }
.gf-edit-actions { display: flex; gap: 10px; }
.gf-btn-save { background: #f29c1f; color: #fff; border: none; padding: 8px 15px; font-size: 13px; border-radius: 4px; cursor: pointer; font-weight: bold; }
.gf-btn-save:hover { background: #d68715; }
.gf-btn-cancel { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; padding: 8px 15px; font-size: 13px; border-radius: 4px; cursor: pointer; }
.gf-btn-cancel:hover { background: #e2e8f0; color: #334155; }

/* Blockquote */
.gf-post-text blockquote { background: #f1f5f9; border-left: 4px solid #1e73be; margin: 10px 0 20px 0; padding: 15px; border-radius: 0 6px 6px 0; font-size: 14px; color: #475569; }
.gf-post-text blockquote strong { color: #0f172a; display: inline-block; margin-bottom: 5px; }

/* Control de Imágenes */
.gf-post-text img { max-width: 100% !important; height: auto !important; width: auto !important; display: block; border-radius: 6px; margin: 15px 0; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
@media (min-width: 769px) { .gf-post-text img { max-width: 768px !important; } }
.gf-img-notice { padding: 10px 15px; background: #fff3cd; color: #856404; font-size: 13px; border-bottom: 1px solid #ffeeba; text-align: center; }
.gf-img-notice a { color: #533f03; font-weight: bold; text-decoration: underline; }

/* Adaptativo (Móviles) */
@media (max-width: 768px) {
    .gf-post-wrapper { flex-direction: column; }
    .gf-post-sidebar { width: 100%; border-right: none; border-bottom: 1px solid #e0e0e0; flex-direction: row; align-items: center; text-align: left; padding: 12px 20px; }
    .gf-avatar-img { width: 55px; height: 55px; margin-bottom: 0; margin-right: 15px; }
    .gf-author-info-wrap { align-items: flex-start; flex-grow: 1; }
    .gf-author-stats { width: auto; margin-top: 0; margin-left: auto; text-align: right; border: none; background: transparent; padding: 0; }
    .gf-reply-wrapper { margin-left: 0; }
    .gf-top-bar { flex-direction: column; align-items: flex-start; }
    .gf-search-form form { width: 100%; }
    .gf-search-form input { width: 100%; }
    .gf-post-actions { justify-content: center; flex-wrap: wrap; } 
}

/* Formulario Principal */
.gf-form-container { background: #f8f9fa; padding: 25px; border-radius: 6px; border: 1px solid #e9ecef; }
.gf-form-title { margin: 0 0 20px 0; font-size: 20px; color: #333; }
.gf-input { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }
.gf-btn-submit { background: #f29c1f; color: #fff; border: none; padding: 10px 20px; font-size: 16px; border-radius: 4px; cursor: pointer; font-weight: bold; transition: background 0.3s; }
.gf-btn-submit:hover { background: #d68715; }
.gf-login-notice { font-size: 15px; color: #b32d2e; font-weight: bold; }
.gf-empty { padding: 20px; background: #f9f9f9; border-radius: 4px; color: #666; text-align: center; margin-bottom: 40px; }

/* Avisos */
.gf-notice { padding: 15px; margin-bottom: 20px; border-radius: 4px; font-weight: bold; }
.gf-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.gf-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }