/* ==========================================================================
   Minimalist Team Slider & Modal CSS - Verale Theme
   Fixed Height Guarantees, Zero Border-Radius, Photo on Left, Controls on Right
   Colors: #9366eb (primary purple), #febd59 (gold accent), #101c26 (dark text), #64748b (muted)
   ========================================================================== */

/* Strict Zero Border-Radius for ALL Team Slider and Modal Elements (excluding round nav buttons) */
#teamSlider,
#teamSlider *:not(.nav-btn):not(.nav-btn *),
#teamModal,
#teamModal *,
.team-slider-card,
.team-slider-card *:not(.nav-btn):not(.nav-btn *),
.team-modal,
.team-modal * {
    border-radius: 0 !important;
}

/* 1. Section Container */
.structure-section.team-section,
.fp-section.team-section {
    padding: 60px 0 70px;
    background: #ffffff;
    position: relative;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
}

/* 2. Team Slider Card (Fixed Height Guaranteed, Zero Border-Radius) */
.team-slider-card {
    position: relative;
    max-width: 1220px;
    margin: 0 auto;
    height: 520px;
    min-height: 520px;
    max-height: 520px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    box-sizing: border-box;
}

/* 3. Slides Wrapper & Track */
.team-slides-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.team-slides-track {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

/* 4. Slide Item (Continuous horizontal sliding track, zero border-radius) */
.team-slide-item {
    display: block !important;
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    height: 100%;
    min-height: 100%;
    max-height: 100%;
    box-sizing: border-box;
    overflow: hidden;
    opacity: 1;
}

/* 5. 2-Column Grid: Left Photo, Right Content */
.team-slide-grid {
    display: grid;
    grid-template-columns: 460px minmax(0, 1fr);
    height: 520px;
    min-height: 520px;
    max-height: 520px;
    background: #ffffff;
    box-sizing: border-box;
    overflow: hidden;
}

.team-slide-grid.no-photo {
    grid-template-columns: 1fr !important;
}

/* 6. Left Column: Photo Frame (Fixed dimensions, object-fit: cover) */
.team-slide-media-col {
    height: 100%;
    min-height: 520px;
    max-height: 520px;
    position: relative;
    background: #f8fafc;
    border-right: 1px solid #f1f5f9;
    overflow: hidden;
    box-sizing: border-box;
}

.team-photo-frame {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.team-photo-img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    object-position: center top;
    display: block;
    border-radius: 0 !important;
}

/* 7. Right Column: Content Column (Fixed height, flex column) */
.team-slide-info-col {
    height: 100%;
    min-height: 520px;
    max-height: 520px;
    padding: 34px 44px 36px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    box-sizing: border-box;
    background: #ffffff;
    overflow: hidden;
}

/* 8. Card Top Bar */
.team-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
    gap: 14px;
    flex-shrink: 0;
    min-height: 52px;
    box-sizing: border-box;
}

.team-top-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1 1 auto;
    min-width: 0;
}

.team-badge {
    display: inline-block;
    padding: 5px 12px;
    background: #ede9fe;
    color: #895ae3;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 0 !important;
    white-space: nowrap;
}

.team-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
    margin-left: auto;
}

.team-counter {
    font-family: 'Montserrat', monospace, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.05em;
    white-space: nowrap;
    user-select: none;
    min-width: 54px;
    text-align: right;
}

/* 9. Nav Buttons (Matching Results Section, Circular) */
.nav-buttons.team-nav-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.team-nav-buttons .nav-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    border-radius: 50% !important;
    border: none !important;
    background: var(--fp-primary, #9366eb) !important;
    color: #ffffff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    user-select: none;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(147, 102, 235, 0.25);
    padding: 0;
    margin: 0;
}

.team-nav-buttons .nav-btn svg {
    display: block;
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    pointer-events: none;
    flex-shrink: 0;
}

.team-nav-buttons .nav-btn:hover {
    background: var(--fp-gold, #febd59) !important;
    box-shadow: 0 4px 12px rgba(254, 189, 89, 0.45);
    transform: translateY(-1px);
}

.team-nav-buttons .nav-btn:active {
    transform: translateY(0);
}

/* 10. Quote / Story */
.team-story {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(16.5px, 1.6vw, 20px);
    line-height: 1.5;
    color: #101c26;
    font-weight: 500;
    font-style: italic;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
}

.team-story p {
    margin: 0;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    overflow: hidden;
    -webkit-line-clamp: 3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
}

/* 11. Meta: Name, Role, Since */
.team-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}

.team-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #101c26;
    margin: 0;
    letter-spacing: -0.2px;
}

.team-role {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #9366eb;
    line-height: 1.35;
    overflow: hidden;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
}

.team-since {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
}

/* 12. Contact Links */
.team-contacts-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    flex-shrink: 0;
}

.team-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.team-contact-link i {
    color: #9366eb;
    font-size: 14px;
}

.team-contact-link:hover {
    color: #9366eb;
    text-decoration: none;
}

/* 13. CTA Button (Zero Border-Radius, Results Section Style) */
.team-actions-row {
    margin-top: 2px;
    flex-shrink: 0;
}

.team-more-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 12px 28px !important;
    border-radius: 0 !important;
    border: none !important;
    background: var(--fp-primary, #9366eb) !important;
    color: #ffffff !important;
    cursor: pointer !important;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease !important;
    box-shadow: 0 4px 14px rgba(147, 102, 235, 0.28) !important;
    width: fit-content !important;
}

.team-more-btn:hover {
    background: var(--fp-gold, #febd59) !important;
    color: #101c26 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 18px rgba(254, 189, 89, 0.45) !important;
}

.team-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 55px 16px 30px;
    background: rgba(16, 28, 38, 0.85);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 99999;
    overflow-y: auto;
    box-sizing: border-box;
}

.team-modal.active {
    display: flex;
}

.team-modal__backdrop {
    position: absolute;
    inset: 0;
    cursor: pointer;
}

.team-modal__dialog {
    position: relative;
    background: #ffffff;
    border-radius: 0 !important;
    max-width: 580px;
    width: min(94vw, 580px);
    box-shadow: 0 25px 50px -12px rgba(16, 28, 38, 0.35);
    overflow: visible !important;
    z-index: 2;
    margin: auto;
    animation: teamModalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes teamModalFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.team-modal__close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 32px;
    height: 32px;
    border-radius: 0 !important;
    border: none !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    color: #ffffff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    margin: 0;
    z-index: 100;
    outline: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
}

.team-modal__close:hover,
.team-modal__close:focus,
.team-modal__close:active {
    background: transparent !important;
    background-color: transparent !important;
    color: #ffffff !important;
    box-shadow: none !important;
    transform: none !important;
    outline: none !important;
    opacity: 1 !important;
}

.team-modal__close svg {
    display: block;
    width: 28px;
    height: 28px;
    stroke: #ffffff;
    color: #ffffff;
    transition: none !important;
    transform: none !important;
}

.team-modal__image {
    width: 100%;
    height: 360px;
    background: #f1f5f9;
    overflow: hidden;
    position: relative;
    border-radius: 0 !important;
}

.team-modal__image img {
    width: 100%;
    height: -webkit-fill-available !important;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 0 !important;
}

.team-modal__body {
    padding: 26px 32px 32px;
}

.team-modal__name {
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: #101c26;
    margin: 0 0 6px 0;
    letter-spacing: -0.2px;
}

.team-modal__role {
    font-family: 'Montserrat', sans-serif;
    font-size: 14.5px;
    font-weight: 600;
    color: #9366eb;
    margin: 0 0 4px 0;
    line-height: 1.4;
}

.team-modal__since {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    color: #64748b;
    margin: 0 0 16px 0;
}

.team-modal__text {
    font-family: 'Montserrat', sans-serif;
    font-size: 14.5px;
    line-height: 1.65;
    color: #333333;
    margin-bottom: 24px;
}

.team-modal__text p {
    margin: 0 0 12px;
}

.team-modal__text p:last-child {
    margin-bottom: 0;
}

.team-modal__footer {
    display: flex;
    gap: 12px;
}

.team-modal__btn {
    width: 100% !important;
    text-align: center !important;
    border-radius: 0 !important;
    background: var(--fp-primary, #9366eb) !important;
    color: #ffffff !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    padding: 13px 24px !important;
    box-shadow: 0 4px 14px rgba(147, 102, 235, 0.28) !important;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease !important;
}

.team-modal__btn:hover {
    background: var(--fp-gold, #febd59) !important;
    color: #101c26 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(254, 189, 89, 0.45) !important;
}

/* ==========================================================================
   Responsive Breakpoints (Guaranteed Uniform Heights per Screen Width)
   ========================================================================== */
@media (max-width: 1024px) {
    .team-slider-card {
        height: 720px;
        min-height: 720px;
        max-height: 720px;
    }

    .team-slide-grid {
        grid-template-columns: 1fr;
        height: 720px;
        min-height: 720px;
        max-height: 720px;
    }

    .team-slide-media-col {
        height: 330px;
        min-height: 330px;
        max-height: 330px;
        border-right: none;
        border-bottom: 1px solid #f1f5f9;
    }

    .team-slide-info-col {
        height: 390px;
        min-height: 390px;
        max-height: 390px;
        padding: 26px 28px;
        gap: 14px;
    }
}

@media (max-width: 768px) {
    .structure-section.team-section,
    .fp-section.team-section {
        padding: 45px 0 55px;
    }

    .team-slider-card {
        height: 680px;
        min-height: 680px;
        max-height: 680px;
    }

    .team-slide-grid {
        height: 680px;
        min-height: 680px;
        max-height: 680px;
    }

    .team-slide-media-col {
        height: 290px;
        min-height: 290px;
        max-height: 290px;
    }

    .team-slide-info-col {
        height: 390px;
        min-height: 390px;
        max-height: 390px;
        padding: 22px 20px;
        gap: 12px;
    }

    .team-story {
        font-size: 16.5px;
    }

    .team-modal {
        padding: 20px 12px;
    }

    .team-modal__image {
        height: 280px;
    }

    .team-modal__body {
        padding: 20px;
    }

    .team-modal__name {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .team-slider-card {
        height: 640px;
        min-height: 640px;
        max-height: 640px;
    }

    .team-slide-grid {
        height: 640px;
        min-height: 640px;
        max-height: 640px;
    }

    .team-slide-media-col {
        height: 250px;
        min-height: 250px;
        max-height: 250px;
    }

    .team-slide-info-col {
        height: 390px;
        min-height: 390px;
        max-height: 390px;
        padding: 18px 16px;
        gap: 10px;
    }

    .team-card-top {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }

    .team-story {
        font-size: 15px;
        line-height: 1.4;
    }

    .team-nav-buttons .nav-btn {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }

    .team-contacts-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
