/*
 * MAGE Stavebne referencie – red/white construction theme
 * Visual redesign only. The original vertical ticker/animation remains unchanged.
 */
.mage-sr {
    --mage-sr-speed: 32s;
    --mage-sr-height: 620px;
    --mage-sr-red: #e10600;
    --mage-sr-red-dark: #bd0500;
    --mage-sr-ink: #181a1f;
    --mage-sr-muted: #6f7279;
    --mage-sr-bg: #f7f8fa;
    --mage-sr-card: #ffffff;
    --mage-sr-border: rgba(16, 20, 24, .06);

    position: relative;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    padding: 52px 0 0;
    color: var(--mage-sr-ink);
    background: transparent;
    font-family: inherit;
    isolation: isolate;
}

.mage-sr::before,
.mage-sr::after { display: none; }

.mage-sr *,
.mage-sr *::before,
.mage-sr *::after { box-sizing: border-box; }

/* Theme setting stays backwards-compatible, but this design is intentionally red/white. */
.mage-sr--dark,
.mage-sr--light {
    --mage-sr-ink: #181a1f;
    --mage-sr-muted: #6f7279;
    --mage-sr-card: #fff;
}

.mage-sr__header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 38px;
    text-align: center;
}

.mage-sr__label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--mage-sr-red);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.mage-sr__label::before,
.mage-sr__label::after {
    content: "";
    width: 26px;
    height: 2px;
    border-radius: 10px;
    background: currentColor;
}

.mage-sr__title {
    margin: 0;
    color: var(--mage-sr-ink) !important;
    font-size: clamp(34px, 4.5vw, 58px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.035em;
}

.mage-sr__desc {
    max-width: 720px;
    margin: 15px auto 0;
    color: var(--mage-sr-muted) !important;
    font-size: 16px;
    line-height: 1.65;
}

/* Original moving 3-column ticker */
.mage-sr__ticker {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    max-width: 1240px;
    height: var(--mage-sr-height);
    margin: 0 auto;
    padding: 0 20px;
    overflow: hidden;
    /* Jemné miznutie iba na úplnom hornom a dolnom okraji. */
    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0,
        #000 46px,
        #000 calc(100% - 46px),
        transparent 100%
    );
    mask-image: linear-gradient(
        to bottom,
        transparent 0,
        #000 46px,
        #000 calc(100% - 46px),
        transparent 100%
    );
}

.mage-sr__ticker--mobile { display: none; }
.mage-sr__col { position: relative; overflow: hidden; background: transparent; }

.mage-sr__track {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 8px 0;
    animation: mageSrTickerUp var(--mage-sr-speed) linear infinite;
    will-change: transform;
}

.mage-sr__col:nth-child(2) .mage-sr__track { padding-top: 32px; }
.mage-sr__col[data-direction="down"] .mage-sr__track { animation-name: mageSrTickerDown; }
.mage-sr__ticker:hover .mage-sr__track { animation-play-state: paused; }

@keyframes mageSrTickerUp {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(0, calc(-1 * var(--mage-sr-loop-distance, 50%)), 0); }
}

@keyframes mageSrTickerDown {
    from { transform: translate3d(0, calc(-1 * var(--mage-sr-loop-distance, 50%)), 0); }
    to   { transform: translate3d(0, 0, 0); }
}

/* Card design from the approved mock-up */
.mage-sr-card {
    position: relative;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    column-gap: 17px;
    flex-shrink: 0;
    min-height: 194px;
    margin: 0;
    padding: 25px 25px 24px 22px;
    overflow: hidden;
    border: 1px solid var(--mage-sr-border);
    border-radius: 15px;
    background: var(--mage-sr-card);
    box-shadow: 0 8px 24px rgba(18, 24, 31, .06);
    color: var(--mage-sr-ink);
    transform: translateZ(0);
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.mage-sr-card:hover {
    transform: translateY(-4px);
    border-color: rgba(225, 6, 0, .18);
    box-shadow: 0 12px 28px rgba(18, 24, 31, .085);
}

.mage-sr-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 26px;
    width: 3px;
    height: 34px;
    border-radius: 0 4px 4px 0;
    background: var(--mage-sr-red);
    opacity: 0;
    transform: scaleY(.4);
    transition: opacity .3s ease, transform .3s ease;
}

.mage-sr-card:hover::before {
    opacity: 1;
    transform: scaleY(1);
}

.mage-sr-card__avatar {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    display: flex;
    width: 54px;
    height: 54px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 18px;
    border: 3px solid #f4f4f4;
    border-radius: 50%;
    background: linear-gradient(145deg, #292c31, #0e1013);
    box-shadow: 0 5px 16px rgba(0,0,0,.16);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .02em;
}

.mage-sr-card__avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mage-sr-card__content {
    grid-column: 2;
    min-width: 0;
}

.mage-sr-card__stars {
    margin: 0 0 7px;
    color: var(--mage-sr-red) !important;
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 2px;
    white-space: nowrap;
}

.mage-sr-card__name {
    display: block;
    margin: 0 0 3px;
    color: var(--mage-sr-ink) !important;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.25;
}

.mage-sr-card__role {
    display: block;
    margin: 0 0 11px;
    color: #74777d !important;
    font-size: 12.5px;
    font-style: italic;
    line-height: 1.35;
}

.mage-sr-card__quote {
    margin: 0;
    padding: 0 22px 0 0;
    color: #34373d !important;
    font-size: 13.5px;
    font-style: normal;
    font-weight: 500;
    line-height: 1.58;
}

.mage-sr-card__mark {
    position: absolute;
    right: 19px;
    bottom: 8px;
    color: rgba(225, 6, 0, .17);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

@media (max-width: 1000px) {
    .mage-sr__ticker { gap: 16px; padding: 0 14px; }
    .mage-sr__track { gap: 16px; }
    .mage-sr-card {
        grid-template-columns: 46px minmax(0,1fr);
        column-gap: 13px;
        min-height: 190px;
        padding: 21px 18px 21px 17px;
    }
    .mage-sr-card__avatar { width: 46px; height: 46px; margin-top: 18px; font-size: 12px; }
    .mage-sr-card__quote { font-size: 12.8px; padding-right: 12px; }
    .mage-sr-card__name { font-size: 15px; }
}

@media (max-width: 780px) {
    .mage-sr { padding-top: 40px; }
    .mage-sr__header { padding: 0 18px 26px; }
    .mage-sr__title { font-size: clamp(31px, 9vw, 44px); }
    .mage-sr__desc { margin-top: 12px; font-size: 14px; }

    .mage-sr__ticker--desktop { display: none; }
    .mage-sr__ticker--mobile {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
        height: min(var(--mage-sr-height), 540px);
        padding: 0 14px;
        -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%);
        mask-image: linear-gradient(to bottom, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%);
    }
    .mage-sr__ticker--mobile .mage-sr__track { padding-top: 12px; }
    .mage-sr-card {
        grid-template-columns: 48px minmax(0,1fr);
        min-height: 178px;
        border-radius: 14px;
        padding: 20px 18px;
    }
    .mage-sr-card__avatar { width: 48px; height: 48px; }
    .mage-sr-card__quote { font-size: 13px; line-height: 1.55; }
    .mage-sr-card__mark { right: 13px; bottom: 5px; font-size: 42px; }
}

@media (max-width: 420px) {
    .mage-sr__label { font-size: 10px; }
    .mage-sr-card { grid-template-columns: 42px minmax(0,1fr); column-gap: 12px; padding: 18px 15px; }
    .mage-sr-card__avatar { width: 42px; height: 42px; font-size: 11px; }
    .mage-sr-card__stars { font-size: 12px; letter-spacing: 1.5px; }
    .mage-sr-card__name { font-size: 14px; }
    .mage-sr-card__role { font-size: 11.5px; }
    .mage-sr-card__quote { font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
    .mage-sr__ticker {
        height: auto;
        max-height: none;
        overflow: visible;
        -webkit-mask-image: none;
        mask-image: none;
    }
    .mage-sr__track {
        animation: none !important;
        transform: none !important;
        will-change: auto;
    }
    .mage-sr__ticker--desktop { display: grid; }
    .mage-sr__ticker--mobile { display: none; }
    .mage-sr-card { transition: none; }
}
