/* ============================================================================
   TEAM SECTION STYLES
   ============================================================================ */

.team-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f0f9ff 100%);
    position: relative;
}

/* Container matching Tailwind's max-w-6xl */
.team-section .container {
    max-width: 72rem !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    width: 100% !important;
}

@media (min-width: 640px) {
    .team-section .container {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
}

@media (min-width: 1024px) {
    .team-section .container {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }
}

/* Section Header - Use Tailwind classes instead */
.text-center.mb-10 {
    margin-bottom: 40px;
}

/* Loading State */
.team-loading {
    text-align: center;
    padding: 60px 0;
}

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

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

.team-loading p {
    color: #64748b;
    font-size: 1.1rem;
}

/* Team Grid - 5 columns on desktop */
.team-grid-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 25px;
    margin-bottom: 60px;
    width: 100%;
}

/* Responsive Grid Adjustments */
@media (max-width: 1200px) {
    .team-grid-container {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 992px) {
    .team-grid-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .team-grid-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .team-grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 400px) {
    .team-grid-container {
        grid-template-columns: 1fr;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Team Member Card */
.team-member-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.team-member-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.member-image-container {
    position: relative;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}

.member-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.member-info {
    padding: 20px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.member-name {
    font-size: 1rem; /* Standard size */
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
    line-height: 1.3;
}

.member-role {
    font-size: 0.85rem; /* Standard size */
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

/* Hover Overlay */
.member-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9), rgba(5, 150, 105, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.team-member-card:hover .member-overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
    color: white;
    padding: 20px;
}

.overlay-content i {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.overlay-content p {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.9;
}

/* ============================================================================
   MODAL/POPUP STYLES - UPDATED
   ============================================================================ */

.team-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

/* Modal Container - WIDER and RESPONSIVE */
.modal-container {
    position: relative;
    max-width: 90%;
    width: 90%;
    max-height: 85vh;
    background: white;
    border-radius: 24px;
    overflow: hidden;
    margin: 5vh auto;
    animation: modalSlideIn 0.4s ease;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

/* 80% width on large screens */
@media (min-width: 1400px) {
    .modal-container {
        max-width: 1200px;
        width: 80%;
    }
}

/* 95% on tablets */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        max-height: 90vh;
        margin: 2vh auto;
    }
}

/* 100% full screen on mobile */
@media (max-width: 480px) {
    .modal-container {
        width: 100%;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
        height: 100vh;
    }
    
    .team-modal {
        padding: 0;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: none;
    font-size: 1.2rem;
    color: #64748b;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.modal-close:hover {
    background: #ef4444;
    color: white;
    transform: rotate(90deg);
}

@media (max-width: 480px) {
    .modal-close {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
        font-size: 1rem;
        background: rgba(255, 255, 255, 0.9);
    }
}

/* Modal Content - Responsive layout */
.modal-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    height: 100%;
    overflow: hidden;
}

/* Mobile: Stack image above, content below */
@media (max-width: 768px) {
    .modal-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        max-height: 100%;
    }
}

/* Image Container */
.modal-image-container {
    position: relative;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    min-height: 300px;
}

@media (max-width: 768px) {
    .modal-image-container {
        height: 300px;
        min-height: auto;
    }
}

.modal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(5, 150, 105, 0.1));
}

/* Info Section - SCROLLABLE with standard text sizes */
.modal-info {
    padding: 40px;
    overflow-y: auto;
    max-height: 100%;
}

/* Standard text sizes (not too big) */
.modal-name {
    font-size: 1.8rem; /* Standard size */
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    line-height: 1.2;
}

.modal-role {
    font-size: 1.1rem; /* Standard size */
    color: #2563eb;
    margin-bottom: 20px;
    font-weight: 600;
}

.modal-story {
    color: #475569;
    line-height: 1.7; /* Better readability */
    margin-bottom: 25px;
    font-size: 1rem; /* Standard readable size */
}

.modal-details {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #e2e8f0;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    color: #475569;
    font-size: 0.95rem; /* Standard size */
}

.detail-item i {
    color: #2563eb;
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

/* Responsive text sizes */
@media (max-width: 768px) {
    .modal-info {
        padding: 25px;
    }
    
    .modal-name {
        font-size: 1.6rem;
    }
    
    .modal-role {
        font-size: 1rem;
    }
    
    .modal-story {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .modal-info {
        padding: 20px;
    }
    
    .modal-name {
        font-size: 1.4rem;
    }
    
    .modal-story {
        font-size: 0.9rem;
    }
}

/* Smooth scrollbar styling */
.modal-info::-webkit-scrollbar {
    width: 6px;
}

.modal-info::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.modal-info::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.modal-info::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive Design for Team Section */
@media (max-width: 768px) {
    .team-section {
        padding: 60px 0;
    }
    
    .member-name {
        font-size: 0.95rem;
    }
    
    .member-role {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .team-section {
        padding: 50px 0;
    }
    
    .member-name {
        font-size: 0.9rem;
    }
    
    .member-role {
        font-size: 0.75rem;
    }
}

/* Remove old section-header styles since we're using Tailwind */
.section-header,
.section-title,
.section-subtitle {
    display: none;
}