/* ===== MODALE STILE LINKTREE - STRETTA E VERTICALE ===== */

/* Override modale base per Linktree style */
#socioModal .modal-content {
    max-width: 420px;
    width: 90%;
    max-height: 85vh;
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

#socioModal .modal-body {
    padding: 0;
    max-height: calc(85vh - 60px);
    overflow-y: auto;
}

/* Card principale Linktree */
.linktree-card {
    padding: 3.3rem 1.5rem 2rem 1.5rem;
    text-align: center;
}

/* Header con nome e tessera */
.linktree-header {
    margin-bottom: 2rem;
}

.linktree-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.linktree-badge {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

/* Container bottoni */
.linktree-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Stile bottoni Linktree */
.linktree-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: white;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.linktree-btn:hover {
    background: #f8f9fa;
    border-color: #039425;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
}

.linktree-btn:active {
    transform: translateY(0);
}

.linktree-btn svg {
    flex-shrink: 0;
    color: #039425;
}

.linktree-btn span {
    flex: 1;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Pallini Social */
.linktree-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e1e8ed;
}

.social-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: 2px solid #e1e8ed;
    color: #495057;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.social-circle:hover {
    background: #039425;
    border-color: #039425;
    color: white;
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.social-circle:active {
    transform: translateY(-2px) scale(1.05);
}

.social-circle svg {
    flex-shrink: 0;
}

/* Bottone close modale */
#socioModal .modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e1e8ed;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

#socioModal .modal-close:hover {
    background: #f8f9fa;
    border-color: #039425;
    transform: rotate(90deg);
}

#socioModal .modal-close svg {
    width: 18px;
    height: 18px;
    color: #495057;
}

/* Scrollbar personalizzata */
.linktree-card::-webkit-scrollbar {
    width: 6px;
}

.linktree-card::-webkit-scrollbar-track {
    background: transparent;
}

.linktree-card::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 10px;
}

.linktree-card::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Responsive */
@media (max-width: 480px) {
    #socioModal .modal-content {
        max-width: 95%;
        border-radius: 16px;
    }
    
    .linktree-card {
        padding: 3.3rem 1.25rem 1.5rem 1.25rem;
    }
    
    .linktree-name {
        font-size: 1.3rem;
    }
    
    .linktree-btn {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }
    
    .social-circle {
        width: 44px;
        height: 44px;
    }
}

/* Animazione apertura modale */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#socioModal.active .modal-content {
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

 

/* ======================================================================================================
                                    RICERCA AVANZATA
   ===================================================================================================== */

.search-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
}

.search-box {
    flex: 1 1 auto;
    max-width: 600px;
    min-width: 300px;
}

.btn-advanced-search {
    padding: 12px 20px;
    background: #5a8f8a;  
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    font-family: 'Ubuntu', sans-serif;
    flex-shrink: 0; /* Non si comprime mai */
    margin-left: auto; /* Spinge sempre a destra */
}

.btn-advanced-search:hover {
    background: #4a7a75;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(90, 143, 138, 0.3);
}

/* Pannello ricerca avanzata */
.advanced-search-panel {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin-top: 15px;
    margin-bottom: 20px;
}

.advanced-search-panel.hidden {
    display: none;
}

.advanced-search-form .form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.advanced-search-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.advanced-search-form label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.advanced-search-form select {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Ubuntu', sans-serif;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.advanced-search-form select:focus {
    outline: none;
    border-color: #5a8f8a;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-start;
}

.btn-search,
.btn-reset {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Ubuntu', sans-serif;
}

.btn-search {
    background: #51c149;
    color: white;
}

.btn-search:hover {
    background: #45a83d;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(81, 193, 73, 0.3);
}

.btn-reset {
    background: #dc3545;
    color: white;
}

.btn-reset:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .search-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .btn-advanced-search {
        width: 100%;
    }
    
    .advanced-search-form .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-search,
    .btn-reset {
        width: 100%;
    }
}



/* ===================================================================
   RISULTATI RICERCA & TRANSIZIONI
   =================================================================== */

/* Container principale risultati */
#searchResultsContainer {
    position: relative;
    min-height: 200px;
}

/* Transizioni fade */
.fade-out {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fade-in {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Badge risultati */
.search-results-badge {
    background: #e8f4f8;
    border: 2px solid #5a8f8a;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #333;
}

.search-results-badge.hidden {
    display: none;
}

.badge-actions {
    display: flex;
    gap: 10px;
}

.btn-badge {
    padding: 8px 16px;
    background: white;
    border: 2px solid #5a8f8a;
    border-radius: 6px;
    color: #5a8f8a;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Ubuntu', sans-serif;
}

.btn-badge:hover {
    background: #5a8f8a;
    color: white;
}

/* Messaggio nessun risultato */
.no-results-message {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 8px;
    border: 2px dashed #ddd;
}

.no-results-message.hidden {
    display: none;
}



.no-results-message h3 {
    font-size: 1.5rem;
    color: #333;
    margin: 0 0 10px 0;
}

.no-results-message p {
    font-size: 1rem;
    color: #666;
    margin: 0 0 30px 0;
}

.no-results-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Ubuntu', sans-serif;
}

.btn-primary {
    background: #5a8f8a;
    color: white;
}

.btn-primary:hover {
    background: #4a7a75;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(90, 143, 138, 0.3);
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #d0d0d0;
    transform: translateY(-2px);
}

/* Loader */
.search-loader {
    text-align: center;
    padding: 60px 20px;
}

.search-loader.hidden {
    display: none;
}

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

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

.search-loader p {
    color: #666;
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .search-results-badge {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .badge-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .btn-badge {
        width: 100%;
    }
    
    .no-results-actions {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
}