/* Most & Jazz Sponsors – Frontend Styles
   Custom Properties:
     --mjs-bg       Hintergrundfarbe der Sponsoren-Bar
     --mjs-logo-h   Logo-Höhe in Pixel
     --mjs-duration Dauer der Marquee-Animation
*/

/* ============== HAUPTSPONSOREN-BAR (statisch) ============== */

.mjs-main {
    background: var(--mjs-bg, #fff);
    padding: 1.5rem 1rem;
    border-radius: 8px;
    margin: 0 auto 1.5rem;
    max-width: 1100px;
}

.mjs-main__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-around;
    gap: 1.5rem 2.5rem;
}

.mjs-main .mjs-logo {
    flex: 0 1 auto;
}

.mjs-main .mjs-logo img {
    max-height: calc(var(--mjs-logo-h, 60px) * 1.2);  /* Hauptsponsoren etwas größer */
    width: auto;
    object-fit: contain;
    transition: transform .25s, opacity .25s;
}

.mjs-main .mjs-logo a:hover img { transform: scale(1.05); }

/* ============== ANIMIERTE SPONSOREN-LEISTE ============== */

.mjs-bar {
    background: var(--mjs-bg, #fff);
    padding: 1rem;
    overflow: hidden;
    margin: 0 auto 1.5rem;
    max-width: 1400px;
    border-radius: 6px;
}

.mjs-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mjs-logo img,
.mjs-logo .mjs-logo__img {
    height: var(--mjs-logo-h, 60px) !important;
    width: auto !important;
    max-width: 200px !important;
    object-fit: contain;
    display: block;
}

.mjs-logo__text {
    color: #333;
    font-weight: 600;
    padding: 0 1rem;
    line-height: var(--mjs-logo-h, 60px);
    font-size: 1.05em;
}

.mjs-logo a {
    text-decoration: none !important;
    display: inline-flex;
    transition: opacity .2s;
}

.mjs-logo a:hover { opacity: .75; }

/* ============== ANIMATION: MARQUEE ============== */

.mjs-bar--marquee .mjs-bar__track {
    display: inline-flex;
    gap: 3rem;
    align-items: center;
    animation: mjsMarquee var(--mjs-duration, 35s) linear infinite;
    white-space: nowrap;
    padding-right: 3rem;
}

.mjs-bar--marquee:hover .mjs-bar__track {
    animation-play-state: paused;
}

@keyframes mjsMarquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ============== ANIMATION: FADE ============== */

.mjs-bar--fade {
    position: relative;
}

.mjs-bar--fade .mjs-bar__pool {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.5rem 2rem;
    align-items: center;
    justify-items: center;
    min-height: calc(var(--mjs-logo-h, 60px) + 1rem);
}

.mjs-bar--fade .mjs-bar__slot {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .8s ease-in-out, transform .8s ease-in-out;
    opacity: 1;
}

.mjs-bar--fade .mjs-bar__slot[aria-hidden="true"] {
    opacity: 0;
    transform: scale(.92);
    pointer-events: none;
    position: absolute;
    visibility: hidden;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* ============== ANIMATION: SLIDE ============== */

.mjs-bar--slide {
    position: relative;
    overflow: hidden;
}

.mjs-bar--slide .mjs-bar__pool {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    min-height: calc(var(--mjs-logo-h, 60px) + 1rem);
}

.mjs-bar--slide .mjs-bar__slot {
    transition: opacity .6s, transform .6s;
}

.mjs-bar--slide .mjs-bar__slot[aria-hidden="true"] {
    opacity: 0;
    transform: translateX(50px);
    pointer-events: none;
    position: absolute;
    visibility: hidden;
    width: 0;
    height: 0;
    overflow: hidden;
}

.mjs-bar--slide .mjs-bar__slot[data-entering="left"] {
    animation: mjsSlideInLeft .6s ease-out;
}

.mjs-bar--slide .mjs-bar__slot[data-entering="right"] {
    animation: mjsSlideInRight .6s ease-out;
}

@keyframes mjsSlideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes mjsSlideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ============== TOURISMUSLOGO ============== */

.mjs-tourism {
    text-align: center;
    margin: 1.5rem auto;
    padding: 1rem;
}

.mjs-tourism img {
    max-height: 80px;
    width: auto;
    display: inline-block;
    transition: opacity .2s;
}

.mjs-tourism a:hover img { opacity: .8; }

/* ============== REDUCED MOTION ============== */

@media (prefers-reduced-motion: reduce) {
    .mjs-bar--marquee .mjs-bar__track {
        animation: none !important;
    }
    .mjs-bar--fade .mjs-bar__slot,
    .mjs-bar--slide .mjs-bar__slot {
        transition: none !important;
        animation: none !important;
    }
}

/* ============== MOBILE ============== */

@media (max-width: 720px) {
    .mjs-main__inner { gap: 1rem 1.5rem; justify-content: center; }
    .mjs-main .mjs-logo img { max-height: var(--mjs-logo-h, 60px); }
    .mjs-bar--marquee .mjs-bar__track { gap: 2rem; }
    .mjs-bar--fade .mjs-bar__pool { gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); }
}
