.hero {
    position: relative;
    padding: 15rem 0 5rem 0;
    margin-top: -10rem;
}

.hero .wp-block-group__inner-container {
    z-index: 10;
}

.hero::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: url(/wp-content/uploads/Hero-bg.jpg) bottom right no-repeat;
    background-size: cover;
    z-index: -1;
}

#main-menu ul {
    display: flex;
    list-style-type: none !important;
    margin-bottom: 1rem;
    align-items: center;
}

.kapcsolat-head li::before {
    display: none;
}

.kapcsolat-head li {
    font-size: clamp(16px, 1.6vw, 1rem);
    font-family: "Inter", serif;
    margin-bottom: 1rem;
    padding-left: 0;
}

.kapcsolat-head li img {
    margin-right: 10px;
}


#main-menu ul li {
    margin-left: 2rem;
}

#main-menu ul li::before {
    background: none;
}

#main-menu ul li a {
    color: white;
    padding: 0.5rem 0;
    font-weight: 400;
    position: relative;
    font-size: clamp(16px, 1.6vw, 0.8rem);
    text-transform: uppercase;
}

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

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

#main-menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#nav-header {
    padding-bottom: 0;
    padding-top: 1rem 0;
    z-index: 10;
    position: relative;
}

.archive #nav-header,
.single #nav-header{
    background-color: var(--dark);
}


#nav-header .content-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
}

#bottom-head ul {
    display: flex;
    list-style-type: none;
    justify-content: flex-end;
}

#bottom-head a {
    font-size: 0.7rem;
    color: var(--body-txt)
}

#bottom-head a:hover {
    color: var(--gold);
}

#bottom-head ul li {
    margin-left: 2rem;
    display: flex;
    align-items: center;
}

.menu-icon-idopont>a,
.menu-icon-contact>a {
    display: block;
    width: 36px;
    height: 74.5px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.menu-icon-idopont>a:hover,
.menu-icon-contact>a:hover {
    transform: scale(1.1);
}

.menu-icon-contact {
    margin-left: 0 !important;
    padding-left: 1rem;
}

.menu-contact-link {
    display: block;
    width: 20px;
    height: 20px;
}

.wp-image-50 {
    margin-right: 7px;
}

.wp-image-52 {
    margin-right: 10px;
}

/* Dekorációs csíkok */
#nav-menu {
    position: relative;
}

.menu {
    margin-top: 2rem;
}


/* Logóra vonatkozó beállítások */
#logo a {
    display: flex;
    align-items: center;
}

#logotipia svg {
    width: auto;
    height: 2.1rem;
}

#emblem svg {
    width: auto;
    height: 5rem;
    margin-right: 14px;
}



/* Hamburger gomb*/
#hamburger,
#kapcsolat-head {
    display: none;
}

.line {
    stroke: var(--red);
    stroke-width: 2;
    stroke-linecap: round;
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Transform origins for smooth rotation */
.line1-left,
.line1-right {
    transform-origin: 15px 7.5px;
}

.line2-left,
.line2-right {
    transform-origin: 15px 15px;
}

.line3-left,
.line3-right {
    transform-origin: 15px 22.5px;
}

/* Opening Animation: Hamburger → Arrow → X */
.hamburger.animating .line1-left {
    animation: line1LeftToX 0.8s ease-in-out forwards;
}

.hamburger.animating .line1-right {
    animation: line1RightToX 0.8s ease-in-out forwards;
}

.hamburger.animating .line2-left {
    animation: line2LeftToX 0.8s ease-in-out forwards;
}

.hamburger.animating .line2-right {
    animation: line2RightToX 0.8s ease-in-out forwards;
}

.hamburger.animating .line3-left {
    animation: line3LeftToX 0.8s ease-in-out forwards;
}

.hamburger.animating .line3-right {
    animation: line3RightToX 0.8s ease-in-out forwards;
}

/* Closing Animation: X → Arrow → Hamburger */
.hamburger.closing .line1-left {
    animation: line1LeftFromX 0.8s ease-in-out forwards;
}

.hamburger.closing .line1-right {
    animation: line1RightFromX 0.8s ease-in-out forwards;
}

.hamburger.closing .line2-left {
    animation: line2LeftFromX 0.8s ease-in-out forwards;
}

.hamburger.closing .line2-right {
    animation: line2RightFromX 0.8s ease-in-out forwards;
}

.hamburger.closing .line3-left {
    animation: line3LeftFromX 0.8s ease-in-out forwards;
}

.hamburger.closing .line3-right {
    animation: line3RightFromX 0.8s ease-in-out forwards;
}

/* Active X State (when menu is open) */
.hamburger.active .line1-left {
    transform: translateY(7.5px) rotate(-45deg);
}

.hamburger.active .line1-right {
    transform: translateY(7.5px) rotate(45deg);
}

.hamburger.active .line2-left,
.hamburger.active .line2-right {
    opacity: 0;
}

.hamburger.active .line3-left {
    transform: translateY(-7.5px) rotate(45deg);
}

.hamburger.active .line3-right {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* Keyframes: Hamburger → Arrow → X */

/* Top left line */
@keyframes line1LeftToX {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(0) rotate(-45deg);
    }

    100% {
        transform: translateY(7.5px) rotate(-45deg);
    }
}

/* Top right line */
@keyframes line1RightToX {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(0) rotate(45deg);
    }

    100% {
        transform: translateY(7.5px) rotate(45deg);
    }
}

/* Middle left line - forms arrow then fades */
@keyframes line2LeftToX {
    0% {
        opacity: 1;
        transform: rotate(0deg);
    }

    50% {
        opacity: 1;
        transform: rotate(-45deg);
    }

    75% {
        opacity: 0;
        transform: rotate(-45deg);
    }

    100% {
        opacity: 0;
        transform: rotate(-45deg);
    }
}

/* Middle right line - forms arrow then fades */
@keyframes line2RightToX {
    0% {
        opacity: 1;
        transform: rotate(0deg);
    }

    50% {
        opacity: 1;
        transform: rotate(45deg);
    }

    75% {
        opacity: 0;
        transform: rotate(45deg);
    }

    100% {
        opacity: 0;
        transform: rotate(45deg);
    }
}

/* Bottom left line */
@keyframes line3LeftToX {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(0) rotate(-45deg);
    }

    100% {
        transform: translateY(-7.5px) rotate(45deg);
    }
}

/* Bottom right line */
@keyframes line3RightToX {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(0) rotate(45deg);
    }

    100% {
        transform: translateY(-7.5px) rotate(-45deg);
    }
}

/* Keyframes: X → Arrow → Hamburger (Reverse) */

/* Top left line reverse */
@keyframes line1LeftFromX {
    0% {
        transform: translateY(7.5px) rotate(-45deg);
    }

    50% {
        transform: translateY(0) rotate(-45deg);
    }

    100% {
        transform: translateY(0) rotate(0deg);
    }
}

/* Top right line reverse */
@keyframes line1RightFromX {
    0% {
        transform: translateY(7.5px) rotate(45deg);
    }

    50% {
        transform: translateY(0) rotate(45deg);
    }

    100% {
        transform: translateY(0) rotate(0deg);
    }
}

/* Middle left line - fades in then straightens */
@keyframes line2LeftFromX {
    0% {
        opacity: 0;
        transform: rotate(-45deg);
    }

    25% {
        opacity: 0;
        transform: rotate(-45deg);
    }

    50% {
        opacity: 1;
        transform: rotate(-45deg);
    }

    100% {
        opacity: 1;
        transform: rotate(0deg);
    }
}

/* Middle right line - fades in then straightens */
@keyframes line2RightFromX {
    0% {
        opacity: 0;
        transform: rotate(45deg);
    }

    25% {
        opacity: 0;
        transform: rotate(45deg);
    }

    50% {
        opacity: 1;
        transform: rotate(45deg);
    }

    100% {
        opacity: 1;
        transform: rotate(0deg);
    }
}

/* Bottom left line reverse */
@keyframes line3LeftFromX {
    0% {
        transform: translateY(-7.5px) rotate(45deg);
    }

    50% {
        transform: translateY(0) rotate(-45deg);
    }

    100% {
        transform: translateY(0) rotate(0deg);
    }
}

/* Bottom right line reverse */
@keyframes line3RightFromX {
    0% {
        transform: translateY(-7.5px) rotate(-45deg);
    }

    50% {
        transform: translateY(0) rotate(45deg);
    }

    100% {
        transform: translateY(0) rotate(0deg);
    }
}


/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: -1;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}


@media only screen and (min-width: 1920px) {
    .hero {
        padding: 18rem 0 14rem 0;
        margin-top: -10rem;
    }
}

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

    /* Hamburger gomb megjelenítése */
    #main-menu {
        flex-wrap: wrap;
    }

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

    /* Alapból minden li 100% széles — egy sorba tördeléshez */
    #menu-main-menu>li {
        flex: 1 1 100%;
    }

    /* Az utolsó 2 li egymás mellé: 50‑50% */
    #menu-main-menu>li:nth-last-child(2),
    #menu-main-menu>li:last-child {
        flex: 1 1 calc(50% - 0.5rem);
    }

    #bottom-head ul,
    #kapcsolat-head {
        display: block;
        margin: 0;
    }

    #main-menu ul li {
        margin-left: 0 !important;
        margin-bottom: 1rem;
        padding-left: 0;
    }

    .menu-icon-idopont,
    .menu-icon-contact {
        margin-left: 0 !important;
        margin-top: 1rem;
        max-width: 50px;
    }

    .menu-icon-contact {
        padding-left: 1rem !important;
    }

    .menu-icon-idopont>a::after,
    .menu-icon-contact>a::after {
        display: none;
    }

    #bottom-head ul li {
        margin-left: 0;
        margin-bottom: 0.5rem;
    }

    #nav-header .content-box {
        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: 2rem 0 0 3rem;
        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: 30px 0;
        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;
    }

    .menu-item a {
        color: #ffffff;
        text-decoration: none;
        font-size: clamp(20px, 1.6vw, 1.5rem);
        letter-spacing: 2px;
        position: relative;
        transition: color 0.3s ease;
        cursor: pointer;
    }

    .menu-item a::after {
        content: '';
        position: absolute;
        bottom: -10px;
        left: 50%;
        transform: translateX(-50%) scaleX(0);
        width: 80%;
        height: 3px;
        background: var(--gold);
        transition: transform 0.3s ease;
    }



    .menu-item a:hover {
        color: var(--gold);
    }

    .menu-item a:hover::after {
        transform: translateX(-50%) scaleX(1);
    }

    /* Hamburger Button */

    #hamburger {
        display: flex;
        height: 4rem;
        width: 3rem;
        padding: 0.4rem;
        flex-direction: column;
        justify-content: space-between;
        transition: all 0.3s ease-in-out;
        cursor: pointer;
        background: transparent;
        z-index: 999;
    }

    #hamburger.nyitva {
        background: var(--gold);
        justify-content: center;
        align-items: center;
    }

    #hamburger span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: var(--gold);
    }
}

@media only screen and (max-width: 1240px) {
    /*#logo {
        margin: 0 0 2rem 0;
    }*/

    #bottom-head ul {
        justify-content: center;
    }

    #nav-header .content-box {
        flex-direction: column;
        align-items: center;
    }

    .hero {
        margin-top: -10rem;
    }
}

@media only screen and (max-width: 830px) {
    #logo {
        margin: 0;
    }

    #logotipia svg {
        height: 1.8rem;
    }

    .hero {
        margin-top: -5rem;
        margin-bottom: 25vw;
    }

    .hero::before {
        bottom: -25vw;
        height: 70%;
    }

    #main-menu ul li a {
        font-size: clamp(16px, 1.6vw, 1.8rem);
    }
}

@media (max-width: 768px) {
    .hamburger {
        top: 20px;
        right: 20px;
        width: 2rem;
        height: 2rem;
    }

    .menu-item {
        margin: 25px 0;
    }
}

@media only screen and (max-width: 542px) {
    .hero {
        padding: 7.5rem 0 5rem 0;
        margin-top: -4rem;
        margin-bottom: 45vw;
    }

    .hero::before {
        bottom: -45vw;
    }

    .hero .wp-block-buttons:first-of-type {
        margin-top: 2rem;
    }

    .hamburger {
        width: 2rem;
        height: 2rem;
    }

    .menu-item a {
        font-size: 1.5rem;
    }

    .menu-item {
        margin: 10px 0;
    }

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