/* CSS Variables for Light/Dark Mode (Fallbacks) */
:root {
    --partners-primary: #efc1a9;
}

#partners {
    padding: 80px 0 !important;
    overflow: hidden !important;
}

/* 1. The Main Container */
.About__container {
    padding: 20px 0 80px !important;
    position: relative !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
}

/* 2. The Horizontal Wrapper */
.partners__wrapper {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 30px !important;
    overflow-x: auto !important;
    scroll-behavior: smooth !important;
    padding: 20px 10px !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.partners__wrapper::-webkit-scrollbar {
    display: none !important;
}

/* 3. The Professional Card - Direct Theme Support */
body .About__card {
    flex: 0 0 calc(25% - 22.5px) !important;
    min-width: 250px !important;
    padding: 30px 20px !important;
    border-radius: 16px !important;
    text-align: center !important;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Light Theme - Direct */
body:not(.dark-theme) .About__card {
    background-color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
}

body:not(.dark-theme) .About__title {
    color: #2c3e50 !important;
}

body:not(.dark-theme) .About__description {
    color: #7f8c8d !important;
}

body:not(.dark-theme) .About__img {
    background-color: #ffffff !important;
}

/* Dark Theme - Direct */
body.dark-theme .About__card {
    background-color: #1a1a1a !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .About__title {
    color: #ffffff !important;
}

body.dark-theme .About__description {
    color: #bbbbbb !important;
}

body.dark-theme .About__img {
    background-color: #ffffff !important;
    /* Keep images clear */
}

/* Hover Effects */
body .About__card:hover {
    transform: translateY(-10px) !important;
}

body:not(.dark-theme) .About__card:hover {
    box-shadow: 0 15px 35px rgba(239, 193, 169, 0.2) !important;
    border-color: #efc1a9 !important;
}

body.dark-theme .About__card:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5) !important;
    border-color: #efc1a9 !important;
}

/* Images Styling */
body .About__img {
    width: 100% !important;
    max-width: 140px !important;
    height: 80px !important;
    object-fit: contain !important;
    margin-bottom: 20px !important;
    transition: transform 0.3s ease !important;
    padding: 10px !important;
    border-radius: 8px !important;
}

body .About__card:hover .About__img {
    transform: scale(1.08) !important;
}

/* Titles and Descriptions Shared */
body .About__title {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    margin-bottom: 10px !important;
    line-height: 1.4 !important;
}

body .About__description {
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    margin: 0 !important;
}

/* 4. Arrows - Direct Theme Support - PLACED BOTTOM */
body .partners__arrow {
    width: 48px !important;
    height: 48px !important;
    border-radius: 12px !important;
    /* Modern Square */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    font-size: 24px !important;
    z-index: 50 !important;
}

body:not(.dark-theme) .partners__arrow {
    background-color: #ffffff !important;
    border: 2px solid rgba(239, 193, 169, 0.3) !important;
    color: #efc1a9 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

body.dark-theme .partners__arrow {
    background-color: #2c2c2c !important;
    border: 2px solid rgba(239, 193, 169, 0.3) !important;
    color: #efc1a9 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

body .partners__arrow:hover {
    background-color: #efc1a9 !important;
    color: #ffffff !important;
    transform: translateY(-5px) !important;
    border-color: #efc1a9 !important;
    box-shadow: 0 8px 20px rgba(239, 193, 169, 0.3) !important;
}

.partners__arrow--prev,
.partners__arrow--next {
    position: absolute !important;
    top: auto !important;
    bottom: 20px !important;
    transform: none !important;
}

/* Center group at bottom */
.partners__arrow--prev {
    left: calc(50% - 60px) !important;
}

.partners__arrow--next {
    left: calc(50% + 10px) !important;
    right: auto !important;
}

/* RTL Support - Flip positions */
[dir="rtl"] .partners__arrow--prev {
    right: calc(50% - 60px) !important;
    left: auto !important;
}

[dir="rtl"] .partners__arrow--next {
    right: calc(50% + 10px) !important;
    left: auto !important;
}

/* 5. Responsive Adjustments */
@media screen and (max-width: 1250px) {
    .partners__arrow--prev {
        left: 10px !important;
    }

    .partners__arrow--next {
        right: 10px !important;
    }

    [dir="rtl"] .partners__arrow--prev {
        right: 10px !important;
        left: auto !important;
    }

    [dir="rtl"] .partners__arrow--next {
        left: 10px !important;
        right: auto !important;
    }
}

@media screen and (max-width: 1024px) {
    .About__card {
        flex: 0 0 calc(50% - 15px) !important;
    }
}

@media screen and (max-width: 600px) {
    .About__card {
        flex: 0 0 85% !important;
    }

    .partners__arrow {
        display: none !important;
    }

    #partners {
        padding: 50px 0 !important;
    }

    .About__container {
        padding-bottom: 20px !important;
    }
}