/* ══════════════════════════════════════════
   Feed de Noticias — Premium Editorial v3
   ══════════════════════════════════════════ */

/* ─── Feed View Header ─── */
.feed-view-header h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-main);
    display: inline-block;
    position: relative;
}
.feed-view-header h1::after {
    content: none;
}
.feed-view-header .subtitle {
    font-size: 11px;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-faint);
    font-weight: 500;
    margin-top: 16px;
}
.feed-top-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 12px 32px;
    border-bottom: 1px solid rgba(124, 77, 255, 0.12);
    margin-left: -32px;
    margin-right: -32px;
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10, 10, 20, 0.55);
    backdrop-filter: blur(20px) saturate(1.3);
    -webkit-backdrop-filter: blur(20px) saturate(1.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5),
                0 1px 0 rgba(124, 77, 255, 0.08);
    transition: background 0.3s ease,
                backdrop-filter 0.3s ease,
                box-shadow 0.3s ease,
                border-color 0.3s ease;
}
.feed-top-row:hover {
    background: rgba(18, 18, 35, 1);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.7),
                0 1px 0 rgba(124, 77, 255, 0.25);
    border-bottom-color: rgba(124, 77, 255, 0.25);
}
.feed-top-row h1 {
    flex-shrink: 0;
    margin-right: 4px;
}
.feed-row-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}
.feed-top-row .feed-filters .feed-articles-count {
    flex-shrink: 0;
}
.feed-top-row .feed-filters {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}
/* Toggle button: hidden by default (desktop), shown on mobile */
.feed-filters-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid rgba(124, 77, 255, 0.18);
    border-radius: 10px;
    background: rgba(124, 58, 237, 0.08);
    color: var(--text-main);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    flex: 0 0 auto;
}
.feed-filters-toggle:hover {
    background: rgba(124, 58, 237, 0.18);
    border-color: rgba(124, 77, 255, 0.35);
}
.feed-filters-toggle-arrow {
    transition: transform 0.25s ease;
}
.feed-filters--open .feed-filters-toggle-arrow {
    transform: rotate(180deg);
}
/* Collapsible container: visible by default (desktop) */
.feed-filters-collapsible {
    display: contents;
}
.feed-top-row .feed-filters > *,
.feed-top-row .feed-filters-collapsible > * {
    flex: 0 0 100%;
}
@media (min-width: 900px) {
    .feed-top-row .feed-filters > *,
    .feed-top-row .feed-filters-collapsible > * {
        flex: 0 1 auto;
    }
    .feed-top-row .feed-filters-collapsible > .feed-tag-wrapper {
        flex: 1 1 auto;
    }
}

/* ─── Editorial Grid — 12 columns ─── */
/* ── Feed: Featured section (top 3) ── */
.feed-grid-featured {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}
/* Hero: 1st card — 8 cols × 2 rows */
.feed-grid-featured .feed-card:nth-child(1) { grid-column: span 8; grid-row: span 2; min-height: 420px; }
/* Side: 2nd + 3rd — 4 cols each */
.feed-grid-featured .feed-card:nth-child(2),
.feed-grid-featured .feed-card:nth-child(3) { grid-column: span 4; }

/* ── Feed: Regular section (cards 4+, 4 per row) ── */
.feed-grid-regular {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    margin-bottom: 40px;
}
.feed-card-spacer {
    visibility: hidden;
    pointer-events: none;
    min-height: 0;
}

/* ─── Card Base ─── */
.feed-card {
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: rgba(255,255,255,0.022);
    border: 1px solid rgba(255,255,255,0.07);
    display: flex;
    flex-direction: column;
    position: relative;
    animation: feedEntry 0.5s cubic-bezier(0.22,1,0.36,1) both;
    transition: transform 0.32s cubic-bezier(0.25,0.46,0.45,0.94),
                box-shadow 0.32s ease,
                border-color 0.25s ease,
                opacity 0.3s ease;
}

/* Badge "Leído" en cards visitadas */
.feed-card-read-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(139, 92, 246, 0.75);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 2;
    letter-spacing: 0.3px;
    backdrop-filter: blur(4px);
}

/* Top-edge accent line — premium micro-interaction */
.feed-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent) 0%, #a78bfa 60%, transparent 100%);
    opacity: 0;
    transition: opacity 0.28s ease;
    z-index: 10;
    border-radius: 10px 10px 0 0;
}
.feed-card:hover::before { opacity: 1; }

/* Stagger entry animation */
.feed-card:nth-child(1)  { animation-delay:   0ms; }
.feed-card:nth-child(2)  { animation-delay:  60ms; }
.feed-card:nth-child(3)  { animation-delay: 115ms; }
.feed-card:nth-child(4)  { animation-delay: 160ms; }
.feed-card:nth-child(5)  { animation-delay: 200ms; }
.feed-card:nth-child(6)  { animation-delay: 240ms; }
.feed-card:nth-child(7)  { animation-delay: 280ms; }
.feed-card:nth-child(n+8){ animation-delay: 315ms; }

@keyframes feedEntry {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

.feed-card:hover {
    transform: translateY(-4px);
    border-color: rgba(124,77,255,0.22);
    box-shadow: 0 18px 52px rgba(0,0,0,0.58), 0 0 0 1px rgba(124,77,255,0.07);
}

/* ══ OVERLAY CARDS: Hero + Feature (all 3 in featured grid) ══ */

.feed-grid-featured .feed-card:nth-child(2),
.feed-grid-featured .feed-card:nth-child(3) { min-height: 275px; }

.feed-grid-featured .feed-card .feed-card-image {
    position: absolute;
    inset: 0;
    aspect-ratio: unset;
    height: 100%;
    flex-shrink: 0;
}
.feed-grid-featured .feed-card .feed-card-image img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.feed-grid-featured .feed-card .feed-card-overlay {
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.02)  0%,
        transparent       22%,
        rgba(0,0,0,0.38)  55%,
        rgba(0,0,0,0.88)  82%,
        rgba(0,0,0,0.96) 100%
    );
}
.feed-grid-featured .feed-card .feed-card-body {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    z-index: 3;
    background: none;
    padding: 48px 18px 16px;
    gap: 8px;
}
.feed-grid-featured .feed-card:nth-child(1) .feed-card-body {
    padding: 64px 24px 22px;
}
.feed-grid-featured .feed-card .feed-card-footer {
    border-top-color: rgba(255,255,255,0.12);
}
.feed-grid-featured .feed-card .feed-owner-name,
.feed-grid-featured .feed-card .feed-date { color: rgba(255,255,255,0.58); }

/* ─── Image zone (regular cards in feed-grid-regular) ─── */
.feed-card-image {
    position: relative;
    overflow: hidden;
    background: rgba(14,14,22,1);
    flex-shrink: 0;
}
.feed-grid-regular .feed-card .feed-card-image { aspect-ratio: 16 / 9; }

/* Inline meta row for regular cards (replaces hidden footer) */
.feed-card-inline-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: auto;
}
.feed-date-inline {
    font-size: 0.68rem;
    color: var(--text-faint);
    margin-left: auto;
    white-space: nowrap;
}

.feed-card-image img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    transition: transform 0.7s cubic-bezier(0.25,0.46,0.45,0.94);
}
.feed-card:hover .feed-card-image img { transform: scale(1.07); }

/* ─── YouTube card overlay ─── */
.yt-play-overlay {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 3;
    pointer-events: none;
}
.feed-card:hover .yt-play-overlay { opacity: 1; }
.yt-play-btn {
    width: 44px; height: 44px;
    background: rgba(255,255,255,0.95);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    transition: transform 0.15s;
}
.feed-card:hover .yt-play-btn { transform: scale(1.1); }
.yt-badge {
    background: #ff0000;
    color: #fff;
    font-size: 9px; font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    letter-spacing: 0.05em;
}
.feed-card-meta-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.feed-card-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 45%,
        rgba(0,0,0,0.3) 72%,
        rgba(0,0,0,0.62) 100%
    );
    pointer-events: none;
}

/* ─── Source badge (top-left on image) ─── */
.feed-card-meta {
    position: absolute;
    top: 11px; left: 11px; right: 11px;
    display: flex; align-items: flex-start;
    justify-content: space-between;
    z-index: 4;
}
.feed-job-badge {
    background: rgba(12, 8, 28, 0.72);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    color: #ffffff;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    padding: 5px 11px;
    border-radius: 5px;
    border: 1px solid rgba(167, 139, 250, 0.55);
    box-shadow: 0 0 10px rgba(124, 77, 255, 0.25), inset 0 1px 0 rgba(255,255,255,0.06);
    max-width: 210px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.feed-card:nth-child(1) .feed-job-badge { font-size: 10.5px; padding: 6px 14px; }

/* Feed público: ocultar owner (reactivar para feeds privados) */
.feed-owner-avatar-wrap,
.feed-owner-feat { display: none !important; }

/* Avatar discreto — esquina superior derecha del card-body */
.feed-owner-avatar-wrap {
    position: absolute;
    top: 8px;
    right: 8px;
    cursor: default;
    z-index: 2;
}
.feed-card-title {
    padding-right: 42px;
}
.feed-owner-avatar-tip {
    transition: opacity 0.2s, transform 0.2s;
    opacity: 0.75;
}
.feed-owner-avatar-tip:hover { opacity: 1; transform: scale(1.08); }
.feed-card-body { position: relative; }
.feed-card-owner-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
/* Ocultar el avatar del row para no duplicar — el wrap ya lo posiciona */
.feed-card-owner-row .feed-owner-avatar-wrap,
.feed-inline-date-owner .feed-owner-avatar-wrap { display: none; }
.feed-inline-date-owner {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
}

/* ─── Card Body (regular cards) ─── */
.feed-card-body {
    padding: 13px 14px 14px;
    display: flex; flex-direction: column;
    gap: 9px; flex: 1;
}

/* ─── Title — Inter (legible, open tracking) ─── */
.feed-card-title {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #f0ede7;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    letter-spacing: 0.01em;
}
/* Hero title */
.feed-grid-featured .feed-card:nth-child(1) .feed-card-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    letter-spacing: -0.01em;
    color: #ffffff;
    text-shadow: 0 2px 24px rgba(0,0,0,0.75), 0 1px 4px rgba(0,0,0,0.9);
}
/* Feature titles (cards 2+3) */
.feed-grid-featured .feed-card:nth-child(2) .feed-card-title,
.feed-grid-featured .feed-card:nth-child(3) .feed-card-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    letter-spacing: 0em;
    color: #f6f3ef;
    text-shadow: 0 1px 12px rgba(0,0,0,0.7);
}
/* Regular cards — clean title */
.feed-grid-regular .feed-card-title {
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    letter-spacing: 0.01em;
    color: #eeeaf4;
}
.feed-grid-regular .feed-card-footer {
    display: none;
}
.feed-grid-regular .feed-card-body {
    padding: 11px 12px 13px;
    gap: 6px;
}

/* ─── Footer ─── */
.feed-card-footer {
    display: flex; align-items: center;
    justify-content: space-between;
    gap: 8px; margin-top: auto;
    padding-top: 9px;
    border-top: 1px solid rgba(255,255,255,0.065);
}
.feed-card-owner {
    display: flex; flex-direction: row;
    align-items: center; gap: 8px; flex-shrink: 0;
}
.feed-owner { display: flex; align-items: center; gap: 5px; }
.feed-owner-avatar {
    width: 26px; height: 26px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.22);
    object-fit: cover; flex-shrink: 0;
}
.feed-owner-avatar-placeholder {
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.07); color: var(--text-dim);
}
.feed-owner-name {
    font-size: 10px; color: rgba(255,255,255,0.38);
    font-weight: 500; max-width: 80px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ─── Avatar featured (inline footer, tarjetas destacadas) ─── */
.feed-owner-avatar-feat {
    width: 22px; height: 22px;
    border-radius: 50%;
    border: 1.5px solid rgba(167,139,250,0.45);
    object-fit: cover; flex-shrink: 0;
    background: rgba(124,77,255,0.12);
}
.feed-owner-feat {
    display: flex; align-items: center; gap: 7px;
    background: rgba(12,8,28,0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(167,139,250,0.2);
    border-radius: 20px;
    padding: 4px 10px 4px 4px;
    cursor: default;
    transition: background 0.2s;
}
.feed-owner-feat:hover {
    background: rgba(124,77,255,0.15);
    border-color: rgba(167,139,250,0.4);
}
.feed-owner-feat-name {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255,255,255,0.72);
    letter-spacing: 0.01em;
    max-width: 110px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.feed-date {
    font-size: 10px; color: rgba(255,255,255,0.35);
    white-space: nowrap; flex-shrink: 0;
    letter-spacing: 0.02em; font-variant-numeric: tabular-nums;
}

/* ─── Badges ─── */
.feed-badges { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.feed-badge {
    font-size: 8.5px; font-weight: 700;
    padding: 2px 7px; border-radius: 3px;
    letter-spacing: 0.07em; text-transform: uppercase;
}
.feed-badge-pais  { background: rgba(14,165,233,0.09); color: #7dd3fc; border: 1px solid rgba(14,165,233,0.16); }
.feed-badge-idioma{ background: rgba(16,185,129,0.07); color: #6ee7b7; border: 1px solid rgba(16,185,129,0.14); }

/* ─── Tag Input ─── */
.feed-tag-wrapper {
    position: relative; z-index: 1000;
    display: flex; flex-wrap: nowrap; align-items: center; gap: 6px;
    min-width: 180px; width: auto; flex: 0 1 auto;
    padding: 7px 12px; border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.09);
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(8px); cursor: text;
    transition: border-color 0.2s, width 0.2s;
    overflow: visible;
}
.feed-tag-wrapper:focus-within {
    border-color: rgba(124,77,255,0.5);
    background: rgba(255,255,255,0.06);
}
.feed-tag-wrapper.feed-tag-searching,
.feed-tag-wrapper.feed-tag-searching:focus-within {
    border-color: rgba(124, 77, 255, 0.6);
    background:
        linear-gradient(90deg,
            rgba(124, 77, 255, 0.05) 0%,
            rgba(124, 77, 255, 0.18) 50%,
            rgba(124, 77, 255, 0.05) 100%);
    background-size: 200% 100%;
    animation: tagShimmer 1.5s ease-in-out infinite;
}
@keyframes tagShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.feed-active-tags-inline { display: flex; flex-wrap: nowrap; gap: 6px; flex-shrink: 0; }
.feed-tag-chip { white-space: nowrap; flex-shrink: 0; }
.feed-tag-suggestions {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0;
    z-index: 9999; background: rgba(10,10,20,0.98);
    border: 1px solid rgba(124,77,255,0.3); border-radius: 8px;
    overflow: hidden; backdrop-filter: blur(16px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.6); min-width: 220px;
}
.feed-tag-suggestion {
    display: flex; align-items: center; padding: 9px 12px;
    font-size: 12px; cursor: pointer; color: var(--text-main);
    transition: background 0.15s;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.feed-tag-suggestion:last-child { border-bottom: none; }
.feed-tag-suggestion:hover { background: rgba(124,77,255,0.18); color: #e9d5ff; }

/* ─── Multi-select checkbox dropdown ─── */
.feed-tag-dropdown-list { padding: 4px 0; }

.feed-tag-check-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 14px; cursor: pointer;
    transition: background 0.12s;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.feed-tag-check-item:last-child { border-bottom: none; }
.feed-tag-check-item:hover { background: rgba(124,77,255,0.12); }
.feed-tag-check-item.is-checked { background: rgba(124,77,255,0.08); }
.feed-tag-check-item.is-checked:hover { background: rgba(124,77,255,0.16); }

.feed-tag-checkbox {
    width: 16px; height: 16px; border-radius: 4px;
    border: 1.5px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.04);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: border-color 0.15s, background 0.15s;
}
.feed-tag-check-item.is-checked .feed-tag-checkbox {
    border-color: #a78bfa;
    background: rgba(124,77,255,0.2);
}
.feed-tag-check-label {
    font-size: 12.5px; color: var(--text-main); line-height: 1.3;
}
.feed-tag-variant-count {
    font-size: 11px; color: var(--text-faint); font-weight: 400;
}
.feed-tag-check-item.is-checked .feed-tag-check-label {
    color: #e9d5ff; font-weight: 500;
}
.feed-tag-dropdown-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px;
    border-top: 1px solid rgba(124,77,255,0.2);
    background: rgba(124,77,255,0.06);
}
.feed-tag-selected-count {
    font-size: 11px; color: #a78bfa;
    font-weight: 600; letter-spacing: 0.02em;
}
.feed-tag-apply-btn {
    display: flex; align-items: center; gap: 5px;
    background: rgba(124,77,255,0.25);
    border: 1px solid rgba(124,77,255,0.45);
    color: #e9d5ff; font-size: 11px; font-weight: 600;
    padding: 5px 12px; border-radius: 5px;
    cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.feed-tag-apply-btn:hover {
    background: rgba(124,77,255,0.4);
    border-color: rgba(124,77,255,0.7);
}
.feed-tag-chip {
    display: inline-flex; align-items: center; gap: 5px;
    background: rgba(124,77,255,0.15);
    border: 1px solid rgba(124,77,255,0.4);
    color: #ddd6fe; font-size: 11px; font-weight: 600;
    padding: 3px 8px 3px 10px; border-radius: 4px;
    transition: border-color 0.15s;
}
.feed-tag-chip:hover { border-color: rgba(124,77,255,0.7); }
.feed-tag-chip-remove {
    background: none; border: none; color: #a78bfa;
    cursor: pointer; font-size: 14px; line-height: 1; padding: 0;
    display: flex; align-items: center; transition: color 0.15s;
}
.feed-tag-chip-remove:hover { color: #f87171; }
.feed-tag-clear-all {
    display: inline-flex; align-items: center; gap: 4px;
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.4);
    color: #fca5a5; font-size: 11px; font-weight: 600;
    padding: 3px 10px; border-radius: 4px; cursor: pointer;
    white-space: nowrap; flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.feed-tag-clear-all:hover {
    background: rgba(239,68,68,0.25);
    border-color: rgba(239,68,68,0.7);
    color: #fca5a5;
}

/* ─── Announcements Bell ─── */
.announcements-bell {
    position: relative;
    flex-shrink: 0;
}
.announcements-bell-btn {
    position: relative;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 8px;
    cursor: pointer;
    color: var(--text-dim);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.announcements-bell-btn:hover {
    border-color: rgba(124,77,255,0.3);
    color: var(--text-main);
    background: rgba(124,77,255,0.06);
}
.announcements-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ff5252;
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    font-family: var(--font-main);
    pointer-events: none;
}
.announcements-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 340px;
    max-height: 400px;
    overflow-y: auto;
    background: rgba(18, 18, 28, 0.92);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border: 1px solid rgba(124,77,255,0.15);
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04);
    z-index: 200;
    padding: 0;
}
.announcements-panel-header {
    padding: 14px 16px 10px;
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.announcements-panel-list {
    padding: 8px;
}
.announcements-item {
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 4px;
}
.announcements-item:hover {
    background: rgba(124,77,255,0.06);
}
.announcements-item.unread {
    background: rgba(124,77,255,0.04);
    border-left: 3px solid var(--accent);
    padding-left: 9px;
}
.announcements-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.announcements-item-icon {
    font-size: 14px;
    flex-shrink: 0;
}
.announcements-item-title {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-main);
}
.announcements-new-tag {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    color: #7c4dff;
    background: rgba(124,77,255,0.12);
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}
.announcements-item-body {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}
.announcements-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    margin: 0;
}
.announcements-load-more {
    width: 100%;
    padding: 10px;
    background: rgba(124,77,255,0.06);
    border: 1px solid rgba(124,77,255,0.15);
    border-radius: 8px;
    color: #a78bfa;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 4px;
}
.announcements-load-more:hover {
    background: rgba(124,77,255,0.12);
    border-color: rgba(124,77,255,0.3);
}

/* ─── Feed bar (count + pagination on same row) ─── */
.feed-bar {
    display: none;
}
.feed-articles-count {
    font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    color: #f5c542;
    background: rgba(245, 197, 66, 0.1);
    border: 1px solid rgba(245, 197, 66, 0.3);
    border-radius: 6px;
    padding: 4px 12px;
    margin: 0; white-space: nowrap; flex-shrink: 0;
}

/* ─── Pagination ─── */
.feed-pagination {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 0; flex-wrap: wrap;
}
.feed-pagination-goto {
    display: flex; align-items: center; gap: 6px;
}
.feed-goto-input {
    width: 64px; padding: 7px 10px; text-align: center;
    font-size: 12px; border-radius: 6px;
    -moz-appearance: textfield;
    appearance: textfield;
}
.feed-goto-input::-webkit-outer-spin-button,
.feed-goto-input::-webkit-inner-spin-button { -webkit-appearance: none; appearance: none; margin: 0; }
.feed-pagination-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 9px 22px; font-size: 11px; font-weight: 600;
    letter-spacing: 0.07em; text-transform: uppercase;
    border-radius: 6px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.09);
    color: var(--text-dim); cursor: pointer; transition: all 0.2s;
}
.feed-pagination-btn:hover:not(:disabled) {
    background: rgba(124,77,255,0.12);
    border-color: rgba(124,77,255,0.35); color: #c4b5fd;
}
.feed-pagination-btn.disabled,
.feed-pagination-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.feed-pagination-info {
    font-size: 11px; color: var(--text-faint);
    min-width: 100px; text-align: center;
    letter-spacing: 0.06em; text-transform: uppercase;
}

/* ─── Feed header: layout compacto con chat abierto ─── */
/* Filtros siempre a la izquierda — no se mueven con el chatbot */
body.chat-open .feed-top-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
body.chat-open .feed-top-row > .feed-filters {
    flex: 1 1 0%;
    min-width: 0;
    justify-content: flex-start;
}

/* ─── Infinite Scroll ─── */
.feed-scroll-sentinel {
    height: 1px;
    width: 100%;
    flex-shrink: 0;
}
.feed-load-more {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 24px 0;
}
.feed-skeleton-card {
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
}
.feed-skeleton-img {
    width: 100%;
    height: 140px;
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}
.feed-skeleton-text {
    height: 12px;
    margin: 12px 14px 0;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
}
.feed-skeleton-text.short {
    width: 60%;
    margin-bottom: 14px;
}
@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.feed-end-message {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-dim);
    font-size: 13px;
    letter-spacing: 0.03em;
    opacity: 0.6;
}
@media (max-width: 800px) {
    .feed-load-more { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .feed-load-more { grid-template-columns: 1fr; }
}

/* ─── Card Preview Modal ─── */
.card-preview-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.72);
    backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transition: opacity 0.28s cubic-bezier(0.22,1,0.36,1);
    padding: 24px;
}
.card-preview-overlay.is-visible { opacity: 1; }
.card-preview-overlay.is-visible .card-preview-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.card-preview-modal {
    position: relative;
    width: 100%; max-width: 900px;
    background: rgba(22,22,34,0.97);
    border: 1px solid rgba(124,77,255,0.18);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(124,77,255,0.08);
    transform: translateY(24px) scale(0.97);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.22,1,0.36,1), opacity 0.3s ease;
    max-height: 85vh;
    overflow-y: auto;
}

.card-preview-close {
    position: absolute; top: 12px; right: 12px; z-index: 10;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    color: #fff; cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.card-preview-close:hover {
    background: rgba(124,77,255,0.35);
    border-color: rgba(124,77,255,0.5);
}
.card-preview-close svg { width: 16px; height: 16px; }


.card-preview-analyst-btn {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #9b6dff, #7c4dff 70%);
    color: #fff;
    border: none;
    cursor: pointer;
    position: relative;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 20px rgba(124,77,255,0.45);
    transition: transform 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}
.card-preview-analyst-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(124,77,255,0.65);
}
.card-preview-analyst-btn .analyst-tooltip {
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%) translateX(4px);
    padding: 6px 12px;
    background: rgba(91, 33, 182, 0.95);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}
.card-preview-analyst-btn:hover .analyst-tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}
.card-preview-analyst-btn svg { width: 20px; height: 20px; }
.card-preview-analyst-btn .fab-badge { display: none; }
.card-preview-analyst-btn::before {
    content: '';
    position: absolute; inset: -5px;
    border-radius: 50%;
    border: 2px solid rgba(124,77,255,0.4);
    animation: fab-pulse 2.5s ease-in-out infinite;
}
/* Ideating: oculta ring, muestra burbuja de pensamiento con dots */
.card-preview-analyst-btn.ideating::before { display: none; }
.card-preview-analyst-btn.ideating .fab-badge {
    display: flex; align-items: center; justify-content: center; gap: 3px;
    position: absolute; top: -4px; right: -6px;
    min-width: 0; width: 32px; height: 24px; padding: 0 6px;
    border-radius: 12px;
    background: linear-gradient(145deg, #5b21b6, #7c4dff);
    border: 1.5px solid rgba(255,255,255,0.7);
    box-shadow: 0 0 12px rgba(124,77,255,0.4), 0 4px 16px rgba(0,0,0,0.5);
    animation: fab-bubble-float 3s ease-in-out infinite;
}
.card-preview-analyst-btn.ideating .fab-badge::after {
    content: '';
    position: absolute; bottom: -7px; left: 6px;
    width: 0; height: 0;
    border-left: 6px solid transparent; border-right: 6px solid transparent;
    border-top: 8px solid rgba(255,255,255,0.7);
}
.card-preview-analyst-btn.ideating .fab-badge::before {
    content: '';
    position: absolute; bottom: -5px; left: 7px;
    width: 0; height: 0;
    border-left: 5px solid transparent; border-right: 5px solid transparent;
    border-top: 6px solid #6d28d9;
    z-index: 1;
}
.card-preview-analyst-btn.ideating .fab-badge .ideate-dot { display: block; }
/* Ideating icon mode: icono rotativo que reemplaza dots */
.card-preview-analyst-btn.ideating .fab-badge.ideate-icon-mode {
    background: linear-gradient(145deg, #7c3aed, #a78bfa);
}
.card-preview-analyst-btn.ideating .fab-badge.ideate-icon-mode svg {
    width: 14px; height: 14px; color: #fff;
    animation: fab-icon-pop 0.4s ease-out;
}
.card-preview-analyst-btn.ideating .fab-badge.ideate-icon-mode .ideate-dot { display: none; }
/* Thinking (hover): ring rápido */
.card-preview-analyst-btn.thinking::before {
    display: block;
    animation: fab-think-pulse 1.4s ease-in-out infinite;
    border-color: rgba(124,77,255,0.6);
}

/* Hero image */
.card-preview-hero {
    position: relative;
    width: 100%; height: 240px;
    overflow: hidden;
    background: rgba(14,14,22,1);
}
.card-preview-hero img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.card-preview-yt-iframe {
    width: 100%; height: 100%;
    display: block; border: none;
}
.card-preview-hero-yt { background: #000; }
.card-preview-hero-yt .card-preview-hero-overlay { display: none; }
.card-preview-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, transparent 30%, rgba(22,22,34,0.95) 100%);
    pointer-events: none;
}
.card-preview-hero-meta {
    position: absolute; bottom: 12px; left: 16px; right: 16px;
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.card-preview-meta-left {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.card-preview-date {
    font-size: 11px; color: rgba(255,255,255,0.65);
    font-weight: 500; letter-spacing: 0.02em;
}

/* Two-column body (content + related sidebar) */
.card-preview-body {
    display: flex;
}
.card-preview-body > .card-preview-content {
    flex: 1;
    min-width: 0;
    border-right: 1px solid rgba(255,255,255,0.06);
}
.card-preview-body > .card-preview-related {
    width: 280px;
    min-width: 280px;
    margin-top: 0;
    padding: 20px 18px 24px;
    border-top: none;
}

/* Content area */
.card-preview-content {
    padding: 20px 24px 24px;
}
.card-preview-title {
    font-family: 'Playfair Display', serif;
    font-size: 20px; font-weight: 700;
    color: var(--text-main);
    line-height: 1.35;
    margin: 0 0 14px;
}
.card-preview-snippet {
    font-size: 14px; line-height: 1.65;
    color: rgba(255,255,255,0.72);
    margin: 0 0 18px;
    font-style: italic;
    border-left: 2px solid rgba(124,77,255,0.35);
    padding-left: 14px;
}
.card-preview-snippet.card-preview-ai-failed {
    color: rgba(255, 200, 100, 0.85);
    border-left-color: rgba(255, 170, 60, 0.55);
    font-style: normal;
}

/* Tema chips */
.card-preview-temas {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-bottom: 20px;
}
.preview-tema-chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 6px 14px;
    background: rgba(124,77,255,0.1);
    border: 1px solid rgba(167,139,250,0.25);
    border-radius: 20px;
    color: #c4b5fd;
    font-size: 12px; font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.22,1,0.36,1);
    letter-spacing: 0.02em;
}
.preview-tema-chip:hover {
    background: rgba(124,77,255,0.25);
    border-color: rgba(167,139,250,0.55);
    color: #e9d5ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124,77,255,0.2);
}

/* Action buttons */
.card-preview-actions {
    display: flex; justify-content: flex-end; gap: 10px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.card-preview-share-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 18px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    color: rgba(255,255,255,0.7);
    font-size: 13px; font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.01em;
}
.card-preview-share-btn:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.25);
    color: #fff;
    transform: translateY(-1px);
}
.card-preview-share-btn svg { width: 14px; height: 14px; }

/* Avatar Video Button */
.card-preview-avatar-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 18px;
    background: rgba(16,185,129,0.15);
    border: 1px solid rgba(16,185,129,0.35);
    border-radius: 8px;
    color: #6ee7b7;
    font-size: 13px; font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.01em;
}
.card-preview-avatar-btn:hover {
    background: rgba(16,185,129,0.3);
    border-color: rgba(16,185,129,0.5);
    color: #a7f3d0;
    transform: translateY(-1px);
}
.card-preview-avatar-btn svg { width: 14px; height: 14px; }

/* ─── Avatar Section (integrated in card preview) ─── */
.avatar-section {
    margin: 0 24px 20px;
}
.avatar-section-inner {
    padding: 18px;
    background: linear-gradient(135deg, rgba(124,77,255,0.08), rgba(16,185,129,0.05));
    border: 1px solid rgba(124,77,255,0.15);
    border-radius: 16px;
    position: relative;
}
.avatar-section-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 14px;
}
.avatar-section-pitch {
    font-size: 13px; font-weight: 700; color: #fcd34d;
    display: flex; align-items: center; gap: 6px;
}
.avatar-section-subtitle {
    font-size: 11px; color: rgba(255,255,255,0.4); margin-top: 2px;
}
.avatar-section-cost {
    font-size: 11px; color: #fcd34d; font-weight: 600;
    background: rgba(252,211,77,0.1); padding: 4px 10px; border-radius: 6px;
    white-space: nowrap;
}

/* Avatar cards carousel */
.avatar-carousel-wrap {
    overflow-x: auto; overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(124,77,255,0.3) transparent;
}
.avatar-carousel-wrap::-webkit-scrollbar { height: 4px; }
.avatar-carousel-wrap::-webkit-scrollbar-thumb { background: rgba(124,77,255,0.3); border-radius: 2px; }
.avatar-carousel { display: flex; gap: 10px; padding-bottom: 4px; }

.avatar-card {
    flex: 0 0 100px;
    background: rgba(255,255,255,0.04);
    border: 2px solid rgba(255,255,255,0.08);
    border-radius: 14px; padding: 10px;
    text-align: center; cursor: pointer;
    transition: all 0.2s;
}
.avatar-card:hover:not(.avatar-card-soon) {
    border-color: rgba(124,77,255,0.6);
    background: rgba(124,77,255,0.12);
}
.avatar-card-soon { cursor: default; opacity: 0.4; }
.avatar-card-soon .avatar-card-gif-wrap { border: 2px dashed rgba(255,255,255,0.06); }
.avatar-card-gif-wrap {
    width: 72px; height: 72px; margin: 0 auto 8px;
    border-radius: 12px; overflow: hidden;
}
.avatar-card-gif {
    width: 100%; height: 100%; object-fit: cover;
}
.avatar-card-placeholder {
    background: rgba(255,255,255,0.03);
    display: flex; align-items: center; justify-content: center;
}
.avatar-card-name { font-size: 11px; font-weight: 700; color: #fff; }
.avatar-ia { color: #6ee7b7; }
.avatar-card-style { font-size: 10px; color: rgba(255,255,255,0.5); margin-top: 1px; }

/* No credits overlay */
.avatar-no-credits { pointer-events: none; }
.avatar-no-credits-overlay {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background: rgba(14,14,18,0.7);
    border-radius: 16px; backdrop-filter: blur(2px);
    pointer-events: auto;
}
.avatar-no-credits-msg {
    font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.7); margin-bottom: 8px;
}
.avatar-buy-credits-btn {
    padding: 6px 16px; background: rgba(124,77,255,0.3);
    border: 1px solid rgba(124,77,255,0.5); border-radius: 8px;
    color: #c4b5fd; font-size: 12px; font-weight: 600; cursor: pointer;
    transition: background 0.2s;
}
.avatar-buy-credits-btn:hover { background: rgba(124,77,255,0.5); }

/* Confirmation inline */
.avatar-confirm-inline {
    display: flex; gap: 16px; align-items: center;
}
.avatar-confirm-info { flex: 1; }

/* Section progress bar */
.avatar-section-processing { min-height: 60px; }
.avatar-section-processing .avatar-section-header { display: flex; align-items: center; gap: 14px; justify-content: flex-start !important; margin-bottom: 10px; }
.avatar-progress-gif {
    width: 56px; height: 56px; border-radius: 10px;
    object-fit: cover; flex-shrink: 0;
    border: 2px solid rgba(124,77,255,0.3);
}
.avatar-progress-bar-section {
    height: 6px; background: rgba(255,255,255,0.08);
    border-radius: 3px; overflow: visible; margin-top: 8px;
    position: relative;
}
.avatar-progress-fill-section {
    height: 100%; border-radius: 3px;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    transition: width 0.5s ease;
    position: relative;
}
.avatar-progress-pct {
    position: absolute; right: 0; top: -20px;
    font-size: 12px; font-weight: 700; color: #fbbf24;
    white-space: nowrap;
}

/* Completed section */
.avatar-section-completed .avatar-section-header { margin-bottom: 0; }
.avatar-completed-actions { display: flex; gap: 8px; }

/* ─── Avatar Confirmation View ─── */
.avatar-confirm-gif {
    width: 64px; height: 64px; border-radius: 10px;
    object-fit: cover; margin-bottom: 8px;
}
.avatar-confirm-msg {
    font-size: 12px; color: rgba(255,255,255,0.55);
    line-height: 1.5; margin: 10px 0 14px; text-align: center;
}
.avatar-confirm-actions { display: flex; gap: 8px; }
.avatar-confirm-btn {
    flex: 1; padding: 8px; border: none; border-radius: 8px;
    background: rgba(16,185,129,0.25); color: #6ee7b7;
    font-size: 13px; font-weight: 600; cursor: pointer;
    transition: background 0.2s;
}
.avatar-confirm-btn:hover { background: rgba(16,185,129,0.4); }
.avatar-cancel-btn {
    flex: 1; padding: 8px; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px;
    background: transparent; color: rgba(255,255,255,0.5);
    font-size: 13px; font-weight: 600; cursor: pointer;
    transition: all 0.2s;
}
.avatar-cancel-btn:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.8); }

/* ─── Avatar Progress Bar ─── */
.avatar-btn-processing {
    min-width: 200px;
    background: rgba(245,158,11,0.12) !important;
    border-color: rgba(245,158,11,0.3) !important;
    color: #fcd34d !important;
}
.avatar-progress-wrap { width: 100%; }
.avatar-progress-text { font-size: 12px; display: block; margin-bottom: 4px; }
.avatar-progress-bar {
    height: 4px; background: rgba(255,255,255,0.08);
    border-radius: 2px; overflow: hidden;
}
.avatar-progress-fill {
    height: 100%; border-radius: 2px;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    transition: width 0.5s ease;
}

/* ─── Avatar Completed Buttons ─── */
.card-preview-linkedin-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 18px;
    background: rgba(0,119,181,0.2);
    border: 1px solid rgba(0,119,181,0.4);
    border-radius: 8px;
    color: #5bb5e8;
    font-size: 13px; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
}
.card-preview-linkedin-btn:hover {
    background: rgba(0,119,181,0.35);
    border-color: rgba(0,119,181,0.6);
    transform: translateY(-1px);
}
.card-preview-linkedin-btn svg { width: 14px; height: 14px; }
.avatar-linkedin-disabled {
    opacity: 0.4; cursor: not-allowed;
}
.avatar-linkedin-disabled:hover {
    background: rgba(0,119,181,0.2);
    border-color: rgba(0,119,181,0.4);
    transform: none;
}
.avatar-completed-wrap { display: flex; gap: 10px; align-items: center; }

.card-preview-download-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 18px;
    background: rgba(16,185,129,0.15);
    border: 1px solid rgba(16,185,129,0.35);
    border-radius: 8px;
    color: #6ee7b7;
    font-size: 13px; font-weight: 600;
    text-decoration: none;
    cursor: pointer; transition: all 0.2s;
}
.card-preview-download-btn:hover {
    background: rgba(16,185,129,0.3);
    border-color: rgba(16,185,129,0.5);
    transform: translateY(-1px);
}
.card-preview-download-btn svg { width: 14px; height: 14px; }

/* ─── Avatar Format Toggle (Standard / Shorts) ─── */
.avatar-format-toggle {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}
.avatar-format-btn {
    padding: 5px 14px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    background: transparent;
    color: rgba(255,255,255,0.45);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.04em;
    transition: all 0.2s;
}
.avatar-format-btn:hover { color: rgba(255,255,255,0.75); border-color: rgba(255,255,255,0.25); }
.avatar-format-btn.active {
    border-color: #6ee7b7;
    color: #6ee7b7;
    background: rgba(110,231,183,0.08);
}

/* ─── Avatar Format Badge (on completed state) ─── */
.avatar-format-badge {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(110,231,183,0.12);
    color: #6ee7b7;
    border: 1px solid rgba(110,231,183,0.25);
    vertical-align: middle;
}

/* ─── Avatar Delete Button ─── */
.avatar-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    border: 1px solid rgba(220,38,38,0.25);
    border-radius: 8px;
    background: rgba(220,38,38,0.1);
    color: #fc8181;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}
.avatar-delete-btn:hover {
    background: rgba(220,38,38,0.22);
    border-color: rgba(220,38,38,0.45);
    transform: translateY(-1px);
}

/* ─── Avatar Delete Confirmation Inline ─── */
.avatar-delete-confirm-inline {
    margin-top: 10px;
    padding: 12px 14px;
    background: rgba(220,38,38,0.08);
    border: 1px solid rgba(220,38,38,0.2);
    border-radius: 8px;
    font-size: 12px;
    color: rgba(255,255,255,0.75);
    line-height: 1.4;
}
.avatar-delete-confirm-inline p { margin: 0 0 10px 0; }
.avatar-delete-confirm-actions { display: flex; gap: 8px; }
.avatar-delete-confirm-btn {
    flex: 1; padding: 7px; border: 1px solid rgba(220,38,38,0.35); border-radius: 8px;
    background: rgba(220,38,38,0.2); color: #fc8181;
    font-size: 12px; font-weight: 600; cursor: pointer;
    transition: all 0.2s;
}
.avatar-delete-confirm-btn:hover { background: rgba(220,38,38,0.35); }
.avatar-delete-confirm-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── LinkedIn Preview Modal ─── */
.li-preview-modal {
    position: relative; width: 100%; max-width: 560px;
    background: rgba(22,22,34,0.97);
    border: 1px solid rgba(0,119,181,0.2);
    border-radius: 16px; padding: 24px;
}
.li-preview-title {
    font-size: 16px; font-weight: 700; color: #fff;
    margin: 0 0 16px; text-align: center;
}
.li-preview-container {
    background: #1b1f23; border-radius: 8px;
    padding: 16px; border: 1px solid rgba(255,255,255,0.08);
}
.li-header { display: flex; gap: 10px; margin-bottom: 12px; align-items: center; }
.li-avatar-placeholder {
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(124,77,255,0.3); color: #c4b5fd;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 700; flex-shrink: 0;
}
.li-author-name { font-size: 14px; font-weight: 600; color: #fff; display: block; }
.li-timestamp { font-size: 11px; color: rgba(255,255,255,0.4); }
.li-body { margin-bottom: 12px; }
.li-commentary-textarea {
    width: 100%; min-height: 140px; padding: 12px;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px; color: #e0e0e0; font-size: 13px;
    line-height: 1.5; resize: vertical; font-family: inherit;
}
.li-commentary-textarea:focus {
    outline: none; border-color: rgba(0,119,181,0.5);
}
.li-media-card {
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px; overflow: hidden;
}
.li-thumbnail-wrapper {
    position: relative; width: 100%; aspect-ratio: 21/9;
    background: #0d0d14;
}
.li-main-thumb {
    width: 100%; height: 100%; object-fit: contain;
    padding: 12px 40px;
}
.li-play-overlay {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.15);
}
.li-play-icon {
    width: 56px; height: 56px; border-radius: 50%;
    background: rgba(0,0,0,0.7);
    border: 2px solid rgba(255,255,255,0.8);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
}
.li-play-icon svg { width: 28px; height: 28px; margin-left: 3px; }
.li-video-player {
    width: 100%; height: 100%; object-fit: contain;
    background: #000; border-radius: 0;
}
.li-link-info {
    padding: 10px 14px;
    background: rgba(255,255,255,0.04);
}
.li-link-title { font-size: 14px; font-weight: 600; color: #70b5f9; }
.li-link-domain { font-size: 11px; color: rgba(255,255,255,0.4); margin-top: 2px; }
.li-preview-actions {
    display: flex; gap: 10px; margin-top: 16px;
}
.li-preview-actions .avatar-confirm-btn {
    background: rgba(0,119,181,0.3); color: #5bb5e8;
    border: 1px solid rgba(0,119,181,0.5);
}
.li-preview-actions .avatar-confirm-btn:hover {
    background: rgba(0,119,181,0.5);
}

/* ─── Announcement Links ─── */
.announcement-link {
    color: #7dd3fc; text-decoration: none;
    transition: color 0.2s;
}
.announcement-link:hover { color: #bae6fd; text-decoration: underline; }

.spinner-sm {
    display: inline-block; width: 12px; height: 12px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #6ee7b7;
    border-radius: 50%;
    animation: spin-sm 0.8s linear infinite;
    vertical-align: middle; margin-right: 4px;
}
@keyframes spin-sm { to { transform: rotate(360deg); } }

.card-preview-source-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 18px;
    background: rgba(124,77,255,0.15);
    border: 1px solid rgba(124,77,255,0.35);
    border-radius: 8px;
    color: #c4b5fd;
    font-size: 13px; font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    letter-spacing: 0.01em;
}
.card-preview-source-btn:hover {
    background: rgba(124,77,255,0.3);
    border-color: rgba(124,77,255,0.6);
    color: #e9d5ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(124,77,255,0.25);
}
.card-preview-source-btn svg { width: 14px; height: 14px; }
.card-preview-source-disabled {
    opacity: 0.35; cursor: not-allowed;
    pointer-events: auto; /* para tooltip */
}
.card-preview-source-disabled:hover {
    background: rgba(124,77,255,0.15);
    border-color: rgba(124,77,255,0.35);
    color: #c4b5fd;
    transform: none;
    box-shadow: none;
}

/* ─── Related Articles ("Te pudiera interesar") ─── */
.card-preview-related {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.related-header {
    display: flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase;
    color: rgba(167,139,250,0.8);
    margin-bottom: 12px;
}
.related-header svg { width: 13px; height: 13px; }

.related-grid {
    display: flex; flex-direction: column; gap: 10px;
}

.related-card {
    display: flex; gap: 12px; align-items: center;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.22,1,0.36,1);
    animation: relatedFadeIn 0.4s ease both;
}
.related-card:hover {
    background: rgba(124,77,255,0.08);
    border-color: rgba(124,77,255,0.2);
    transform: translateX(4px);
}

.related-card-img {
    width: 56px; height: 56px; min-width: 56px;
    border-radius: 8px; overflow: hidden;
    background: rgba(14,14,22,1);
}
.related-card-img img {
    width: 100%; height: 100%; object-fit: cover;
}

.related-card-body {
    display: flex; flex-direction: column; gap: 3px;
    min-width: 0;
}
.related-card-title {
    font-size: 12.5px; font-weight: 600;
    color: var(--text-main);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.related-card-source {
    font-size: 10px; font-weight: 500;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.02em;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

@keyframes relatedFadeIn {
    from { opacity: 0; transform: translateX(-12px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Topic chips en "Te puede interesar" */
.related-topics {
    display: flex; gap: 6px; flex-wrap: wrap;
    margin-bottom: 12px;
}
.related-topic-chip {
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.55);
    font-size: 11px; font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
}
.related-topic-chip:hover {
    border-color: rgba(124,77,255,0.4);
    background: rgba(124,77,255,0.1);
    color: rgba(255,255,255,0.85);
}
.related-topic-chip.active {
    border-color: rgba(124,77,255,0.6);
    background: rgba(124,77,255,0.18);
    color: #c4b5fd;
}
.related-topics-skel {
    display: flex; gap: 6px;
    margin-bottom: 12px;
}
.related-topic-pill-skel {
    width: 72px; height: 24px;
    border-radius: 20px;
    background: linear-gradient(110deg, rgba(255,255,255,0.04) 30%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 70%);
    background-size: 200% 100%;
    animation: shimmer 1.2s ease infinite;
}
.related-empty {
    font-size: 12px;
    color: rgba(255,255,255,0.3);
    text-align: center;
    padding: 16px 0;
}

/* Skeleton loader for related */
.related-skeleton {
    display: flex; gap: 12px; align-items: center;
    padding: 8px 10px;
}
.related-skeleton-img {
    width: 56px; height: 56px; min-width: 56px;
    border-radius: 8px;
    background: linear-gradient(110deg, rgba(255,255,255,0.04) 30%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 70%);
    background-size: 200% 100%;
    animation: shimmer 1.2s ease infinite;
}
.related-skeleton-text {
    flex: 1; height: 32px;
    border-radius: 6px;
    background: linear-gradient(110deg, rgba(255,255,255,0.04) 30%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 70%);
    background-size: 200% 100%;
    animation: shimmer 1.2s ease infinite;
}
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive: volver a layout vertical en móvil */
@media (max-width: 768px) {
    .card-preview-modal { max-width: 520px; }
    .card-preview-body { flex-direction: column; }
    .card-preview-body > .card-preview-content { border-right: none; }
    .card-preview-body > .card-preview-related {
        width: auto; min-width: auto;
        margin-top: 20px;
        padding: 0 24px 24px;
        border-top: 1px solid rgba(255,255,255,0.06);
        padding-top: 18px;
    }
}

/* ─── Card Flip 3D (contenedor real front/back) ─── */
.flip-container {
    perspective: 1200px;
    overflow: visible;
}
.flip-inner {
    position: relative;
    width: 100%; height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.flip-inner.is-flipped {
    transform: rotateY(180deg);
}
.flip-face {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 10px;
    overflow: hidden;
}
.flip-front {
    z-index: 2;
}
.flip-back {
    transform: rotateY(180deg);
    z-index: 1;
}
/* Desactivar feedEntry en cards dentro del flip y en cards post-limpieza */
.flip-back .feed-card,
.no-feed-entry .feed-card,
.feed-card[style*="animation: none"] {
    animation: none !important;
    opacity: 1 !important;
}

/* ─── Responsive ─── */

/* ── Header Feed: Tablet Landscape (768px - 1200px) ── */
@media (max-width: 1200px) {
    .feed-top-row {
        gap: 12px;
    }
    .feed-top-row h1 {
        font-size: 1.75rem;
    }
    .feed-pagination {
        gap: 8px;
    }
    .feed-tag-wrapper {
        min-width: 150px;
        max-width: 280px;
    }
}

/* ── Header Feed: Tablet Portrait (481px - 767px) ── */
@media (max-width: 767px) {
    .feed-top-row {
        gap: 10px;
    }
    .feed-top-row h1 {
        font-size: 1.5rem;
        flex: 1 1 100%;
    }
    .feed-articles-count {
        order: 1;
    }
    #feed-pagination {
        order: 2;
        flex: 1 1 auto;
    }
    .feed-top-row .feed-filters {
        order: 3;
        flex: 1 1 100%;
        gap: 8px;
    }
    /* Show toggle button on mobile */
    .feed-filters-toggle {
        display: flex;
    }
    /* Collapse filters by default on mobile */
    .feed-filters-collapsible {
        display: none;
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    .feed-filters--open .feed-filters-collapsible {
        display: flex;
    }
    .feed-filters-collapsible > select,
    .feed-filters-collapsible .feed-tag-wrapper {
        flex: 1 1 auto;
        min-width: 0;
        max-width: none;
    }
    .announcements-bell {
        order: 0;
        position: absolute;
        top: 12px;
        right: 32px;
    }
    .announcements-panel {
        width: calc(100vw - 48px);
        right: -12px;
    }
}

/* ── Header Feed: Mobile (≤ 480px) ── */
@media (max-width: 480px) {
    .feed-top-row {
        gap: 12px;
        padding-bottom: 14px;
    }
    .feed-top-row h1 {
        font-size: 1.35rem;
        flex: 1 1 100%;
        margin-bottom: 4px;
    }
    .feed-articles-count {
        order: 1;
        flex: 0 0 auto;
        text-align: center;
        font-size: 10px;
        padding: 6px 10px;
    }
    #feed-pagination {
        order: 2;
        flex: 1 1 100%;
        justify-content: center;
        gap: 10px;
    }
    .feed-pagination-goto {
        display: none;
    }
    .feed-pagination-info {
        font-size: 10px;
        min-width: auto;
    }
    .feed-pagination-btn {
        padding: 8px 16px;
        font-size: 10px;
    }
    .feed-top-row .feed-filters {
        order: 3;
        flex: 1 1 100%;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
    }
    .feed-filters-collapsible > select,
    .feed-filters-collapsible > .feed-filter-wrap {
        width: 100%;
        min-width: 0;
    }
    .feed-filters-collapsible .feed-tag-wrapper {
        width: 100%;
        min-width: 0;
        max-width: none;
    }
}

@media (max-width: 1400px) {
    .feed-grid-featured .feed-card:nth-child(1)   { grid-column: span 7; }
    .feed-grid-featured .feed-card:nth-child(2),
    .feed-grid-featured .feed-card:nth-child(3)   { grid-column: span 5; }
    .feed-grid-regular                            { grid-template-columns: repeat(4, 1fr); gap: 22px; }
}
@media (max-width: 1100px) {
    .feed-grid-featured                           { grid-template-columns: repeat(6, 1fr); }
    .feed-grid-featured .feed-card:nth-child(1)   { grid-column: span 4; grid-row: span 2; }
    .feed-grid-featured .feed-card:nth-child(2),
    .feed-grid-featured .feed-card:nth-child(3)   { grid-column: span 2; min-height: 230px; }
    .feed-grid-regular                            { grid-template-columns: repeat(3, 1fr); }
    .feed-grid-featured .feed-card:nth-child(1) .feed-card-title { font-size: 18px; }
    .feed-grid-featured .feed-card:nth-child(2) .feed-card-title,
    .feed-grid-featured .feed-card:nth-child(3) .feed-card-title { font-size: 13.5px; }
}
@media (max-width: 800px) {
    .feed-grid-featured                           { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .feed-grid-featured .feed-card:nth-child(1)   { grid-column: span 2; grid-row: span 1; min-height: 300px; }
    .feed-grid-featured .feed-card:nth-child(n+2) { grid-column: span 1; }
    .feed-grid-featured .feed-card:nth-child(1) .feed-card-title { font-size: 18px; }
    .feed-grid-featured .feed-card:nth-child(2),
    .feed-grid-featured .feed-card:nth-child(3)   { min-height: 200px; }
    .feed-grid-regular                            { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
@media (max-width: 480px) {
    .feed-grid-featured, .feed-grid-regular       { grid-template-columns: 1fr; gap: 10px; }
    .feed-grid-featured .feed-card                { grid-column: span 1 !important; grid-row: span 1 !important; }
    .feed-grid-featured .feed-card:nth-child(1)   { min-height: 260px; }
    .feed-grid-featured .feed-card:nth-child(2),
    .feed-grid-featured .feed-card:nth-child(3)   { min-height: 200px; }
}



