/**
 * VilaTec 2.0 — CSS: Página de Listado de Actualidad (Blog)
 * Estética premium oscura con cristalmorfismo, transiciones suaves y tarjetas responsivas.
 */

#actualidad-page {
    background-color: #05070a;
    color: #cbd5e1;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
}

/* ─── BLOG HERO ────────────────────────────────────────── */
.blog-hero {
    position: relative;
    padding: 10rem 0 2rem 0;
    min-height: 360px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: #090d16;
}

.blog-hero__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(50px) brightness(0.25);
    transform: scale(1.15);
    opacity: 0.5;
    z-index: 1;
}

.blog-hero__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(5, 7, 10, 0.3) 0%, rgba(5, 7, 10, 1) 100%);
    z-index: 2;
}

.blog-hero__glow {
    position: absolute;
    top: -10%;
    right: 15%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.08) 0%, transparent 70%);
    filter: blur(60px);
    pointer-events: none;
    z-index: 2;
}

.blog-hero__container {
    position: relative;
    z-index: 3;
    width: 100%;
}

.blog-hero__content {
    max-width: 800px;
}

.blog-hero__badge {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
    padding: 0.3rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.blog-hero__title {
    font-size: clamp(2.25rem, 6vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    font-family: 'Outfit', 'Inter', sans-serif;
}

.blog-hero__subtitle {
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    line-height: 1.65;
    color: #94a3b8;
    font-weight: 400;
}

/* ─── GRID DE BLOG ─────────────────────────────────────── */
.blog-list-section {
    position: relative;
    padding-top: 1rem !important;
    padding-bottom: 6rem;
    z-index: 5;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 2.5rem;
    margin-bottom: 4rem;
}

@media (max-width: 480px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }
}

/* ─── TARJETAS DEL BLOG ─────────────────────────────────── */
.blog-card {
    background: rgba(17, 24, 39, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1.25rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(10px);
    text-decoration: none;
    color: inherit;
}

.blog-card:hover {
    transform: translateY(-8px);
    border-color: rgba(245, 158, 11, 0.25);
    background: rgba(17, 24, 39, 0.7);
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.5), 
                0 0 20px -5px rgba(245, 158, 11, 0.05);
}

/* Imagen de la tarjeta */
.blog-card__media {
    position: relative;
    padding-top: 56.25%; /* Ratio 16:9 */
    overflow: hidden;
    background-color: #090d16;
}

.blog-card__img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card:hover .blog-card__img {
    transform: scale(1.06);
}

.blog-card__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 40%, rgba(5, 7, 10, 0.7) 100%);
    z-index: 1;
}

.blog-card__badge {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 2;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f59e0b;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
}

/* Contenido de la tarjeta */
.blog-card__content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card__date {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.blog-card__date span {
    font-size: 0.95rem;
}

.blog-card__title {
    font-size: 1.25rem;
    line-height: 1.4;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
}

.blog-card__excerpt {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #94a3b8;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #f59e0b;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: gap 0.3s ease;
    align-self: flex-start;
    margin-top: auto;
}

.blog-card__cta span:last-child {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card__cta {
    color: #fbbf24;
}

.blog-card:hover .blog-card__cta span:last-child {
    transform: translateX(4px);
}

/* ─── PAGINACIÓN ───────────────────────────────────────── */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
    background: rgba(17, 24, 39, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    backdrop-filter: blur(10px);
}

.blog-pagination__btn, .blog-pagination__page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    background: transparent;
    border: none;
}

.blog-pagination__btn {
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
}

.blog-pagination__btn:hover:not(.disabled) {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.3);
}

.blog-pagination__btn.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.blog-pagination__page:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.blog-pagination__page.active {
    background: #f59e0b;
    color: #05070a;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

/* ─── EMPTY STATE ──────────────────────────────────────── */
.blog-empty-state {
    text-align: center;
    padding: 6rem 2rem;
    background: rgba(17, 24, 39, 0.3);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    max-width: 600px;
    margin: 2rem auto;
}
