/**
 * Sleek Team Members Public Styling
 * Modern, corporate, sleek, glassmorphic layout.
 */

:root {
    --stm-primary: #4f46e5;
    --stm-primary-rgb: 79, 70, 229;
    --stm-text-dark: #0f172a;
    --stm-text-muted: #64748b;
    --stm-border: #f1f5f9;
    --stm-card-bg: #ffffff;
    --stm-card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --stm-card-shadow-hover: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
    --stm-radius: 12px;
    --stm-radius-sm: 8px;
    --stm-transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Outer Container Wrapper */
.sleek-team-wrapper {
    width: 100%;
    margin: 0 auto;
    padding: 10px 0;
    box-sizing: border-box;
}

/* Sections & Row Titles */
.sleek-team-section {
    margin-bottom: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}
.sleek-team-section:last-child {
    margin-bottom: 0;
}
.sleek-team-section-header {
    margin-bottom: 40px;
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    justify-content: center;
}
.sleek-team-section-title {
    font-size: 24px;
    font-weight: 700;
    color: inherit;
    margin: 0 auto !important;
    padding: 0 !important;
    font-family: inherit;
    text-align: center !important;
}
/* Organizational chart vertical line from title */
.sleek-team-section-header::after {
    content: '';
    display: block;
    width: 2px;
    height: 30px;
    background: var(--stm-primary);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
}

/* CSS Flexbox Layout for Centering (Replaces Grid) */
.sleek-team-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    width: 100%;
}

/* Flex sizing based on column settings */
.sleek-team-grid.sleek-cols-1 .sleek-team-card { flex: 0 1 100%; max-width: 400px; }
.sleek-team-grid.sleek-cols-2 .sleek-team-card { flex: 0 1 calc(50% - 12px); max-width: 350px; }
.sleek-team-grid.sleek-cols-3 .sleek-team-card { flex: 0 1 calc(33.333% - 16px); max-width: 300px; }
.sleek-team-grid.sleek-cols-4 .sleek-team-card { flex: 0 1 calc(25% - 18px); max-width: 250px; }
.sleek-team-grid.sleek-cols-5 .sleek-team-card { flex: 0 1 calc(20% - 19.2px); max-width: 220px; }
.sleek-team-grid.sleek-cols-6 .sleek-team-card { flex: 0 1 calc(16.666% - 20px); max-width: 200px; }

/* Responsive Overrides */
@media (max-width: 1024px) {
    .sleek-team-grid[class*="sleek-cols-"] .sleek-team-card {
        flex: 0 1 calc(33.333% - 16px);
        max-width: none;
    }
}
@media (max-width: 768px) {
    .sleek-team-grid[class*="sleek-cols-"] .sleek-team-card {
        flex: 0 1 calc(50% - 12px);
        max-width: none;
    }
}
@media (max-width: 480px) {
    .sleek-team-grid[class*="sleek-cols-"] .sleek-team-card {
        flex: 0 1 100%;
        max-width: none;
    }
}

/* Card Styling (Org Chart Node) */
.sleek-team-card {
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    transition: var(--stm-transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
    position: relative;
}
/* Horizontal connecting line for org chart grid */
.sleek-team-grid {
    position: relative;
}
/* Add a top border to the grid to act as horizontal connector if needed, or just keep it clean */

.sleek-team-card.sleek-clickable {
    cursor: pointer;
}
.sleek-team-card:hover {
    transform: translateY(-6px);
}

/* Card Image Wrapper */
.sleek-team-card-image-wrap {
    width: 150px;
    height: 150px;
    border-radius: 50% !important;
    overflow: hidden;
    position: relative;
    background: #f8fafc;
    border: 4px solid #fff;
    box-shadow: var(--stm-card-shadow);
    margin: 0 auto 15px auto;
    z-index: 2;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sleek-team-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: var(--stm-transition);
    display: block;
    border-radius: 50% !important;
}
.sleek-team-card:hover .sleek-team-card-image {
    transform: scale(1.05);
}

/* Hover Overlay Styles (Rounded for circle) */
.sleek-team-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    padding: 10px;
    border-radius: 50%;
}
.sleek-team-card:hover .sleek-team-card-overlay {
    opacity: 1;
}

/* Overlay Elements */
.sleek-team-social-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 8px;
}
.sleek-social-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffff;
    color: var(--stm-text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transform: translateY(15px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, background 0.2s ease, color 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.sleek-social-btn svg {
    width: 18px;
    height: 18px;
}

/* Wave-like reveal effect for buttons on hover */
.sleek-team-card:hover .sleek-social-btn {
    transform: translateY(0);
    opacity: 1;
}
.sleek-team-card:hover .sleek-social-btn:nth-child(1) { transition-delay: 0.05s; }
.sleek-team-card:hover .sleek-social-btn:nth-child(2) { transition-delay: 0.1s; }
.sleek-team-card:hover .sleek-social-btn:nth-child(3) { transition-delay: 0.15s; }
.sleek-team-card:hover .sleek-social-btn:nth-child(4) { transition-delay: 0.2s; }

/* Social hover states */
.sleek-social-btn.sleek-linkedin:hover { background: #0077b5; color: #ffffff; }
.sleek-social-btn.sleek-twitter:hover { background: #000000; color: #ffffff; }
.sleek-social-btn.sleek-email:hover { background: #ea4335; color: #ffffff; }
.sleek-social-btn.sleek-website:hover { background: var(--stm-primary); color: #ffffff; }

.sleek-view-bio-hint {
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 4px 10px;
    border-radius: 20px;
    transform: translateY(10px);
    opacity: 0;
    transition: transform 0.3s ease 0.2s, opacity 0.3s ease 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.sleek-team-card:hover .sleek-view-bio-hint {
    transform: translateY(0);
    opacity: 1;
}

/* Card Details Footer */
.sleek-team-card-info {
    padding: 0 10px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.sleek-team-card-name {
    font-size: 18px;
    font-weight: 700;
    color: inherit;
    margin: 0 0 4px 0 !important;
    padding: 0 !important;
    line-height: 1.3;
    font-family: inherit;
}
.sleek-team-card-role {
    font-size: 14px;
    font-weight: 500;
    color: inherit;
    opacity: 0.8;
    margin: 0 !important;
    padding: 0 !important;
    text-transform: capitalize;
}

/* Frontend Glassmorphic Popup Modal */
.sleek-team-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    padding: 20px;
}
.sleek-team-modal-backdrop.stm-modal-active {
    opacity: 1;
    pointer-events: auto;
}
.sleek-team-modal-box {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.sleek-team-modal-backdrop.stm-modal-active .sleek-team-modal-box {
    transform: scale(1) translateY(0);
}
.sleek-team-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: #f1f5f9;
    border: none;
    color: var(--stm-text-dark);
    font-size: 26px;
    line-height: 1;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 5;
}
.sleek-team-modal-close:hover {
    background: #e2e8f0;
    transform: rotate(90deg);
}

/* Modal Content Layout */
.sleek-team-modal-layout {
    display: flex;
    box-sizing: border-box;
    max-height: 90vh;
}
.sleek-team-modal-avatar-column {
    width: 220px;
    background: #f8fafc;
    border-right: 1px solid var(--stm-border);
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}
.sleek-team-modal-avatar {
    width: 130px;
    height: 130px;
    border-radius: 50% !important;
    object-fit: cover;
    border: 3px solid #ffffff;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}
.sleek-team-modal-socials {
    display: flex;
    gap: 8px;
    margin-top: auto;
}
.sleek-team-modal-socials .sleek-social-btn {
    position: static;
    transform: none;
    opacity: 1;
    width: 32px;
    height: 32px;
}
.sleek-team-modal-text-column {
    flex-grow: 1;
    padding: 40px 32px;
    overflow-y: auto;
}
.sleek-team-modal-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--stm-text-dark);
    margin: 0 0 6px 0 !important;
    padding: 0 !important;
    font-family: inherit;
}
.sleek-team-modal-role {
    font-size: 13px;
    font-weight: 600;
    color: var(--stm-primary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0 0 20px 0 !important;
    padding: 0 !important;
}
.sleek-team-modal-bio {
    font-size: 14px;
    line-height: 1.6;
    color: var(--stm-text-muted);
}
.sleek-team-modal-bio p {
    margin: 0 0 12px 0 !important;
}
.sleek-team-modal-bio p:last-child {
    margin-bottom: 0 !important;
}

/* Modal Responsive Stacking */
@media (max-width: 640px) {
    .sleek-team-modal-layout {
        flex-direction: column;
        overflow-y: auto;
    }
    .sleek-team-modal-avatar-column {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--stm-border);
        padding: 30px 20px;
    }
    .sleek-team-modal-avatar {
        width: 100px;
        height: 100px;
        margin-bottom: 12px;
    }
    .sleek-team-modal-text-column {
        padding: 30px 20px;
    }
}
