#menu-main-menu,
#menu-top-menu {
    display: flex;
    list-style-type: none;
    align-items: center;
}


#menu-main-menu {
    justify-content: flex-end;
}

#menu-top-menu {
    padding: 0;
    margin: 0;
}

#main-menu ul li,
.top-menu-cta-btn {
    margin-left: 2rem;
}

/* Kereső li: a FiboSearch wrapper ne terjeszkedjen szét zárva */
#menu-item-74 {
    padding: 0;
}

#menu-item-74 .dgwt-wcas-search-wrapp {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
}

#menu-item-74 .dgwt-wcas-search-form {
    min-width: 0 !important;
    flex-shrink: 1;
}

#main-menu ul li a,
#menu-top-menu li a {
    padding: 0.5rem 0;
    font-weight: 500;
    font-size: 16px;
    position: relative;
    color: var(--color-text-inv);
}

@media only screen and (min-width: 3400px) {
    #main-menu ul li a,
    #menu-top-menu li a {
        font-size: 20px;
    }
}

#menu-top-menu .top-menu-cta-btn a {
    font-size: 16px;
    font-weight: 600;
}

#main-menu ul li a:hover,
.menu-item-object-page,
#menu-top-menu li a:hover {
    color: var(--color-terracotta);
}

/*#main-menu ul li ul {
    display: none;
}*/

#main-menu ul li a:hover,
#tel a:hover {
    color: var(--color-terracotta);
}

#head .content-box,
#top-head .content-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#main-menu ul li a::before {
    content: "";
    display: block;
    background: transparent;
    width: 0;
    height: 2px;
    position: absolute;
    bottom: 5px;
    transition: all 0.5s ease-in-out;
}

#main-menu ul li a:hover::before {
    background: var(--color-terracotta);
    width: 100%;
}

#hamburger {
    display: none;
}

#menu-item-77 a::before {
    display: none !important;
}

/* Logo */
#logo svg {
    max-width: 18rem;
    transition: transform 0.3s ease, max-width 0.4s ease;
}

#logo a:hover svg {
    transform: scale(1.06);
}

#logo {
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-btn {
    all: unset;
}

#menu-item-70 {
    display: inline-flex
}

#menu-item-70 a,
#menu-item-77 a {
    border-radius: 40px;
    background: #D97E4A;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.25);
    padding: 10px 32px !important;
    height: 50px;
}


#menu-item-70 a:hover,
#menu-item-77 a:hover {
    color: var(--color-text-inv) !important;
}

.fiokom,
.fiokom a {
    cursor: pointer;
    padding: 0;
}

.fiokom a svg {
    width: 40px;
    height: 40px;
    display: block;
}

.fiokom a svg path:hover {
    fill: var(--color-terracotta);
}

.search-toggle-btn::before {
    background-color: var(--color-terracotta);
}




/* --- Top Bar --- */
#top-head {
    background-color: #232B26;
    height: 3rem;
    display: flex;
    align-items: center;
}

/* Tartalom: jobra igazítva, két div egymás mellett */
#top-head .container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 24px;
    width: 100%;
}

/* A két div: flex sor, ikonok szöveggel egy sorban */
#top-head .container > div {
    display: flex;
    align-items: center;
    gap: 2rem;
}

#top-head .wp-block-paragraph {
    font-size: 12px;
}

#top-head .wp-block-paragraph img {
    width: 25px !important;
    height: auto;
}

/* Linkek és bekezdések belül: ikon + szöveg egy sorban */
#top-head .container a,
#top-head .container p {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text-inv);
    text-decoration: none;
}

#top-head .container svg {
    flex-shrink: 0;
}

/* Mobil: bal igazítás, kisebb betű */
@media only screen and (max-width: 799px) {
    #top-head .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    #top-head .container * {
        font-size: 14px !important;
    }
}

#top-head i {
    color: var(--color-text-inv);
}

#head {
    background-color: var(--color-navy);
    color: var(--color-text-inv);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    padding-bottom: 1rem;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.25) !important;
}



/* =============================================
   KERESŐ TOGGLE – animált keresőmező
   ============================================= */

/* Top menu: elemek függőleges igazítása */
#menu-top-menu,
#menu-mobil-top-menu {
    align-items: center;
}

#menu-top-menu>li,
#menu-mobil-top-menu>li {
    display: flex;
    align-items: center;
}

/* FiboSearch wrapper: mindig vízszintes sor, a plugin mobile-overlay módja sem törheti el */
#menu-item-74 .dgwt-wcas-search-wrapp {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
}

/* Form: ne vegye át a teljes szélességet, maradjon flex item */
#menu-item-74 .dgwt-wcas-search-form {
    display: block !important;
    min-width: 0 !important;
    flex-shrink: 1;
    width: auto !important;
}

/* Plugin mobile overlay trigger: mindig rejtve (saját toggle gombunk kezeli) */
#menu-item-74 .dgwt-wcas-enable-mobile-form,
#menu-item-74 .js-dgwt-wcas-enable-mobile-form {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
}

/* FiboSearch belső doboz: vizuális stílusok – csak desktop */
#menu-item-74 .dgwt-wcas-sf-wrapp {
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 40px !important;
}

/* FiboSearch mobil overlay trigger – csak a desktop menüben rejtve */
#menu-top-menu .js-dgwt-wcas-enable-mobile-form,
#menu-top-menu .dgwt-wcas-enable-mobile-form {
    display: none !important;
}

/* ---- Kereső ikon (toggle) gomb ---- */
.search-toggle-btn {
    all: unset;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-toggle-btn::before {
    content: "";
    width: 40px;
    height: 40px;
    display: block;
    background-color: var(--color-text-inv);
    mask: url("/wp-content/uploads/Kereses.svg") no-repeat center / contain;
    -webkit-mask: url("/wp-content/uploads/Kereses.svg") no-repeat center / contain;
    transition: background-color 0.2s ease;
}

.search-toggle-btn:hover::before {
    background-color: var(--color-terracotta);
}

/* Nyitott állapotban toggle ikon eltűnik */
.dgwt-wcas-search-wrapp.search-open .search-toggle-btn {
    display: none !important;
}

/* ---- Bezáró X gomb ----
   Zárva: display none → 0px, nem foglal helyet
   Nyitva: display flex → megjelenik
*/
.search-close-btn {
    all: unset;
    cursor: pointer;
    display: none !important;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    position: relative;
    margin-left: 8px;
}

.search-close-btn::before,
.search-close-btn::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 16px;
    background-color: var(--color-text-inv);
    border-radius: 2px;
    transition: background-color 0.2s ease;
}

.search-close-btn::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.search-close-btn::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.search-close-btn:hover::before,
.search-close-btn:hover::after {
    background-color: var(--color-terracotta);
}

/* Nyitott állapotban X megjelenik */
.dgwt-wcas-search-wrapp.search-open .search-close-btn {
    display: flex !important;
}

/* =============================================
   NAVIGÁCIÓ – CTA GOMB (top-menu-cta-btn)
   ============================================= */

/* Alap megjelenés */
.top-menu-cta-btn>a {
    display: inline-flex;
    align-items: center;
    background-color: var(--color-terracotta);
    color: var(--color-text-inv);
    font-family: var(--font-heading);
    font-size: var(--fs-base);
    font-weight: var(--fw-bold);
    letter-spacing: var(--ls-cta);
    padding: 10px 32px;
    height: 44px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-btn);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
    transition: background-color 0.2s ease;
}

/* Nyilkör: flex elem, max-width 0-ról nő – így a gomb tágul jobbra */
.top-menu-cta-btn>a::after {
    content: '';
    display: block;
    width: 28px;
    height: 28px;
    max-width: 0;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 50%;
    border: 2px solid var(--color-text-inv);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FAF8F4' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    margin-left: 0;
    opacity: 0;
    transition: max-width 0.3s ease, margin-left 0.3s ease, opacity 0.2s ease;
}

/* Hover: gomb jobbra tágul, kör megjelenik */
.top-menu-cta-btn>a:hover {
    background-color: #c56e3a;
}

.top-menu-cta-btn>a:hover::after {
    max-width: 28px;
    margin-left: 10px;
    opacity: 1;
}

.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp {
    background: transparent;
}

/* Mobil top menü alapból rejtve – csak 715px alatt jelenik meg */
#mobile-top-menu {
    display: none;
}



@media only screen and (max-width: 1281px) {
    #head {
        padding-bottom: 0 !important;
    }


    #hamburger {
        width: 40px;
        height: 34px;
        padding: 0.4rem;
        display: flex;
        transition: all 0.5s ease-in-out;
        flex-direction: column;
        justify-content: space-between;
        margin-left: 1rem;
        cursor: pointer;
    }

    #hamburger:hover span {
        background: var(--color-terracotta);
    }

    #hamburger.nyitva {
        justify-content: center;
    }

    #hamburger span {
        display: block;
        width: 100%;
        height: 5px;
        background: var(--color-text-inv);
        transition: all 0.3s ease-in-out;
    }

    #hamburger.nyitva span {
        background: var(--color-terracotta);
    }

    #logo svg {
        max-width: 14rem;
    }

    #hamburger.nyitva span:nth-of-type(2) {
        display: none;
    }

    #hamburger.nyitva span:nth-of-type(1) {
        transform: rotate(45deg);
        margin-bottom: -2px;
    }

    #hamburger.nyitva span:nth-of-type(3) {
        transform: rotate(-45deg);
        margin-top: -2px;
    }

    #main-menu {
        max-height: 0;
        opacity: 0;
        pointer-events: none;
        transition: all 0.8s ease-in-out;
        border-top: solid 1px #ddd;
        flex-wrap: wrap;
    }

    #menu-main-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 0;
    }

    #main-menu.nyitva {
        max-height: 1000px;
        opacity: 1;
        pointer-events: auto;
    }

    #menu-item-70,
    #menu-item-70 a,
    #top-head {
        display: none;
    }


    /* Alapból minden li 100% széles — egy sorba tördeléshez */

    #nav-header .container {
        flex-wrap: wrap;
        flex-direction: row !important;
        margin-bottom: 0;
    }

    #nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: #1D1A13;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding-left: 5rem;
        transition: right 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        overflow-y: auto;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
    }

    #nav-menu.nyitva {
        right: 0;
        position: absolute;
    }

    #nav-menu.nyitva ul {
        position: relative;
        position: relative;
        left: -1.5rem;
        top: 0;
    }

    #nav-menu.active {
        right: 0;
        max-height: 1000px;
        opacity: 1;
        pointer-events: auto;
    }

    #main-menu ul.nyitva .menu-item {
        margin-top: 20px;
        margin-bottom: 20px;
        opacity: 1;
        transform: translateX(50px);
        transition: all 0.5s ease;
        padding: 0;
    }

    .nav-menu.active .menu-item {
        opacity: 1;
        transform: translateX(0);
    }

    .nav-menu.active .menu-item:nth-child(1) {
        transition-delay: 0.1s;
    }

    .nav-menu.active .menu-item:nth-child(2) {
        transition-delay: 0.2s;
    }

    .nav-menu.active .menu-item:nth-child(3) {
        transition-delay: 0.3s;
    }

    .nav-menu.active .menu-item:nth-child(4) {
        transition-delay: 0.4s;
    }

    .nav-menu.active .menu-item:nth-child(5) {
        transition-delay: 0.5s;
    }

    .nav-menu.active .menu-item:nth-child(6) {
        transition-delay: 0.6s;
    }

    .head-container-group {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}


@media only screen and (max-width: 980px) {
    #logo svg {
        max-width: 10rem;
        height: 80px;
    }

    .fiokom::before,
    .search-toggle-btn::before {
        width: 45px;
        height: 45px;
    }

    #hamburger span {
        height: 4px;
    }

    .fiokom::before,
    .search-toggle-btn::before {
        width: 40px;
        height: 40px;
    }

}


/* Tablet: #main-menu.nyitva padding-bottom (800px–1281px) */
@media only screen and (min-width: 800px) and (max-width: 1281px) {
    #main-menu.nyitva {
        padding-bottom: 1rem;
    }
}

/* .mobile-tophead: csak mobilon látható – desktop-on rejtve */
.mobile-tophead {
    display: none;
}

@media only screen and (max-width: 799px) {

    /* Logó kisebb méret mobilon */
    #logo svg {
        max-width: 12rem;
    }

    /* Fiókom SVG ikon mérete mobilon */
    .fiokom a svg {
        width: 50px;
        height: 50px;
    }

    /* #menu-main-menu és #menu-mobil-top-menu padding mobilon */
    #menu-main-menu,
    #menu-mobil-top-menu {
        padding: 2rem 0;
    }

    #menu-main-menu {
        display: flex;
        align-content: flex-start;
    }

    /* #top-head tartalom a hamburger menü alján */
    .mobile-tophead {
        display: block;
        background-color: #232B26;
        padding: 20px var(--header-nav-h);
        margin-left: calc(-1 * var(--header-nav-h));
        margin-right: calc(-1 * var(--header-nav-h));
        margin-top: auto;
    }

    .mobile-tophead * {
        font-size: 14px !important;
        color: var(--color-text-inv) !important;
    }

    /* wp-block-paragraph: ikon és szöveg egy sorban */
    .mobile-tophead .wp-block-paragraph,
    .mobile-nav-panel__contact .wp-block-paragraph {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .mobile-tophead .wp-block-paragraph img,
    .mobile-nav-panel__contact .wp-block-paragraph img {
        display: inline-block;
        flex-shrink: 0;
    }

    /* #menu-main-menu elemek mobil stílusa */
    #menu-main-menu > li {
        flex: 1 1 100%;
        margin-left: 0 !important;
        padding: 0;
        border-bottom: 1px solid rgba(250, 248, 244, 0.08);
    }

    #main-menu ul li a {
        display: block;
        font-family: var(--font-heading);
        font-size: 20px;
        font-weight: 700;
        padding: 14px 0;
        margin-right: 1.5rem;
    }

    .js-dgwt-wcas-enable-mobile-form {
        padding: 0 !important;
    }

    #main-menu ul li a::before {
        display: none !important;
        content: none !important;
    }

    /* FiboSearch input mobil méret */
    .dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input {
        font-size: var(--fs-base) !important;
        padding: 8px 24px 8px 48px;
    }

    /* FiboSearch kereső gomb mobil méret */
    .dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
        min-height: 25px;
        min-width: 25px;
        height: 25px;
        width: 25px;
        left: 23px;
    }

    /* Jobbra mutató nyíl a has-mega-menu elemeken */
    #main-menu ul li.has-mega-menu > a {
        display: flex;
        gap: 2rem;
        align-items: center;
        width: 100%;
    }

    #main-menu ul li.has-mega-menu > a::after {
        content: '';
        display: block;
        width: 8px;
        height: 8px;
        border-right: 2.5px solid currentColor;
        border-top: 2.5px solid currentColor;
        transform: rotate(45deg);
        flex-shrink: 0;
        margin-right: 4px;
    }
}

@media only screen and (max-width: 715px) {

    /* Desktop top menü elrejtése mobilon */
    #menu-top-menu {
        display: none;
    }

    #hamburger {
        width: 2.5rem;
        height: 2rem;
        padding: 0.3rem;
        margin-left: 1rem;
    }

    /* --- Mobil top menü (hamburger alján) --- */
    #mobile-top-menu {
        display: block;
        width: 100%;
    }

    #menu-mobil-top-menu {
        display: flex !important;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 0;
        margin: 0;
        padding: 0 0 2rem 0;
    }

    #menu-mobil-top-menu>li {
        margin: 0 !important;
        padding: 0 !important;
        flex: 0 0 auto;
    }

    /* item-75 (kereső) saját sort kap, alatta item-76 + item-77 egymás mellett */
    #menu-mobil-top-menu #menu-item-75 {
        flex: 1 1 100%;
    }


    /* CTA gomb: megtartja eredeti megjelenését */
    #menu-mobil-top-menu .top-menu-cta-btn>a {
        display: inline-flex !important;
        font-size: var(--fs-base) !important;
        padding: 8px 20px !important;
        height: 40px !important;
    }
}


@media only screen and (max-width: 630px) {
    .mobile-tophead {
        padding-left: 40px;
        padding-right: 40px;
        margin-left: -40px;
        margin-right: -40px;
    }
}

@media only screen and (max-width: 450px) {
    #mobile-top-menu {
        display: block;
    }

    .mobile-tophead {
        padding-left: 20px;
        padding-right: 20px;
        margin-left: -20px;
        margin-right: -20px;
    }
}