/* --------------------------------------------------------------
   FWGPress – Mobile Menü (bis 768px)
-------------------------------------------------------------- */

@media (max-width: 768px) {

    /* -------------------------------
       1) Hauptmenü ausblenden
    --------------------------------*/
    .fwg-nav .fwg-menu {
        display: none;
        flex-direction: column;
        gap: 0;
        background: #fcf2e8;
        padding: 16px;
        border-top: 1px solid #f7a141;
        width: 100%;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);

        max-height: 0;
        overflow: hidden;
        transition: max-height .35s ease;
    }

    /* Wenn geöffnet */
    .fwg-nav .fwg-menu.open {
        display: flex;
        max-height: 1000px;
    }


    /* -------------------------------
       2) Menü-Links
    --------------------------------*/
    .fwg-nav .fwg-menu li {
        padding: 8px 0;
        position: relative;
    }

    .fwg-nav .fwg-menu a {
        display: block;
        width: 100%;
        padding: 10px 0;
    }


    /* -------------------------------
       3) Submenüs (geschlossen)
    --------------------------------*/
    .fwg-nav .fwg-menu .sub-menu {
        display: none;
        padding-left: 16px;
        border-left: 2px solid #f7a141;
        margin-top: 6px;

        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height .35s ease, opacity .25s ease;
    }

    /* Submenü geöffnet */
    .fwg-nav .fwg-menu .sub-menu.open {
        display: block;
        max-height: 800px;
        opacity: 1;
    }


    /* -------------------------------
       4) Pfeile für Submenüs
    --------------------------------*/
    .fwg-nav .fwg-menu > li.menu-item-has-children > a {
        padding-right: 28px;
    }

    .fwg-nav .fwg-menu > li.menu-item-has-children > a::after {
        content: "›";
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%) rotate(90deg);
        font-size: 20px;
        color: var(--fwg-blue);
        transition: transform .2s ease;
    }

    /* Pfeil drehen, wenn Submenü offen */
    .fwg-nav .fwg-menu > li.menu-item-has-children.open > a::after {
        transform: translateY(-50%) rotate(180deg);
    }


    /* -------------------------------
       5) Hamburger-Button
    --------------------------------*/
    #fwg-nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 34px;
        border: 2px solid #0b3169;
        border-radius: 4px;
        background: #fcf2e8;
        color: #0b3169;
        font-size: 24px;
        cursor: pointer;
        transition: background .3s, border-color .3s, color .3s;
    }

    #fwg-nav-toggle:hover {
        background: #f7a141;
        color: white;
        border-color: #f7a141;
    }
}
