/* =========================================================
   PÁGINA DE LISTADO DE ARTÍCULOS - EL AVISO MAGAZINE
   ========================================================= */

/* SECCIÓN PRINCIPAL */
.articles-list-section {
    padding: 30px 0 60px;
    align-items: start;
}

.articles-list-main {
    grid-column: 1 / span 10;
    min-width: 0;
}

/* HERO / HEADER DE LA PÁGINA */
.articles-hero-card {
    background: #ffffff;
    border: 2px solid var(--border, #e2e8f0);
    border-radius: var(--radius, 14px);
    padding: 28px 32px;
    margin-bottom: 28px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.articles-hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.articles-hero-title-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.articles-hero-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--red, #d32027);
    flex-shrink: 0;
}

.articles-hero-heading {
    font-family: "Anton", sans-serif;
    font-weight: 100;
    font-size: 32px;
    line-height: 1.15;
    color: var(--blue, #075ba8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.articles-hero-subtitle {
    font-family: "Inter", sans-serif;
    font-size: 15px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* BUSCADOR DE ARTÍCULOS */
.articles-search-form {
    display: flex;
    gap: 10px;
    max-width: 520px;
    width: 100%;
}

.articles-search-input-wrap {
    position: relative;
    flex: 1;
}

.articles-search-input-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 15px;
}

.articles-search-input {
    width: 100%;
    height: 44px;
    padding: 0 16px 0 40px;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    color: #0f172a;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    outline: none;
    transition: all 0.2s ease;
}

.articles-search-input:focus {
    background: #ffffff;
    border-color: var(--blue, #075ba8);
    box-shadow: 0 0 0 3px rgba(7, 91, 168, 0.12);
}

.articles-search-btn {
    height: 44px;
    padding: 0 20px;
    background: var(--blue, #075ba8);
    color: #ffffff;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.articles-search-btn:hover {
    background: #064987;
}

.articles-search-clear {
    display: inline-flex;
    align-items: center;
    height: 44px;
    padding: 0 14px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    transition: all 0.2s ease;
}

.articles-search-clear:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* RESULTADOS Y CONTEO */
.articles-results-info {
    font-size: 13px;
    color: #64748b;
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* GRID DE ARTÍCULOS */
.articles-catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-bottom: 36px;
}

/* TARJETA DE ARTÍCULO */
.article-catalog-card {
    background: #ffffff;
    border: 2px solid var(--border, #e2e8f0);
    border-radius: var(--radius, 12px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        border-color 0.22s ease;
    text-decoration: none;
    color: inherit;
}

.article-catalog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

/* IMAGEN DEL ARTÍCULO */
.article-catalog-thumb-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #0f172a;
    overflow: hidden;
}

.article-catalog-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.article-catalog-card:hover .article-catalog-thumb {
    transform: scale(1.04);
}

/* BADGES SOBRE LA IMAGEN */
.article-catalog-badge-cat {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--red, #d32027);
    color: #ffffff;
    font-family: "Anton", sans-serif;
    font-weight: 100;
    font-size: 11px;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.article-catalog-badge-lang {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(15, 23, 42, 0.85);
    color: #38bdf8;
    font-family: "Inter", sans-serif;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(2px);
}

/* CONTENIDO DE LA TARJETA */
.article-catalog-body {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.article-catalog-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.article-catalog-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.article-catalog-title {
    font-family: "Anton", sans-serif;
    font-weight: 100;
    font-size: 19px;
    line-height: 1.25;
    color: #0f172a;
    text-transform: uppercase;
    margin: 0 0 10px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.article-catalog-card:hover .article-catalog-title {
    color: var(--blue, #075ba8);
}

.article-catalog-excerpt {
    font-family: "Inter", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #475569;
    margin: 0 0 16px 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* BOTÓN LEER ARTÍCULO */
.article-catalog-read-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 36px;
    padding: 0 16px;
    background: var(--blue, #075ba8);
    color: #ffffff;
    font-family: "Anton", sans-serif;
    font-weight: 100;
    font-size: 13px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: 8px;
    transition: all 0.2s ease;
    margin-top: auto;
}

.article-catalog-card:hover .article-catalog-read-btn {
    background: var(--red, #d32027);
}

.article-catalog-read-btn i {
    transition: transform 0.2s ease;
}

.article-catalog-card:hover .article-catalog-read-btn i {
    transform: translateX(4px);
}

/* =========================================================
   PAGINACIÓN PERSONALIZADA PARA ARTÍCULOS
   ========================================================= */
.articles-custom-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 36px 0 24px 0;
    width: 100%;
}

.custom-page-list {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.custom-page-list .page-item {
    display: inline-flex;
    list-style: none;
}

.custom-page-list .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 42px;
    height: 42px;
    padding: 0 16px;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    user-select: none;
}

.custom-page-list a.page-link:hover {
    background: #f1f5f9;
    color: var(--blue, #075ba8);
    border-color: var(--blue, #075ba8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(7, 91, 168, 0.15);
}

.custom-page-list .page-item.active .page-link {
    background: var(--blue, #075ba8);
    border-color: var(--blue, #075ba8);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(7, 91, 168, 0.3);
    cursor: default;
}

.custom-page-list .page-item.disabled .page-link {
    background: #f8fafc;
    color: #94a3b8;
    border-color: #e2e8f0;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.6;
}

.custom-page-list i {
    font-size: 12px;
}

/* Evitar que SVGs gigantes desconfiguren el layout */
.articles-custom-pagination svg {
    display: none !important;
}

/* ESTADO VACÍO */
.articles-empty-box {
    grid-column: 1 / -1;
    background: #ffffff;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 50px 20px;
    text-align: center;
}

.articles-empty-icon {
    font-size: 48px;
    color: #94a3b8;
    margin-bottom: 16px;
}

.articles-empty-title {
    font-family: "Anton", sans-serif;
    font-weight: 100;
    font-size: 22px;
    color: #334155;
    margin: 0 0 8px 0;
}

.articles-empty-text {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 20px 0;
}

/* PUBLICIDAD LATERAL */
.articles-detail-sidebar {
    grid-column: 11 / span 2;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.articles-side-ad-card {
    display: block;
    width: 220px;
    border-radius: var(--radius, 12px);
    overflow: hidden;
    border: 2px solid var(--border, #e2e8f0);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

.articles-side-ad-card:hover {
    transform: translateY(-3px);
}

.articles-side-ad-card img {
    width: 100%;
    height: auto;
    display: block;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1199px) {
    .articles-list-section {
        display: flex !important;
        flex-direction: column !important;
        gap: 24px;
    }

    .articles-list-main {
        width: 100% !important;
    }

    .articles-catalog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .articles-detail-sidebar {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .articles-hero-card {
        padding: 20px 16px;
    }

    .articles-hero-heading {
        font-size: 24px;
    }

    .articles-search-form {
        max-width: 100%;
        flex-direction: column;
    }

    .articles-catalog-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}
