/* Estils per a l'overlay de cerca */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    justify-content: center;
    align-items: flex-start;
    padding-top: 100px;
}

.search-overlay.active {
    display: flex;
    opacity: 1;
}

.search-container {
    background: white;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.search-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
}

.search-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    font-size: 1.5rem;
    color: #666;
}

.search-close:hover {
    color: #000;
}

.search-input-container {
    display: flex;
    margin-bottom: 20px;
}

#search-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
    outline: none;
}

#search-input:focus {
    border-color: #c00;
}

#search-button {
    padding: 12px 15px;
    background: #c00;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    color: white;
    font-weight: bold;
}

#search-button:hover {
    background: #c00;
}

.search-results {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 10px;
}

.search-message {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

.search-count {
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
    padding: 5px 0;
}

.results-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.results-list li {
    border-bottom: 1px solid #eee;
    padding: 10px 0;
}

.results-list li:last-child {
    border-bottom: none;
}

.results-list a {
    text-decoration: none;
    color: #c00;
    display: block;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.results-list a:hover {
    background-color: #f5f9ff;
}

.results-list h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
}

.results-list p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.results-list a:hover h3 {
    text-decoration: underline;
}

/* Responsiu */
@media (max-width: 768px) {
    .search-overlay {
        padding-top: 50px;
    }
    
    .search-container {
        width: 95%;
        padding: 15px;
    }
    
    .search-header h2 {
        font-size: 1.3rem;
    }
}