/* Zendrop Speakers Widget
 * Selectors are scoped under .zsp-wrapper and layout-critical rules use
 * !important so theme / Elementor global styles and Swiper's bundle CSS
 * cannot override the grid <-> slider behavior.
 */

.zsp-wrapper {
    --zsp-gap: 24px;
    width: 100%;
    box-sizing: border-box;
}

.zsp-wrapper *,
.zsp-wrapper *::before,
.zsp-wrapper *::after {
    box-sizing: border-box;
}

/* ── Header ─────────────────────────────────────────────── */
.zsp-wrapper .zsp-header {
    text-align: center;
    margin: 0 0 40px;
}

.zsp-wrapper .zsp-title {
    margin: 0 0 12px;
    padding: 0;
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 800;
    line-height: 1.05;
    color: #ffffff;
}

.zsp-wrapper .zsp-subtitle {
    margin: 0;
    padding: 0;
    font-size: clamp(15px, 2vw, 20px);
    line-height: 1.4;
    color: #9ca3af;
}

/* ── Grid (desktop default) ─────────────────────────────── */
.zsp-wrapper .zsp-grid {
    position: relative;
    overflow: hidden;
    margin: 0;
    padding: 0;
    width: 100%;
}

/* Force a 3-up grid, overriding Swiper's `.swiper-wrapper { display:flex }`
 * and any theme grid/flex rules. Swiper only adds inline transform once it
 * initializes (mobile), which we neutralize on desktop below. */
.zsp-wrapper .zsp-grid .zsp-track {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    grid-auto-rows: 1fr;
    gap: var(--zsp-gap) !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

/* ── Card ───────────────────────────────────────────────── */
.zsp-wrapper .zsp-grid .zsp-slide {
    display: flex !important;
    height: auto !important;
    list-style: none !important;
}

.zsp-wrapper .zsp-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    margin: 0;
    padding: 32px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    background: #15161a;
}

.zsp-wrapper .zsp-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #2a2b31;
    color: #ffffff;
    flex-shrink: 0;
    margin: 0 0 18px;
    padding: 0;
}

.zsp-wrapper .zsp-avatar--highlight {
    background: #6c5ce7;
}

.zsp-wrapper .zsp-avatar-img {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    display: block;
    border-radius: 0;
}

.zsp-wrapper .zsp-initials {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1;
    color: #ffffff;
}

.zsp-wrapper .zsp-avatar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.zsp-wrapper .zsp-avatar-icon svg {
    width: 50%;
    height: 50%;
    opacity: 0.7;
}

.zsp-wrapper .zsp-name {
    margin: 0 0 8px;
    padding: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
}

.zsp-wrapper .zsp-desc {
    margin: 0 0 18px;
    padding: 0;
    font-size: 16px;
    line-height: 1.4;
    color: #9ca3af;
}

.zsp-wrapper .zsp-badge {
    display: inline-block;
    margin: auto 0 0;
    padding: 6px 16px;
    border: 0;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    color: #c9c2ff;
    background: #6c5ce7;
    white-space: nowrap;
}

/* ── Pagination dots (mobile only) ──────────────────────── */
.zsp-wrapper .zsp-pagination {
    display: none;
    position: static;
    margin: 22px 0 0;
    text-align: center;
}

.zsp-wrapper .zsp-pagination .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.35);
    opacity: 1;
}

.zsp-wrapper .zsp-pagination .swiper-pagination-bullet-active {
    background: #6c5ce7;
}

/* ── Mobile: single-slide Swiper ────────────────────────── */
@media (max-width: 767px) {
    /* Once Swiper initializes it manages the layout: hand control back to it. */
    .zsp-wrapper .zsp-grid.swiper-initialized .zsp-track {
        display: flex !important;
        grid-template-columns: none !important;
        gap: 0 !important;
    }

    .zsp-wrapper .zsp-grid.swiper-initialized .zsp-slide {
        height: auto !important;
        flex-shrink: 0 !important;
    }

    /* Before init / no-JS fallback: stack vertically so nothing is clipped. */
    .zsp-wrapper .zsp-grid:not(.swiper-initialized) .zsp-track {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    .zsp-wrapper .zsp-pagination {
        display: block;
    }

    /* Keep the single card comfortably inside the viewport. */
    .zsp-wrapper .zsp-card {
        padding: 24px 20px;
    }

    .zsp-wrapper .zsp-avatar {
        width: 60px;
        height: 60px;
        margin-bottom: 14px;
    }

    .zsp-wrapper .zsp-initials {
        font-size: 20px;
    }

    .zsp-wrapper .zsp-name {
        font-size: 19px;
    }

    .zsp-wrapper .zsp-desc {
        font-size: 15px;
        margin-bottom: 14px;
    }

    .zsp-wrapper .zsp-header {
        margin-bottom: 28px;
    }
}
