/**
 * Estilos para el Filtro Combinado AJAX (fma-card-styles.css)
 */

/* ------------------------------------------------ */
/* 1. Estilos del Formulario de Filtro Combinado */
/* ------------------------------------------------ */

.combined-filter-form {
    margin-bottom: 40px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background-color: #f9f9f9;
    
    /* Mostrar filtros lado a lado */
    display: flex;
    gap: 30px;
    flex-wrap: wrap; 
    align-items: flex-end; 
}

.fma-filter-group {
    display: flex;
    flex-direction: column;
}

.fma-filter-group label {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

#fma-select-month, #fma-select-category {
    padding: 10px 15px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 1em;
    min-width: 250px;
    cursor: pointer;
    background-color: #fff;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23000000%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13%205.4L146.2%20208.7L18.4%2074.9c-2.4-2.5-5.3-3.8-8.8-3.8-3.5%200-6.4%201.3-8.8%203.8%20-.9.9-1.5%202-1.9%203.4-.3%201.3-.4%202.7-.4%204.2%200%201.5.1%202.9.4%204.2.4%201.4%201%202.5%201.9%203.4L138.8%20224c2.5%202.5%205.4%203.8%208.8%203.8s6.3-1.3%208.8-3.8l120.4-118c.9-.9%201.5-2%201.9-3.4.3-1.3.4-2.7.4-4.2s-.1-2.9-.4-4.2c-.4-1.4-1-2.5-1.9-3.4z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
    background-size: 12px auto;
    padding-right: 30px;
}

/* ------------------------------------------------ */
/* 2. Estilos de la Cuadrícula y las Tarjetas */
/* ------------------------------------------------ */

.fma-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.fma-post-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    background-color: #ffffff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.fma-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.fma-post-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex-grow: 1; 
}

/* Estilos de Overlay (Categoría y Logo) */
.fma-post-thumbnail {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.fma-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.fma-category-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: #f44336; 
    color: white;
    padding: 3px 8px;
    font-size: 0.75em;
    font-weight: bold;
    border-radius: 3px;
    text-transform: uppercase;
    pointer-events: auto;
}

.fma-author-avatar {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 15;
    pointer-events: auto;
}

.fma-author-logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid #2e8b57;
    background-color: white;
    background-size: cover; 
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.fma-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Contenido y Pie de la Tarjeta */
.fma-post-content {
    padding: 15px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.fma-post-title {
    font-size: 1.25em;
    margin-top: 0;
    margin-bottom: 10px;
    color: #2e8b57;
    line-height: 1.3;
}

.fma-post-excerpt {
    font-size: 0.95em;
    color: #555;
    margin-bottom: 10px;
    line-height: 1.5;
}

.fma-post-footer {
    display: flex;
    justify-content: flex-start;
    gap: 15px;
    padding: 10px 20px;
    border-top: 1px solid #eee;
    font-size: 0.8em;
    color: #777;
    background-color: #f7f7f7;
    margin-top: auto;
}

/* ------------------------------------------------ */
/* 3. Estilos de Paginación */
/* ------------------------------------------------ */

.fma-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    margin-bottom: 60px;
}

.fma-page-link {
    background-color: #fff;
    border: 1px solid #ccc;
    color: #333;
    padding: 10px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    font-weight: normal;
    font-size: 1em;
    text-decoration: none;
}

.fma-page-link:hover:not(.disabled) {
    background-color: #e0e0e0;
    border-color: #aaa;
}

.fma-page-link.current {
    background-color: #2e8b57;
    color: #fff;
    border-color: #2e8b57;
    cursor: default;
}

.fma-page-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.fma-page-link.fma-prev-next {
    padding: 10px 20px;
    font-size: 0.95em;
    font-weight: bold;
}

/* Efecto de Carga (Loading) */
#fma-blog-posts-container.loading-opacity {
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.3s;
}

/* 4. Media Queries (Responsividad) */
@media (max-width: 768px) {
    .combined-filter-form {
        flex-direction: column;
        gap: 20px;
    }
    #fma-select-month, #fma-select-category {
        width: 100%;
        min-width: unset;
    }
    .fma-posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .fma-post-thumbnail {
        height: 180px;
    }
}