/* Partners Section - Final Production Fix */

/* Remove debug styles and apply final production styles */
.About__container {
    border: none !important;
    position: relative !important;
    overflow: hidden !important;
    width: 100% !important;
    padding: 2rem 0 4rem 0 !important;
}

.About__container::before,
.About__container::after {
    display: none !important;
}

.About__container .swiper-wrapper::before {
    display: none !important;
}

.About__container .swiper-slide::before {
    display: none !important;
}

/* Enhanced Swiper Container */
.About__container.swiper {
    display: block !important;
    padding-bottom: 4rem !important;
}

.About__container .swiper-wrapper {
    border: none !important;
    display: flex !important;
    align-items: stretch !important;
    transition-timing-function: ease-in-out !important;
    min-height: auto !important;
}

/* Perfect Card Styling */
.About__card {
    /* width: 300px !important; REMOVED */
    max-width: 320px !important;
    margin: 0 auto !important;
    background: var(--container-color) !important;
    border-radius: 1.5rem !important;
    padding: 1rem 1rem 2rem 1rem !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    border: 1px solid rgba(239, 193, 169, 0.1) !important;
    position: relative !important;
    overflow: hidden !important;
}

.About__card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #efc1a9, #d4a894);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.About__card:hover::before {
    transform: scaleX(1);
}

.About__card:hover {
    box-shadow: 0 20px 40px rgba(239, 193, 169, 0.15) !important;
    transform: translateY(-8px) !important;
    border-color: rgba(239, 193, 169, 0.3) !important;
}

/* Perfect Image Styling */
.About__img {
    width: 100% !important;
    height: 180px !important;
    object-fit: contain !important;
    border-radius: 1rem !important;
    margin-bottom: 1.5rem !important;
    background: #f8f9fa !important;
    padding: 1rem !important;
    box-sizing: border-box !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    transition: all 0.3s ease !important;
}

.About__card:hover .About__img {
    transform: scale(1.05);
    background: #fff;
}

/* Perfect Data Section */
.About__data {
    text-align: center !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

.About__title {
    font-size: 1.1rem !important;
    margin-bottom: 0.75rem !important;
    color: var(--title-color) !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    min-height: 2.6rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.About__description {
    font-size: 0.9rem !important;
    color: var(--text-color) !important;
    line-height: 1.5 !important;
    flex: 1 !important;
    opacity: 0.8 !important;
    margin-bottom: 1rem !important;
}

.About__price {
    margin-bottom: 0.5rem !important;
}

.About__price span {
    color: var(--second-color) !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
}

/* Perfect Swiper Slides */
.swiper-slide {
    height: auto !important;
    display: flex !important;
    justify-content: center !important;
    align-items: stretch !important;
    border: none !important;
}

/* Perfect Navigation Buttons */
.About__container .swiper-button-next,
.About__container .swiper-button-prev {
    top: auto !important;
    bottom: -1rem !important;
    width: 50px !important;
    height: 50px !important;
    background: linear-gradient(135deg, #efc1a9, #d4a894) !important;
    border: none !important;
    border-radius: 50% !important;
    color: white !important;
    font-size: 1.5rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 15px rgba(239, 193, 169, 0.3) !important;
    margin-top: 0 !important;
}

.About__container .swiper-button-next::after,
.About__container .swiper-button-prev::after {
    font-size: 18px !important;
    font-weight: bold !important;
}

.About__container .swiper-button-next:hover,
.About__container .swiper-button-prev:hover {
    background: linear-gradient(135deg, #d4a894, #c19a85) !important;
    transform: scale(1.1) !important;
    box-shadow: 0 6px 20px rgba(239, 193, 169, 0.4) !important;
}

.About__container .swiper-button-prev {
    left: calc(50% - 4rem) !important;
}

.About__container .swiper-button-next {
    right: calc(50% - 4rem) !important;
}

/* RTL Support for Arabic */
.rtl .About__container .swiper-button-prev {
    right: calc(50% - 4rem) !important;
    left: auto !important;
}

.rtl .About__container .swiper-button-next {
    left: calc(50% - 4rem) !important;
    right: auto !important;
}

/* Dark Theme Perfect Support */
.dark-theme .About__card {
    background: var(--container-color) !important;
    border-color: rgba(239, 193, 169, 0.2) !important;
}

.dark-theme .About__img {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.dark-theme .About__card:hover .About__img {
    background: rgba(255, 255, 255, 0.1) !important;
}

.dark-theme .About__container .swiper-button-next,
.dark-theme .About__container .swiper-button-prev {
    background: linear-gradient(135deg, #efc1a9, #d4a894) !important;
    box-shadow: 0 4px 15px rgba(239, 193, 169, 0.2) !important;
}

/* Mobile Responsive Perfect */
@media screen and (max-width: 768px) {
    .About__card {
        /* width: 280px !important; REMOVED to let Swiper control width */
        max-width: none !important;
        padding: 0.75rem 0.75rem 1.5rem 0.75rem !important;
    }

    .About__img {
        height: 160px !important;
        margin-bottom: 1rem !important;
    }

    .About__title {
        font-size: 1rem !important;
        min-height: 2.2rem !important;
    }

    .About__description {
        font-size: 0.85rem !important;
    }

    .About__container .swiper-button-next,
    .About__container .swiper-button-prev {
        width: 44px !important;
        height: 44px !important;
        font-size: 1.3rem !important;
    }

    .About__container .swiper-button-prev {
        left: calc(50% - 3.5rem) !important;
    }

    .About__container .swiper-button-next {
        right: calc(50% - 3.5rem) !important;
    }
}

@media screen and (max-width: 480px) {
    .About__card {
        /* width: 260px !important; REMOVED */
        max-width: none !important;
    }

    .About__container .swiper-button-next,
    .About__container .swiper-button-prev {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.2rem !important;
    }

    .About__container .swiper-button-prev {
        left: calc(50% - 3rem) !important;
    }

    .About__container .swiper-button-next {
        right: calc(50% - 3rem) !important;
    }
}

/* Fallback Grid Layout */
.About__container:not(.swiper-initialized) .swiper-wrapper {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 2rem !important;
    transform: none !important;
    justify-items: center !important;
}

.About__container:not(.swiper-initialized) .swiper-slide {
    width: auto !important;
    transform: none !important;
    display: flex !important;
    justify-content: center !important;
}

/* Loading Animation */
.About__container:not(.swiper-initialized) {
    position: relative;
}

.About__container:not(.swiper-initialized)::after {
    content: 'تحميل الشركاء...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(239, 193, 169, 0.9);
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    z-index: 10;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Success Indicator */
.About__container.swiper-initialized {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ===============================================
   ENHANCED DARK & LIGHT MODE SUPPORT
   =============================================== */

/* Light Mode - Enhanced Visibility */
body:not(.dark-theme) .partners.section,
body:not(.dark-theme) section.partners {
    background: #f8f9fa !important;
}

body:not(.dark-theme) .partners .section__title {
    color: #2c3e50 !important;
    text-shadow: none !important;
}

body:not(.dark-theme) .partners .section__subtitle {
    color: #efc1a9 !important;
}

body:not(.dark-theme) .About__card {
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
}

body:not(.dark-theme) .About__card:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12) !important;
    border-color: #efc1a9 !important;
}

body:not(.dark-theme) .About__title {
    color: #2c3e50 !important;
}

body:not(.dark-theme) .About__description {
    color: #666666 !important;
}

body:not(.dark-theme) .About__img {
    background: #f8f9fa !important;
    border: 1px solid #e0e0e0 !important;
}

body:not(.dark-theme) .About__card:hover .About__img {
    background: #ffffff !important;
}

/* Dark Mode - Enhanced Visibility */
body.dark-theme .partners.section,
body.dark-theme section.partners {
    background: #1a1a1a !important;
}

body.dark-theme .partners .section__title {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
}

body.dark-theme .partners .section__subtitle {
    color: #efc1a9 !important;
}

body.dark-theme .About__card {
    background: #2d2d2d !important;
    border: 1px solid #404040 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
}

body.dark-theme .About__card:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6) !important;
    border-color: #efc1a9 !important;
    background: #353535 !important;
}

body.dark-theme .About__title {
    color: #ffffff !important;
}

body.dark-theme .About__description {
    color: #b0b0b0 !important;
}

body.dark-theme .About__img {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    filter: brightness(0.95) contrast(1.05) !important;
}

body.dark-theme .About__card:hover .About__img {
    background: rgba(255, 255, 255, 0.1) !important;
    filter: brightness(1) contrast(1.1) !important;
}

/* Navigation Arrows - Light Mode */
body:not(.dark-theme) .About__container .swiper-button-next,
body:not(.dark-theme) .About__container .swiper-button-prev {
    background: linear-gradient(135deg, #efc1a9, #d4a894) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(239, 193, 169, 0.3) !important;
}

body:not(.dark-theme) .About__container .swiper-button-next:hover,
body:not(.dark-theme) .About__container .swiper-button-prev:hover {
    background: linear-gradient(135deg, #d4a894, #c19a85) !important;
    box-shadow: 0 6px 20px rgba(239, 193, 169, 0.5) !important;
}

/* Navigation Arrows - Dark Mode */
body.dark-theme .About__container .swiper-button-next,
body.dark-theme .About__container .swiper-button-prev {
    background: linear-gradient(135deg, #efc1a9, #d4a894) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(239, 193, 169, 0.4) !important;
}

body.dark-theme .About__container .swiper-button-next:hover,
body.dark-theme .About__container .swiper-button-prev:hover {
    background: linear-gradient(135deg, #d4a894, #c19a85) !important;
    box-shadow: 0 6px 20px rgba(239, 193, 169, 0.6) !important;
}

/* Pagination Bullets - Light Mode */
body:not(.dark-theme) .About__container .swiper-pagination-bullet {
    background: #2c3e50 !important;
    opacity: 0.3 !important;
}

body:not(.dark-theme) .About__container .swiper-pagination-bullet-active {
    background: #efc1a9 !important;
    opacity: 1 !important;
}

/* Pagination Bullets - Dark Mode */
body.dark-theme .About__container .swiper-pagination-bullet {
    background: #ffffff !important;
    opacity: 0.3 !important;
}

body.dark-theme .About__container .swiper-pagination-bullet-active {
    background: #efc1a9 !important;
    opacity: 1 !important;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    body:not(.dark-theme) .About__card {
        border: 2px solid #000000 !important;
    }
    
    body.dark-theme .About__card {
        border: 2px solid #ffffff !important;
    }
    
    .About__container .swiper-button-next,
    .About__container .swiper-button-prev {
        border: 3px solid #ffffff !important;
    }
}

/* Ensure Arrows are Always Visible and Functional */
.About__container .swiper-button-next,
.About__container .swiper-button-prev {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    z-index: 100 !important;
}

.About__container .swiper-button-disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
}

.About__container .swiper-button-disabled:hover {
    transform: none !important;
}

/* RTL Support Enhancement */
body[dir="rtl"] .About__container .swiper-button-prev,
body.rtl .About__container .swiper-button-prev {
    right: calc(50% - 4rem) !important;
    left: auto !important;
}

body[dir="rtl"] .About__container .swiper-button-next,
body.rtl .About__container .swiper-button-next {
    left: calc(50% - 4rem) !important;
    right: auto !important;
}

/* Mobile RTL Support */
@media screen and (max-width: 768px) {
    body[dir="rtl"] .About__container .swiper-button-prev,
    body.rtl .About__container .swiper-button-prev {
        right: calc(50% - 3.5rem) !important;
        left: auto !important;
    }
    
    body[dir="rtl"] .About__container .swiper-button-next,
    body.rtl .About__container .swiper-button-next {
        left: calc(50% - 3.5rem) !important;
        right: auto !important;
    }
}

@media screen and (max-width: 480px) {
    body[dir="rtl"] .About__container .swiper-button-prev,
    body.rtl .About__container .swiper-button-prev {
        right: calc(50% - 3rem) !important;
        left: auto !important;
    }
    
    body[dir="rtl"] .About__container .swiper-button-next,
    body.rtl .About__container .swiper-button-next {
        left: calc(50% - 3rem) !important;
        right: auto !important;
    }
}
