/* Parte 2/4 del feed (split Anti-Monolith 2026-10-13, PLAN-2026-10-13-anti-monolith-rojos fila 10).
   Orden de cascada en index.html: feed.css → feed-cards.css → feed-toolbar.css → feed-responsive.css
   (antes de feed-preview.css). Los tramos son contiguos: no reordenar ni mover reglas entre archivos. */

/* ══ 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;
    /* flex-wrap:wrap (no nowrap) — con muchos tags seleccionados, los chips
       de .feed-active-tags-inline deben poder pasar a una nueva línea DENTRO
       de este contenedor (crece en alto) en vez de desbordar horizontalmente
       fuera del cuadro (overflow:visible dejaba que se salieran de la barra
       de filtros, cortados/fuera de pantalla — bug reportado 2026-09-08). */
    display: flex; flex-wrap: wrap; 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: wrap; gap: 6px; }
.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;
}

