/* [admax_menu] — fix (sticky) fejléc. */

/* CSS-fallback a fejléc magasságának megfelelő helyfoglalásra, amíg a
   js/menu.js (footer script) le nem futtatja a pontos layout()-ot — enélkül
   a fix fejléc a tartalom tetejére "ül", majd a JS betöltésekor ugrik lejjebb
   (layout shift). A 72px megegyezik a fájlban már máshol (lásd lejjebb a
   --am-hdr-bottom fallback) használt közelítő fejléc-magassággal.
   A :has(.am-hdr) feltétel biztosítja, hogy ez a padding csak azokon az
   oldalakon érvényesüljön, ahol a [admax_menu] shortcode ténylegesen ki is
   íródott (a CSS maga minden oldalon betöltődik, a header nem feltétlenül). */
body:has(.am-hdr) {
    padding-top: 72px;
}
@media (max-width: 767px) {
    body:has(.am-hdr) {
        padding-top: 64px;
    }
}

.am-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: #2C8B74;
    z-index: 100020;
    width: 0%;
    transition: width 0.1s linear;
}

.am-hdr {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100010;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 39px;
    background: #f1f7f4;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: background 0.4s ease, border-color 0.4s ease;
    color: #16332E;
    font-family: 'Space Grotesk', Arial, sans-serif;
}

body.admin-bar .am-hdr {
    top: 32px;
}

.am-hdr.is-scrolled {
    background: rgba(241, 247, 244, 0.9);
    border-bottom-color: #dbeae3;
}

body.am-mega-open .am-hdr {
    border-bottom-color: transparent;
}

.am-hdr__brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex: none;
}

.am-hdr__logo {
    height: 12px !important;
    width: auto;
    display: block;
}

.am-hdr__logo-fallback {
    font-family: 'Archivo', sans-serif;
    font-weight: 900;
    font-size: 15px;
    letter-spacing: -0.01em;
    color: #16332E;
}

.am-hdr__nav {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    font-weight: 600;
}

.am-hdr__link {
    text-decoration: none;
    color: inherit;
}

.am-hdr__mozi {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #2c8b74;
    font-weight: 800;
    border: 1.5px solid #2c8b74;
    border-radius: 100px;
    padding: 8px 16px;
}

/* — Lenyíló almenü — */
.am-mega-wrap {
    position: relative;
    padding: 20px 0;
    margin: -20px 0;
}

.am-mega-trigger {
    text-decoration: none;
    color: inherit;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    font: inherit;
    padding: 0;
}

.am-mega-caret {
    display: inline-block;
    font-size: 9px;
    transition: transform 0.3s ease;
}

.am-mega-wrap:hover .am-mega-caret,
.am-mega-wrap:focus-within .am-mega-caret {
    transform: rotate(180deg);
}

.am-mega {
    position: absolute;
    top: 100%;
    padding-top: 2px;
    /* híd a trigger és a panel közt — a hover-lánc folytonos marad */
    left: 50%;
    transform: translateX(-50%);
    width: 211px;
    opacity: 0;
    visibility: hidden;
    translate: 0 -7px;
    transition: opacity 0.3s ease, translate 0.35s cubic-bezier(0.16, 0.84, 0.3, 1), visibility 0.3s;
    pointer-events: none;
    z-index: 3;
}

.am-mega-wrap:hover .am-mega,
.am-mega-wrap:focus-within .am-mega {
    opacity: 1;
    visibility: visible;
    translate: 0 0;
    pointer-events: auto;
}

.am-mega__panel {
    background: #FFFFFF;
    border-radius: 21px;
    box-shadow: 0 36px 89px rgba(22, 51, 46, 0.25);
    overflow: hidden;
    border: 1px solid #dbeae3;
}

.am-mega__list {
    padding: 7px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.am-mega-item {
    text-decoration: none;
    border-radius: 13px;
    padding: 11px 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.25s ease;
}

.am-mega-item:hover {
    background: #E3F3EC;
}

.am-mega-item__title {
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    font-size: 13px;
    color: #16332E;
    white-space: nowrap;
}

.am-mega-item__arrow {
    color: #2C8B74;
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.am-mega-item:hover .am-mega-item__arrow {
    transform: translateX(3px);
    opacity: 1;
}

/* — Apple-szerű mega (hirdeto / kiado class) — */
.am-apple-trigger {
    background: none;
    border: none;
    font: inherit;
    color: inherit;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
}

.am-apple-wrap.is-open .am-apple-trigger {
    color: #2c8b74;
}

.am-apple-panel {
    position: absolute;
    top: 100%;
    left: 50%;
    width: 100vw;
    margin-left: -50vw;
    display: grid;
    grid-template-rows: 0fr;
    background: #f1f7f4;
    border-bottom: 1px solid transparent;
    z-index: 2;
    visibility: hidden;
    pointer-events: none;
    transition: grid-template-rows 0.48s cubic-bezier(0.32, 0.08, 0.24, 1), visibility 0s linear 0.48s, background 0.4s ease, border-color 0.4s ease;
}

body.am-mega-open .am-hdr,
body.am-mega-open .am-hdr.is-scrolled {
    background: #f1f7f4;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.am-apple-wrap.is-open .am-apple-panel {
    grid-template-rows: 1fr;
    visibility: visible;
    pointer-events: auto;
    border-bottom-color: #dbeae3;
    transition: grid-template-rows 0.48s cubic-bezier(0.32, 0.08, 0.24, 1), visibility 0s linear 0s, background 0.4s ease, border-color 0.4s ease;
}

.am-apple-panel__clip {
    min-height: 0;
    overflow: hidden;
}

.am-apple-wrap.is-open .am-apple-panel__clip {
    overflow-x: hidden;
    overflow-y: auto;
    max-height: calc(100dvh - var(--am-hdr-bottom, 72px));
}

.am-apple-panel__inner {
    max-width: 980px;
    margin: 0 auto;
    padding: 36px 39px 48px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 56px;
}

.am-apple-col {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.am-apple-wrap.is-open .am-apple-col {
    opacity: 1;
    transform: none;
    transition: opacity 0.42s ease, transform 0.5s cubic-bezier(0.32, 0.08, 0.24, 1);
}

.am-apple-wrap.is-open .am-apple-col:nth-child(1) {
    transition-delay: 0.08s;
}

.am-apple-wrap.is-open .am-apple-col:nth-child(2) {
    transition-delay: 0.14s;
}

.am-apple-wrap.is-open .am-apple-col:nth-child(3) {
    transition-delay: 0.2s;
}

.am-apple-col__title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: #5c7b73;
    line-height: 1.35;
    letter-spacing: 0.01em;
    margin: 0 0 14px;
}

.am-apple-col a {
    display: block;
    text-decoration: none;
    color: #16332e;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    padding: 6px 0;
    transition: color 0.2s ease;
}

.am-apple-col:first-child a {
    font-size: 22px;
    font-weight: 600;
    padding: 5px 0;
}

.am-apple-col a:hover,
.am-apple-col a:focus-visible {
    color: #2c8b74;
}

.am-mega-overlay {
    position: fixed;
    top: var(--am-mega-bottom, var(--am-hdr-bottom, 0));
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    background: rgba(22, 51, 46, 0.28);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.45s ease, visibility 0.45s;
}

.am-mega-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

body.am-mega-open .am-hdr__nav {
    overflow: visible;
}

/* — Nyelvváltó (Polylang) — */
.am-lang {
    display: inline-flex;
    align-items: center;
    background: #E3F3EC;
    border: 1px solid #dbeae3;
    border-radius: 100px;
    padding: 3px;
    font-size: 11px;
    font-weight: 700;
}

.am-lang__btn {
    border: none;
    cursor: pointer;
    border-radius: 100px;
    padding: 4px 11px;
    font: inherit;
    font-weight: 700;
    transition: background 0.25s ease, color 0.25s ease;
    background: transparent;
    color: #5c7b73;
    text-decoration: none;
}

.am-lang__btn.is-active {
    background: #1E3A38;
    color: #fff;
}

/* — Ajánlatkérés lenyíló — */
.am-req {
    position: relative;
    padding: 14px 0;
    margin: -14px 0;
}

.am-req-cta {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #1E3A38;
    color: #fff;
    padding: 11px 21px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 12px;
}

.am-req:hover .am-req-cta {
    background: #2C8B74;
}

.am-req-caret {
    display: inline-block;
    font-size: 9px;
    transition: transform 0.35s cubic-bezier(0.16, 0.84, 0.3, 1);
}

.am-req:hover .am-req-caret,
.am-req:focus-within .am-req-caret {
    transform: rotate(180deg);
}

.am-req-pop {
    position: absolute;
    top: 100%;
    padding-top: 5px;
    /* híd a gomb és a panel közt — a hover-lánc folytonos marad */
    right: 0;
    width: max-content;
    min-width: 241px;
    opacity: 0;
    visibility: hidden;
    translate: 0 9px;
    transition: opacity 0.26s ease, translate 0.34s cubic-bezier(0.16, 0.84, 0.3, 1), visibility 0.26s;
    pointer-events: none;
    z-index: 4;
}

.am-req:hover .am-req-pop,
.am-req:focus-within .am-req-pop {
    opacity: 1;
    visibility: visible;
    translate: 0 0;
    pointer-events: auto;
}

.am-req-pop__panel {
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 27px 63px rgba(22, 51, 46, 0.24);
    border: 1px solid #dbeae3;
    padding: 7px;
}

.am-req-item {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 12px;
    padding: 12px 13px;
    transition: background 0.22s ease;
}

.am-req-item:hover {
    background: #E3F3EC;
}

.am-req-item__ic {
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #E3F3EC;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.16, 0.84, 0.3, 1);
    color: #2C8B74;
}

.am-req-item:hover .am-req-item__ic {
    transform: scale(1.08) rotate(-4deg);
}

.am-req-item__ic svg {
    width: 17px;
    height: 17px;
}

.am-req-item__body {
    flex: 1;
    min-width: 0;
}

.am-req-item__title {
    display: block;
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    font-size: 13px;
    color: #16332E;
    white-space: nowrap;
}

.am-req-item__sub {
    display: block;
    font-size: 11px;
    color: #5c7b73;
    font-weight: 500;
    margin-top: 1px;
    white-space: nowrap;
}

.am-req-item__arrow {
    color: #2C8B74;
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.am-req-item:hover .am-req-item__arrow {
    transform: translateX(3px);
    opacity: 1;
}

.am-hdr__tools,
.am-mnav,
.am-mnav-overlay {
    display: none;
}

/* — Mobil hamburger + off-canvas — */
@media (max-width: 767px) {
    .am-hdr {
        flex-wrap: nowrap;
        padding: 12px 16px;
        gap: 11px;
    }

    .am-hdr__nav {
        display: none;
    }

    .am-hdr__tools {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-left: auto;
        flex: none;
    }

    .am-burger {
        width: 40px;
        height: 40px;
        border: 0;
        background: none;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        padding: 9px 8px;
        cursor: pointer;
    }

    .am-burger span {
        display: block;
        height: 2px;
        width: 28px;
        background: #16332e;
        border-radius: 2px;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    body.am-mnav-open .am-burger span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    body.am-mnav-open .am-burger span:nth-child(2) {
        opacity: 0;
    }

    body.am-mnav-open .am-burger span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .am-mnav-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 100025;
        background: rgba(22, 51, 46, 0.28);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.4s ease, visibility 0.4s;
    }

    .am-mnav-overlay.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .am-mnav {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        background: #f1f7f4;
        z-index: 100030;
        transform: translateX(100%);
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.42s cubic-bezier(0.32, 0.08, 0.24, 1), visibility 0s linear 0.42s;
    }

    .am-mnav.is-open {
        transform: none;
        visibility: visible;
        pointer-events: auto;
        transition: transform 0.42s cubic-bezier(0.32, 0.08, 0.24, 1), visibility 0s linear 0s;
    }

    .am-mnav__top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 16px;
        flex: none;
        border-bottom: 1px solid #dbeae3;
    }

    .am-mnav__close {
        width: 40px;
        height: 40px;
        border: 0;
        background: none;
        position: relative;
        cursor: pointer;
    }

    .am-mnav__close span {
        position: absolute;
        left: 10px;
        right: 10px;
        top: 50%;
        height: 2px;
        background: #16332e;
        border-radius: 2px;
    }

    .am-mnav__close span:first-child {
        transform: rotate(45deg);
    }

    .am-mnav__close span:last-child {
        transform: rotate(-45deg);
    }

    .am-mnav__scroll {
        flex: 1 1 auto;
        overflow: hidden;
        min-height: 0;
    }

    .am-mnav__track {
        display: flex;
        width: 200%;
        height: 100%;
        transform: translateX(0);
        transition: transform 0.4s cubic-bezier(0.32, 0.08, 0.24, 1);
    }

    .am-mnav.is-sub .am-mnav__track {
        transform: translateX(-50%);
    }

    .am-mnav__pane {
        width: 50%;
        overflow-x: hidden;
        overflow-y: auto;
        padding: 8px 20px 20px;
        box-sizing: border-box;
    }

    .am-mnav__item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 14px 0;
        border: 0;
        border-bottom: 1px solid #e4eee9;
        background: none;
        font-family: 'Space Grotesk', sans-serif;
        font-size: 17px;
        font-weight: 600;
        color: #16332e;
        text-decoration: none;
        text-align: left;
        cursor: pointer;
    }

    .am-mnav__item.am-hdr__mozi {
        display: inline-flex;
        width: auto;
        border-bottom: 0;
        margin: 10px 0 6px;
        padding: 8px 16px;
        font-weight: 800;
        color: #2c8b74;
    }

    .am-mnav__chev {
        font-size: 22px;
        font-weight: 400;
        color: #5c7b73;
        line-height: 1;
    }

    .am-mnav__subhead {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 8px 0 14px;
        border-bottom: 1px solid #dbeae3;
        margin-bottom: 8px;
    }

    .am-mnav__back,
    .am-mnav__fwd {
        font-family: 'Space Grotesk', sans-serif;
        font-size: 13px;
        font-weight: 700;
        color: #2c8b74;
        background: none;
        border: 0;
        padding: 0;
        text-decoration: none;
        cursor: pointer;
        white-space: nowrap;
    }

    .am-mnav__fwd {
        color: #2c8b74;
    }

    .am-mnav__group {
        padding: 14px 0 8px;
    }

    .am-mnav__group .am-apple-col__title {
        margin-bottom: 6px;
    }

    .am-mnav__group .am-mnav__item {
        font-size: 16px;
        font-weight: 600;
        padding: 10px 0;
    }

    .am-mnav__foot {
        flex: none;
        padding: 14px 20px 22px;
        border-top: 1px solid #dbeae3;
        background: #f1f7f4;
    }

    .am-mnav__langs {
        margin-bottom: 12px;
    }

    .am-mnav__contact {
        display: flex;
        flex-direction: column;
        gap: 14px;
        margin-bottom: 16px;
    }

    .am-mnav__crow {
        display: flex;
        align-items: center;
        gap: 14px;
    }

    .am-mnav__clabel {
        font-family: 'Archivo', sans-serif;
        font-weight: 900;
        color: #2c8b74;
        font-size: 12px;
        width: 57px;
        flex: none;
        letter-spacing: 0.04em;
    }

    .am-mnav__cvalue {
        font-size: 16px;
        font-weight: 600;
        color: #16332e;
        text-decoration: none;
        font-family: 'Space Grotesk', sans-serif;
    }

    .am-hdr__mcta,
    .am-mnav__cta {
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        background: #1e3a38;
        color: #fff;
        padding: 11px 21px;
        border-radius: 100px;
        font-weight: 700;
        font-size: 12px;
        font-family: 'Space Grotesk', sans-serif;
        box-sizing: border-box;
    }

    .am-mnav__cta {
        width: 100%;
    }

    .am-hdr__mcta:hover,
    .am-mnav__cta:hover {
        background: #2c8b74;
        color: #fff;
    }

    body.am-mnav-open {
        overflow: hidden;
    }
}

.elementor-location-header:has(.am-hdr) {
    z-index: 100010 !important;
    position: relative;
}

@media (prefers-reduced-motion: reduce) {
    .am-apple-panel,
    .am-mega-overlay,
    .am-apple-col,
    .am-apple-col a,
    .am-mnav,
    .am-mnav-overlay,
    .am-mnav__track,
    .am-burger span {
        transition: none;
    }
}
