/* ===================================
   TRUST BAR SECTION - AUTO SLIDER
   =================================== */

.trust-bar {
    padding: var(--spacing-xl) 0;
    background: var(--subtle-gold-gradient);
    position: relative;
    overflow: hidden;
}

.trust-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(217, 180, 95, 0.3), transparent);
}

.trust-bar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(217, 180, 95, 0.3), transparent);
}

/* ===================================
   TRUST BAR CONTENT
   =================================== */

.trust-title {
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-medium);
    margin-bottom: var(--spacing-md);
    position: relative;
}

.trust-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--gold-gradient);
    opacity: 0.5;
}

/* ===================================
   AUTO-SLIDING LOGOS CONTAINER
   =================================== */

.trust-logos {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    animation: slideLogos 25s linear infinite;
    width: max-content;
}

/* Pause animation on hover for better UX */
.trust-bar:hover .trust-logos {
    animation-play-state: paused;
}

/* Smooth infinite scroll animation */
@keyframes slideLogos {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Wrapper to handle overflow and create seamless loop */
.trust-bar .container {
    overflow: hidden;
    position: relative;
}

/* Add gradient fade on edges for premium effect */
.trust-bar .container::before,
.trust-bar .container::after {
    content: '';
    position: absolute;
    top: 0;
    width: 100px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.trust-bar .container::before {
    left: 0;
    background: linear-gradient(to right, var(--primary-subtle-gold), transparent);
}

.trust-bar .container::after {
    right: 0;
    background: linear-gradient(to left, var(--primary-subtle-gold), transparent);
}

/* ===================================
   LOGO STYLING
   =================================== */

.trust-logo {
    flex: 0 0 auto;
    padding: var(--spacing-sm);
    transition: all var(--transition-normal);
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

/* Staggered fade-in animation */
.trust-logo:nth-child(1) { animation-delay: 0.1s; }
.trust-logo:nth-child(2) { animation-delay: 0.2s; }
.trust-logo:nth-child(3) { animation-delay: 0.3s; }
.trust-logo:nth-child(4) { animation-delay: 0.4s; }
.trust-logo:nth-child(5) { animation-delay: 0.5s; }
.trust-logo:nth-child(6) { animation-delay: 0.1s; }
.trust-logo:nth-child(7) { animation-delay: 0.2s; }
.trust-logo:nth-child(8) { animation-delay: 0.3s; }
.trust-logo:nth-child(9) { animation-delay: 0.4s; }
.trust-logo:nth-child(10) { animation-delay: 0.5s; }

.trust-logo img {
    max-width: 160px;
    width: 160px;
    height: auto;
    max-height: 80px;
    object-fit: contain;
    padding: 18px 24px;
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
    border: 2px solid transparent;
    transition: all var(--transition-normal);
    filter: grayscale(0%);
}

.trust-logo:hover img {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 12px 28px rgba(217, 180, 95, 0.2);
    border-color: var(--primary-gold);
    filter: grayscale(0%) brightness(1.1);
}

/* Logo placeholder for text-based logos */
.logo-placeholder {
    padding: 22px 32px;
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-medium);
    text-align: center;
    white-space: nowrap;
    border: 2px solid transparent;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    min-width: 160px;
}

/* Animated gradient border on hover */
.logo-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gold-gradient);
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: -1;
}

.trust-logo:hover .logo-placeholder {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 12px 28px rgba(217, 180, 95, 0.2);
    border-color: var(--primary-gold);
    color: var(--primary-dark-gold);
}

.trust-logo:hover .logo-placeholder::before {
    opacity: 0.1;
}

/* ===================================
   RESPONSIVE TRUST BAR
   =================================== */

@media (max-width: 1200px) {
    .trust-logos {
        gap: var(--spacing-md);
        animation-duration: 20s;
    }
    
    .trust-logo img {
        max-width: 140px;
        width: 140px;
        padding: 16px 22px;
    }
    
    .logo-placeholder {
        padding: 20px 28px;
        min-width: 140px;
    }
}

@media (max-width: 1024px) {
    .trust-bar .container::before,
    .trust-bar .container::after {
        width: 60px;
    }
    
    .trust-logos {
        gap: var(--spacing-sm);
        animation-duration: 18s;
    }
    
    .logo-placeholder {
        padding: 18px 26px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .trust-bar {
        padding: var(--spacing-lg) 0;
    }
    
    .trust-bar .container::before,
    .trust-bar .container::after {
        width: 40px;
    }
    
    .trust-logos {
        gap: var(--spacing-sm);
        animation-duration: 15s;
    }
    
    .trust-logo img {
        max-width: 120px;
        width: 120px;
        padding: 14px 18px;
    }
    
    .logo-placeholder {
        padding: 16px 24px;
        font-size: 0.85rem;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .trust-title {
        font-size: 0.8rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .trust-bar .container::before,
    .trust-bar .container::after {
        width: 30px;
    }
    
    .trust-logos {
        animation-duration: 12s;
    }
    
    .trust-logo img {
        max-width: 100px;
        width: 100px;
        padding: 12px 16px;
    }
    
    .logo-placeholder {
        padding: 14px 20px;
        font-size: 0.8rem;
        min-width: 100px;
    }
}

/* ===================================
   ACCESSIBILITY & REDUCED MOTION
   =================================== */

@media (prefers-reduced-motion: reduce) {
    .trust-logos {
        animation: none !important;
    }
    
    .trust-logo {
        animation: none;
        opacity: 1;
    }
    
    .trust-logo:hover img,
    .trust-logo:hover .logo-placeholder {
        transform: none;
    }
}

/* Focus states for accessibility */
.trust-logo:focus-within {
    outline: 2px solid var(--primary-gold);
    outline-offset: 4px;
    border-radius: var(--radius-sm);
}

/* ===================================
   LOADING STATE
   =================================== */

.trust-logos.loading {
    animation-play-state: paused;
}

.trust-logo.skeleton img {
    background: linear-gradient(
        90deg,
        var(--bg-light) 0%,
        #e0e0e0 50%,
        var(--bg-light) 100%
    );
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s ease-in-out infinite;
}

@keyframes skeletonLoading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}
