/* ==========================================================================
   V4.35 :: v435-novedades - Estilos
   - UpdateBanner sticky top global
   - Pagina /novedades timeline
   ========================================================================== */

/* ==========================================================================
   UPDATE BANNER (sticky top global)
   ========================================================================== */
.upd-banner {
    position: sticky;
    top: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
    color: #422006;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
    border-bottom: 1px solid #d97706;
    animation: upd-slide-down 0.3s ease-out;
    font-family: -apple-system, system-ui, sans-serif;
}

.upd-banner.upd-critica {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border-bottom-color: #b91c1c;
    animation: upd-slide-down 0.3s ease-out, upd-pulse 2s infinite;
}

@keyframes upd-slide-down {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

@keyframes upd-pulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3); }
    50%      { box-shadow: 0 2px 16px rgba(220, 38, 38, 0.6); }
}

.upd-ico {
    font-size: 1.5rem;
    line-height: 1;
}

.upd-msg {
    flex: 1;
    min-width: 0;
}

.upd-msg-tit {
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.upd-ver {
    background: rgba(255, 255, 255, 0.4);
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.upd-banner.upd-critica .upd-ver {
    background: rgba(0, 0, 0, 0.2);
}

.upd-msg-sub {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-top: 0.15rem;
}

.upd-flag {
    background: rgba(0, 0, 0, 0.25);
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-weight: 700;
    margin-left: 0.5rem;
}

.upd-acc {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.upd-btn {
    border: none;
    padding: 0.5rem 0.85rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.82rem;
    transition: all 0.15s;
    white-space: nowrap;
}

.upd-btn-ver {
    background: rgba(255, 255, 255, 0.4);
    color: #422006;
}

.upd-btn-actu {
    background: #422006;
    color: #fbbf24;
}

.upd-btn-mute {
    background: transparent;
    color: #422006;
    border: 1px solid rgba(66, 32, 6, 0.3);
}

.upd-banner.upd-critica .upd-btn-ver,
.upd-banner.upd-critica .upd-btn-mute {
    color: white;
    background: rgba(255, 255, 255, 0.2);
}

.upd-banner.upd-critica .upd-btn-actu {
    background: white;
    color: #b91c1c;
}

.upd-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.upd-btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .upd-banner {
        flex-wrap: wrap;
        padding: 0.65rem 0.85rem;
    }
    .upd-msg { width: 100%; }
    .upd-acc { width: 100%; justify-content: stretch; }
    .upd-btn { flex: 1; }
    .upd-btn-mute { display: none; }
}

/* ==========================================================================
   PAGINA /novedades · Timeline
   ========================================================================== */
.nov-shell {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem;
}

.nov-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.nov-head-tit {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.nov-head-emoji {
    font-size: 2rem;
    line-height: 1;
}

.nov-head h1 {
    margin: 0;
    font-size: 1.5rem;
    color: #1f2937;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.nov-head-sub {
    color: #6b7280;
    font-size: 0.85rem;
    margin-top: 0.15rem;
}

.nov-btn-mark {
    background: white;
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s;
}

.nov-btn-mark:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

/* ==========================================================================
   Filtros
   ========================================================================== */
.nov-filtros {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    padding: 0.85rem 1rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.nov-filtros label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.72rem;
    color: #6b7280;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.4px;
}

.nov-filtros select {
    padding: 0.4rem 0.65rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.85rem;
    background: white;
    color: #1f2937;
    min-width: 140px;
    cursor: pointer;
}

.nov-toggle {
    align-self: flex-end;
    flex-direction: row !important;
    align-items: center;
    gap: 0.4rem !important;
    padding-bottom: 0.5rem;
    text-transform: none !important;
    font-size: 0.85rem !important;
    color: #374151 !important;
}

.nov-toggle input { cursor: pointer; }

/* ==========================================================================
   Timeline
   ========================================================================== */
.nov-loading,
.nov-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.nov-empty-ico {
    font-size: 3rem;
    opacity: 0.5;
    margin-bottom: 0.5rem;
}

.nov-empty-tit {
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.25rem;
}

.nov-empty-sub {
    font-size: 0.85rem;
}

.nov-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.nov-card {
    display: flex;
    background: white;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: all 0.15s;
}

.nov-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.nov-card.no-leida {
    border-left: 4px solid #3b82f6;
}

.nov-card.leida {
    opacity: 0.85;
}

.nov-card.imp-critica.no-leida {
    border-left-color: #dc2626;
    background: linear-gradient(90deg, #fef2f2 0%, white 5%);
}

.nov-card.imp-alta.no-leida {
    border-left-color: #f59e0b;
}

.nov-card-bar {
    width: 4px;
    flex-shrink: 0;
}

.nov-card-content {
    flex: 1;
    padding: 1rem 1.25rem;
}

.nov-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.nov-card-meta {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    align-items: center;
}

.nov-card-fecha {
    font-size: 0.72rem;
    color: #9ca3af;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Pills */
.nov-pill-version {
    background: #1e3a5f;
    color: white;
    padding: 0.18rem 0.55rem;
    border-radius: 5px;
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.3px;
}

.nov-pill-modulo {
    background: #f3f4f6;
    color: #374151;
    padding: 0.18rem 0.55rem;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.7rem;
}

.nov-pill-tipo {
    padding: 0.18rem 0.55rem;
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: 600;
}

.nov-pill-tipo.tipo-feature   { background: #dbeafe; color: #1e40af; }
.nov-pill-tipo.tipo-bug_fix   { background: #fee2e2; color: #b91c1c; }
.nov-pill-tipo.tipo-rediseno  { background: #fce7f3; color: #be185d; }
.nov-pill-tipo.tipo-mejora    { background: #d1fae5; color: #047857; }
.nov-pill-tipo.tipo-infra     { background: #ede9fe; color: #6d28d9; }

.nov-pill-imp {
    padding: 0.18rem 0.5rem;
    border-radius: 5px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.nov-pill-imp.imp-baja    { background: #f3f4f6; color: #6b7280; }
.nov-pill-imp.imp-media   { background: #fef3c7; color: #92400e; }
.nov-pill-imp.imp-alta    { background: #fed7aa; color: #c2410c; }
.nov-pill-imp.imp-critica { background: #fecaca; color: #991b1b; animation: nov-pulse-imp 2s infinite; }

@keyframes nov-pulse-imp {
    0%, 100% { background: #fecaca; }
    50%      { background: #fca5a5; }
}

.nov-pill-nuevo {
    background: #3b82f6;
    color: white;
    padding: 0.18rem 0.5rem;
    border-radius: 5px;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    animation: nov-pulse-nuevo 1.5s infinite;
}

@keyframes nov-pulse-nuevo {
    0%, 100% { background: #3b82f6; }
    50%      { background: #60a5fa; }
}

/* Titulo y descripcion */
.nov-card-titulo {
    margin: 0 0 0.4rem 0;
    font-size: 1.1rem;
    color: #1f2937;
    font-weight: 700;
}

.nov-card-iconos {
    margin-right: 0.35rem;
}

.nov-card-corta {
    margin: 0 0 0.65rem 0;
    color: #4b5563;
    font-size: 0.9rem;
    line-height: 1.5;
}

.nov-card-larga {
    background: #f9fafb;
    padding: 0.85rem 1rem;
    border-radius: 6px;
    margin: 0.65rem 0;
    color: #374151;
    font-size: 0.88rem;
    line-height: 1.6;
    border-left: 3px solid #d1d5db;
}

.nov-card-larga h2,
.nov-card-larga h3,
.nov-card-larga h4 {
    margin: 0.85rem 0 0.4rem 0;
    color: #1e3a5f;
}

.nov-card-larga h2 { font-size: 1.05rem; }
.nov-card-larga h3 { font-size: 0.95rem; }
.nov-card-larga h4 { font-size: 0.9rem; }

.nov-card-larga p {
    margin: 0.4rem 0;
}

.nov-card-larga ul {
    margin: 0.4rem 0 0.4rem 1.25rem;
    padding: 0;
}

.nov-card-larga li {
    margin: 0.2rem 0;
}

.nov-card-larga code {
    background: #e5e7eb;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    font-size: 0.85em;
    color: #be185d;
}

.nov-card-larga strong {
    color: #1e3a5f;
}

/* Acciones */
.nov-card-acc {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.nov-btn-toggle,
.nov-btn-leida {
    background: transparent;
    border: 1px solid #d1d5db;
    color: #4b5563;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.nov-btn-toggle:hover,
.nov-btn-leida:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.nov-btn-leida {
    color: #047857;
    border-color: #6ee7b7;
    background: #d1fae5;
}

.nov-btn-leida:hover {
    background: #a7f3d0;
}

/* Mobile */
@media (max-width: 640px) {
    .nov-shell { padding: 0.65rem; }
    .nov-head { gap: 0.5rem; }
    .nov-head h1 { font-size: 1.2rem; }
    .nov-card-content { padding: 0.85rem; }
    .nov-card-titulo { font-size: 1rem; }
    .nov-filtros select { min-width: 0; flex: 1 1 45%; }
}

/* ==========================================================================
   V4.39 :: tanda-h2e-novedades-enriquecidas - bloques rich extendidos
   Cuatro secciones nuevas dentro del detalle expandido de cada novedad.
   ========================================================================== */

.nov-rich-block {
    margin: 1rem 0;
    padding: 0.85rem 1rem 0.85rem 1.1rem;
    border-radius: 8px;
    border-left: 4px solid #94a3b8;
    background: #f8fafc;
    font-size: 0.92rem;
    line-height: 1.55;
}

.nov-rich-head {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #475569;
    margin-bottom: 0.45rem;
}

.nov-rich-body {
    color: #1e293b;
}

.nov-rich-body p {
    margin: 0.4rem 0;
}

.nov-rich-body code {
    background: rgba(15, 23, 42, 0.08);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-size: 0.86em;
    font-family: 'JetBrains Mono', 'Cascadia Code', Menlo, monospace;
}

.nov-rich-body ul {
    margin: 0.35rem 0 0.35rem 1.1rem;
    padding: 0;
}

.nov-rich-body li {
    margin: 0.2rem 0;
}

.nov-rich-problema { background: #fffbeb; border-left-color: #f59e0b; }
.nov-rich-problema .nov-rich-head { color: #92400e; }

.nov-rich-decision { background: #eff6ff; border-left-color: #3b82f6; }
.nov-rich-decision .nov-rich-head { color: #1e40af; }

.nov-rich-pendientes { background: #faf5ff; border-left-color: #a855f7; }
.nov-rich-pendientes .nov-rich-head { color: #7e22ce; }

.nov-rich-archivos { background: #f0fdf4; border-left-color: #22c55e; }
.nov-rich-archivos .nov-rich-head { color: #166534; }

.nov-rich-archivos-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.25rem;
}

.nov-archivo-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.6rem;
    background: white;
    border: 1px solid #bbf7d0;
    color: #166534;
    border-radius: 6px;
    font-family: 'JetBrains Mono', 'Cascadia Code', Menlo, monospace;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: default;
    transition: all 0.12s ease;
}

.nov-archivo-chip:hover {
    background: #dcfce7;
    border-color: #4ade80;
    transform: translateY(-1px);
}

.nov-rich-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0.85rem 0 0.5rem;
}

.nov-tag {
    padding: 0.2rem 0.55rem;
    background: #e0e7ff;
    color: #3730a3;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.nov-rich-footer {
    margin-top: 0.9rem;
    padding-top: 0.7rem;
    border-top: 1px dashed #cbd5e1;
    font-size: 0.78rem;
    color: #64748b;
}

.nov-rich-footer strong {
    color: #334155;
}

.nov-pill-reinicio {
    background: #fed7aa;
    color: #9a3412;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    border: 1px solid #fb923c;
}

.nov-btn-actualizar {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    padding: 0.45rem 0.95rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.35);
    transition: all 0.15s ease;
}

.nov-btn-actualizar:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.5);
}

@media (max-width: 700px) {
    .nov-rich-block {
        padding: 0.7rem 0.85rem 0.7rem 1rem;
        font-size: 0.88rem;
    }
    .nov-archivo-chip {
        font-size: 0.74rem;
        padding: 0.25rem 0.5rem;
    }
}
