/* Team Popup Styles */
.team-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

.team-popup.active {
    display: block;
}

.popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.popup-container {
    position: relative;
    width: 90%;
    max-width: var(--popup-width, 1111px);
    max-height: 85vh;
    margin: 50px auto;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 1000000;
    animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.popup-header {
    position: relative;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.popup-member-info {
    flex: 1;
}

.popup-member-name {
    margin: 0;
    font-size: 20px;
    color: #1a1a1a;
    font-weight: 600;
    line-height: 1.3;
}

.popup-member-title {
    font-size: 14px;
    color: #666;
    display: block;
    margin-top: 4px;
}

.popup-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    line-height: 1;
}

.popup-close:hover {
    background: #e9ecef;
    color: #1a1a1a;
}

.popup-content-wrapper {
    overflow-y: auto;
    max-height: calc(85vh - 120px);
    background: #fff;
}

.popup-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    text-align: right;
    font-size: 12px;
    color: #999;
}

/* Loading states */
.popup-loading {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.loading-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Skeleton loading */
.skeleton-loading {
    padding: 30px;
    text-align: center;
}

.skeleton-image {
    width: 150px;
    height: 150px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 50%;
    margin: 0 auto 20px;
}

.skeleton-line {
    height: 20px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    margin: 10px 0;
    border-radius: 4px;
}

.skeleton-line.short {
    width: 60%;
    margin-left: auto;
    margin-right: auto;
}

.skeleton-line.medium {
    width: 80%;
    margin-left: auto;
    margin-right: auto;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Error state */
.popup-error {
    text-align: center;
    padding: 60px 20px;
    color: #dc3545;
}

.popup-error .error-details {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
}

.retry-button {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.3s;
}

.retry-button:hover {
    background: #0056b3;
}

/* Content styles */
.popup-content img {
    max-width: 100%;
    height: auto;
}

.popup-content .elementor-widget:not(:last-child) {
    margin-bottom: 20px !important;
}

.popup-content .elementor-widget-container {
    margin: 0 !important;
    padding: 0 !important;
}

/* Custom popup classes */
.my-custom-popup .elementor-widget-container {
    text-align: start !important;
    font-family: "Sofia Pro Light Az", Sans-serif !important;
    font-weight: 400 !important;
    color: #000000 !important;
}

/*.my-custom-popup .elementor-widget-text-editor {
    font-size: 18px !important;
}*/

.my-custom-popup h2 {
    font-family: "Sofia Pro Regular Az", Sans-serif !important;
    font-size: 40px !important;
    font-weight: 600 !important;
    color: #223354 !important;
}

.my-custom-popup h4 {
    font-family: "Sofia Pro Regular Az", Sans-serif !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    color: #223354 !important;
}

.my-custom-popup .div-1,
.my-custom-popup .div-15 {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    width: 95%;
}

.my-custom-popup .div-2 {
    flex: 0 0 40% !important;
    max-width: 40% !important;
}

.my-custom-popup .div-5 {
    flex: 0 0 60% !important;
    max-width: 60% !important;
}

/* Responsive */
@media (max-width: 768px) {
    .popup-container {
        width: 95%;
        margin: 20px auto;
        max-height: 90vh;
    }
    
    .popup-content-wrapper {
        max-height: calc(90vh - 120px);
    }
    
    .my-custom-popup .div-1 {
        flex-direction: column !important;
    }
    
    .my-custom-popup .div-2,
    .my-custom-popup .div-5 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}