/* =====================================================
   GAZHAL FEED — Módulo de Noticias y Normatividad Fiscal
   Para clientes — Valor Agregado Gazhal
   Compatible con gazhal-dof.css
===================================================== */

:root {
    --gzl-blue:        #0093C9;
    --gzl-navy:        #1e3a8a;
    --gzl-navy-dark:   #0f2f76;
    --gzl-slate:       #334155;
    --gzl-slate-light: #64748b;
    --gzl-bg:          #f8fafc;
    --gzl-white:       #ffffff;
    --gzl-border:      #e2e8f0;
    --gzl-border-soft: #f1f5f9;
}

body {
    background: var(--gzl-bg);
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    overflow-x: hidden;
    color: var(--gzl-slate);
}

.gzl-feed-container {
    width: 100%;
    max-width: 100%;
    padding: 20px;
    box-sizing: border-box;
}

/* --- BANNER NOVEDADES HOY --- */
.feed-banner-hoy {
    background: linear-gradient(135deg, #0f2f76, #0093C9);
    border-radius: 12px;
    padding: 18px 24px;
    margin-bottom: 22px;
    color: white;
}

.feed-banner-hoy .banner-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.75;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.feed-banner-item {
    padding: 7px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.feed-banner-item:last-child { border-bottom: none; }

.feed-banner-badge {
    background: rgba(255,255,255,0.15);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.feed-banner-titulo {
    color: white;
    text-decoration: none;
    flex: 1;
    line-height: 1.4;
    opacity: 0.95;
}

.feed-banner-titulo:hover { opacity: 1; text-decoration: underline; }

.feed-banner-pdf {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

/* --- STATS CHIPS --- */
.feed-stats-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.stat-chip {
    background: var(--gzl-white);
    border: 1px solid var(--gzl-border);
    border-radius: 8px;
    padding: 10px 18px;
    text-align: center;
    min-width: 80px;
    transition: box-shadow 0.2s;
}

.stat-chip:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.07); }

.stat-chip .stat-num {
    font-size: 22px;
    font-weight: 800;
    color: var(--gzl-navy);
    display: block;
    line-height: 1;
}

.stat-chip .stat-label {
    font-size: 10px;
    color: var(--gzl-slate-light);
    text-transform: uppercase;
    font-weight: 700;
    margin-top: 4px;
    display: block;
    letter-spacing: 0.3px;
}

/* --- FORMULARIO FILTROS --- */
.feed-form-filtros {
    background: var(--gzl-white);
    padding: 22px 25px;
    border-radius: 12px;
    border: 1px solid var(--gzl-border);
    margin-bottom: 22px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.filtro-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.filtro-label {
    font-size: 11px;
    color: var(--gzl-slate-light);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.filtro-input {
    padding: 9px 12px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: white;
    font-size: 13px;
    font-family: inherit;
    color: var(--gzl-slate);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.filtro-input:focus {
    outline: none;
    border-color: var(--gzl-blue);
    box-shadow: 0 0 0 3px rgba(0,147,201,0.1);
}

.filtro-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.btn-consultar {
    background: var(--gzl-blue);
    color: white;
    padding: 10px 28px;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    transition: background 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-consultar:hover { background: #007aab; }

/* --- TABS CATEGORÍA --- */
.feed-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.feed-tab {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid var(--gzl-border);
    background: var(--gzl-white);
    color: var(--gzl-slate-light);
    text-decoration: none;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.feed-tab:hover           { background: var(--gzl-border-soft); }
.feed-tab.tab-all.active  { background: var(--gzl-navy);   color: white; border-color: var(--gzl-navy); }
.feed-tab.tab-fiscal.active   { background: #0369a1; color: white; border-color: #0369a1; }
.feed-tab.tab-legal.active    { background: #3730a3; color: white; border-color: #3730a3; }
.feed-tab.tab-economico.active{ background: #166534; color: white; border-color: #166534; }
.feed-tab.tab-laboral.active  { background: #92400e; color: white; border-color: #92400e; }

/* --- HEADER FUENTE (igual que DOF) --- */
.feed-header-fuente {
    background-color: var(--gzl-navy);
    color: #ffffff;
    padding: 10px 20px;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 6px 6px 0 0;
    margin-top: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feed-header-tipo {
    background: var(--gzl-border-soft);
    color: var(--gzl-navy);
    padding: 7px 20px;
    font-weight: 700;
    font-size: 11px;
    border-bottom: 1px solid var(--gzl-border);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- CARD WRAPPER --- */
.feed-card {
    background: var(--gzl-white);
    border: 1px solid var(--gzl-border);
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

/* --- ITEM FEED --- */
.feed-item {
    padding: 15px 22px;
    border-bottom: 1px solid var(--gzl-border-soft);
    display: flex;
    align-items: flex-start;
    gap: 13px;
    transition: background 0.12s;
}

.feed-item:last-child { border-bottom: none; }
.feed-item:hover { background: #fafbfc; }

/* Icono tipo documento */
.feed-tipo-icon {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
    font-size: 13px;
}

.icon-resolucion           { background:#e0f2fe; color:#0369a1; }
.icon-resolucion_modificacion { background:#ede9fe; color:#6d28d9; }
.icon-anexo                { background:#ede9fe; color:#6d28d9; }
.icon-dictamen             { background:#fef3c7; color:#b45309; }
.icon-comunicado           { background:#ccfbf1; color:#0f766e; }
.icon-articulo             { background:#f1f5f9; color:#475569; }
.icon-decreto              { background:#e0e7ff; color:#1e3a8a; }
.icon-default              { background:#f1f5f9; color:#64748b; }

/* Contenido */
.feed-item-body { flex: 1; min-width: 0; }

.feed-item-titulo {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    line-height: 1.55;
    text-decoration: none;
    display: block;
    margin-bottom: 7px;
}

.feed-item-titulo:hover { color: var(--gzl-blue); }
.feed-item-titulo.sin-link { color: #475569; cursor: default; }

/* Meta */
.feed-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 11px;
    color: var(--gzl-slate-light);
}

/* --- BADGES --- */
.badge {
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.badge-fiscal    { background: #e0f2fe; color: #0369a1; }
.badge-legal     { background: #e0e7ff; color: #3730a3; }
.badge-economico { background: #dcfce7; color: #166534; }
.badge-laboral   { background: #fef3c7; color: #92400e; }
.badge-general   { background: #f1f5f9; color: #475569; }
.badge-nuevo     { background: #dcfce7; color: #166534; }

/* --- ACCIONES DERECHA --- */
.feed-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    flex-shrink: 0;
}

.btn-pdf-local {
    font-size: 10px; color: #dc2626;
    background: #fee2e2; padding: 4px 9px;
    border-radius: 4px; border: 1px solid #fecaca;
    text-decoration: none; white-space: nowrap;
    font-weight: 700; display: inline-flex; align-items: center; gap: 4px;
}
.btn-pdf-local:hover { background: #fecaca; }

.btn-fuente {
    font-size: 10px; color: var(--gzl-slate-light);
    background: var(--gzl-border-soft); padding: 4px 9px;
    border-radius: 4px; border: 1px solid var(--gzl-border);
    text-decoration: none; white-space: nowrap;
}
.btn-fuente:hover { background: var(--gzl-border); color: #1e293b; }

/* --- PAGINACIÓN --- */
.feed-paginacion {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.pag-btn {
    padding: 6px 12px; border-radius: 6px;
    font-size: 13px; font-weight: 600;
    text-decoration: none; transition: all 0.15s;
    border: 1px solid var(--gzl-border);
    background: white; color: #475569;
}
.pag-btn:hover  { background: var(--gzl-border-soft); }
.pag-btn.active { background: var(--gzl-navy); color: white; border-color: var(--gzl-navy); }

/* --- EMPTY STATE --- */
.feed-empty {
    text-align: center; padding: 60px 20px; color: #94a3b8;
}
.feed-empty i { font-size: 40px; margin-bottom: 15px; display: block; opacity: 0.35; }
.feed-empty p { margin: 0 0 12px; font-size: 15px; }

/* --- FLATPICKR --- */
.flatpickr-day.has-data {
    background: var(--gzl-navy-dark, #0f2f76) !important;
    color: #fff !important; border-radius: 8px;
    font-weight: 700; border: none;
}
.flatpickr-day.has-data:hover { background: var(--gzl-blue) !important; }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .filtro-row       { flex-direction: column; }
    .feed-item        { flex-wrap: wrap; }
    .feed-item-actions{ flex-direction: row; }
    .feed-stats-row   { gap: 6px; }
    .stat-chip        { min-width: 60px; padding: 8px 12px; }
}
/* HEADER */
.feed-header{
    background:#f1f5f9;
    color:#0f2f76;
    padding:15px 18px;
    border-radius:10px;
    margin-bottom:15px;
    border-left:4px solid #0093C9;
}

.feed-titulo{
    font-size:15px;
    font-weight:600;
    line-height:1.5;
    text-transform:none; /* ðŸ”¥ QUITA MAYÃšSCULAS */
}

.feed-meta{
    font-size:13px;
    opacity:.85;
}