/* [admax_demo] — „Így néz ki" demó: Desktop / Mobil kapcsoló, eszközkeret fade-váltással, kampánytípus-chipek. */

/* A keret magasság/szélesség aránya animálható legyen a nézetváltáskor. */
@property --am-demo-r {
    syntax: "<number>";
    inherits: true;
    initial-value: 0.625;
}

.am-demo {
    --am-demo-r: 0.625;
    --am-demo-ease: cubic-bezier(.16, .84, .3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    width: 100%;
}

.am-demo[data-device="mobile"] {
    --am-demo-r: 2.1667;
}

/* ---- Kapcsoló (a demón belül, vagy külön [admax_demo_kapcsolo] shortcode-ként a szöveg mellett) ---- */
.am-demo-switch {
    position: relative;
    display: inline-grid;
    vertical-align: middle;
    grid-template-columns: 1fr 1fr;
    padding: 5px;
    border-radius: 999px;
    background: #F1F7F4;
    border: 1px solid #dbeae3;
    box-shadow: inset 0 2px 6px rgba(11, 24, 21, .05);
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
    cursor: grab;
}

.am-demo-switch.is-dragging {
    cursor: grabbing;
}

.am-demo-knob {
    position: absolute;
    top: 5px;
    bottom: 5px;
    left: 5px;
    width: calc(50% - 5px);
    border-radius: 999px;
    background: #1E3A38;
    box-shadow: 0 8px 20px rgba(11, 24, 21, .22);
    transition: transform .45s var(--am-demo-ease);
    pointer-events: none;
}

.am-demo-switch[data-device="mobile"] .am-demo-knob {
    transform: translateX(100%);
}

.am-demo-switch.is-dragging .am-demo-knob {
    transition: none;
}

.am-demo-opt {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 128px;
    padding: 11px 22px;
    border: 0;
    border-radius: 999px;
    background: none;
    color: #5c7b73;
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: .2px;
    line-height: 1;
    cursor: inherit;
    transition: color .35s ease;
}

.am-demo-opt:hover {
    background: none;
    color: #1E3A38;
}

.am-demo-opt.is-active,
.am-demo-opt.is-active:hover {
    color: #A7EBDD;
}

.am-demo-opt:focus-visible,
.am-demo-chip:focus-visible {
    outline: 2px solid #5FBDA8;
    outline-offset: 3px;
}

.am-demo-opt svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---- Eszközkeret ---- */
.am-demo-stage {
    display: flex;
    justify-content: center;
    width: 100%;
}

.am-demo-frame {
    position: relative;
    width: 100%;
    max-width: 1040px;
    padding: 0;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #dbeae3;
    box-shadow: 0 30px 70px rgba(11, 24, 21, .16);
    overflow: hidden;
    transition: width .65s var(--am-demo-ease), padding .65s var(--am-demo-ease), border-radius .65s var(--am-demo-ease), background-color .5s ease, border-color .5s ease;
}

.am-demo[data-device="mobile"] .am-demo-frame {
    /* A telefon ugyanolyan magas, mint a desktop keret (S = szakasz szélessége):
       0,625·S + 38 px sáv + 2 px keret = 22 px padding + (w − 22 px) · 2,1667  →  w ≈ 28,85% + 29 px.
       Így nézetváltáskor nem ugrik a szekció; keskeny oszlopban 220 px alá nem megy. */
    width: max(220px, calc(28.85% + 29px));
    padding: 11px;
    border-radius: 46px;
    background: #16332E;
    border-color: #16332E;
}

/* Böngésző-sáv (csak desktopon). */
.am-demo-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 16px;
    background: #F1F7F4;
    border-bottom: 1px solid #dbeae3;
    overflow: hidden;
    transition: height .5s var(--am-demo-ease), opacity .3s ease, border-color .3s ease;
}

.am-demo-bar i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #dbeae3;
}

.am-demo-bar i:first-child {
    background: #5FBDA8;
}

.am-demo[data-device="mobile"] .am-demo-bar {
    height: 0;
    opacity: 0;
    border-bottom-color: transparent;
}

/* Telefon-notch (csak mobilon). */
.am-demo-notch {
    position: absolute;
    top: 20px;
    left: 50%;
    z-index: 2;
    width: 84px;
    height: 22px;
    border-radius: 999px;
    background: #16332E;
    transform: translateX(-50%) scale(.6);
    opacity: 0;
    transition: opacity .3s ease, transform .5s var(--am-demo-ease);
    pointer-events: none;
}

.am-demo[data-device="mobile"] .am-demo-notch {
    opacity: 1;
    transform: translateX(-50%) scale(1);
    transition-delay: .3s;
}

.am-demo-screen {
    position: relative;
    aspect-ratio: 1 / var(--am-demo-r);
    overflow: hidden;
    background: #F1F7F4;
    border-radius: 0;
    transition: --am-demo-r .65s var(--am-demo-ease), border-radius .65s var(--am-demo-ease);
}

.am-demo[data-device="mobile"] .am-demo-screen {
    border-radius: 36px;
}

/* Dupla osztály: az Elementor/téma „img { height: auto }" szabálya ne írja felül. */
.am-demo .am-demo-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    border-radius: 0;
    object-fit: cover;
    object-position: top center;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity .6s ease, transform .9s var(--am-demo-ease);
}

.am-demo .am-demo-img.is-active {
    opacity: 1;
    transform: scale(1);
}

/* ---- Kampánytípus-chipek ---- */
.am-demo-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.am-demo-chip {
    padding: 11px 20px;
    border: 1px solid #dbeae3;
    border-radius: 999px;
    background: #fff;
    color: #1E3A38;
    font-family: 'Archivo', sans-serif;
    font-weight: 700;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: background-color .3s ease, color .3s ease, border-color .3s ease, box-shadow .3s ease, transform .3s var(--am-demo-ease);
}

.am-demo-chip:hover {
    background: #fff;
    color: #1E3A38;
    border-color: #5FBDA8;
    transform: translateY(-2px);
}

.am-demo-chip.is-active,
.am-demo-chip.is-active:hover {
    background: #2C8B74;
    border-color: #2C8B74;
    color: #fff;
    box-shadow: 0 10px 24px rgba(44, 139, 116, .28);
}

.am-demo-arrow {
    color: #5FBDA8;
    font-weight: 800;
    font-size: 16px;
}

@media (max-width: 767px) {
    .am-demo {
        gap: 22px;
    }

    .am-demo-opt {
        min-width: 112px;
        padding: 10px 16px;
    }

    .am-demo-frame {
        border-radius: 12px;
    }

    .am-demo-bar {
        height: 26px;
        padding: 0 11px;
        gap: 5px;
    }

    .am-demo-bar i {
        width: 7px;
        height: 7px;
    }

    .am-demo[data-device="mobile"] .am-demo-frame {
        /* Ugyanaz a magasság-egyezés a kisebb (26 px) böngésző-sávval: w ≈ 28,85% + 21 px. */
        width: max(200px, calc(28.85% + 21px));
        padding: 9px;
        border-radius: 38px;
    }

    .am-demo[data-device="mobile"] .am-demo-screen {
        border-radius: 30px;
    }

    .am-demo-notch {
        top: 17px;
        width: 70px;
        height: 18px;
    }

    .am-demo-chip {
        padding: 10px 16px;
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .am-demo-knob,
    .am-demo-frame,
    .am-demo-bar,
    .am-demo-notch,
    .am-demo-screen,
    .am-demo-img,
    .am-demo-chip {
        transition-duration: .01ms;
    }
}

/* Natív mintaképek: teljes screenshot, képkivágás nélkül. */
.page-id-1310 .am-demo-screen { background: #fff; }
.page-id-1310 .am-demo .am-demo-img { object-fit: contain; }
.page-id-1310 .am-demo[data-device="mobile"] .am-demo-img {
    top: 30px;
    height: calc(100% - 30px);
}

/* A fotó már tartalmazza a mobilt: külön keret nélkül, teljes szélességben. */
.am-demo.am-demo--mobil-foto[data-device="mobile"] .am-demo-frame {
 width:100%;max-width:1040px;padding:0;border-radius:18px;background:#eff7f4;
}
.am-demo--mobil-foto .am-demo-bar,
.am-demo--mobil-foto .am-demo-notch {display:none!important;}
.am-demo.am-demo--mobil-foto[data-device="mobile"] .am-demo-screen {
 aspect-ratio:16 / 9;border-radius:17px;
}
.am-demo--mobil-foto .am-demo-img {object-fit:cover;}
.am-demo--mobil-foto .am-demo-chips {gap:10px;}
.am-demo--mobil-foto .am-demo-chip {padding:12px 16px;font-size:14px;}
.am-demo--mobil-foto .am-demo-chip:focus-visible {outline:3px solid #16332e;outline-offset:4px;}
@media(max-width:767px){
 .am-demo--mobil-foto .am-demo-chips {gap:8px;}
 .am-demo--mobil-foto .am-demo-chip {font-size:12px;padding:11px 13px;}
}

/* Eltolt dekoráció a fotós bemutató mögött, a képfájltól függetlenül. */
.am-demo--mobil-foto .am-demo-stage {
    position:relative;
    isolation:isolate;
    box-sizing:border-box;
    padding:24px 24px 0 0;
}
.am-demo--mobil-foto .am-demo-backdrop {
    position:absolute;
    z-index:-1;
    inset:0 0 24px 18%;
    border-radius:26px;
    background:#D2F3EB;
    pointer-events:none;
}
.am-demo.am-demo--mobil-foto[data-device="mobile"] .am-demo-frame {
    border:0;
    background:transparent;
    box-shadow:0 22px 48px rgba(22,51,46,.14);
}
@media(max-width:767px) {
    .am-demo--mobil-foto .am-demo-stage {padding:16px 16px 0 0;}
    .am-demo--mobil-foto .am-demo-backdrop {bottom:16px;border-radius:22px;}
}
