/* ============================================================
   Anuncios — estilos página pública
   ============================================================ */

/* ── Hero ── */
.anuncios-hero {
    background: linear-gradient(160deg, #f0ece4 0%, #e8f1f8 60%, #ddeaf5 100%);
    border-bottom: 1px solid var(--border-light);
}
.anuncios-hero-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.anuncios-hero-icon {
    width: 70px; height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 18px;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 24px rgba(44,95,138,0.25);
    flex-shrink: 0;
}
.anuncios-hero-icon i { color: #fff; font-size: 1.9rem; }

.anuncios-titulo {
    font-family: 'Lora', serif;
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 .25rem;
}
.anuncios-subtitulo {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin: 0;
}

@media (max-width: 576px) {
    .anuncios-hero-inner { flex-direction: column; text-align: center; }
    .anuncios-titulo { font-size: 1.8rem; }
}

/* ── Keyframes ── */
@keyframes cardEntrada {
    0%   { opacity: 0; transform: perspective(700px) rotateX(-12deg) translateY(36px) scale(.96); }
    70%  { opacity: 1; transform: perspective(700px) rotateX(2deg)   translateY(-4px) scale(1.01); }
    100% { opacity: 1; transform: perspective(700px) rotateX(0)      translateY(0)    scale(1); }
}

@keyframes shimmerSweep {
    0%   { background-position: -250% center; }
    100% { background-position: 250% center; }
}

@keyframes borderPulse {
    0%, 100% { box-shadow: var(--card-glow-base), var(--card-border-glow-sm); }
    50%       { box-shadow: var(--card-glow-base), var(--card-border-glow-lg); }
}

/* ── Lista ── */
.anuncios-lista {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 860px;
    margin: 0 auto;
}

/* ── Card base ── */
.anuncio-card {
    position: relative;
    overflow: hidden;
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem 1.75rem;
    border-left: 5px solid transparent;
    transition: transform .3s cubic-bezier(.34,1.56,.64,1), box-shadow .3s ease;

    --card-glow-base:     0 3px 14px rgba(0,0,0,.08);
    --card-border-glow-sm: 0 0 0 rgba(0,0,0,0);
    --card-border-glow-lg: 0 0 0 rgba(0,0,0,0);

    opacity: 0;
    animation:
        cardEntrada   .65s cubic-bezier(.34,1.56,.64,1) forwards,
        borderPulse   3s  ease-in-out                   infinite,
        shimmerSweep  5s  linear                         infinite;

    background-image: linear-gradient(
        105deg,
        transparent 40%,
        rgba(255,255,255,.55) 50%,
        transparent 60%
    );
    background-size: 250% 100%;
}

/* Entrada escalonada */
.anuncio-card:nth-child(1) { animation-delay: .08s, .8s, 1.2s; }
.anuncio-card:nth-child(2) { animation-delay: .22s, 1s,  1.8s; }
.anuncio-card:nth-child(3) { animation-delay: .36s, 1.2s,2.4s; }
.anuncio-card:nth-child(4) { animation-delay: .50s, 1.4s,3s;   }
.anuncio-card:nth-child(5) { animation-delay: .64s, 1.6s,3.6s; }
.anuncio-card:nth-child(6) { animation-delay: .78s, 1.8s,4.2s; }
.anuncio-card:nth-child(7) { animation-delay: .92s, 2s,  4.8s; }
.anuncio-card:nth-child(8) { animation-delay:1.06s, 2.2s,5.4s; }

/* Hover: levitar + ampliar sombra, pausar shimmer */
.anuncio-card:hover {
    transform: translateY(-6px) scale(1.012);
    animation-play-state: running, running, paused;
}

/* ── Glow por tipo ── */
.anuncio-info {
    border-left-color: #2c5f8a;
    --card-border-glow-sm: -3px 0 8px  rgba(44,95,138,.25);
    --card-border-glow-lg: -3px 0 18px rgba(44,95,138,.55);
}
.anuncio-aviso {
    border-left-color: #c97a00;
    --card-border-glow-sm: -3px 0 8px  rgba(201,122,0,.25);
    --card-border-glow-lg: -3px 0 18px rgba(201,122,0,.55);
}
.anuncio-urgente {
    border-left-color: #b91c1c;
    --card-border-glow-sm: -3px 0 8px  rgba(185,28,28,.25);
    --card-border-glow-lg: -3px 0 18px rgba(185,28,28,.55);
}
.anuncio-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .75rem;
    gap: .75rem;
    flex-wrap: wrap;
}
.anuncio-tipo-badge {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: .2rem .7rem;
    border-radius: 20px;
}
.anuncio-fecha {
    font-size: .8rem;
    color: var(--color-muted, #888);
}
.anuncio-card-titulo {
    font-family: var(--font-heading, 'Lora', serif);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 .6rem;
    color: var(--color-text, #1a1a2e);
}
.anuncio-card-contenido {
    font-size: .97rem;
    line-height: 1.7;
    color: var(--color-text-light, #444);
}
.anuncio-card-contenido p:last-child { margin-bottom: 0; }

.anuncio-vigencia {
    margin-top: .85rem;
    font-size: .82rem;
    font-weight: 500;
    color: var(--text-muted, #6b7280);
    padding-top: .75rem;
    border-top: 1px solid rgba(0,0,0,.08);
}

/* ── Badges por tipo ── */
.anuncio-info    .anuncio-tipo-badge { background: #dbeafe; color: #1e40af; }
.anuncio-aviso   .anuncio-tipo-badge { background: #fef3c7; color: #92400e; }
.anuncio-urgente .anuncio-tipo-badge { background: #fee2e2; color: #991b1b; }

/* ── Sin anuncios ── */
.anuncios-vacio { color: var(--color-muted, #888); }
