/* ==========================================================================
   INDEX — Mejoras de UX: Carrusel de Noticias, Cross-Promo, Categorías
   Archivo: style_index.css
   Versión: 1.0
   ========================================================================== */

/* ══════════════════════════════════════════════════════════════
   VARIABLES COMPARTIDAS (compatible con el sistema existente)
   ══════════════════════════════════════════════════════════════ */
:root {
    --idx-rojo: #b30000;
    --idx-rojo-hover: #8a0000;
    --idx-dorado: #d4af37;
    --idx-dorado-hover: #b8962e;
    --idx-verde: #2e7d32;
    --idx-gris-texto: #555;
    --idx-gris-claro: #f5f5f5;
    --idx-radio: 14px;
}

/* ══════════════════════════════════════════════════════════════
   1. CARRUSEL DE NOTICIAS
   ══════════════════════════════════════════════════════════════ */

.noti-section {
    max-width: 1200px;
    margin: 0 auto 35px;
    padding: 0 20px;
}

/* ── Header con título + flechas ── */
.noti-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.noti-titulo {
    font-size: 1.3rem;
    font-weight: 800;
    color: #222;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.noti-titulo i {
    color: var(--idx-dorado);
    font-size: 1.1rem;
}

.noti-nav-arrows {
    display: flex;
    gap: 8px;
}

.noti-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #ddd;
    background: #fff;
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 0.8rem;
}

.noti-arrow:hover:not(.disabled) {
    border-color: var(--idx-rojo);
    color: var(--idx-rojo);
    background: #fff5f5;
}

.noti-arrow.disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

/* ── Track / Wrapper ── */
.noti-track-wrapper {
    overflow: hidden;
    border-radius: var(--idx-radio);
}

.noti-track {
    display: flex;
    flex-wrap: nowrap;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.noti-card {
    flex: none;
    width: calc((100% - (var(--cards-per-view) - 1) * 20px) / var(--cards-per-view));
    margin-right: 20px;
    background: #fff;
    border-radius: var(--idx-radio);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid #eee;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.noti-card:last-child {
    margin-right: 0;
}

.noti-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

/* ── Card internals ── */
.noti-card-acento {
    height: 5px;
    width: 100%;
}

.noti-card-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.noti-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.noti-badge {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.noti-vigencia {
    font-size: 0.68rem;
    font-weight: 600;
    color: #e65100;
    background: #fff3e0;
    padding: 2px 8px;
    border-radius: 10px;
}

.noti-card-icon {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.noti-card-titulo {
    font-size: 1rem;
    font-weight: 800;
    color: #222;
    margin: 0 0 8px;
    line-height: 1.3;
}

.noti-card-desc {
    font-size: 0.82rem;
    color: #666;
    line-height: 1.5;
    margin: 0 0 16px;
    flex-grow: 1;
}

.noti-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    transition: opacity 0.2s, transform 0.15s;
    align-self: flex-start;
}

.noti-card-link:hover {
    opacity: 0.88;
    transform: translateX(2px);
}

.noti-card-link i {
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.noti-card-link:hover i {
    transform: translateX(3px);
}

/* ── Dots ── */
.noti-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.noti-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #ccc;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.noti-dot.active {
    background: var(--idx-dorado);
    border-color: var(--idx-dorado);
    transform: scale(1.15);
}

.noti-dot:hover:not(.active) {
    border-color: #999;
}

/* ══════════════════════════════════════════════════════════════
   2. CROSS-PROMO BANNER (arriba de la tabla)
   ══════════════════════════════════════════════════════════════ */

.cross-promo {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #fffdf5 0%, #fff8e8 100%);
    border: 1px solid #f0e6c8;
    border-radius: 10px;
    padding: 14px 20px;
    margin-bottom: 20px;
}

.cross-promo-icon {
    font-size: 1.4rem;
    color: var(--idx-dorado);
    flex-shrink: 0;
}

.cross-promo-text {
    flex: 1;
    font-size: 0.85rem;
    color: #555;
    line-height: 1.4;
}

.cross-promo-text strong {
    color: #333;
}

.cross-promo-link {
    flex-shrink: 0;
    padding: 8px 16px;
    background: var(--idx-dorado);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 700;
    transition: background 0.2s;
    white-space: nowrap;
}

.cross-promo-link:hover {
    background: var(--idx-dorado-hover);
}

.cross-promo-close {
    background: none;
    border: none;
    color: #bbb;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
    flex-shrink: 0;
    transition: color 0.15s;
}

.cross-promo-close:hover {
    color: #888;
}

/* ══════════════════════════════════════════════════════════════
   3. HERO TOOLS STRIP — Hub de navegación compacto
   ══════════════════════════════════════════════════════════════ */

.hero-tools-strip {
    max-width: 1200px;
    margin: -20px auto 30px;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.hero-tools-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

.hero-tool-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: var(--idx-radio);
    padding: 16px 14px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.hero-tool-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.09);
    border-color: #ddd;
}

.hero-tool-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.hero-tool-text {
    flex: 1;
    min-width: 0;
}

.hero-tool-text h3 {
    font-size: 0.82rem;
    font-weight: 800;
    color: #222;
    margin: 0;
    line-height: 1.2;
}

.hero-tool-text p {
    font-size: 0.7rem;
    color: #999;
    margin: 2px 0 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-tool-arrow {
    color: #ccc;
    font-size: 0.65rem;
    flex-shrink: 0;
    transition: color 0.15s, transform 0.15s;
}

.hero-tool-card:hover .hero-tool-arrow {
    color: var(--idx-rojo);
    transform: translateX(2px);
}

/* ══════════════════════════════════════════════════════════════
   4. HERO MEJORADO — acciones rápidas
   ══════════════════════════════════════════════════════════════ */

.hero-quick-actions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-action-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.2s;
}

.hero-action-btn.primary {
    background: var(--idx-dorado);
    color: #fff;
    border: 2px solid var(--idx-dorado);
}

.hero-action-btn.primary:hover {
    background: var(--idx-dorado-hover);
    border-color: var(--idx-dorado-hover);
}

.hero-action-btn.secondary {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 2px solid rgba(255,255,255,0.4);
}

.hero-action-btn.secondary:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.6);
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
    .noti-section {
        padding: 0 16px;
    }

    .noti-titulo {
        font-size: 1.1rem;
    }

    .hero-tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .noti-section {
        padding: 0 12px;
        margin-bottom: 24px;
    }

    .noti-titulo {
        font-size: 1rem;
    }

    .noti-header {
        margin-bottom: 12px;
    }

    .noti-card-body {
        padding: 14px 16px 16px;
    }

    .noti-card-titulo {
        font-size: 0.92rem;
    }

    .noti-card-icon {
        font-size: 1.5rem;
    }

    /* Cross promo stacks vertically */
    .cross-promo {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding: 14px 16px;
    }

    .cross-promo-link {
        width: 100%;
        text-align: center;
    }

    /* Hero tools: 2 columns on mobile */
    .hero-tools-strip {
        margin-top: -12px;
        margin-bottom: 20px;
        padding: 0 12px;
    }

    .hero-tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .hero-tool-card {
        padding: 12px 10px;
        gap: 8px;
    }

    .hero-tool-icon {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }

    .hero-tool-text h3 {
        font-size: 0.75rem;
    }

    .hero-tool-text p {
        display: none;
    }

    .hero-tool-arrow {
        display: none;
    }

    /* Hero actions stack */
    .hero-quick-actions {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .hero-action-btn {
        width: 100%;
        justify-content: center;
        max-width: 280px;
    }
}