.ak-stats-section {
    width: 100%;
    padding: 35px 0;
}

.ak-stats-heading {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 38px;
}

.ak-stats-heading h2 {
    margin: 0 0 8px;
    color: #051D49;
    font-size: 34px;
    line-height: 1.2;
    font-weight: 700;
    text-transform: uppercase;
}

.ak-stats-heading h2:after {
    content: "";
    display: block;
    width: 68px;
    height: 2px;
    margin: 15px auto 0;
    background: #90292B;
}

.ak-stats-heading p {
    margin: 18px 0 0;
    color: #6b6b6b;
    font-size: 14px;
    line-height: 1.7;
}

.ak-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.ak-stat-card {
    overflow: hidden;
    background: #f3f1f1;
    border: 1px solid #ece8e8;
    transition: transform .25s ease, box-shadow .25s ease;
}

.ak-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(5, 29, 73, .10);
}

.ak-stat-image {
    display: block;
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #e7e4e4;
}

.ak-stat-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.ak-stat-card:hover .ak-stat-image img {
    transform: scale(1.035);
}

.ak-stat-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #051D49, #90292B);
}

.ak-stat-bars {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 75px;
}

.ak-stat-bars i {
    display: block;
    width: 14px;
    background: rgba(255,255,255,.92);
}

.ak-stat-bars i:nth-child(1) { height: 28%; }
.ak-stat-bars i:nth-child(2) { height: 48%; }
.ak-stat-bars i:nth-child(3) { height: 70%; }
.ak-stat-bars i:nth-child(4) { height: 100%; }

.ak-stat-content {
    padding: 22px 20px 24px;
    text-align: center;
}

.ak-stat-date {
    display: block;
    margin-bottom: 6px;
    color: #90292B;
    font-size: 12px;
    font-weight: 600;
}

.ak-stat-content h3 {
    margin: 0 0 12px;
    font-size: 18px;
    line-height: 1.35;
}

.ak-stat-content h3 a {
    color: #051D49;
    text-decoration: none;
}

.ak-stat-content p {
    margin: 0 0 18px;
    color: #626262;
    font-size: 13px;
    line-height: 1.65;
}

.ak-stat-button {
    display: inline-block;
    padding: 9px 18px;
    color: #fff !important;
    background: #90292B;
    border: 1px solid #90292B;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none !important;
    transition: background .2s ease, border-color .2s ease;
}

.ak-stat-button:hover {
    background: #051D49;
    border-color: #051D49;
}

.ak-stats-empty {
    grid-column: 1 / -1;
    padding: 30px;
    text-align: center;
    background: #f7f7f7;
    border: 1px solid #e8e8e8;
}

@media (max-width: 1024px) {
    .ak-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .ak-stats-grid {
        grid-template-columns: 1fr;
    }

    .ak-stats-heading h2 {
        font-size: 28px;
    }
}


/* v1.1.0: tarjetas como modal y botón a la categoría */
.ak-stat-open {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: inherit;
    cursor: pointer;
}

.ak-stat-category {
    display: block;
    margin-bottom: 7px;
    color: #90292B;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
}

.ak-stat-title {
    display: block;
    color: #051D49;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
}

.ak-stat-zoom {
    display: inline-block;
    margin-top: 12px;
    color: #90292B;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.ak-stats-more {
    margin-top: 32px;
    text-align: center;
}

body.ak-modal-open {
    overflow: hidden;
}

.ak-stat-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.ak-stat-modal.is-open {
    display: flex;
}

.ak-stat-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 29, 73, .88);
    cursor: pointer;
}

.ak-stat-modal__dialog {
    position: relative;
    z-index: 2;
    width: min(1100px, 96vw);
    max-height: 92vh;
    overflow: auto;
    background: #fff;
    box-shadow: 0 25px 70px rgba(0,0,0,.35);
}

.ak-stat-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 3;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #90292B;
    color: #fff;
    font-size: 30px;
    line-height: 42px;
    text-align: center;
    cursor: pointer;
}

.ak-stat-modal__content {
    padding: 20px;
    text-align: center;
}

.ak-stat-modal__content img {
    display: block;
    max-width: 100%;
    max-height: 78vh;
    width: auto;
    height: auto;
    margin: 0 auto;
}

.ak-stat-modal__content h3 {
    margin: 18px 0 4px;
    color: #051D49;
    font-size: 20px;
}


/* =========================================================
   v1.2.0 - ARCHIVO DE ESTADÍSTICAS + FILTROS DINÁMICOS
========================================================= */

.ak-stats-archive {
    width: 100%;
    padding: 35px 0;
}

.ak-stats-filters {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
    margin: 0 0 34px;
    padding: 20px;
    background: #f6f6f6;
    border: 1px solid #e8e8e8;
}

.ak-stats-filter-search {
    position: relative;
    flex: 1 1 320px;
}

.ak-stats-filter-search i {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: #90292B;
    pointer-events: none;
}

.ak-stats-filter-search input {
    width: 100%;
    height: 46px;
    padding: 0 15px 0 43px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    outline: none;
}

.ak-stats-filter-search input:focus {
    border-color: #90292B;
}

.ak-stats-filter-group {
    flex: 0 1 180px;
}

.ak-stats-filter-group label {
    display: block;
    margin-bottom: 6px;
    color: #051D49;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.ak-stats-filter-group select {
    width: 100%;
    height: 46px;
    padding: 0 35px 0 12px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    outline: none;
}

.ak-stats-filter-group select:focus {
    border-color: #90292B;
}

.ak-stats-filter-reset {
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid #90292B;
    background: #90292B;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
}

.ak-stats-filter-reset:hover {
    background: #051D49;
    border-color: #051D49;
}

.ak-stats-grid--archive {
    grid-template-columns: repeat(var(--ak-columns, 3), minmax(0, 1fr));
}

.ak-stat-filter-item[hidden] {
    display: none !important;
}

.ak-stat-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 7px;
}

.ak-stat-meta .ak-stat-category {
    margin-bottom: 0;
}

.ak-stat-year {
    color: #777;
    font-size: 11px;
    font-weight: 600;
}

.ak-stat-tags {
    display: block;
    margin-top: 8px;
    color: #777;
    font-size: 11px;
    line-height: 1.45;
}

.ak-stats-filter-empty {
    margin-top: 30px;
    padding: 24px;
    background: rgba(144, 41, 43, .06);
    border-left: 4px solid #90292B;
    color: #555;
    text-align: center;
}

@media (max-width: 1024px) {
    .ak-stats-grid--archive {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .ak-stats-filters {
        display: block;
        padding: 16px;
    }

    .ak-stats-filter-search,
    .ak-stats-filter-group,
    .ak-stats-filter-reset {
        width: 100%;
        max-width: none;
        margin-bottom: 12px;
    }

    .ak-stats-filter-reset {
        margin-bottom: 0;
    }

    .ak-stats-grid--archive {
        grid-template-columns: 1fr;
    }
}
