/**
 * Foxco Logo Carousel Styles
 * Version: 1.2.8
 */

/* ═══════════════════════════════════════════════
   CORE LAYOUT
═══════════════════════════════════════════════ */

.foxco-logo-carousel-wrapper {
    position: relative;
    overflow: hidden;
    padding: 20px 0;
}

.foxco-logo-carousel {
    position: relative;
    overflow: hidden;
}

.foxco-logo-track {
    display: flex;
    gap: var(--logo-gap, 60px);
    animation-name: foxco-scroll;
    animation-duration: var(--carousel-speed, 30s);
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    align-items: center;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-animation-name: foxco-scroll;
    -webkit-animation-duration: var(--carousel-speed, 30s);
    -webkit-animation-timing-function: linear;
    -webkit-animation-iteration-count: infinite;

    animation-play-state: paused;
    -webkit-animation-play-state: paused;
}


/* Logo item sizing (prevents layout shifts while images load) */
.foxco-logo-item{
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.foxco-logo-item img{
    display:block;
    height: var(--logo-height, 44px);
    width:auto;
    max-width: var(--logo-max-width, 180px);
    object-fit: contain;
}
/* ═══════════════════════════════════════════════
   KEYFRAMES — SCROLL DIRECTION
═══════════════════════════════════════════════ */

/* Standard: Right → Left (default) */
@keyframes foxco-scroll {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(-33.333%, 0, 0); }
}
@-webkit-keyframes foxco-scroll {
    from { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
    to   { -webkit-transform: translate3d(-33.333%, 0, 0); transform: translate3d(-33.333%, 0, 0); }
}

/* Direction: Left → Right */
.foxco-logo-carousel-wrapper.direction-right .foxco-logo-track {
    animation-direction: reverse;
    -webkit-animation-direction: reverse;
}

/* ═══════════════════════════════════════════════
   SCROLL STYLES
═══════════════════════════════════════════════ */

/* ── Smooth (default) — linear, no change needed ── */

/* ── Ease — gentle acceleration/deceleration per cycle ── */
.foxco-logo-carousel-wrapper.style-ease .foxco-logo-track {
    animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1);
    -webkit-animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1);
}

/* ── Wave — items bob vertically while the track scrolls ── */
.foxco-logo-carousel-wrapper.style-wave .foxco-logo-item {
    animation: foxco-wave 2.4s ease-in-out infinite;
    -webkit-animation: foxco-wave 2.4s ease-in-out infinite;
}
.foxco-logo-carousel-wrapper.style-wave .foxco-logo-item:nth-child(3n+2) {
    animation-delay: -0.8s;
    -webkit-animation-delay: -0.8s;
}
.foxco-logo-carousel-wrapper.style-wave .foxco-logo-item:nth-child(3n) {
    animation-delay: -1.6s;
    -webkit-animation-delay: -1.6s;
}

@keyframes foxco-wave {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-12px); }
}
@-webkit-keyframes foxco-wave {
    0%, 100% { -webkit-transform: translateY(0px); transform: translateY(0px); }
    50%       { -webkit-transform: translateY(-12px); transform: translateY(-12px); }
}

/* Restore normal hover lift on wave (hover wins) */
.foxco-logo-carousel-wrapper.style-wave .foxco-logo-item:hover {
    animation-play-state: paused;
    -webkit-animation-play-state: paused;
    transform: translateY(-10px) scale(1.1);
}

/* ── Pulse — logos breathe (scale + opacity) ── */
.foxco-logo-carousel-wrapper.style-pulse .foxco-logo-item {
    animation: foxco-pulse 3s ease-in-out infinite;
    -webkit-animation: foxco-pulse 3s ease-in-out infinite;
}
.foxco-logo-carousel-wrapper.style-pulse .foxco-logo-item:nth-child(3n+2) {
    animation-delay: -1s;
    -webkit-animation-delay: -1s;
}
.foxco-logo-carousel-wrapper.style-pulse .foxco-logo-item:nth-child(3n) {
    animation-delay: -2s;
    -webkit-animation-delay: -2s;
}

@keyframes foxco-pulse {
    0%, 100% { transform: scale(1);    opacity: 1; }
    50%       { transform: scale(0.88); opacity: 0.45; }
}
@-webkit-keyframes foxco-pulse {
    0%, 100% { -webkit-transform: scale(1);    transform: scale(1);    opacity: 1; }
    50%       { -webkit-transform: scale(0.88); transform: scale(0.88); opacity: 0.45; }
}

.foxco-logo-carousel-wrapper.style-pulse .foxco-logo-item:hover {
    animation-play-state: paused;
    -webkit-animation-play-state: paused;
    transform: translateY(-10px) scale(1.1);
    opacity: 1;
}

/* ── Spotlight — center logos appear larger/brighter ── */

.foxco-logo-carousel-wrapper.style-spotlight .foxco-logo-track {
    animation-timing-function: linear;
}
.foxco-logo-carousel-wrapper.style-spotlight .foxco-logo-item {
    animation: foxco-spotlight 3.2s ease-in-out infinite;
    -webkit-animation: foxco-spotlight 3.2s ease-in-out infinite;
    transform-origin: center center;
}
.foxco-logo-carousel-wrapper.style-spotlight .foxco-logo-item:nth-child(2n) {
    animation-delay: -1.6s;
    -webkit-animation-delay: -1.6s;
}

@keyframes foxco-spotlight {
    0%, 100% { transform: scale(0.85); filter: grayscale(calc(var(--use-grayscale, 1) * 100%)) brightness(0.7) opacity(0.6); }
    50%       { transform: scale(1.08); filter: grayscale(0%) brightness(1.15) opacity(1); }
}
@-webkit-keyframes foxco-spotlight {
    0%, 100% { -webkit-transform: scale(0.85); transform: scale(0.85); -webkit-filter: brightness(0.7); filter: brightness(0.7); }
    50%       { -webkit-transform: scale(1.08); transform: scale(1.08); -webkit-filter: brightness(1.15); filter: brightness(1.15); }
}

.foxco-logo-carousel-wrapper.style-spotlight .foxco-logo-item:hover {
    animation-play-state: paused;
    -webkit-animation-play-state: paused;
}

/* ── Ticker — linear, no pause, slightly reduced item padding ── */
/* (no-pause-hover is added separately; this just tightens spacing feel) */
.foxco-logo-carousel-wrapper.style-ticker .foxco-logo-item {
    padding: 12px 20px;
}

/* ═══════════════════════════════════════════════
   PAUSE ON HOVER
═══════════════════════════════════════════════ */

/* Default: pause on desktop hover */
@media (hover: hover) and (pointer: fine) {
    .foxco-logo-track:hover {
        animation-play-state: paused;
        -webkit-animation-play-state: paused;
    }
}

/* No-pause override — user selected "No" for pause on hover */
.foxco-logo-carousel-wrapper.no-pause-hover .foxco-logo-track,
.foxco-logo-carousel-wrapper.no-pause-hover .foxco-logo-track:hover {
    animation-play-state: running !important;
    -webkit-animation-play-state: running !important;
}

/* ═══════════════════════════════════════════════
   EDGE FADE
   Masks the left + right edges so logos fade in/out
═══════════════════════════════════════════════ */

.foxco-logo-carousel-wrapper.edge-fade .foxco-logo-carousel {
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 8%,
        black 92%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 8%,
        black 92%,
        transparent 100%
    );
}

/*
   iOS Safari fix:
   -webkit-mask-image + an infinitely-transforming track can stutter/freeze
   or appear to restart while the user scrolls.
   We disable the mask and use lightweight overlay fades instead.
*/
@supports (-webkit-touch-callout: none) {
    .foxco-logo-carousel-wrapper.edge-fade .foxco-logo-carousel {
        -webkit-mask-image: none !important;
        mask-image: none !important;
    }

    .foxco-logo-carousel-wrapper.edge-fade {
        --edge-fade-bg: rgba(255, 255, 255, 1);
    }

    /* Dark presets get darker fade edges */
    .foxco-logo-carousel-wrapper.bg-preset-charcoal.edge-fade,
    .foxco-logo-carousel-wrapper.bg-preset-carbon.edge-fade,
    .foxco-logo-carousel-wrapper.bg-preset-brand-glow.edge-fade,
    .foxco-logo-carousel-wrapper.bg-preset-frosted.edge-fade,
    .foxco-logo-carousel-wrapper.bg-preset-edge-lit.edge-fade,
    .foxco-logo-carousel-wrapper.bg-preset-diagonal-dark.edge-fade {
        --edge-fade-bg: rgba(20, 20, 20, 1);
    }

    .foxco-logo-carousel-wrapper.edge-fade::before,
    .foxco-logo-carousel-wrapper.edge-fade::after {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        width: 70px;
        pointer-events: none;
        z-index: 3;
    }

    .foxco-logo-carousel-wrapper.edge-fade::before {
        left: 0;
        background: linear-gradient(to right, var(--edge-fade-bg), rgba(255, 255, 255, 0));
    }

    .foxco-logo-carousel-wrapper.edge-fade::after {
        right: 0;
        background: linear-gradient(to left, var(--edge-fade-bg), rgba(255, 255, 255, 0));
    }
}

/* ═══════════════════════════════════════════════
   MOBILE — keep animation running
═══════════════════════════════════════════════ */

@media (hover: none) and (pointer: coarse) {
    .foxco-logo-track,
    .foxco-logo-track:hover,
    .foxco-logo-track:active,
    .foxco-logo-track:focus {
        animation-play-state: running !important;
        -webkit-animation-play-state: running !important;
    }

    /* Mobile perf: filters on a moving element can trigger costly repaints */
    .foxco-logo-item img {
        filter: none !important;
    }
    .foxco-logo-item {
        transition: none;
    }
}

@media (max-width: 1024px) {
    .foxco-logo-track {
        animation-play-state: running !important;
        -webkit-animation-play-state: running !important;
    }
}

/* ═══════════════════════════════════════════════
   LOGO ITEMS
═══════════════════════════════════════════════ */

.foxco-logo-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    min-width: 200px;
    height: var(--logo-height, 120px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    border-radius: 12px;
}

.foxco-logo-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.foxco-logo-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 2px;
    background: linear-gradient(135deg, transparent, transparent);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s;
}

.foxco-logo-item:hover {
    transform: translateY(-10px) scale(1.1);
}

.foxco-logo-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(calc(var(--use-grayscale, 1) * 100%)) opacity(0.7);
    transition: filter 0.4s;
}

.foxco-logo-item:hover img {
    filter: grayscale(0%) opacity(1);
}

/* ═══════════════════════════════════════════════
   LOGO NAMES (TOOLTIP)
═══════════════════════════════════════════════ */

.foxco-logo-name {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--accent-color, #667eea), var(--accent-dark, #764ba2));
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.4s;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.foxco-logo-item:hover .foxco-logo-name {
    opacity: 1;
    bottom: -35px;
}

/* ═══════════════════════════════════════════════
   HOVER EFFECT VARIANTS
═══════════════════════════════════════════════ */

.foxco-logo-item.effect-gradient:hover::before {
    background: linear-gradient(135deg, var(--accent-color, #667eea), var(--accent-dark, #764ba2));
    opacity: 1;
}
.foxco-logo-item.effect-gradient:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.foxco-logo-item.effect-solid::before {
    background: var(--accent-color, #667eea);
}
.foxco-logo-item.effect-solid:hover::before {
    opacity: 1;
}
.foxco-logo-item.effect-solid:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.foxco-logo-item.effect-shadow:hover::before {
    opacity: 0;
}
.foxco-logo-item.effect-shadow:hover {
    box-shadow: 0 15px 40px var(--accent-color, #667eea);
}

.foxco-logo-item.effect-none:hover::before {
    opacity: 0;
}
.foxco-logo-item.effect-none:hover {
    box-shadow: none;
    transform: translateY(-5px) scale(1.05);
}

/* ═══════════════════════════════════════════════
   GRID LAYOUT
═══════════════════════════════════════════════ */

.foxco-logo-carousel-wrapper.grid-layout .foxco-logo-track {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--logo-gap, 30px);
    animation: none;
    -webkit-animation: none;
    padding: 20px;
}

.foxco-logo-carousel-wrapper.grid-layout .foxco-logo-item {
    min-width: auto;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .foxco-logo-track {
        gap: calc(var(--logo-gap, 60px) * 0.8);
    }
    .foxco-logo-item {
        min-width: 180px;
        height: calc(var(--logo-height, 120px) * 0.9);
    }
}

@media (max-width: 768px) {
    .foxco-logo-track {
        gap: calc(var(--logo-gap, 60px) * 0.6);
    }
    .foxco-logo-item {
        min-width: 150px;
        height: calc(var(--logo-height, 120px) * 0.8);
        padding: 15px;
    }
    .foxco-logo-carousel-wrapper.grid-layout .foxco-logo-track {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: calc(var(--logo-gap, 30px) * 0.7);
    }
}

@media (max-width: 480px) {
    .foxco-logo-track {
        gap: calc(var(--logo-gap, 60px) * 0.5);
    }
    .foxco-logo-item {
        min-width: 120px;
        height: calc(var(--logo-height, 120px) * 0.7);
        padding: 12px;
    }
    .foxco-logo-name {
        font-size: 0.75rem;
        padding: 5px 12px;
    }
    .foxco-logo-carousel-wrapper.grid-layout .foxco-logo-track {
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
        gap: calc(var(--logo-gap, 30px) * 0.5);
    }
}

/* ═══════════════════════════════════════════════
   ACCESSIBILITY
═══════════════════════════════════════════════ */

.foxco-logo-item:focus-visible {
    outline: 2px solid var(--accent-color, #667eea);
    outline-offset: 4px;
}
.foxco-logo-item a:focus-visible {
    outline: 2px solid var(--accent-color, #667eea);
    outline-offset: 2px;
    border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {
    .foxco-logo-track {
        animation: none !important;
        -webkit-animation: none !important;
    }
    .foxco-logo-item,
    .foxco-logo-item img,
    .foxco-logo-name,
    .foxco-logo-item::before {
        transition: none;
        animation: none !important;
    }
}

/* ═══════════════════════════════════════════════
   PRINT
═══════════════════════════════════════════════ */

@media print {
    .foxco-logo-carousel-wrapper {
        overflow: visible;
    }
    .foxco-logo-track {
        animation: none;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
    .foxco-logo-item {
        break-inside: avoid;
    }
}

/* ═══════════════════════════════════════════════
   BACKGROUND PRESETS  (v1.2.0)
   Applied as a class on .foxco-logo-carousel-wrapper
═══════════════════════════════════════════════ */

/* 1. Clean White (default — no class needed, but alias for explicitness) */
.foxco-logo-carousel-wrapper.bg-preset-white {
    background: #ffffff;
}

/* 2. Warm Off-White */
.foxco-logo-carousel-wrapper.bg-preset-warm {
    background: #faf8f5;
}

/* 3. Diagonal Stripe Light */
.foxco-logo-carousel-wrapper.bg-preset-diagonal-light {
    background-color: #f8f8f8;
    background-image: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 18px,
        rgba(0,0,0,0.03) 18px,
        rgba(0,0,0,0.03) 20px
    );
}

/* 4. Diagonal Stripe Dark */
.foxco-logo-carousel-wrapper.bg-preset-diagonal-dark {
    background-color: #141414;
    background-image: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 18px,
        rgba(255,255,255,0.03) 18px,
        rgba(255,255,255,0.03) 20px
    );
}

/* 5. Charcoal */
.foxco-logo-carousel-wrapper.bg-preset-charcoal {
    background: linear-gradient(180deg, #1e1e1e 0%, #141414 100%);
}

/* 6. Brand Glow — deep amber diagonal echoing orange headers */
.foxco-logo-carousel-wrapper.bg-preset-brand-glow {
    background: linear-gradient(135deg, #1a1008 0%, #291500 40%, #1a1008 100%);
}

/* 7. Frosted — dark with soft radial orange bloom */
.foxco-logo-carousel-wrapper.bg-preset-frosted {
    background: linear-gradient(135deg, #161616 0%, #1f1a14 50%, #161616 100%);
    position: relative;
}
.foxco-logo-carousel-wrapper.bg-preset-frosted::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(ellipse at 15% 50%, rgba(232,119,34,0.09) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 50%, rgba(232,119,34,0.06) 0%, transparent 55%);
    pointer-events: none;
    z-index: 0;
}
.foxco-logo-carousel-wrapper.bg-preset-frosted .foxco-logo-carousel {
    position: relative;
    z-index: 1;
}

/* 8. Diagonal Split — two-tone light */
.foxco-logo-carousel-wrapper.bg-preset-split {
    background: linear-gradient(160deg, #f5f5f5 50%, #ebebeb 50%);
}

/* 9. Dot Grid */
.foxco-logo-carousel-wrapper.bg-preset-dots {
    background-color: #f9f9f9;
    background-image: radial-gradient(circle, #d0d0d0 1px, transparent 1px);
    background-size: 28px 28px;
}

/* 10. Carbon Grid */
.foxco-logo-carousel-wrapper.bg-preset-carbon {
    background-color: #181818;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 32px 32px;
}

/* 11. Matte Stone */
.foxco-logo-carousel-wrapper.bg-preset-stone {
    background: linear-gradient(145deg, #e8e4df 0%, #f0ece7 40%, #ddd9d4 100%);
}

/* 12. Edge Lit — dark with inset orange top/bottom glow lines */
.foxco-logo-carousel-wrapper.bg-preset-edge-lit {
    background: #111111;
    box-shadow:
        inset 0 1px 0 rgba(232,119,34,0.30),
        inset 0 -1px 0 rgba(232,119,34,0.30),
        inset 0 2px 12px rgba(232,119,34,0.06),
        inset 0 -2px 12px rgba(232,119,34,0.06);
}


/* Start animation only after images are loaded (prevents mobile/tablet restarts) */
.foxco-logo-carousel-wrapper.is-ready .foxco-logo-track{
    animation-play-state: running;
    -webkit-animation-play-state: running;
}
