/* =========================================================
   Actions Blog Filter - Estilos
   ========================================================= */

.abf-wrapper {
    max-width: 1200px;
    margin: 0 auto 40px;
    font-family: inherit;
    color: #222;
}

/* ---------- Barra de filtros ---------- */
.abf-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    background: #f6f6f6;
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 28px;
}

.abf-field {
    position: relative;
    flex: 1 1 180px;
    min-width: 160px;
    margin: 0;
    padding: 0;
}

.abf-field-search {
    flex: 2 1 320px;
}

/* Selectores de año/mes más compactos */
.abf-field-year,
.abf-field-month {
    flex: 0 1 140px;
    min-width: 120px;
}

.abf-search-input,
.abf-category-select,
.abf-year-select,
.abf-month-select {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 2px solid #1bb5c5;
    border-radius: 30px;
    background: #fff;
    font-size: 15px;
    color: #222;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
    margin: 0;
    line-height: normal;
}

.abf-search-input:focus,
.abf-category-select:focus,
.abf-year-select:focus,
.abf-month-select:focus {
    border-color: #0d8a99;
    box-shadow: 0 0 0 3px rgba(27, 181, 197, 0.15);
}

.abf-category-select,
.abf-year-select,
.abf-month-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231bb5c5' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

/* Botón "limpiar" discreto con icono */
.abf-reset-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #d0d0d0;
    border-radius: 50%;
    background: transparent;
    color: #888;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color .2s, border-color .2s, color .2s, transform .1s;
    flex: 0 0 auto;
}

.abf-reset-btn:hover {
    background: #e8e8e8;
    border-color: #b0b0b0;
    color: #555;
}

.abf-reset-btn:active {
    transform: scale(0.92);
}

.abf-reset-btn svg {
    display: block;
}

/* ---------- Autosuggest ---------- */
.abf-suggest {
    list-style: none !important;
    margin: 6px 0 0;
    padding: 6px 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e3e6ea;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    max-height: 380px;
    overflow-y: auto;
    z-index: 99;
    display: none;
}

.abf-suggest-item {
    margin: 0;
    padding: 0;
    list-style: none !important;
}

.abf-suggest-item::before,
.abf-suggest-item::marker {
    content: none !important;
    display: none !important;
}

.abf-suggest-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    color: #222;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background-color .15s, border-color .15s;
}

.abf-suggest-item a:hover,
.abf-suggest-item a:focus {
    background: #f2fbfc;
    border-left-color: #1bb5c5;
}

.abf-suggest-title {
    flex: 1;
    font-size: 14px;
    line-height: 1.3;
    color: #222;
}

.abf-suggest-title strong {
    color: #1bb5c5;
    font-weight: 700;
}

.abf-suggest-date {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
}

/* ---------- Resultados ---------- */
.abf-results {
    min-height: 120px;
    position: relative;
}

.abf-results.abf-loading {
    opacity: .6;
}

.abf-loader {
    text-align: center;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.abf-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid rgba(27, 181, 197, 0.18);
    border-top-color: #1bb5c5;
    border-radius: 50%;
    animation: abf-spin 0.8s linear infinite;
}

@keyframes abf-spin {
    to { transform: rotate(360deg); }
}

.abf-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

.abf-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

@media (max-width: 900px) {
    .abf-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .abf-grid { grid-template-columns: 1fr; }
    .abf-field,
    .abf-field-year,
    .abf-field-month { flex: 1 1 100%; }
    .abf-reset-btn { margin-left: auto; }
}

/* ---------- Card ---------- */
.abf-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transition: transform .25s, box-shadow .25s;
    display: flex;
    flex-direction: column;
}

.abf-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
}

.abf-card-link {
    color: inherit;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.abf-card-thumb {
    width: 100%;
    padding-top: 58%;
    background-size: cover;
    background-position: center;
    background-color: #eef2f5;
}

.abf-card-thumb-placeholder {
    background: linear-gradient(135deg, #1bb5c5 0%, #0d8a99 100%);
}

.abf-card-body {
    padding: 18px 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.abf-card-cat {
    display: inline-block;
    align-self: flex-start;
    background: rgba(27, 181, 197, 0.12);
    color: #0d8a99;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 4px 10px;
    border-radius: 20px;
}

.abf-card-title {
    margin: 0;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 700;
    color: #1a1a1a;
}

.abf-card-date {
    margin-top: auto;
    font-size: 12px;
    color: #888;
}

/* ---------- Paginación ---------- */
.abf-pagination {
    margin-top: 32px;
}

.abf-pages {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none !important;
    padding: 0;
    margin: 0;
}

.abf-pages > li {
    list-style: none !important;
    margin: 0;
    padding: 0;
    display: inline-flex;
}

.abf-pages > li::before,
.abf-pages > li::marker {
    content: none !important;
    display: none !important;
}

.abf-page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 2px solid #1bb5c5;
    background: #fff;
    color: #1bb5c5;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .2s, color .2s;
    line-height: 1;
}

.abf-page-btn:hover {
    background: #1bb5c5;
    color: #fff;
}

.abf-page-active {
    background: #1bb5c5;
    color: #fff;
}

.abf-page-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    color: #888;
    list-style: none !important;
}
