/* SX1 Partner Manager Styles */
:root {
    --cp-max-width: 1600px;
}

/* Carousel Wrapper */
.sx1-partner-carousel-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    margin: 20px 0;
}

.sx1-partner-carousel-container {
    width: 100%;
    max-width: var(--cp-max-width);
    /* Limit width */
    overflow: hidden;
    margin: 0;
    /* Removed margin: auto to allow arrows to sit next to it */
    padding: 0 50px;
    /* Safe space for arrows on smaller screens */
}

/* Custom Navigation Buttons */
.sx1-swiper-button-prev,
.sx1-swiper-button-next {
    width: 68px;
    height: 93px;
    cursor: pointer;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    flex-shrink: 0;
    transition: transform 0.2s ease;
    /* Removed absolute positioning to let them flow next to container */
    margin: 0 30px;
    /* 30px spacing from carousel */
}

.sx1-swiper-button-prev:hover,
.sx1-swiper-button-next:hover {
    opacity: 0.6;
    /* transform: none;  Removed to avoid conflict with translateY */
}

.sx1-swiper-button-prev {
    background-image: url('../images/nyil-bal.png');
}

.sx1-swiper-button-next {
    background-image: url('../images/nyil-jobb.png');
}

/* Ensure no default swiper buttons interfere if any */
.swiper-button-next,
.swiper-button-prev {
    display: none !important;
}

.sx1-partner-slide {
    text-align: center;
    background: #fff;
    /* Center content in slide */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    /* Fixed height from user req */
    padding: 10px;
    box-sizing: border-box;
    /* Optional: border to visualize square if needed, or shadow? User just said 200x200 square layout */
}

.sx1-partner-slide img {
    max-width: 100%;
    max-height: 100%;
    /* Fit within the 200px container */
    width: auto;
    height: auto;
    object-fit: contain;
    transition: all 0.3s ease;
    opacity: 1;
}

.sx1-partner-slide img:hover {
    /* filter: grayscale(0%); */
    opacity: 0.8;
    /* Slight fade on hover instead of color change */
    transform: scale(1.05);
    /* Slight zoom effect */
}

/* Table / Grid View */
.sx1-partner-table-container {
    width: 100%;
    margin: 20px 0;
}

.sx1-partner-grid {
    display: grid;
    /* grid-template-columns dynamically set via inline styles based on card_size */
    gap: 20px;
    align-items: stretch;
    justify-items: center;
}

.sx1-partner-grid-item {
    text-align: center;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    transition: box-shadow 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

.sx1-partner-grid-item:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Partner card link wrapper */
.sx1-partner-card-link,
.sx1-partner-card-nolink {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.sx1-partner-card-link:hover {
    text-decoration: none;
}

/* Square image wrapper */
.sx1-partner-image-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.sx1-partner-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%);
    transition: filter 0.3s ease, transform 0.3s ease;
    opacity: 0.8;
}

.sx1-partner-grid-item:hover .sx1-partner-image-wrapper img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

/* Partner name below logo */
.sx1-partner-name {
    display: block;
    margin-top: 10px;
    font-size: 18px;
    font-weight: 500;
    color: #444;
    text-align: center;
    transition: color 0.3s ease;
}

.sx1-partner-card-link:hover .sx1-partner-name {
    color: var(--primary-dark);
}

/* Responsive adjustments */
@media (max-width: 980px) {
    .sx1-partner-grid-item img {
        filter: none;
    }
}

@media (max-width: 768px) {
    .sx1-partner-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 15px;
    }
    
    .sx1-partner-name {
        font-size: 12px;
    }

}

@media (max-width: 480px) {
    .sx1-partner-carousel-container {
        padding: 0 12px;
    }
    .sx1-partner-grid {
        gap: 10px;
    }
    
    .sx1-partner-grid-item {
        padding: 10px;
    }

    .sx1-swiper-button-next,
    .sx1-swiper-button-prev {
        width: 40px !important;
        height: 60px !important;
    }

}