/**
 * Team WDB — Elementor Widget Styles
 * Models: A (Grid Circular), F (Coverflow Showcase)
 */

/* ==========================================================================
   CSS CUSTOM PROPERTIES
   ========================================================================== */

.wdb-team {
    --wdb-tm-bg: #1a1a2e;
    --wdb-tm-bg-card: #16213e;
    --wdb-tm-text: #ffffff;
    --wdb-tm-text-muted: rgba(255, 255, 255, 0.65);
    --wdb-tm-accent: #f59e0b;
    --wdb-tm-accent-hover: #d97706;
    --wdb-tm-border: rgba(255, 255, 255, 0.1);
    --wdb-tm-radius: 16px;
    --wdb-tm-radius-sm: 10px;
    --wdb-tm-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    --wdb-tm-transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --wdb-tm-av-ox: 0px;
    --wdb-tm-av-oy: 0px;
    position: relative;
    background: var(--wdb-tm-bg);
    border-radius: var(--wdb-tm-radius);
    padding: 40px;
    color: var(--wdb-tm-text);
    font-family: inherit;
    box-sizing: border-box;
}

.wdb-team *,
.wdb-team *::before,
.wdb-team *::after {
    box-sizing: border-box;
}

/* ==========================================================================
   GLASS EFFECT
   ========================================================================== */

.wdb-team-glass {
    background: rgba(26, 26, 46, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.15);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

/* ==========================================================================
   GRAYSCALE FILTER
   ========================================================================== */

.wdb-team-grayscale .wdb-team-avatar img {
    filter: grayscale(100%);
    transition: filter var(--wdb-tm-transition);
}

.wdb-team-grayscale .wdb-team-member:hover .wdb-team-avatar img {
    filter: grayscale(0%);
}

/* ==========================================================================
   ENTRANCE ANIMATIONS
   ========================================================================== */

.wdb-team-anim-item {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.wdb-team-anim-item.wdb-team-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ==========================================================================
   MAIN TITLE
   ========================================================================== */

.wdb-team-title {
    margin: 0 0 32px 0;
    font-size: 28px;
    font-weight: 700;
    color: var(--wdb-tm-text);
    text-align: center;
}

/* ==========================================================================
   SHARED — AVATAR
   ========================================================================== */

.wdb-team-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    transform: translate(var(--wdb-tm-av-ox, 0px), var(--wdb-tm-av-oy, 0px));
    transition: transform var(--wdb-tm-transition), box-shadow var(--wdb-tm-transition);
}

.wdb-team-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ==========================================================================
   SHARED — NAME, ROLE, BIO
   ========================================================================== */

.wdb-team-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--wdb-tm-text);
    margin: 0;
    line-height: 1.3;
}

.wdb-team-first {
    display: inline-block;
    transform: translate(var(--wdb-tm-fn-ox, 0px), var(--wdb-tm-fn-oy, 0px));
}

.wdb-team-name .wdb-team-last {
    display: inline-block;
    font-weight: 700;
    transform: translate(var(--wdb-tm-ln-ox, 0px), var(--wdb-tm-ln-oy, 0px));
}

.wdb-team-role {
    font-size: 13px;
    font-weight: 500;
    color: var(--wdb-tm-accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 4px 0 0 0;
    transform: translate(var(--wdb-tm-role-ox, 0px), var(--wdb-tm-role-oy, 0px));
}

.wdb-team-bio {
    font-size: 14px;
    color: var(--wdb-tm-text-muted);
    line-height: 1.6;
    margin: 12px 0 0 0;
}

/* ==========================================================================
   SHARED — SOCIAL ICONS
   ========================================================================== */

.wdb-team-socials {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    transform: translate(var(--wdb-tm-soc-ox, 0px), var(--wdb-tm-soc-oy, 0px));
}

.wdb-team-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--wdb-tm-text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: background var(--wdb-tm-transition), color var(--wdb-tm-transition), transform var(--wdb-tm-transition);
}

.wdb-team-social-icon img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.wdb-team-social-icon:hover {
    background: var(--wdb-tm-accent);
    color: #fff;
    transform: translateY(-3px);
}

.wdb-team-social-icon svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* ==========================================================================
   SHARED — CTA BUTTON
   ========================================================================== */

.wdb-team-cta {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--wdb-tm-accent);
    background: transparent;
    border: 1px solid var(--wdb-tm-accent);
    border-radius: 6px;
    text-decoration: none;
    transition: all var(--wdb-tm-transition);
    cursor: pointer;
    transform: translate(var(--wdb-tm-cta-ox, 0px), var(--wdb-tm-cta-oy, 0px));
}

.wdb-team-cta:hover {
    background: var(--wdb-tm-accent);
    color: #fff;
    transform: translate(var(--wdb-tm-cta-ox, 0px), var(--wdb-tm-cta-oy, 0px)) translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

/* ==========================================================================
   MODEL A — GRID CIRCULAR
   ========================================================================== */

.wdb-team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.wdb-team-member {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 20px;
    background: var(--wdb-tm-bg-card);
    border-radius: var(--wdb-tm-radius);
    border: 1px solid var(--wdb-tm-border);
    transition: transform var(--wdb-tm-transition), box-shadow var(--wdb-tm-transition), background var(--wdb-tm-transition), border-color var(--wdb-tm-transition);
}

.wdb-team-member:hover {
    transform: translateY(-6px);
    box-shadow: var(--wdb-tm-shadow);
}

.wdb-team-member .wdb-team-socials {
    justify-content: center;
}

/* ==========================================================================
   FADE EDGES (Opacity nos slides das extremidades)
   ========================================================================== */
.wdb-team-grid-has-fade .swiper-slide {
    opacity: var(--wdb-tm-fade-opacity, 0.3);
    transition: opacity 0.4s ease;
}

.wdb-team-grid-has-fade .swiper-slide-visible {
    opacity: 1;
}

.wdb-team-grid-has-fade .swiper-slide:not(.swiper-slide-visible) {
    opacity: var(--wdb-tm-fade-opacity, 0.3);
}

/* ==========================================================================
   GRID DESKTOP SLIDER (Carousel)
   ========================================================================== */

.wdb-team-grid-desktop-slider {
    position: relative;
    width: 100%;
}

.wdb-team-grid-desktop-swiper {
    overflow: hidden;
    padding: 8px 0;
}

.wdb-team-grid-desktop-slider .swiper-slide {
    height: auto;
}

.wdb-team-grid-desktop-slider .wdb-team-member {
    text-align: center;
    height: 100%;
}

/* Navigation arrows */
.wdb-team-grid-desk-prev,
.wdb-team-grid-desk-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.wdb-team-grid-desk-prev { left: -16px; }
.wdb-team-grid-desk-next { right: -16px; }

.wdb-team-grid-desk-prev:hover,
.wdb-team-grid-desk-next:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

.wdb-team-grid-desk-prev.swiper-button-disabled,
.wdb-team-grid-desk-next.swiper-button-disabled {
    opacity: 0.3;
    cursor: default;
}

/* ==========================================================================
   GRID MOBILE SLIDER
   ========================================================================== */

/* Hidden by default — shown only on mobile */
.wdb-team-grid-mobile {
    display: none;
}

.wdb-team-grid-mobile .wdb-team-member {
    margin: 0 auto;
    max-width: 320px;
}

.wdb-team-grid-mobile .wdb-team-member .wdb-team-socials {
    justify-content: center;
}

.wdb-team-grid-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
}

.wdb-team-grid-dots .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--wdb-tm-text-muted);
    opacity: 0.4;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wdb-team-grid-dots .swiper-pagination-bullet-active {
    background: var(--wdb-tm-accent);
    opacity: 1;
    transform: scale(1.2);
}

/* ==========================================================================
   MODEL F — COVERFLOW SHOWCASE
   ========================================================================== */

.wdb-team-coverflow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    overflow: hidden;
}

/* Coverflow Swiper container */
.wdb-team-coverflow-swiper {
    width: 100%;
    max-width: 700px;
    overflow: hidden;
    padding: 30px 0;
}

.wdb-team-coverflow-swiper .swiper-wrapper {
    display: flex;
    align-items: center;
}

/* Prevent white bleed in editor */
.wdb-team-coverflow-swiper .swiper-slide {
    background: transparent;
    width: 160px;
    flex-shrink: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.wdb-team-coverflow-slide {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: transform var(--wdb-tm-transition);
}

.wdb-team-coverflow-slide .wdb-team-avatar {
    width: 120px;
    height: 120px;
    border: 3px solid var(--wdb-tm-border);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.wdb-team-coverflow-slide .wdb-team-avatar img {
    border-radius: 50%;
    object-position: var(--wdb-tm-cov-obj-x, 50%) var(--wdb-tm-cov-obj-y, 50%);
}

/* Non-active slides: muted */
.wdb-team-coverflow-swiper .swiper-slide:not(.swiper-slide-active) .wdb-team-coverflow-slide {
    opacity: 0.5;
}

.wdb-team-coverflow-swiper .swiper-slide:not(.swiper-slide-active) .wdb-team-avatar img {
    filter: grayscale(40%);
}

.wdb-team-coverflow-swiper .swiper-slide:not(.swiper-slide-active) .wdb-team-name,
.wdb-team-coverflow-swiper .swiper-slide:not(.swiper-slide-active) .wdb-team-role {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Adjacent slides: partially visible */
.wdb-team-coverflow-swiper .swiper-slide-prev .wdb-team-coverflow-slide,
.wdb-team-coverflow-swiper .swiper-slide-next .wdb-team-coverflow-slide {
    opacity: 0.7;
}

.wdb-team-coverflow-swiper .swiper-slide-prev .wdb-team-avatar img,
.wdb-team-coverflow-swiper .swiper-slide-next .wdb-team-avatar img {
    filter: grayscale(20%);
}

/* Active slide: highlighted */
.wdb-team-coverflow-swiper .swiper-slide-active .wdb-team-coverflow-slide {
    opacity: 1;
}

.wdb-team-coverflow-swiper .swiper-slide-active .wdb-team-avatar {
    border-color: var(--wdb-tm-accent);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.3), 0 8px 24px rgba(0, 0, 0, 0.3);
    transform: scale(1.15);
}

.wdb-team-coverflow-swiper .swiper-slide-active .wdb-team-avatar img {
    filter: grayscale(0%);
}

.wdb-team-coverflow-swiper .swiper-slide-active .wdb-team-name,
.wdb-team-coverflow-swiper .swiper-slide-active .wdb-team-role {
    opacity: 1;
}

.wdb-team-coverflow-slide .wdb-team-name {
    margin-top: 12px;
    font-size: 14px;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.wdb-team-coverflow-slide .wdb-team-role {
    font-size: 11px;
    transition: opacity 0.3s ease;
}

/* Info panel below coverflow */
.wdb-team-coverflow-panels {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    min-height: 80px;
}

.wdb-team-coverflow-panel {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 24px;
    background: var(--wdb-tm-bg-card);
    border-radius: var(--wdb-tm-radius);
    border: 1px solid var(--wdb-tm-border);
    animation: wdb-team-coverflow-panel-in 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    transition: background var(--wdb-tm-transition), border-color var(--wdb-tm-transition), box-shadow var(--wdb-tm-transition);
}

.wdb-team-coverflow-panel.active {
    display: flex;
}

@keyframes wdb-team-coverflow-panel-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Alpha edge masks (coverflow) */
.wdb-team-alpha-edges {
    position: relative;
}

.wdb-team-alpha-edges::before,
.wdb-team-alpha-edges::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 10;
    pointer-events: none;
}

.wdb-team-alpha-edges::before {
    left: 0;
    background: linear-gradient(to right, var(--wdb-tm-bg) 0%, transparent 100%);
}

.wdb-team-alpha-edges::after {
    right: 0;
    background: linear-gradient(to left, var(--wdb-tm-bg) 0%, transparent 100%);
}

/* ==========================================================================
   RESPONSIVE — TABLET
   ========================================================================== */

@media (max-width: 1024px) {
    .wdb-team {
        padding: 28px;
    }

    .wdb-team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

/* ==========================================================================
   RESPONSIVE — MOBILE LANDSCAPE
   ========================================================================== */

@media (max-width: 768px) {
    .wdb-team {
        padding: 20px;
    }

    .wdb-team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    /* Grid mobile slider: swap grid/desktop-slider → mobile slider */
    .wdb-team-grid-has-mobile,
    .wdb-team-grid-desk-has-mobile {
        display: none;
    }

    .wdb-team-grid-mobile {
        display: block;
    }

    .wdb-team-alpha-edges::before,
    .wdb-team-alpha-edges::after {
        width: 30px;
    }
}

/* ==========================================================================
   RESPONSIVE — MOBILE PORTRAIT
   ========================================================================== */

@media (max-width: 480px) {
    .wdb-team {
        padding: 16px;
        border-radius: var(--wdb-tm-radius-sm);
    }

    .wdb-team-grid {
        grid-template-columns: 1fr;
    }

    .wdb-team-name {
        font-size: 16px;
    }

    .wdb-team-role {
        font-size: 12px;
    }

    .wdb-team-coverflow-swiper .swiper-slide {
        width: 120px;
    }

    .wdb-team-coverflow-slide .wdb-team-avatar {
        width: 90px;
        height: 90px;
    }

    .wdb-team-coverflow-panel {
        padding: 16px;
    }

    .wdb-team-alpha-edges::before,
    .wdb-team-alpha-edges::after {
        width: 20px;
    }
}
