.partner-card {
    position: relative;
    overflow: hidden;
    text-decoration: none;
}
.partner-card .lux-card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
}
.partner-card .name-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 0.5rem;
    background: rgba(0,0,0,0.6);
    color: #fff;
    text-align: center;
    font-weight: 600;
    transition: background 0.3s ease;
}
.partner-card:hover .name-overlay {
    background: rgba(0,0,0,0.8);
}
/* Advanced partner card styles */
.partner-card-advanced {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.2);
    display: flex;
    flex-direction: column;
    height: 100%;
}
.partner-card-advanced:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}
.partner-card-advanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}
.partner-card-advanced:hover::before {
    left: 100%;
}
.partner-logo-container {
    width: 160px;
    height: 100px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}
.partner-logo-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
}
.partner-card-advanced:hover .partner-logo-container::before {
    opacity: 0.1;
}
.partner-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}
.partner-card-advanced:hover .partner-logo-container {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: rgba(102,126,234,0.3);
}
.partner-card-advanced:hover .partner-logo {
    transform: scale(1.05);
}
.partner-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    text-align: center;
}
.partner-description {
    color: #7f8c8d;
    font-size: 0.9rem;
    text-align: center;
    line-height: 1.6;
}
.fade-in {
    animation: fadeInUp 0.8s ease-out;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }

/* CRITICAL FIX: Carousel container needs relative positioning and padding */
.carousel {
    position: relative !important;
    padding: 0 90px !important; /* Add padding to accommodate outside arrows */
}

@media (max-width: 1400px) {
    .carousel {
        padding: 0 50px !important;
    }
}

@media (max-width: 1200px) {
    .carousel {
        padding: 0 !important; /* Remove padding when arrows are inside */
    }
}

/* Ensure carousel inner takes full width */
.carousel-inner {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Professional Carousel Controls - Fixed Positioning */
.carousel-control-prev,
.carousel-control-next {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    min-height: 56px !important;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50% !important;
    border: 2px solid rgba(0, 0, 0, 0.08);
    opacity: 0.9;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 !important;
}

/* Position arrows with more spacing from cards */
.carousel-control-prev {
    left: -80px !important;
}

.carousel-control-next {
    right: -80px !important;
}

/* For smaller containers, bring arrows closer but still with spacing */
@media (max-width: 1400px) {
    .carousel-control-prev {
        left: -40px !important;
    }

    .carousel-control-next {
        right: -40px !important;
    }
}

/* For even smaller screens, position inside but with good spacing */
@media (max-width: 1200px) {
    .carousel-control-prev {
        left: 30px !important;
    }

    .carousel-control-next {
        right: 30px !important;
    }
}

.carousel-control-prev::before,
.carousel-control-next::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    transform: translateY(-50%) scale(1.08) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
    opacity: 1;
    background: rgba(255, 255, 255, 1);
    border-color: rgba(0, 0, 0, 0.1);
}

.carousel-control-prev:hover::before,
.carousel-control-next:hover::before {
    background: rgba(255,255,255,0.2);
}

/* Custom Arrow Icons */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 24px;
    height: 24px;
    background: none !important;
    background-image: none !important;
    position: relative;
    z-index: 1;
}

.carousel-control-prev-icon::before,
.carousel-control-next-icon::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border: solid #666666;
    border-width: 0 3px 3px 0;
    display: inline-block;
    transition: all 0.3s ease;
    top: 50%;
    left: 50%;
}

.carousel-control-prev-icon::before {
    transform: translate(-25%, -50%) rotate(135deg);
}

.carousel-control-next-icon::before {
    transform: translate(-75%, -50%) rotate(-45deg);
}

.carousel-control-prev:hover .carousel-control-prev-icon::before {
    border-color: #333333;
    transform: translate(-25%, -50%) rotate(135deg) scale(1.1);
}

.carousel-control-next:hover .carousel-control-next-icon::before {
    border-color: #333333;
    transform: translate(-75%, -50%) rotate(-45deg) scale(1.1);
}

/* Enhanced focus states for accessibility */
.carousel-control-prev:focus,
.carousel-control-next:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25), 0 4px 20px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.95);
}

/* Active state */
.carousel-control-prev:active,
.carousel-control-next:active {
    transform: translateY(-50%) scale(0.95) !important;
    transition: all 0.1s ease;
}

/* Responsive adjustments - maintaining perfect circles */
@media (max-width: 992px) {
    .carousel-control-prev,
    .carousel-control-next {
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
        min-height: 48px !important;
    }

    .carousel-control-prev {
        left: 25px !important;
    }

    .carousel-control-next {
        right: 25px !important;
    }

    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 20px;
        height: 20px;
    }

    .carousel-control-prev-icon::before,
    .carousel-control-next-icon::before {
        width: 12px;
        height: 12px;
    }
}

@media (max-width: 768px) {
    .carousel-control-prev,
    .carousel-control-next {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        box-shadow: 0 3px 15px rgba(0, 0, 0, 0.12);
    }

    .carousel-control-prev {
        left: 20px !important;
    }

    .carousel-control-next {
        right: 20px !important;
    }

    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 18px;
        height: 18px;
    }

    .carousel-control-prev-icon::before,
    .carousel-control-next-icon::before {
        width: 10px;
        height: 10px;
        border-width: 0 2px 2px 0;
    }

    .carousel-control-prev:hover,
    .carousel-control-next:hover {
        transform: translateY(-50%) scale(1.05) !important;
    }
}

/* Smooth carousel transitions */
.carousel-item {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ensure proper z-index stacking */
.partners-section,
.associate-partners-section {
    position: relative;
    z-index: 1;
}

/* Fix for Bootstrap's default arrow positioning */
.carousel-control-prev-icon[aria-hidden="true"],
.carousel-control-next-icon[aria-hidden="true"] {
    background-image: none !important;
}