/* Container principale */
.advanced-search-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Form di ricerca */
.advanced-search-form {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.search-row {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.search-field {
    flex: 1;
    min-width: 200px;
}

.search-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.search-field select,
.search-field input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-field select:focus,
.search-field input[type="text"]:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.search-button {
    background: #0073aa;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.search-button:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.search-button:active {
    transform: translateY(0);
}

/* Loader */
.search-loader {
    text-align: center;
    padding: 20px;
    font-size: 16px;
    color: #666;
}

.search-loader span {
    display: inline-block;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Risultati */
.search-results {
    margin-top: 30px;
}

.results-title {
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0073aa;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.result-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.result-item:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    transform: translateY(-5px);
}

.result-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.result-item:hover .result-image img {
    transform: scale(1.1);
}

.result-content {
    padding: 20px;
}

.result-title {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.result-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.result-title a:hover {
    color: #0073aa;
}

.result-tags {
    margin: 10px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tag-badge {
    display: inline-block;
    background: #e3f2fd;
    color: #0073aa;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

.result-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin: 15px 0;
}

.result-link {
    display: inline-block;
    color: #0073aa;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.result-link:hover {
    color: #005a87;
    transform: translateX(5px);
}

/* Messaggio di errore */
.search-error {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 15px 20px;
    border-radius: 5px;
    margin-top: 20px;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .search-row {
        flex-direction: column;
    }
    
    .search-field {
        width: 100%;
        min-width: 100%;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
}
