/* [admax_eredmenyek nezet="lebego"] — lebegő metrika-kártya (sablon 2c): nagy kép, rajta átlógó eredmény-kártya. */

.am-fl {
    --am-fl-ease: cubic-bezier(0.16, 0.84, 0.3, 1);
    box-sizing: border-box;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(0, 600px) minmax(0, 1fr);
    gap: 56px;
    align-items: center;
    color: #16332e;
}

.am-fl *,
.am-fl *::before,
.am-fl *::after {
    box-sizing: border-box;
}

/* ---- Kollázs: arányosan skálázódik (600 × 420 a sablonban) ---- */
.am-fl__collage {
    position: relative;
    aspect-ratio: 600 / 420;
}

.am-fl__blob {
    position: absolute;
    right: 0;
    top: 0;
    width: 71.7%;
    height: 78.6%;
    border-radius: 20px;
    background: #a7ebdd;
    opacity: 0.5;
}

.am-fl__photo {
    position: absolute;
    left: 0;
    top: 5.2%;
    width: 78.3%;
    height: 78.6%;
    border-radius: 14px;
    overflow: hidden;
    background: #1e3a38;
    box-shadow: 0 24px 54px rgba(22, 51, 46, 0.24);
}

.am-fl__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.am-fl__card {
    position: absolute;
    right: 0;
    bottom: 0;
    min-width: 220px;
    max-width: 70%;
    background: #fff;
    border-radius: 16px;
    padding: 22px 26px 20px;
    box-shadow: 0 22px 46px rgba(22, 51, 46, 0.22);
}

/* Váltás: az aktív kép és kártya beúszik, a többi elhalványul. */
.am-fl__photo,
.am-fl__card {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, transform 0.6s var(--am-fl-ease), visibility 0s linear 0.5s;
}

.am-fl__photo {
    transform: scale(1.02);
}

.am-fl__card {
    transform: translateY(14px);
}

.am-fl__photo.is-on,
.am-fl__card.is-on {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.5s ease, transform 0.6s var(--am-fl-ease), visibility 0s;
}

.am-fl__card.is-on {
    transition-delay: 0.08s;
}

.am-fl__card-brand {
    font-family: 'Archivo', sans-serif;
    font-weight: 900;
    font-size: 11px;
    letter-spacing: 1.1px;
    color: #2c8b74;
}

.am-fl__card-metric {
    font-family: 'Archivo', sans-serif;
    font-weight: 900;
    font-size: 52px;
    line-height: 0.92;
    letter-spacing: -1.8px;
    color: #16332e;
    margin-top: 10px;
}

.am-fl__card-label {
    font-size: 13.5px;
    font-weight: 600;
    color: #5c7b73;
    margin-top: 6px;
}

/* ---- Jobb oldal ---- */
.am-fl__right {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    min-width: 0;
}

.am-fl__eyebrow {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2.2px;
    text-transform: uppercase;
    color: #2c8b74;
}

.am-fl .am-fl__title {
    margin: 0;
    padding: 0;
    font-family: 'Archivo', sans-serif;
    font-weight: 900;
    font-size: 40px;
    line-height: 1.08;
    letter-spacing: -1.2px;
    text-transform: uppercase;
    color: #16332e;
}

.am-fl .am-fl__text {
    margin: 0;
    font-size: 15.5px;
    line-height: 1.6;
    color: #5c7b73;
    font-weight: 500;
}

.am-fl__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.am-fl__chip {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    font-family: 'Archivo', sans-serif;
    font-weight: 900;
    font-size: 12px;
    letter-spacing: 1px;
    line-height: 1.2;
    text-transform: none;
    border-radius: 100px;
    padding: 10px 16px;
    background: #fff;
    color: #16332e;
    border: 1.5px solid #dbeae3;
    transition: background 0.25s, color 0.25s, border-color 0.25s;
}

.am-fl__chip:hover {
    border-color: #16332e;
    background: #fff;
    color: #16332e;
}

.am-fl__chip.is-on,
.am-fl__chip.is-on:hover {
    background: #16332e;
    color: #fff;
    border-color: #16332e;
}

/* Autoplay: az aktív chip alján végigfutó csík mutatja, mikor vált a következőre. */
.am-fl.is-auto .am-fl__chip.is-on::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    background: #a7ebdd;
    transform-origin: left center;
    animation: am-fl-timer var(--am-fl-delay, 6s) linear forwards;
}

.am-fl.is-auto.is-paused .am-fl__chip.is-on::after {
    animation-play-state: paused;
}

@keyframes am-fl-timer {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

.am-fl__chip:focus-visible,
.am-fl__link:focus-visible {
    outline: 2px solid #2c8b74;
    outline-offset: 2px;
}

.am-fl__link {
    font-size: 14px;
    font-weight: 800;
    color: #2c8b74;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.am-fl__link[hidden] {
    display: none;
}

.am-fl__link:hover {
    color: #1e3a38;
}

.am-fl__arrow {
    transition: transform 0.3s var(--am-fl-ease);
}

.am-fl__link:hover .am-fl__arrow {
    transform: translateX(4px);
}

/* ---- Tablet: egymás alatt ---- */
@media (max-width: 1024px) {
    .am-fl {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }

    .am-fl__collage {
        width: 100%;
        max-width: 600px;
    }
}

/* ---- Mobil ---- */
@media (max-width: 767px) {
    .am-fl {
        gap: 28px;
    }

    .am-fl__card {
        min-width: 0;
        max-width: 78%;
        padding: 14px 16px 13px;
        border-radius: 12px;
    }

    .am-fl__card-metric {
        font-size: 36px;
        letter-spacing: -1.1px;
        margin-top: 6px;
    }

    .am-fl__card-label {
        font-size: 12.5px;
    }

    .am-fl .am-fl__title {
        font-size: 30px;
        letter-spacing: -0.9px;
    }

    .am-fl__right {
        gap: 16px;
    }

    .am-fl__chip {
        padding: 9px 13px;
        font-size: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .am-fl__photo,
    .am-fl__card,
    .am-fl__photo.is-on,
    .am-fl__card.is-on,
    .am-fl__arrow {
        transition: none;
        transform: none;
    }
}
