/* home/static/css/team.css */

/* بخش تیم */
.team-section {
    padding: 50px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.section-subtitle {
    font-size: 14px;
    color: #4a5568;
    margin-top: 20px;
}

/* گروه تیم */
.team-group {
    margin-bottom: 40px;
}

.team-group-title {
    font-size: 22px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
    position: relative;
}

.team-group-title:before {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

/* کانتینر اسکرول */
.team-grid-container {
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding: 10px 0;
}

.team-grid-container::-webkit-scrollbar {
    height: 6px;
}

.team-grid-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.team-grid-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 10px;
}

/* گرید کارت‌ها */
.team-grid {
    display: inline-flex;
    gap: 25px;
    padding: 0 15px;
    white-space: normal;
}

/* کارت عضو تیم - دایره‌ای */
.team-card {
    width: 220px;
    flex-shrink: 0;
    cursor: pointer;
    white-space: normal;
    text-align: center;
}

.team-card-inner {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    padding: 25px 20px 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.team-card:hover .team-card-inner {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

/* عکس دایره‌ای */
.team-photo {
    position: relative;
    width: 130px;
    height: 130px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.team-card:hover .team-photo {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.2);
}

.team-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.team-card:hover .team-image {
    transform: scale(1.1);
}

.team-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-icon {
    font-size: 50px;
    color: white;
}

/* شبکه‌های اجتماعی روی عکس */
.team-social-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.team-card:hover .team-social-overlay {
    transform: translateY(0);
}

.social-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.social-icon.instagram {
    background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af);
}

.social-icon.linkedin {
    background: #0077b5;
}

.social-icon.twitter {
    background: #1da1f2;
}

.social-icon:hover {
    transform: translateY(-3px) scale(1.1);
}

/* اطلاعات زیر عکس */
.team-info {
    text-align: center;
    margin-top: 15px;
}

.team-name {
    font-size: 18px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 5px;
}

.team-position {
    font-size: 13px;
    color: #6366f1;
    font-weight: 500;
    margin-bottom: 12px;
}

/* دکمه بیشتر */
.team-more-btn {
    background: transparent;
    border: 1px solid #e2e8f0;
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 500;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.team-more-btn:hover {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: transparent;
    color: white;
}

.btn-icon {
    transition: transform 0.3s ease;
}

.team-more-btn:hover .btn-icon {
    transform: translateX(5px);
}

/* برای دسکتاپ - نمایش به صورت گرید */
@media (min-width: 769px) {
    .team-grid-container {
        overflow-x: visible;
    }
    
    .team-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
        padding: 0;
    }
    
    .team-card {
        width: auto;
    }
}

/* برای تبلت */
@media (min-width: 769px) and (max-width: 1024px) {
    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* برای موبایل */
@media (max-width: 768px) {
    .team-card {
        width: 200px;
    }
    
    .team-photo {
        width: 110px;
        height: 110px;
    }
    
    .team-name {
        font-size: 16px;
    }
    
    .team-position {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .team-card {
        width: 180px;
    }
    
    .team-photo {
        width: 100px;
        height: 100px;
    }
    
    .team-name {
        font-size: 14px;
    }
    
    .team-position {
        font-size: 11px;
    }
    
    .team-more-btn {
        padding: 4px 12px;
        font-size: 11px;
    }
}

/* مودال (به همان صورت قبلی) */
.team-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    background: white;
    margin: 10% auto;
    width: 85%;
    max-width: 700px;
    border-radius: 20px;
    overflow: hidden;
    animation: slideIn 0.3s ease;
}

.modal-close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    z-index: 10;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(0,0,0,0.8);
    transform: rotate(90deg);
}

.modal-body {
    display: flex;
    flex-wrap: wrap;
}

.modal-photo {
    flex: 1;
    min-width: 250px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.modal-photo img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal-info {
    flex: 1;
    padding: 30px;
    background: white;
}

.modal-info h2 {
    font-size: 24px;
    color: #1a202c;
    margin-bottom: 8px;
}

.modal-info h3 {
    font-size: 16px;
    color: #6366f1;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.modal-info p {
    font-size: 14px;
    line-height: 1.6;
    color: #4a5568;
    margin-bottom: 25px;
}

.modal-contact {
    margin-bottom: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 13px;
    color: #4a5568;
}

.contact-item i {
    width: 20px;
    color: #6366f1;
}

.modal-social {
    display: flex;
    gap: 12px;
}

.modal-social .social-icon {
    width: 35px;
    height: 35px;
    font-size: 16px;
}

/* انیمیشن‌ها */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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