/**
 * Partners Section Styles
 * Tabbed testimonial section with logo grid navigation
 * Uses CSS custom properties from PHP module
 */

/* ========================================
   Section Container
   ======================================== */
.partners-section {
    position: relative;
    width: 100%;
}

.partners-section__container {
    max-width: 1632px;
    margin: 0 auto;
    overflow: hidden;
}

/* ========================================
   Logo Grid — scrollable flex container
   ======================================== */
.partners-section__logo-grid {
    display: flex;
    gap: 32px;
    margin-bottom: 32px;
    padding: 0 20px;
    overflow-x: auto;
    overflow-y: hidden;
    cursor: grab;
    -webkit-overflow-scrolling: touch;
    /* Hide scrollbar */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE / Edge */
}

.partners-section__logo-grid::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

.partners-section__logo-grid.is-dragging {
    cursor: grabbing;
    user-select: none;
}

.partners-section__logo-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: #F8F8F8;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-sizing: border-box;
    height: 158px;
    flex-shrink: 0;
    width: 374px;
    max-width: calc(25% - 32px * 3 / 4);
}

.partners-section__logo-item:hover {
    background: #f2f2f2;
}

/* Active logo — linear-gradient background */
.partners-section__logo-item--active,
.partners-section__logo-item--active:hover {
    background: linear-gradient(95.61deg, #042B7C -30.07%, #046CBC 97.59%), linear-gradient(180deg, #042B7C 0%, #046CBC 100%);
    transform: none;
}

/* Invert logo colors on active item */
.partners-section__logo-item--active .partners-section__logo-img {
    filter: brightness(0) invert(1);
}

.partners-section__logo-img {
    max-width: var(--ps-logo-w, 120px);
    height: auto;
    width: auto;
    object-fit: cover;
    display: block;
    transition: filter 0.3s ease;
}

/* Grouped logos (2 on one item) */
.partners-section__logo-group {
    display: flex;
    align-items: center;
    gap: 24px;
}

.partners-section__logo-group .partners-section__logo-img {
    max-width: calc(var(--ps-logo-w, 120px) / 1.5);
}

/* ========================================
   Content — Testimonial + Visual (Swiper)
   ======================================== */
.partners-section__content {
    position: relative;
    min-height: 300px;
    overflow: hidden;
    padding: 0 20px;
}

.partners-section__content-swiper {
    overflow: hidden;
}

/* Panel — each is a Swiper slide */
.partners-section__panel {
    display: flex;
    gap: 32px;
    align-items: stretch;
    box-sizing: border-box;
}

/* ========================================
   Testimonial Card
   ======================================== */
.testimonial-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 48px;
    background: #F8F8F8;
    border-radius: 16px;
    padding: 32px;
    box-sizing: border-box;
}

.testimonial-card__text {
    font-size: 18px;
    line-height: 150%;
    color: #000000;
    font-weight: 300;
}

.partners-section__cta-icon.et-pb-icon {
    font-size: 16px;
}

.testimonial-card__author {
    display: flex;
    align-items: center;
    gap: 16px;
}

.testimonial-card__author-logo {
    max-width: 107px;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.testimonial-card__meta {
    display: flex;
    flex-direction: column;
    font-weight: 300;
    font-size: 16px;
    line-height: 150%;
    letter-spacing: 0;
    color: #000;
}

.testimonial-card__name {
    font-weight: 400;
}

/* ========================================
   Visual Image
   ======================================== */
.partners-section__visual {
    flex: 1;
}

.partners-section__image-container {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    height: 100%;
}

.partners-section__image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(4, 43, 124, 0.4), rgba(4, 43, 124, 0.4));
    z-index: 1;
    pointer-events: none;
}

.partners-section__main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.partners-section__cta {
    position: absolute;
    bottom: 24px;
    right: 24px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background: #042B7C;
    color: #ffffff;
    border: 1px solid #042B7C;
    border-radius: 100px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    z-index: 10;
}

.partners-section__cta:hover {
    background: #ffffff;
    color: #042B7C;
    border-color: #042B7C;
}

.partners-section__cta-icon {
    width: 24px;
    height: 24px;
    display: inline-block;
    background-image: url('cta-icon-white.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transition: all 0.3s ease;
}

.partners-section__cta:hover .partners-section__cta-icon {
    background-image: url('cta-icon-blue.svg');
}


/* ========================================
   Navigation — dots left, arrows right
   ======================================== */
.partners-section__navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 32px;
    padding: 0 20px;
}

.partners-section__pagination {
    display: flex;
    align-items: center;
    gap: 8px;
}

.partners-section__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #000000;
    opacity: 0.2;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.partners-section__dot:hover {
    opacity: 0.5;
}

.partners-section__dot--active {
    background-color: #046CBC;
    opacity: 1;
}

/* ========================================
   Arrows — prev gray outline, next filled
   ======================================== */
.partners-section__controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.partners-section__arrow {
    width: 48px;
    height: 48px;
    border-radius: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: none;
    background: linear-gradient(94.34deg, #042B7C -2.23%, #046CBC 98.09%);
    color: #ffffff;
}

.partners-section__arrow:disabled,
.partners-section__arrow--disabled {
    background: #BCBCBC !important;
    background: var(--ps-arrow-disabled-bg, #BCBCBC) !important;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Arrow icon handling */
.partners-section__arrow::after {
    content: '';
    display: block;
    width: 20px;
    height: 20px;
    background-color: currentColor;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-position: center;
    mask-size: contain;
    -webkit-mask-size: contain;
}

/* Prev arrow — outline style */
.partners-section__arrow--prev::after {
    mask-image: url('arrow-prev.svg');
    -webkit-mask-image: url('arrow-prev.svg');
}

/* Next arrow — filled style */
.partners-section__arrow--next::after {
    mask-image: url('arrow-next.svg');
    -webkit-mask-image: url('arrow-next.svg');
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 980px) {
    .partners-section__title {
        font-size: 28px;
    }

    .partners-section__panel {
        flex-direction: column;
    }

    .partners-section__logo-grid {
        gap: 16px;
    }

    .partners-section__logo-item {
        padding: 14px 16px;
    }

    .partners-section__navigation {
        flex-direction: column;
        gap: 32px;
    }
}

@media (max-width: 600px) {

    .partners-section__logo-item {
        width: calc(100% - 32px);
        max-width: 374px;
        flex: 0 0 auto;
    }

    .partners-section__logo-item {
        min-width: 100%;
        flex-shrink: 0;
    }

    .testimonial-card {
        padding: 32px;
    }

    .testimonial-card__text {
        font-size: 16px;
    }

    .partners-section__main-img {
        aspect-ratio: 16 / 9;
    }

    .partners-section__container {
        position: relative;
    }

    .partners-section__visual {
        padding-top: 116px;
    }

    .partners-section__navigation {
        position: absolute;
        bottom: 283px;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
        z-index: 10;
    }
}