/* ======================================================
   LOGO TICKER CAROUSEL – FULL STYLESHEET (WITH TOOLTIPS)
   ====================================================== */

/* Outer wrapper */
.ltc-wrapper {
    /* Width control (percentage-based, centered) */
    width: var(--ltc-width, 100%);
    max-width: var(--ltc-width, 100%);
    margin-left: auto;
    margin-right: auto;

    overflow-x: hidden;
    overflow-y: visible;
    box-sizing: border-box;
    display: block;
    position: relative;

    padding: clamp(8px, 2vw, 16px) 0;

    --ltc-bg-opacity: 0.65;
    background: rgba(255, 255, 255, var(--ltc-bg-opacity));

    --ltc-fade-width: 70px;

    --ltc-shift: 1000px;

    --ltc-logo-height: 80px;

    --ltc-gap: clamp(14px, 3vw, 36px);
}

/* Track that scrolls (FORCE single row) */
.ltc-track {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    width: max-content !important;
    white-space: nowrap !important;

    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-duration: var(--ltc-speed, 25s);
}

/* Inner blocks created by JS (also force single row) */
.ltc-inner {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    width: max-content !important;
    white-space: nowrap !important;
}

/* Direction */
.ltc-direction-left .ltc-track { animation-name: ltc-scroll-left; }
.ltc-direction-right .ltc-track { animation-name: ltc-scroll-right; }

/* Pause on hover */
.ltc-wrapper.ltc-pause-hover:hover .ltc-track {
    animation-play-state: paused;
}

/* Logo item */
.ltc-item {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    flex: 0 0 auto !important;
    padding: 0 var(--ltc-gap);

    position: relative; /* required for tooltip positioning */
}

/* Logo image */
.ltc-item img {
    display: block !important;

    max-height: clamp(36px, 8vw, var(--ltc-logo-height));
    max-width: clamp(110px, 20vw, 220px);

    width: auto !important;
    height: auto !important;

    object-fit: contain;
    transition: transform 0.2s ease;
}

.ltc-item img:hover { transform: scale(1.05); }

/* Scroll animations */
@keyframes ltc-scroll-left {
    from { transform: translateX(0); }
    to   { transform: translateX(calc(-1 * var(--ltc-shift))); }
}

@keyframes ltc-scroll-right {
    from { transform: translateX(calc(-1 * var(--ltc-shift))); }
    to   { transform: translateX(0); }
}

/* Edge fade overlays */
.ltc-wrapper.ltc-fade::before,
.ltc-wrapper.ltc-fade::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: var(--ltc-fade-width);
    z-index: 9999;
    pointer-events: none;
}

.ltc-wrapper.ltc-fade.ltc-fade-left::before {
    left: 0;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, var(--ltc-bg-opacity)) 0%,
        rgba(255, 255, 255, 0) 100%
    );
}
.ltc-wrapper.ltc-fade:not(.ltc-fade-left)::before { display: none; }

.ltc-wrapper.ltc-fade.ltc-fade-right::after {
    right: 0;
    background: linear-gradient(
        to left,
        rgba(255, 255, 255, var(--ltc-bg-opacity)) 0%,
        rgba(255, 255, 255, 0) 100%
    );
}
.ltc-wrapper.ltc-fade:not(.ltc-fade-right)::after { display: none; }

/* ======================================================
   TOOLTIP (NEW)
   ====================================================== */

/* Tooltip bubble */
.ltc-tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%);

    padding: 8px 10px;
    border-radius: 8px;

    font-size: 13px;
    line-height: 1.2;

    max-width: 220px;
    white-space: normal;
    text-align: center;

    background: rgba(0, 0, 0, 0.85);
    color: #fff;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    z-index: 20;

    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}

/* Small arrow */
.ltc-tooltip::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);

    border-width: 7px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.85) transparent transparent transparent;
}

/* Show tooltip on hover (only items with tooltip) */
.ltc-item.ltc-has-tooltip:hover .ltc-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-2px);
}

/* Avoid tooltip being clipped by edge fades: ensure tooltip sits above overlays */
.ltc-item.ltc-has-tooltip {
    z-index: 10;
}

/* Responsive tuning */
@media (max-width: 420px) {
    .ltc-wrapper { --ltc-gap: 12px; }
    .ltc-item img { max-width: 140px; }
    .ltc-tooltip { max-width: 180px; font-size: 12px; }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .ltc-wrapper { --ltc-gap: clamp(18px, 2.5vw, 32px); }
}
