.partners-marquee-section {
    background-color: #0f3b75;
    padding: 0;
    overflow-x: hidden;
    overflow-y: visible;
    position: relative;
    width: 100%;
    max-width: 100vw; /* Ensure it doesn't exceed viewport width */
    z-index: 10;
}

.partners-marquee {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    overflow: hidden; /* Standard overflow hidden for slider */
}

.partners-marquee .swiper-wrapper {
    transition-timing-function: linear !important;
    align-items: center;
}

.partner-slide {
    width: auto !important;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 40px;
    flex-shrink: 0;
    position: relative;
    /* Context for absolute tooltip */
    cursor: pointer;
    background: #0C3C75;
    transition: none;
}

.partner-slide:hover {
    background: #FFFFFF;
}

@media (max-width: 1024px) {
    .partners-marquee {
        height: 96px;
    }

    .partner-slide {
        padding: 0 25px;
    }
}

@media (max-width: 768px) {
    .partners-marquee {
        height: 84px;
    }

    .partner-slide {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .partners-marquee {
        height: 72px;
    }

    .partner-slide {
        padding: 0 12px;
    }

    .partner-logo-wrap {
        height: 32px;
    }

    .partner-slide img {
        max-height: 32px;
        opacity: 0.85;
    }
}

@media (max-width: 360px) {
    .partners-marquee {
        height: 64px;
    }

    .partner-slide {
        padding: 0 10px;
    }

    .partner-logo-wrap {
        height: 28px;
    }

    .partner-slide img {
        max-height: 28px;
    }
}

@media (min-width: 1600px) {
    .partners-marquee {
        height: 140px;
    }

    .partner-slide {
        padding: 0 56px;
    }

    .partner-logo-wrap {
        height: 48px;
    }

    .partner-slide img {
        max-height: 48px;
    }
}

@media (min-width: 1920px) {
    .partners-marquee {
        height: 156px;
    }

    .partner-slide {
        padding: 0 64px;
    }

    .partner-logo-wrap {
        height: 54px;
    }

    .partner-slide img {
        max-height: 54px;
    }
}

.partner-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    line-height: 0;
}

.partner-slide img {
    max-height: 40px;
    width: auto;
    object-fit: contain;
    opacity: 0.7;
    transition: all 0.3s ease;
    filter: brightness(0) invert(1);
    position: relative;
    z-index: 1;
}

.partner-slide.partner-logo-gray img {
    filter: brightness(0) invert(1) !important;
    opacity: 0.5;
}

.partner-slide:hover img {
    opacity: 1;
    filter: none !important;
}

.partner-slide.partner-logo-gray:hover img {
    filter: none !important;
    opacity: 1;
}

/* Original internal tooltip - hidden but kept as data source if needed, 
   or we can style the portal using these classes */
.partner-tooltip {
    display: none; /* Hide original, we use portal now */
}

/* Portal Tooltip Styling */
.partners-tooltip-portal {
    position: fixed; /* Fixed relative to viewport to avoid overflow issues */
    width: 320px;
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 99999999;
    pointer-events: none;
    text-align: left;
    transform: translateX(-50%) translateY(10px);
}

.partners-tooltip-portal.is-active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Tooltip Arrow */
.partners-tooltip-portal::after {
    content: '';
    position: absolute;
    bottom: -8px; 
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #fff; 
}

.partner-tooltip-title {
    color: #111;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.2;
}

.partner-tooltip-desc {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 400;
}

/* Mobile specific styling for portal */
@media (max-width: 768px) {
    .partners-tooltip-portal {
        width: 90% !important;
        max-width: 320px;
        /* Let JS handle positioning relative to the element */
    }

    .partners-tooltip-portal::after {
        display: none;
    }
}
