/* Estilos para filtros de escuelas */

/* Contenedor principal de filtros */
.filters-container {
    margin: 2rem 0;
}

.filter-form {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    align-items: end;
}

/* Grupos de filtros */
.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.filter-icon {
    font-size: 1.1rem;
}

/* Inputs y selects */
.filter-input,
.filter-select {
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: white;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--wp--preset--color--primary, #D6AA59);
    box-shadow: 0 0 0 3px rgba(214, 170, 89, 0.1);
}

.search-group .filter-input {
    padding-left: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23999' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 0.75rem center;
    background-size: 16px;
}

/* Botones */
.filter-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
    justify-content: end;
}

.filter-submit {
    background: var(--wp--preset--color--primary, #D6AA59);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    min-width: 100px;
    width: 100%;
}

.filter-submit:hover {
    background: var(--wp--preset--color--accent, #436C7C);
    transform: translateY(-2px);
}

.filter-reset {
    color: var(--wp--preset--color--accent, #436C7C);
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    font-weight: 500;
    text-align: center;
    width: 100%;
}

.filter-reset:hover {
    background: rgba(67, 108, 124, 0.1);
}

/* Filtros en hero section */
.hero-filters {
    margin-top: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-filters-container .filter-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
}

.hero-filters-container .filter-row {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.hero-filters-container .filter-label {
    color: #333;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.hero-filters-container .filter-input,
.hero-filters-container .filter-select {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

/* Filtros en archive */
.page-header .filters-container {
    margin: 1.5rem 0 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .filter-row {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    .filter-form {
        padding: 1.5rem;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .filter-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-submit,
    .filter-reset {
        text-align: center;
    }
    
    .hero-filters-container .filter-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .filter-form {
        padding: 1rem;
        margin: 0 -1rem;
        border-radius: 0;
    }
    
    .hero-filters {
        margin: 1rem -1rem 0;
    }
    
    .hero-filters-container .filter-form {
        border-radius: 0;
    }
}

/* Estados de carga */
.filter-form.loading {
    opacity: 0.7;
    pointer-events: none;
}

.filter-submit.loading {
    background: #ccc;
    cursor: not-allowed;
}

/* Animaciones */
.filter-group {
    animation: fadeInUp 0.3s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}