/* Adjunk relatív pozíciót a header-nek, hogy a hamburger ikon helyesen legyen pozícionálva */
.main-header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #A31C20;
    padding: 15px 10%;
}

/* Mobil nézet – max-width: 768px */
@media (max-width: 768px) {
    .main-nav {
        position: fixed;
        top: 0;
        left: -100%; /* alapból rejtve */
        width: 70%;
        height: 100%;
        background-color: #A31C20;
        flex-direction: column;
        align-items: flex-start;
        padding-top: 60px;
        transition: left 0.3s ease;
        z-index: 1000;
    }
    .main-nav.active {
        left: 0;
    }
    .hamburger {
        display: block;
        cursor: pointer;
        position: absolute;
        top: 20px;
        right: 20px;
        z-index: 1100;
        /* Debug célból ideiglenes háttér, később eltávolítható */
        padding: 5px;
    }
    .hamburger span {
        display: block;
        width: 25px;
        height: 3px;
        margin: 5px;
        background: #fff;
        transition: 0.3s;
    }
    .main-nav a {
        padding: 15px 20px;
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    /* ✅ Almenü mobilnézetben – Kilógás megszüntetése, sortörés */
    @media (max-width: 768px) {
        .menu-item {
            width: 100%;
        }

        .menu-item > a {
            display: block;
            padding: 15px 20px;
            width: 100%;
        }

        .menu-item .submenu {
            display: none;
            width: 100%;
            background-color: #7F1316; /* Sötétebb bordó a jobb kontrasztért */
            padding: 0;
            list-style: none;
            transition: max-height 0.3s ease-out;
            overflow: hidden;
            max-height: 0;
            border-left: 4px solid #FDAA10; /* Kiemelés */
        }

        .menu-item .submenu.active {
            display: block;
            max-height: 500px; /* Lassan lenyíló hatás */
        }

        .submenu li {
            width: 100%;
            padding: 0;
        }

        .submenu a {
            display: block;
            width: 100%;
            padding: 12px 20px;
            color: white;
            text-decoration: none;
            border-bottom: 1px solid rgba(255,255,255,0.2);
            transition: background-color 0.3s ease-in-out;
            word-wrap: break-word;  /* ✅ Sortörés beállítása */
            white-space: normal;    /* ✅ Engedélyezzük a sortörést */
            line-height: 1.4;       /* ✅ Jobb olvashatóság érdekében */
        }

        .submenu a:hover {
            background-color: #A31C20;
        }
    }

}
