/* ========================================
   ADVANCED SEARCH FILTER - STYLES
   ======================================== */

/* Contenedor principal */
.asf-search-filter-wrapper {
    width: 100%;
    margin: 40px 0;
}

.ct-wiki-card {color: #ffffff !important;}
/* ========================================
   BARRA DE BÚSQUEDA Y FILTROS
   ======================================== */


.asf-search-input-wrapper {
    position: relative;
    overflow: hidden;
}
button.asf-clear-button {
    margin: 0;
    border: 0;
    padding: 11px;
    background: #314158;
    color: white;
}
button.asf-clear-button:hover {
    background: #314158 !important;
    opacity: 0.8;
}
.asf-search-input-wrapper button.asf-search-button {
    border: 0;
    background: #F3F4F6;
    margin: 0;
    color: #637381;
    padding: 11px 30px;
}
.asf-search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.asf-search-input:focus {
    outline: none;
    border-color: #7cb342;
    box-shadow: 0 0 0 3px rgba(124, 179, 66, 0.1);
}

/* Filtros */
.asf-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.asf-filter-group {
    flex: 1;
    min-width: 180px;
}

.asf-filter-select,
.asf-date-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.asf-filter-select:focus,
.asf-date-input:focus {
    outline: none;
    border-color: #7cb342;
    box-shadow: 0 0 0 3px rgba(124, 179, 66, 0.1);
}

/* Filtro de fecha */
.asf-date-filter {
    display: flex;
    gap: 8px;
    align-items: center;
}

.asf-date-separator {
    color: #999;
    font-weight: 500;
}

.asf-date-input {
    flex: 1;
}

.asf-date-input.asf-date-invalid,
.asf-date-input.asf-date-range-invalid {
    border-color: #e53935;
    background-color: #fff5f5;
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
}

.asf-date-input.asf-date-invalid::placeholder,
.asf-date-input.asf-date-range-invalid::placeholder {
    color: #e53935;
}

.asf-date-range-error {
    color: #e53935;
    font-size: 12px;
    margin-top: 6px;
    width: 100%;
    text-align: center;
}

/* Botón de búsqueda */
.asf-search-button {
    padding: 10px 30px;
    background-color: #7cb342;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.asf-search-button:hover {
    background-color: #689f38;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 179, 66, 0.3);
}

.asf-search-button:active {
    transform: translateY(0);
}

.asf-clear-button {
    padding: 10px 24px;
    background-color: #f5f5f5;
    color: #666;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    margin-left: 10px;
}

.asf-clear-button:hover {
    background-color: #e0e0e0;
    border-color: #999;
    color: #333;
}

.asf-clear-button:active {
    transform: translateY(0);
}

/* ========================================
   ÁREA DE RESULTADOS
   ======================================== */

.asf-results-wrapper {
    position: relative;
    min-height: 300px;
}

/* Loading */
.asf-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
}

.asf-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #7cb342;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.asf-loading p {
    color: #666;
    font-size: 16px;
}

/* ========================================
   GRID LAYOUT (BLOG)
   ======================================== */

.asf-results-grid.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.asf-results-grid.loading {
    opacity: 0.4;
    pointer-events: none;
}

.asf-post-card-grid {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.asf-post-card-grid:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.asf-post-thumbnail {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.asf-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.asf-post-card-grid:hover .asf-post-thumbnail img {
    transform: scale(1.05);
}

.asf-post-category {
    position: absolute;
    bottom: 15px;
    left: 15px;
    padding: 6px 14px;
    background-color: #7cb342;
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.asf-post-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.asf-post-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #666;
    flex-wrap: wrap;
}

.asf-post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.asf-post-meta svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.asf-post-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    line-height: 1.4;
}

.asf-post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.asf-post-title a:hover {
    color: #7cb342;
}

.asf-post-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-top: auto;
}

/* ========================================
   LIST LAYOUT (WIKI)
   ======================================== */

.asf-results-grid.list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.asf-post-card-list {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    display: flex;
    gap: 20px;
}

.asf-post-card-list:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateX(5px);
}

.asf-post-thumbnail-small {
    flex-shrink: 0;
    width: 180px;
    height: 120px;
    border-radius: 6px;
    overflow: hidden;
}

.asf-post-thumbnail-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.asf-post-card-list:hover .asf-post-thumbnail-small img {
    transform: scale(1.05);
}

.asf-post-content-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.asf-post-category-badge {
    display: inline-block;
    padding: 4px 12px;
    background-color: #76B82A !important;
    color: white;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
}

.asf-post-title-list {
    margin: 0;
    font-size: 20px;
    line-height: 1.3;
}

.asf-post-title-list a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.asf-post-title-list a:hover {
    color: #7cb342;
}

.asf-post-excerpt-list {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    flex: 1;
}

.asf-post-meta-list {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #666;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.asf-post-meta-list span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.asf-post-meta-list svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

/* ========================================
   PAGINACIÓN
   ======================================== */

.asf-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    padding: 20px 0;
}

.asf-pagination-button {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.asf-pagination-button:hover:not(:disabled) {
    background: #7cb342;
    color: white;
    border-color: #7cb342;
}

.asf-pagination-button.active {
    background: #7cb342;
    color: white;
    border-color: #7cb342;
    font-weight: 600;
}

.asf-pagination-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.asf-pagination-info {
    padding: 0 15px;
    color: #666;
    font-size: 14px;
}

/* ========================================
   NO RESULTS
   ======================================== */

.asf-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 16px;
}

/* ========================================
   PLACEHOLDER DE IMÁGENES
   ======================================== */

.asf-post-no-thumbnail,
.asf-post-no-thumbnail-small {
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.asf-placeholder-image,
.asf-placeholder-image-small {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}

.asf-placeholder-image svg,
.asf-placeholder-image-small svg {
    opacity: 0.3;
}

/* Card sin thumbnail tiene más padding en contenido */
.asf-post-card-grid.no-thumbnail .asf-post-content {
    padding-top: 30px;
}

/* Asegurar que las imágenes se carguen correctamente */
.asf-post-thumbnail img,
.asf-post-thumbnail-small img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Fix para imágenes que no cargan */
.asf-post-thumbnail img[src=""],
.asf-post-thumbnail-small img[src=""] {
    display: none;
}

/* ========================================
   WPFORO BADGE
   ======================================== */

.asf-wpforo-badge {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 4px rgba(255, 152, 0, 0.3);
}

.asf-badges-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* Efecto hover para tarjetas de wpForo */
.asf-post-card[data-post-type="wpforo"]:hover {
    border-left: 3px solid #ff9800;
}

/* ========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
    .asf-search-bar {
        padding: 15px;
    }
    
    .asf-filters {
        flex-direction: column;
    }
    
    .asf-filter-group {
        width: 100%;
        min-width: 100%;
    }
    
    .asf-search-button {
        width: 100%;
    }
    
    .asf-results-grid.grid {
        grid-template-columns: 1fr;
    }
    
    .asf-post-card-list {
        flex-direction: column;
    }
    
    .asf-post-thumbnail-small {
        width: 100%;
        height: 200px;
    }
    
    .asf-post-meta,
    .asf-post-meta-list {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .asf-post-title {
        font-size: 16px;
    }
    
    .asf-post-title-list {
        font-size: 18px;
    }
    
    .asf-pagination {
        flex-wrap: wrap;
    }
}


/* ============================================
   ADVANCED SEARCH FILTER - POPUP STYLES
   ============================================ */

/* Prevenir scroll cuando el modal está abierto */
body.asf-modal-active {
    overflow: hidden;
}

button.asf-modal-close {
    width: 40px;
    height: 40px;
    display: flex;
    padding: 0;
    border-radius: 50%;
    color: #111928;
    border-color: #e0e0e0;
}

/* ============================================
   BARRA DE BÚSQUEDA MEJORADA
   ============================================ */
.asf-search-main-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

/* Botón de Filtros */
.asf-filters-button {
    border-color: #CED4DA !important;
    color: #637381 !important;
    padding: 10px 20px !important;
}

.asf-filters-button:hover {
    background: #eeeeee !important;
    border-color: #7cb342 !important;
    color: #7cb342 !important;
}

.asf-filters-button svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.asf-filters-button:hover svg {
    transform: rotate(180deg);
}

/* Badge contador de filtros activos */
.asf-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: #7cb342;
    color: white;
    border-radius: 11px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 4px;
}

/* Input de búsqueda */
.asf-search-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid #CED4DA;
    border-radius: 10px !important;
}

.asf-search-icon {
    position: absolute;
    left: 16px;
    color: #999;
    pointer-events: none;
}

.asf-search-input {
    padding-left: 2.5rem !important;
    font-size: 15px;
    border: 0 !important;
}

.asf-search-input:focus {
    outline: none;
    border-color: #7cb342;
    box-shadow: 0 0 0 3px rgba(124, 179, 66, 0.1);
}

/* Botón de búsqueda */
.asf-search-button {
    padding: 12px 28px;
    background: #7cb342;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.asf-search-button:hover {
    background: #689f38;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 179, 66, 0.3);
}

/* Botón limpiar búsqueda */
.asf-clear-button {
    padding: 12px 24px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    color: #666;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.asf-clear-button:hover {
    background: #f5f5f5;
    border-color: #d32f2f;
    color: #d32f2f;
}

/* ============================================
   POPUP MODAL DE FILTROS
   ============================================ */

.asf-filters-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
}

/* Overlay oscuro de fondo */
.asf-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: asfFadeIn 0.3s ease;
}

@keyframes asfFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Contenedor del modal */
.asf-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.asf-modal-content.asf-modal-open {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* Header del modal */
.asf-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid #e0e0e0;
}

.asf-modal-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #333;
}

.asf-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
}

.asf-modal-close:hover {
    background: #e0e0e0;
    transform: rotate(90deg);
    color: #333;
}

/* Body del modal (contenido scrolleable) */
.asf-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 28px;
}

/* Scrollbar personalizado para el modal */
.asf-modal-body::-webkit-scrollbar {
    width: 8px;
}

.asf-modal-body::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 4px;
}

.asf-modal-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.asf-modal-body::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Grupos de filtros dentro del modal */
.asf-filter-group {
    margin-bottom: 24px;
}

.asf-filter-group:last-child {
    margin-bottom: 0;
}

/* Labels de los filtros con iconos */
.asf-filter-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    margin-bottom: 10px;
}

.asf-filter-label svg {
    color: #7cb342;
}

/* Selects de filtros */
.asf-filter-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    color: #333;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.asf-filter-select:focus {
    outline: none;
    border-color: #7cb342;
    box-shadow: 0 0 0 3px rgba(124, 179, 66, 0.1);
}

.asf-filter-select:hover {
    border-color: #7cb342;
}

/* Wrapper de rango de fechas */
.asf-date-range-wrapper {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.asf-date-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.asf-date-input:focus {
    outline: none;
    border-color: #7cb342;
    box-shadow: 0 0 0 3px rgba(124, 179, 66, 0.1);
}

.asf-date-separator {
    font-size: 14px;
    color: #999;
    white-space: nowrap;
}


/* Footer del modal */
.asf-modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px 28px;
    border-top: 1px solid #e0e0e0;
    background: #fafafa;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    flex-direction: column-reverse;
}
button.asf-modal-clear {
    background: #fafafa;
    border-color: #e0e0e0;
    color: #555;
}
button.asf-modal-clear:hover {
   background: #fafafa;
   opacity: 0.8; 
}
button.asf-modal-apply {
     border-color: #7cb342;
     background:  #7cb342;
     color: white;
}

button.asf-modal-apply:hover {
    background:  #7cb342;
    opacity: 0.8;
}

button.asf-filters-button {
    background: none !important;
}

/* Botón limpiar filtros */
.asf-modal-clear {
    flex: 1;
    padding: 14px 24px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.asf-modal-clear:hover {
    background: #f5f5f5;
    border-color: #999;
    color: #333;
}

/* Botón aplicar filtros */
.asf-modal-apply {
    flex: 1;
    padding: 14px 24px;
    background: #7cb342;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.asf-modal-apply:hover {
    background: #689f38;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 179, 66, 0.3);
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */

@media (max-width: 768px) {
    .asf-search-main-row {
        flex-wrap: wrap;
    }
    
    .asf-filters-button {
        order: -1;
        width: 100%;
        justify-content: center;
    }
    
    .asf-search-input-wrapper {
        width: 100%;
        order: 1;
    }
    
    .asf-search-button {
        order: 2;
        flex: 1;
    }
    
    .asf-clear-button {
        order: 3;
        flex: 1;
    }
    
    .asf-modal-content {
        width: 95%;
        max-height: 90vh;
        border-radius: 12px;
    }
    
    .asf-modal-header {
        padding: 20px;
    }
    
    .asf-modal-header h3 {
        font-size: 20px;
    }
    
    .asf-modal-body {
        padding: 20px;
    }
    
    .asf-modal-footer {
        padding: 16px 20px;
        flex-direction: column;
    }
    
    .asf-modal-clear,
    .asf-modal-apply {
        width: 100%;
    }
    
    .asf-date-range-wrapper {
        flex-direction: column;
    }
    
}

@media (max-width: 480px) {
    .asf-search-bar {
        padding: 16px;
        border-radius: 8px;
    }
    
    .asf-filters-button {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .asf-search-input {
        padding: 10px 14px 10px 44px;
        font-size: 14px;
    }
    
    .asf-search-button,
    .asf-clear-button {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* ============================================
   ESTADOS DE LOADING Y ERROR
   ============================================ */

.asf-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.asf-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #7cb342;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.asf-error-message {
    text-align: center;
    padding: 40px 20px;
}

.asf-error-message p {
    color: #d32f2f;
    font-size: 16px;
    margin: 0;
}

/* ============================================
   ÁREA DE RESULTADOS
   ============================================ */

.asf-results-wrapper {
    margin-top: 30px;
}

.asf-results-grid {
    display: grid;
    gap: 24px;
    margin-bottom: 40px;
}

.asf-results-grid.grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.asf-results-grid.list {
    grid-template-columns: 1fr;
}

.asf-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 18px;
}

/* ============================================
   CARDS DE POSTS
   ============================================ */

.asf-post-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.asf-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.asf-post-thumbnail {
    position: relative;
    padding-top: 60%;
    overflow: hidden;
}

.asf-post-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.asf-post-card:hover .asf-post-thumbnail img {
    transform: scale(1.05);
}

.asf-post-category {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 14px;
    background: #7cb342;
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.asf-post-content {
    padding: 20px;
}

.asf-post-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 12px;
    font-size: 13px;
    color: #999;
}

.asf-post-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.asf-post-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    line-height: 1.4;
}

.asf-post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.asf-post-title a:hover {
    color: #7cb342;
}

.asf-post-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* ============================================
   PAGINACIÓN
   ============================================ */

.asf-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 30px 0;
}

.asf-pagination-button {
    padding: 10px 16px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.asf-pagination-button:hover:not(:disabled) {
    background: #7cb342;
    border-color: #7cb342;
    color: white;
}

.asf-pagination-button.active {
    background: #7cb342;
    border-color: #7cb342;
    color: white;
}

.asf-pagination-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.asf-pagination-ellipsis {
    padding: 10px;
    color: #999;
}

.asf-pagination-info {
    width: 100%;
    text-align: center;
    margin-top: 16px;
    color: #999;
    font-size: 14px;
}

/* ============================================
   RESPONSIVE - TABLETS
   ============================================ */

@media (max-width: 1024px) {
    .asf-results-grid.grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .asf-results-grid.grid {
        grid-template-columns: 1fr;
    }

    .asf-post-card {
        border-radius: 8px;
    }
}

/* ============================================
   TESAURO AUTOCOMPLETE
   ============================================ */

.asf-tesauro-autocomplete-wrapper {
    position: relative;
    min-width: 250px;
}

.asf-tesauro-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.asf-tesauro-search-input {
    width: 100%;
    padding: 10px 35px 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background-color: #fff;
    transition: all 0.3s ease;
}

.asf-tesauro-search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.asf-tesauro-search-input:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.asf-tesauro-search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}

.asf-tesauro-clear-btn {
    position: absolute;
    right: 35px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
}

.asf-tesauro-clear-btn:hover {
    color: #d32f2f;
}

/* Contenedor de resultados */
.asf-tesauro-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 300px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #667eea;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
}

.asf-tesauro-result-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
}

.asf-tesauro-result-item:last-child {
    border-bottom: none;
}

.asf-tesauro-result-item:hover,
.asf-tesauro-result-item.active {
    background: #e8f0fe;
}

.asf-tesauro-result-main {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.asf-tesauro-code {
    display: inline-block;
    padding: 2px 6px;
    background: #667eea;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 3px;
    font-family: monospace;
}

.asf-tesauro-name {
    font-weight: 500;
    color: #333;
}

.asf-tesauro-count {
    font-size: 12px;
    color: #999;
    margin-left: auto;
}

.asf-tesauro-result-path {
    margin-top: 4px;
    font-size: 11px;
    color: #888;
}

.asf-tesauro-hierarchy {
    color: #667eea;
}

/* Estados de carga y mensajes */
.asf-tesauro-loading,
.asf-tesauro-no-results,
.asf-tesauro-error {
    padding: 15px;
    text-align: center;
    color: #666;
    font-size: 13px;
}

.asf-tesauro-error {
    color: #d32f2f;
}

/* Término seleccionado */
.asf-tesauro-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding: 8px 12px;
    background: #7cb342;
    border-radius: 6px;
    color: #fff;
}

.asf-tesauro-selected-text {
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    margin-right: 10px;
}

.asf-tesauro-remove-btn {
    background: rgba(255,255,255,0.2);
    border: none !important;
    color: #fff !important;
    font-size: 16px !important;
    cursor: pointer !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    line-height: 1 !important;
    transition: background 0.2s ease;
}

.asf-tesauro-remove-btn:hover {
    background: rgba(255,255,255,0.3) !important;
}

/* Indicador de API en resultados */
.asf-tesauro-api-indicator {
    display: inline-block;
    color: #667eea;
    font-size: 10px;
    margin-left: 4px;
    vertical-align: super;
}

/* Badge de fuente de resultados */
.asf-tesauro-source-badge {
    padding: 6px 12px;
    background: #7cb342;
    color: white;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

/* Mejora del resultado con jerarquía */
.asf-tesauro-result-path {
    margin-top: 4px;
    font-size: 11px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 4px;
}

.asf-tesauro-result-path .asf-tesauro-hierarchy {
    color: #667eea;
    font-weight: 500;
}

/* Animación de carga mejorada */
.asf-tesauro-loading {
    padding: 20px;
    text-align: center;
    color:#7cb342;
    font-size: 14px;
    animation: asfPulse 1.5s ease-in-out infinite;
}

@keyframes asfPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Estilo para resultado item hover mejorado */
.asf-tesauro-result-item:hover {
    background: #7cb342;
}

.asf-tesauro-result-item.active {
    background: #7cb342;
    color: white;
}

.asf-tesauro-result-item.active .asf-tesauro-name,
.asf-tesauro-result-item.active .asf-tesauro-count,
.asf-tesauro-result-item.active .asf-tesauro-hierarchy,
.asf-tesauro-result-item.active .asf-tesauro-result-path {
    color: white;
}

.asf-tesauro-result-item.active .asf-tesauro-code {
    background: rgba(255, 255, 255, 0.3);
}

.asf-tesauro-result-item.active .asf-tesauro-api-indicator {
    color: #ffd700;
}

/* Responsive para autocomplete tesauro */
@media (max-width: 768px) {
    .asf-tesauro-autocomplete-wrapper {
        min-width: 100%;
    }

    .asf-tesauro-results {
        max-height: 250px;
    }
}