/* =========================================================
   SMY Logo Carousel — Frontend Styles
   Brand palette: Dark Navy #0f1422, Teal #00B4D8, White #FFFFFF
   ========================================================= */

:root {
    --smy-bg: #0f1422;
    --smy-fade-color: #0f1422;
    --smy-accent: #00B4D8;
    --smy-title-color: #ffffff;
    --smy-duration: 40s;
    --smy-item-width: 160px;
    --smy-item-height: 90px;
    --smy-item-gap: 24px;
}

/* ---------- Section Shell ---------- */
.smy-lc-section {
    width: 100%;
    padding: 36px 0;
    background-color: var(--smy-bg, #0f1422);
    position: relative;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    transition: background-color 0.3s ease;
}

/* Theme Variations */
.smy-lc-section.smy-theme-dark {
    --smy-bg: #0f1422;
    --smy-fade-color: #0f1422;
    --smy-title-color: #f1f5f9;
}

.smy-lc-section.smy-theme-light {
    --smy-bg: #ffffff;
    --smy-fade-color: #ffffff;
    --smy-title-color: #0B1B3A;
}

.smy-lc-section.smy-theme-transparent {
    --smy-bg: transparent;
    --smy-fade-color: transparent;
    --smy-title-color: inherit;
}

/* ---------- Section Title ---------- */
.smy-lc-title {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--smy-title-color, #ffffff);
    margin: 0 0 24px 0;
    padding: 0 20px;
}

.smy-theme-dark .smy-lc-title {
    color: #f8fafc;
}

.smy-theme-light .smy-lc-title {
    color: #0f172a;
}

/* ---------- Track Wrapper ---------- */
.smy-lc-track-wrap {
    position: relative;
    overflow: hidden;
    width: 100%;
}

/* Left & Right fade masks */
.smy-lc-fade-left,
.smy-lc-fade-right {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 140px;
    z-index: 2;
    pointer-events: none;
    transition: background 0.3s ease;
}

.smy-lc-fade-left {
    left: 0;
    background: linear-gradient(to right, var(--smy-fade-color, #0f1422) 0%, transparent 100%);
}

.smy-lc-fade-right {
    right: 0;
    background: linear-gradient(to left, var(--smy-fade-color, #0f1422) 0%, transparent 100%);
}

.smy-theme-transparent .smy-lc-fade-left,
.smy-theme-transparent .smy-lc-fade-right {
    display: none;
}

/* ---------- Scrolling Track ---------- */
.smy-lc-track {
    display: flex;
    align-items: center;
    gap: 0;
    width: max-content;
    animation: smy-lc-scroll var(--smy-duration, 40s) linear infinite;
    will-change: transform;
}

/* Pause on hover */
.smy-pause-on-hover:hover .smy-lc-track {
    animation-play-state: paused;
}

@keyframes smy-lc-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ---------- Individual Logo Item ---------- */
.smy-lc-item {
    flex: 0 0 auto;
    width: var(--smy-item-width, 160px);
    height: var(--smy-item-height, 90px);
    margin: 0 var(--smy-item-gap, 24px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    box-sizing: border-box;
}

.smy-lc-item:hover {
    transform: translateY(-4px);
}

/* Glass Card mode (Optional sleek container for dark mode) */
.smy-cards .smy-lc-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px 18px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.smy-cards .smy-lc-item:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(0, 180, 216, 0.4);
    box-shadow: 0 8px 24px rgba(0, 180, 216, 0.2);
}

/* ---------- Logo Image Styles & Dark Mode Contrast Fix ---------- */
.smy-lc-item img {
    max-width: 100%;
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: filter 0.35s ease, transform 0.35s ease, opacity 0.35s ease;
    position: relative;
    z-index: 1;
}

/* 
 * DARK MODE LOGO CONTRAST:
 * Black/dark logos on transparent background become fully visible crisp white in dark theme.
 */
.smy-theme-dark .smy-lc-item img,
.smy-lc-section:not(.smy-theme-light) .smy-lc-item img {
    /* Converts black/dark logos into crisp white with 80% opacity */
    filter: brightness(0) invert(1) opacity(0.8);
}

.smy-theme-dark .smy-lc-item:hover img,
.smy-lc-section:not(.smy-theme-light) .smy-lc-item:hover img {
    /* Full white with glowing teal / cyan brand drop shadow */
    filter: brightness(0) invert(1) opacity(1) drop-shadow(0 0 12px rgba(0, 180, 216, 0.9));
    transform: scale(1.08);
}

/* If user explicitly chooses "Original Colors / Color Hover" in Dark Mode */
.smy-theme-dark.smy-logo-color-hover .smy-lc-item:hover img {
    filter: brightness(1) invert(0) opacity(1) drop-shadow(0 0 14px rgba(255, 255, 255, 0.35));
}

.smy-theme-dark.smy-logo-original .smy-lc-item img {
    filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.8)) opacity(0.9);
}

.smy-theme-dark.smy-logo-original .smy-lc-item:hover img {
    filter: opacity(1) drop-shadow(0 0 12px rgba(0, 180, 216, 0.8));
    transform: scale(1.08);
}

/* 
 * LIGHT THEME:
 * Normal grayscale to full color transition on white background.
 */
.smy-theme-light.smy-grayscale .smy-lc-item img {
    filter: grayscale(100%) opacity(0.55);
}

.smy-theme-light.smy-grayscale .smy-lc-item:hover img {
    filter: grayscale(0%) opacity(1) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.12));
    transform: scale(1.06);
}

.smy-theme-light:not(.smy-grayscale) .smy-lc-item img {
    filter: opacity(0.85);
}

.smy-theme-light:not(.smy-grayscale) .smy-lc-item:hover img {
    filter: opacity(1);
    transform: scale(1.06);
}

/* ---------- Link reset ---------- */
.smy-lc-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    outline: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .smy-lc-section {
        padding: 24px 0;
    }

    .smy-lc-item {
        --smy-item-width: 130px;
        --smy-item-height: 76px;
        --smy-item-gap: 16px;
    }

    .smy-lc-fade-left,
    .smy-lc-fade-right {
        width: 70px;
    }

    .smy-lc-title {
        font-size: 17px;
        margin-bottom: 18px;
    }
}

@media (max-width: 480px) {
    .smy-lc-item {
        --smy-item-width: 110px;
        --smy-item-height: 68px;
        --smy-item-gap: 12px;
    }

    .smy-lc-fade-left,
    .smy-lc-fade-right {
        width: 40px;
    }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .smy-lc-track {
        animation: none;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        padding: 0 20px;
        gap: 20px;
    }
}
