/* ============================================================================
   EL GRANDATERO — FORO EJECUTIVO DARK-LUXURY (Obsidian, Gold & Electric Cyan)
   Responsivo real con CSS Container Queries: perfecto en monitores grandes,
   laptops con barra lateral (600-839px), tablets y teléfonos móviles.
   ============================================================================ */

.egx-wrap {
    max-width: 1120px;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 0 2px 28px;
    container-type: inline-size;
    container-name: egx;
}
.egx-wrap *,
.egx-wrap *::before,
.egx-wrap *::after {
    box-sizing: border-box;
}

/* ============================================================================
   1. HERO EJECUTIVO DEL FORO
   ============================================================================ */
.egx-hero {
    background: linear-gradient(135deg, #070d18 0%, #0d1b2f 52%, #112744 100%);
    border: 1px solid rgba(251, 191, 36, 0.28);
    border-radius: 18px;
    padding: 22px 24px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}
.egx-hero::after {
    content: '';
    position: absolute;
    top: -70px;
    right: -45px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.16) 0%, rgba(0, 234, 255, 0.08) 45%, transparent 72%);
    pointer-events: none;
}
.egx-hero-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}
.egx-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.36);
    color: #fcd34d;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    margin-bottom: 9px;
}
.egx-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    display: inline-block;
    flex-shrink: 0;
}
.egx-hero h1 {
    margin: 0 0 7px;
    font-size: 25px;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.2;
    letter-spacing: -0.2px;
}
.egx-hero h1 span {
    color: #fbbf24;
}
.egx-hero p {
    margin: 0;
    color: #cbd5e1;
    font-size: 13.5px;
    line-height: 1.55;
    max-width: 640px;
}
.egx-hero-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}
.egx-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 15px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
}
.egx-btn-gold {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #0b1120 !important;
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.28);
}
.egx-btn-gold:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
}
.egx-btn-cyan {
    background: rgba(0, 234, 255, 0.12);
    border-color: rgba(0, 234, 255, 0.42);
    color: #7eeeff !important;
}
.egx-btn-cyan:hover {
    background: #00eaff;
    color: #05111d !important;
}
.egx-btn-ghost {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.16);
    color: #e2e8f0 !important;
}
.egx-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff !important;
}

.egx-hero-search {
    margin-top: 16px;
    display: flex;
    background: rgba(6, 11, 20, 0.9);
    border: 1px solid rgba(0, 234, 255, 0.3);
    border-radius: 12px;
    padding: 5px;
    gap: 6px;
    position: relative;
    z-index: 2;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.32);
}
.egx-hero-search:focus-within {
    border-color: #fbbf24;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.14);
}
.egx-hero-search input {
    flex: 1;
    min-width: 0;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    color: #f8fafc !important;
    font-size: 13.5px;
    padding: 9px 11px;
}
.egx-hero-search input::placeholder {
    color: #64748b;
}
.egx-hero-search button {
    border: none;
    background: linear-gradient(135deg, #00c6ff, #0284c7);
    color: #ffffff;
    font-weight: 800;
    font-size: 13px;
    padding: 9px 16px;
    border-radius: 9px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}
.egx-hero-search button:hover {
    filter: brightness(1.1);
}

.egx-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
    position: relative;
    z-index: 2;
}
.egx-kpi {
    background: rgba(15, 23, 42, 0.76);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 12px;
    padding: 11px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.egx-kpi-ico {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}
.egx-kpi-body {
    min-width: 0;
    flex: 1;
}
.egx-kpi-val {
    font-size: 17px;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.15;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}
.egx-kpi-online {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 800;
    color: #34d399;
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(16, 185, 129, 0.34);
    padding: 1px 7px;
    border-radius: 999px;
    white-space: nowrap;
}
.egx-kpi-lbl {
    font-size: 11.5px;
    color: #94a3b8;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================================
   2. TABLERO DE CATEGORÍAS ESTILO GRAN FORO (XENFORO DARK LUXURY)
   ============================================================================ */
.egx-board {
    background: #0b1322;
    border: 1px solid #1e2e47;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.36);
    margin-bottom: 22px;
}
.egx-board.egx-board-official {
    border-color: rgba(16, 185, 129, 0.34);
}
.egx-board-head {
    background: linear-gradient(90deg, #111f36 0%, #162844 100%);
    border-bottom: 1px solid rgba(251, 191, 36, 0.25);
    color: #e2e8f0;
    padding: 13px 18px;
    display: grid;
    grid-template-columns: minmax(320px, 1fr) 144px 245px;
    gap: 14px;
    align-items: center;
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.65px;
}
.egx-board-official .egx-board-head {
    background: linear-gradient(90deg, #072227 0%, #0d2e33 100%);
    border-bottom-color: rgba(16, 185, 129, 0.35);
}
.egx-bh-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 12.5px;
    color: #f8fafc;
}
.egx-bh-stats {
    text-align: center;
    color: #94a3b8;
}
.egx-bh-last {
    color: #94a3b8;
}

.egx-cat-row {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) 144px 245px;
    gap: 14px;
    align-items: center;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    background: #0b1322;
    transition: background 0.18s ease;
}
.egx-cat-row:last-child {
    border-bottom: none;
}
.egx-cat-row:hover {
    background: #101d33;
}
.egx-cat-main {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
}
.egx-cat-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 18px;
    flex-shrink: 0;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}
.egx-cat-info {
    min-width: 0;
    flex: 1;
}
.egx-cat-title-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.egx-cat-name {
    font-size: 16px;
    font-weight: 800;
    color: #f8fafc;
    text-decoration: none;
    line-height: 1.25;
    word-break: normal;
    overflow-wrap: break-word;
    transition: color 0.15s;
}
.egx-cat-name:hover {
    color: #fbbf24;
}
.egx-cat-desc {
    margin: 0 0 8px;
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.45;
    word-break: normal;
    overflow-wrap: break-word;
}
.egx-cat-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.egx-cat-tag {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.9);
    color: #cbd5e1;
    border: 1px solid #1e2e47;
    white-space: nowrap;
}

.egx-cat-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    text-align: center;
}
.egx-stat-box {
    background: #0f1b2e;
    border: 1px solid #1e2e47;
    border-radius: 10px;
    padding: 7px 6px;
    min-width: 0;
}
.egx-stat-num {
    display: block;
    font-size: 15px;
    font-weight: 900;
    color: #f8fafc;
    line-height: 1.15;
}
.egx-stat-lbl {
    display: block;
    font-size: 10px;
    color: #94a3b8;
    font-weight: 600;
    margin-top: 2px;
}

.egx-cat-latest-wrap {
    min-width: 0;
}
.egx-cat-latest {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #0f1b2e;
    border: 1px solid #1e2e47;
    border-radius: 11px;
    padding: 9px 11px;
    min-width: 0;
    transition: border-color 0.18s;
}
.egx-cat-row:hover .egx-cat-latest {
    border-color: rgba(0, 234, 255, 0.35);
}
.egx-cat-latest-body {
    min-width: 0;
    flex: 1;
}
.egx-cat-latest-title {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: #f1f5f9;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 3px;
}
.egx-cat-latest-title:hover {
    color: #00eaff;
}
.egx-cat-latest-meta {
    font-size: 11px;
    color: #94a3b8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.egx-cat-latest-meta strong {
    color: #cbd5e1;
}

/* ============================================================================
   3. AVATARES, BADGES Y BARRA DE PESTAÑAS
   ============================================================================ */
.egx-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(0, 234, 255, 0.35);
}
.egx-avatar-sm {
    width: 32px;
    height: 32px;
}
.egx-avatar-init {
    border-radius: 50%;
    color: #ffffff;
    font-weight: 800;
    font-size: 12.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 0.4px;
    border: 2px solid rgba(255, 255, 255, 0.18);
}

.egx-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.3;
    white-space: nowrap;
    text-decoration: none;
}
.egx-badge-today {
    background: rgba(239, 68, 68, 0.16);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.42);
}
.egx-badge-live {
    background: rgba(16, 185, 129, 0.16);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.42);
}
.egx-badge-gold {
    background: rgba(251, 191, 36, 0.14);
    color: #fcd34d;
    border: 1px solid rgba(251, 191, 36, 0.38);
}

.egx-section-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding: 13px 18px;
    background: #101d33;
    border-bottom: 1px solid #1e2e47;
}
.egx-section-title {
    margin: 0;
    font-size: 15.5px;
    font-weight: 900;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 8px;
}
.egx-sort-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.egx-sort-tab {
    padding: 6px 11px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #cbd5e1;
    background: #0b1322;
    border: 1px solid #1e2e47;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.16s;
}
.egx-sort-tab:hover {
    border-color: rgba(0, 234, 255, 0.5);
    color: #7eeeff;
}
.egx-sort-tab.active {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    border-color: #fbbf24;
    color: #09101d !important;
    font-weight: 800;
}

/* ============================================================================
   4. FILAS DE TEMAS / ACTIVIDAD RECIENTE Y CATEGORÍA
   ============================================================================ */
.egx-topic-row {
    display: grid;
    grid-template-columns: 42px minmax(260px, 1fr) 154px 145px;
    gap: 14px;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.09);
    background: #0b1322;
    transition: background 0.16s ease;
}
.egx-topic-row:last-child {
    border-bottom: none;
}
.egx-topic-row:hover {
    background: #101d33;
}
.egx-topic-row.is-today {
    border-left: 3px solid #fbbf24;
}
.egx-topic-main {
    min-width: 0;
}
.egx-topic-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.egx-topic-title {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.32;
}
.egx-topic-title a {
    color: #f8fafc;
    text-decoration: none;
    word-break: normal;
    overflow-wrap: break-word;
}
.egx-topic-title a:hover {
    color: #fbbf24;
}
.egx-topic-excerpt {
    margin: 0 0 6px;
    font-size: 12.5px;
    color: #94a3b8;
    line-height: 1.42;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.egx-topic-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 12px;
    font-size: 12px;
    color: #94a3b8;
}
.egx-topic-meta strong {
    color: #e2e8f0;
}
.egx-topic-counters {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}
.egx-cnt-box {
    text-align: center;
    min-width: 44px;
    background: #0f1b2e;
    border: 1px solid #1e2e47;
    border-radius: 8px;
    padding: 5px 6px;
}
.egx-cnt-box strong {
    display: block;
    font-size: 13.5px;
    font-weight: 900;
    color: #f8fafc;
    line-height: 1.1;
}
.egx-cnt-box.has-resp strong {
    color: #00eaff;
}
.egx-cnt-box span {
    display: block;
    font-size: 10px;
    color: #94a3b8;
    margin-top: 2px;
}
.egx-topic-activity {
    text-align: right;
    font-size: 11.5px;
    color: #94a3b8;
    min-width: 0;
}
.egx-topic-activity strong {
    display: block;
    color: #e2e8f0;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.egx-admin-tools {
    display: inline-flex;
    gap: 6px;
    margin-top: 5px;
}
.egx-admin-tools a {
    font-size: 12px;
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
}

/* ============================================================================
   5. BANNER DE CATEGORÍA (ver_categoria.php), PAGINACIÓN Y PIE SEO
   ============================================================================ */
.egx-cat-banner {
    background: linear-gradient(135deg, #0a1322 0%, #102038 100%);
    border: 1px solid #1e2e47;
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}
.egx-cat-banner-left {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    flex: 1;
    min-width: 220px;
}
.egx-cat-banner h1 {
    margin: 0 0 6px;
    font-size: 21px;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.2;
}
.egx-cat-banner p {
    margin: 0 0 10px;
    font-size: 13.5px;
    color: #cbd5e1;
    line-height: 1.48;
}
.egx-cat-banner-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #94a3b8;
}
.egx-cat-banner-stats span {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid #1e2e47;
    padding: 4px 9px;
    border-radius: 8px;
}
.egx-cat-banner-stats strong {
    color: #7eeeff;
}

.egx-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 15px 12px;
    background: #0f1b2e;
    border-top: 1px solid #1e2e47;
}
.egx-pg-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 11px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12.5px;
    font-weight: 700;
    color: #cbd5e1;
    background: #0b1322;
    border: 1px solid #1e2e47;
    text-decoration: none;
    transition: all 0.16s;
}
.egx-pg-btn:hover {
    border-color: #00eaff;
    color: #7eeeff;
}
.egx-pg-btn.active {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    border-color: #fbbf24;
    color: #09101d !important;
    font-weight: 900;
}

.egx-about {
    background: #0b1322;
    border: 1px solid #1e2e47;
    border-left: 4px solid #fbbf24;
    border-radius: 14px;
    padding: 16px 18px;
    color: #cbd5e1;
}
.egx-about h2 {
    margin: 0 0 8px;
    font-size: 16px;
    color: #fbbf24;
    font-weight: 900;
}
.egx-about p {
    margin: 0 0 10px;
    font-size: 13.5px;
    line-height: 1.6;
}
.egx-about-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.egx-about-links a {
    font-size: 12px;
    font-weight: 700;
    color: #7eeeff;
    text-decoration: none;
    background: #101d33;
    border: 1px solid #1e2e47;
    border-radius: 8px;
    padding: 7px 11px;
    transition: all 0.16s;
}
.egx-about-links a:hover {
    border-color: #00eaff;
    color: #ffffff;
}

/* ============================================================================
   6. CONTAINER QUERIES — ADAPTABILIDAD REAL A LAPTOPS CON SIDEBAR Y MÓVILES
   (Se activa según el ancho REAL de la columna del foro, NO solo del monitor)
   ============================================================================ */

/* A) Contenedor mediano (laptops 1024-1366px donde el sidebar deja 540-839px) */
@container egx (max-width: 839px) {
    .egx-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .egx-board-head {
        grid-template-columns: 1fr;
        padding: 12px 16px;
    }
    .egx-bh-stats,
    .egx-bh-last {
        display: none;
    }
    /* Fila de categoría en 2 niveles limpios: arriba info completa, abajo stats + último tema */
    .egx-cat-row {
        grid-template-columns: 155px minmax(0, 1fr);
        grid-template-rows: auto auto;
        gap: 12px;
        padding: 15px 16px;
    }
    .egx-cat-main {
        grid-column: 1 / -1;
    }
    .egx-cat-stats {
        grid-column: 1 / 2;
        align-self: stretch;
    }
    .egx-cat-latest-wrap {
        grid-column: 2 / 3;
        min-width: 0;
    }

    /* Fila de tema en 2 niveles limpios */
    .egx-topic-row {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 10px 12px;
        padding: 14px 16px;
    }
    .egx-topic-counters {
        grid-column: 1 / -1;
        justify-content: flex-start;
        padding-top: 8px;
        border-top: 1px solid rgba(148, 163, 184, 0.1);
    }
    .egx-topic-activity {
        grid-column: 1 / -1;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 6px;
        text-align: left;
    }
    .egx-topic-activity strong {
        display: inline;
    }
}

/* B) Contenedor compacto / teléfonos móviles (< 540px) */
@container egx (max-width: 539px) {
    .egx-hero {
        padding: 16px 14px;
        border-radius: 14px;
    }
    .egx-hero h1 {
        font-size: 20px;
    }
    .egx-hero p {
        font-size: 12.8px;
    }
    .egx-hero-actions {
        width: 100%;
    }
    .egx-hero-actions .egx-btn {
        flex: 1 1 130px;
        padding: 9px 11px;
        font-size: 12.5px;
    }
    .egx-hero-search {
        flex-direction: column;
        padding: 6px;
    }
    .egx-hero-search input {
        padding: 8px 10px;
        font-size: 13px;
    }
    .egx-hero-search button {
        width: 100%;
        justify-content: center;
        padding: 9px 14px;
    }
    .egx-kpi-grid {
        gap: 8px;
    }
    .egx-kpi {
        padding: 9px 10px;
        gap: 8px;
    }
    .egx-kpi-ico {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
    .egx-kpi-val {
        font-size: 15px;
    }
    .egx-kpi-lbl {
        font-size: 10.5px;
    }

    .egx-board {
        border-radius: 13px;
        margin-bottom: 16px;
    }
    .egx-board-head {
        padding: 11px 14px;
    }
    .egx-cat-row {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 14px 13px;
    }
    .egx-cat-stats,
    .egx-cat-latest-wrap {
        grid-column: 1 / -1;
    }
    .egx-cat-icon {
        width: 40px;
        height: 40px;
        border-radius: 11px;
        font-size: 16px;
    }
    .egx-cat-name {
        font-size: 15px;
    }
    .egx-cat-desc {
        font-size: 12.5px;
        margin-bottom: 7px;
    }

    .egx-section-bar {
        padding: 12px 13px;
    }
    .egx-sort-tabs {
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 2px;
        -webkit-overflow-scrolling: touch;
    }
    .egx-topic-row {
        grid-template-columns: 36px minmax(0, 1fr);
        gap: 9px 10px;
        padding: 13px;
    }
    .egx-avatar {
        width: 36px;
        height: 36px;
    }
    .egx-topic-title {
        font-size: 14.5px;
    }
    .egx-cnt-box {
        flex: 1;
        min-width: 0;
        padding: 5px 4px;
    }
    .egx-cat-banner {
        padding: 15px 14px;
    }
    .egx-cat-banner h1 {
        font-size: 18.5px;
    }
    .egx-cat-banner > div:last-child {
        width: 100%;
    }
    .egx-cat-banner > div:last-child .egx-btn {
        width: 100%;
    }
}

/* Fallback por viewport únicamente para navegadores muy antiguos sin Container Queries */
@supports not (container-type: inline-size) {
    @media (max-width: 1220px) {
        .egx-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        .egx-board-head { grid-template-columns: 1fr; }
        .egx-bh-stats, .egx-bh-last { display: none; }
        .egx-cat-row { grid-template-columns: 155px minmax(0, 1fr); }
        .egx-cat-main { grid-column: 1 / -1; }
        .egx-cat-stats { grid-column: 1 / 2; }
        .egx-cat-latest-wrap { grid-column: 2 / 3; }
    }
    @media (max-width: 600px) {
        .egx-cat-row { grid-template-columns: 1fr; }
        .egx-cat-stats, .egx-cat-latest-wrap { grid-column: 1 / -1; }
    }
}
