/* ════════════════════════════════════════════════════════════
   CARD MODERNE - STAFF E CENTRO
   Aggiungi questo CSS alla fine di home.css
   ════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════
   TEAM MODERNE - Carousel con immagini tonde
   ═══════════════════════════════════════════════════════════ */

.team-modern {
    padding: 100px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    overflow: hidden;
}

/* Wrapper per il carousel */
.team-carousel-wrapper {
    max-width: 1400px;
    margin: 50px auto 0;
    padding: 0 20px;
    overflow: hidden;
}

/* Carousel a scorrimento */
.team-carousel {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 20px 10px 40px;
    -webkit-overflow-scrolling: touch;
}

/* Nasconde scrollbar ma mantiene funzionalità */
.team-carousel::-webkit-scrollbar {
    height: 8px;
}

.team-carousel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.team-carousel::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.team-carousel::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Card */
.team-card-modern {
    flex: 0 0 300px;
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    scroll-snap-align: start;
    text-align: center;
}

.team-card-modern:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(147, 51, 234, 0.25);
}

/* Foto tonda */
.card-photo-round {
    width: 180px;
    height: 180px;
    margin: 30px auto 0;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid #f0f0f0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
}

.team-card-modern:hover .card-photo-round {
    border-color: #9333ea;
    transform: scale(1.05);
}

.card-photo-round img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.team-card-modern:hover .card-photo-round img {
    transform: scale(1.1);
}

.photo-placeholder-round {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 48px;
    font-weight: 700;
}

/* Card body */
.card-body {
    padding: 25px 30px 30px;
}

.member-role {
    display: inline-block;
    padding: 6px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.member-name-modern {
    font-size: 22px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
}

.member-desc {
    color: #718096;
    line-height: 1.6;
    font-size: 14px;
    margin-bottom: 15px;
}

/* Read more button */
.desc-toggle {
    background: none;
    border: none;
    color: #9333ea;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-top: -10px;
    margin-bottom: 10px;
    transition: color 0.2s;
}

.desc-toggle:hover {
    color: #7c3aed;
    text-decoration: underline;
}

/* Teacher Modal */
.teacher-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.teacher-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.teacher-modal {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.teacher-modal-overlay.active .teacher-modal {
    transform: scale(1) translateY(0);
}

.teacher-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.2s;
    z-index: 10;
}

.teacher-modal-close:hover {
    background: #9333ea;
    color: white;
}

.teacher-modal-content {
    padding: 40px;
}

.teacher-modal-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 25px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(147, 51, 234, 0.2);
}

.teacher-modal-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.teacher-modal-photo .photo-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    color: white;
}

.teacher-modal-info {
    text-align: center;
}

.teacher-modal-role {
    display: inline-block;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    color: #7c3aed;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}

.teacher-modal-name {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 20px 0;
}

.teacher-modal-desc {
    color: #4b5563;
    line-height: 1.8;
    font-size: 15px;
    text-align: left;
    margin: 0;
}

@media (max-width: 600px) {
    .teacher-modal {
        max-height: 85vh;
        border-radius: 16px;
    }
    
    .teacher-modal-content {
        padding: 30px 20px;
    }
    
    .teacher-modal-photo {
        width: 100px;
        height: 100px;
    }
    
    .teacher-modal-name {
        font-size: 24px;
    }
}

/* Social icons in fondo alla card */
.social-icons-bottom {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 15px;
}

.social-icons-bottom a {
    width: 40px;
    height: 40px;
    background: #f5f5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    color: #666;
}

.social-icons-bottom a svg {
    width: 20px;
    height: 20px;
}

.social-icons-bottom a:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Colori brand social */
.social-icons-bottom a.social-instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
}

.social-icons-bottom a.social-facebook:hover {
    background: #1877f2;
    color: white;
}

.social-icons-bottom a.social-website:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.no-content {
    flex: 0 0 100%;
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 18px;
}

/* ═══════════════════════════════════════════════════════════
   CENTRO MODERNE - Card sempre visibili
   ═══════════════════════════════════════════════════════════ */

.centro-modern {
    padding: 100px 20px;
    background: white;
}

.centro-layout-modern {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1400px;
    margin: 50px auto 0;
    align-items: start;
}

/* Gallery */
.centro-gallery-modern {
    position: sticky;
    top: 100px;
}

.main-photo {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    margin-bottom: 20px;
    cursor: pointer;
}

.main-photo img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.main-photo:hover img {
    transform: scale(1.05);
}

.photo-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 25px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: white;
    font-size: 18px;
    font-weight: 600;
}

.photo-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.thumb {
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.thumb::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.thumb.active::after {
    opacity: 0;
}

.thumb.active {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.thumb:hover {
    transform: translateY(-3px);
}

.thumb img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
}

.gallery-empty {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 80px 40px;
    text-align: center;
    color: white;
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.gallery-empty p {
    font-size: 18px;
    opacity: 0.9;
}

/* Info Cards */
.centro-info-modern {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.info-card-modern {
    background: #f8f9fa;
    padding: 35px;
    border-radius: 16px;
    border-left: 5px solid #667eea;
    transition: all 0.3s ease;
}

.info-card-modern:hover {
    transform: translateX(5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.info-card-modern.highlight-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-left: none;
}

.card-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.info-card-modern h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #2d3748;
}

.info-card-modern.highlight-card h3 {
    color: white;
}

.info-card-modern p {
    line-height: 1.8;
    color: #4a5568;
    font-size: 15px;
}

.info-card-modern.highlight-card p {
    color: rgba(255,255,255,0.95);
}

.rules-text {
    line-height: 1.9;
    color: #4a5568;
}

.info-card-modern.highlight-card .rules-text {
    color: rgba(255,255,255,0.95);
}

.cta-button {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 30px;
    background: white;
    color: #667eea;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .centro-layout-modern {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .centro-gallery-modern {
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    .team-modern,
    .centro-modern {
        padding: 60px 15px;
    }

    .team-carousel {
        gap: 20px;
        padding: 15px 5px 30px;
    }

    .team-card-modern {
        flex: 0 0 260px;
    }

    .card-photo-round {
        width: 140px;
        height: 140px;
        margin-top: 25px;
    }

    .photo-placeholder-round {
        font-size: 36px;
    }

    .card-body {
        padding: 20px;
    }

    .member-name-modern {
        font-size: 18px;
    }

    .member-desc {
        font-size: 13px;
    }

    .main-photo img {
        height: 350px;
    }

    .photo-thumbnails {
        grid-template-columns: repeat(3, 1fr);
    }

    .info-card-modern {
        padding: 25px;
    }
}

/* ═══════════════════════════════════════════════════════════
   JAVASCRIPT HELPER
   ═══════════════════════════════════════════════════════════ */

/*
Aggiungi a home.js:

function changeMainPhoto(url, title, element) {
    document.querySelector('#mainPhoto img').src = url;
    document.querySelector('.photo-title').textContent = title;

    document.querySelectorAll('.thumb').forEach(t => t.classList.remove('active'));
    element.classList.add('active');
}
*/


/* ═══════════════════════════════════════════════════════════
   CONTACT FORM ENHANCEMENTS
   ═══════════════════════════════════════════════════════════ */

.contact-feedback {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 14px;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.contact-feedback.success {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.contact-feedback.error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.contact-form button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
