/* =========================================
   Partner Visualization Styles
   Scoped to .baihua-home-scope
   ========================================= */

/* Switcher UI */
.baihua-home-scope .style-switcher-controls {
    display: inline-flex;
    background: #e2e8f0;
    padding: 4px;
    border-radius: 8px;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

.baihua-home-scope .btn-switcher {
    border: none;
    background: transparent;
    color: var(--color-text-secondary);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.baihua-home-scope .btn-switcher:hover {
    color: var(--color-text-primary);
    background: rgba(255,255,255,0.5);
}

.baihua-home-scope .btn-switcher.active {
    background: white;
    color: var(--color-accent-secondary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    font-weight: 600;
}

/* Container */
.baihua-home-scope .partner-display-area {
    min-height: 400px; /* Prevent layout jump */
    position: relative;
    overflow: hidden;
    padding: 20px;
}


/* --- Variant A: Staggered Grid (Honeycomb-ish) --- */
.baihua-home-scope .style-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.baihua-home-scope .style-grid .partner-item {
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 12px; /* Soft square */
    display: flex; /* Centering */
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border: 1px solid var(--color-border);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.baihua-home-scope .style-grid .partner-item img {
    max-width: 80%;
    max-height: 80%;
    filter: grayscale(100%);
    transition: filter 0.3s;
}

.baihua-home-scope .style-grid .partner-item:hover {
    transform: scale(1.15) rotate(2deg);
    z-index: 10;
    box-shadow: 0 10px 25px rgba(58, 123, 213, 0.2);
    border-color: var(--color-accent-primary);
}

.baihua-home-scope .style-grid .partner-item:hover img {
    filter: grayscale(0%);
}

/* Stagger every other row visually (Honey-comb effect approx) */
.baihua-home-scope .style-grid .partner-item:nth-child(even) {
    transform: translateY(20px);
}

.baihua-home-scope .style-grid .partner-item:nth-child(even):hover {
    transform: translateY(20px) scale(1.15) rotate(-2deg);
}


/* --- Variant B: Infinite Marquee (Final Selection) --- */
.baihua-home-scope .style-marquee-container {
    overflow: hidden;
    position: relative;
    padding: 30px 0;
    display: flex;
    flex-direction: column;
    gap: 30px; /* Space between two rows */
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.baihua-home-scope .marquee-track {
    display: flex;
    gap: 40px;
    width: max-content;
    /* Animation defined inline via JS or default here, but JS overrides for direction */
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.baihua-home-scope .marquee-track:hover {
    animation-play-state: paused;
}

.baihua-home-scope .marquee-item {
    width: 100px; /* Larger size */
    height: 100px;
    background: white;
    border-radius: 50%; /* Circular */
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #f0f4f8; /* Subtle border ring */
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 5px; /* Padding for logo inside circle */
}

.baihua-home-scope .marquee-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: none; /* Full Color */
}

.baihua-home-scope .marquee-item:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 30px rgba(0, 210, 255, 0.2);
    border-color: var(--color-accent-primary);
}

@keyframes baihuaMarqueeScrollLeft {
    from { transform: translateX(0); }
    to { transform: translateX(-33.33%); } /* Moving 1/3 because we tripled the content */
}

@keyframes baihuaMarqueeScrollRight {
    from { transform: translateX(-33.33%); }
    to { transform: translateX(0); }
}

/* Use these animations */
.baihua-home-scope .marquee-track-left {
    animation-name: baihuaMarqueeScrollLeft;
}
.baihua-home-scope .marquee-track-right {
    animation-name: baihuaMarqueeScrollRight;
}

/* --- Variant C: 3D Orbit --- */
.baihua-home-scope .style-orbit-container {
    height: 500px;
    width: 100%;
    position: relative;
    perspective: 1000px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.baihua-home-scope .orbit-system {
    position: relative;
    width: 100px;
    height: 100px;
    transform-style: preserve-3d;
    animation: baihuaOrbitRotate 30s linear infinite;
}

.baihua-home-scope .orbit-center-logo {
    position: absolute;
    width: 100px;
    height: 100px;
    background: var(--color-accent-secondary);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 0 50px rgba(58, 123, 213, 0.5);
    z-index: 10;
}

.baihua-home-scope .orbit-item {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    margin-top: -30px;
    margin-left: -30px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.baihua-home-scope .orbit-item img {
    width: 70%;
    height: 70%;
    object-fit: contain;
}

@keyframes baihuaOrbitRotate {
    from { transform: rotateY(0deg) rotateX(10deg); }
    to { transform: rotateY(360deg) rotateX(10deg); }
}

/* Counter-rotate items to keep them facing front */
.baihua-home-scope .orbit-item-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: baihuaOrbitCounterRotate 30s linear infinite;
}

@keyframes baihuaOrbitCounterRotate {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(-360deg); }
}


/* --- Variant D: Bento Box --- */
.baihua-home-scope .style-bento {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    max-width: 1000px;
    margin: 0 auto;
    grid-auto-flow: dense;
}

.baihua-home-scope .bento-item {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.baihua-home-scope .bento-item img {
    max-width: 70%;
    max-height: 70%;
    transition: transform 0.3s;
}

.baihua-home-scope .bento-item:hover {
    box-shadow: var(--shadow-card-hover);
    border-color: var(--color-accent-primary);
}

.baihua-home-scope .bento-item:hover img {
    transform: scale(1.1);
}

/* Random spans for "Bento" feel */
.baihua-home-scope .bento-item.span-2x2 {
    grid-column: span 2;
    grid-row: span 2;
    background: linear-gradient(135deg, #f0f4f8 0%, #ffffff 100%);
}

.baihua-home-scope .bento-item.span-2x1 {
    grid-column: span 2;
}

.baihua-home-scope .bento-item.span-1x2 {
    grid-row: span 2;
}
