/* =========================================================
   DMICHALI.GR - CUSTOM HEADER
   Site-wide, no Elementor / no HFE dependency
   ========================================================= */

#dmh-header,
#dmh-header * {
    box-sizing: border-box;
}

#dmh-header {
    position: relative;
    z-index: 9999;
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid rgba(55, 65, 57, 0.08);
}

#dmh-header .dmh-inner {
    width: calc(100% - 40px);
    max-width: 1170px;
    min-height: 155px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 40px;
}

/* LOGO */
#dmh-header .dmh-brand {
    flex: 0 0 130px;
    width: 130px;
    max-width: 130px;
    margin: 0;
    padding: 0;
}

#dmh-header .dmh-brand .custom-logo-link {
    display: block;
    width: 130px;
    margin: 0;
    padding: 0;
    line-height: 0;
}

#dmh-header .dmh-brand .custom-logo {
    display: block;
    width: 130px !important;
    max-width: 130px !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: contain;
}

#dmh-header .dmh-site-name {
    display: inline-block;
    color: #374139;
    font-family: "Trebuchet MS", Arial, sans-serif;
    font-size: 22px;
    line-height: 1.2;
    text-decoration: none;
}

/* NAVIGATION */
#dmh-header .dmh-nav {
    flex: 1 1 auto;
    min-width: 0;
}

#dmh-header .dmh-menu,
#dmh-header .dmh-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#dmh-header .dmh-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 28px;
}

#dmh-header .dmh-menu > li,
#dmh-header .dmh-menu li {
    position: relative;
    margin: 0;
    padding: 0;
}

#dmh-header .dmh-menu a {
    display: block;
    color: #6d8a75;
    font-family: "Trebuchet MS", Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.25;
    text-decoration: none;
    transition: color .18s ease;
}

#dmh-header .dmh-menu > li > a {
    padding: 14px 0;
    white-space: nowrap;
}

#dmh-header .dmh-menu a:hover,
#dmh-header .dmh-menu .current-menu-item > a,
#dmh-header .dmh-menu .current_page_item > a,
#dmh-header .dmh-menu .current-menu-ancestor > a {
    color: #374139;
}

/* DESKTOP DROPDOWNS */
#dmh-header .dmh-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 10000;
    display: none;
    min-width: 235px;
    background: #ffffff;
    border: 1px solid rgba(55, 65, 57, 0.10);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

#dmh-header .dmh-menu .sub-menu .sub-menu {
    top: 0;
    left: 100%;
}

#dmh-header .dmh-menu .sub-menu a {
    padding: 11px 16px;
    white-space: normal;
}

#dmh-header .dmh-menu li:hover > .sub-menu,
#dmh-header .dmh-menu li:focus-within > .sub-menu {
    display: block;
}

/* HAMBURGER */
#dmh-header .dmh-menu-toggle {
    display: none;
    width: 46px;
    height: 46px;
    margin: 0 0 0 auto;
    padding: 9px;
    background: transparent;
    border: 0;
    box-shadow: none;
    cursor: pointer;
}

#dmh-header .dmh-menu-toggle span {
    display: block;
    width: 27px;
    height: 2px;
    margin: 6px auto;
    background: #374139;
    transition: transform .2s ease, opacity .2s ease;
}

#dmh-header .dmh-menu-toggle.is-open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

#dmh-header .dmh-menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

#dmh-header .dmh-menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

#dmh-header .dmh-submenu-toggle {
    display: none;
}

/* TABLET / MOBILE */
@media (max-width: 1023px) {

    #dmh-header .dmh-inner {
        min-height: 120px;
        gap: 20px;
    }

    #dmh-header .dmh-brand,
    #dmh-header .dmh-brand .custom-logo-link {
        flex-basis: 105px;
        width: 105px;
        max-width: 105px;
    }

    #dmh-header .dmh-brand .custom-logo {
        width: 105px !important;
        max-width: 105px !important;
    }

    #dmh-header .dmh-menu-toggle {
        display: block;
        flex: 0 0 46px;
    }

    #dmh-header .dmh-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        background: #ffffff;
        border-top: 1px solid rgba(55, 65, 57, 0.08);
        border-bottom: 1px solid rgba(55, 65, 57, 0.08);
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
    }

    #dmh-header .dmh-nav.is-open {
        display: block;
    }

    #dmh-header .dmh-menu {
        display: block;
        width: calc(100% - 40px);
        max-width: 1170px;
        margin: 0 auto;
        padding: 12px 0 18px;
    }

    #dmh-header .dmh-menu > li,
    #dmh-header .dmh-menu li {
        width: 100%;
    }

    #dmh-header .dmh-menu > li {
        border-bottom: 1px solid rgba(55, 65, 57, 0.08);
    }

    #dmh-header .dmh-menu > li:last-child {
        border-bottom: 0;
    }

    #dmh-header .dmh-menu > li > a {
        padding: 12px 44px 12px 0;
        white-space: normal;
    }

    #dmh-header .dmh-menu .sub-menu,
    #dmh-header .dmh-menu .sub-menu .sub-menu {
        display: none;
        position: static;
        width: 100%;
        min-width: 0;
        margin: 0;
        padding: 0 0 8px 18px;
        border: 0;
        box-shadow: none;
    }

    #dmh-header .dmh-menu li.dmh-submenu-open > .sub-menu {
        display: block;
    }

    #dmh-header .dmh-menu li:hover > .sub-menu,
    #dmh-header .dmh-menu li:focus-within > .sub-menu {
        display: none;
    }

    #dmh-header .dmh-menu li.dmh-submenu-open:hover > .sub-menu,
    #dmh-header .dmh-menu li.dmh-submenu-open:focus-within > .sub-menu {
        display: block;
    }

    #dmh-header .dmh-menu .sub-menu a {
        padding: 9px 36px 9px 0;
    }

    #dmh-header .dmh-submenu-toggle {
        display: block;
        position: absolute;
        top: 5px;
        right: 0;
        width: 38px;
        height: 38px;
        margin: 0;
        padding: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
        color: #6d8a75;
        font-size: 22px;
        line-height: 38px;
        cursor: pointer;
    }

    #dmh-header .dmh-submenu-toggle span {
        display: inline-block;
        transition: transform .2s ease;
    }

    #dmh-header .dmh-submenu-toggle[aria-expanded="true"] span {
        transform: rotate(180deg);
    }
}

@media (max-width: 600px) {

    #dmh-header .dmh-inner {
        width: calc(100% - 28px);
        min-height: 105px;
    }

    #dmh-header .dmh-brand,
    #dmh-header .dmh-brand .custom-logo-link {
        flex-basis: 90px;
        width: 90px;
        max-width: 90px;
    }

    #dmh-header .dmh-brand .custom-logo {
        width: 90px !important;
        max-width: 90px !important;
    }

    #dmh-header .dmh-menu {
        width: calc(100% - 28px);
    }
}
