/* ==========================================================================
   Hazelwood Mega Menu - Hard-coded dropdown navigation
   Replaces megamenu-pro plugin
   ========================================================================== */

/* ---- Navigation wrapper ---- */
.hw-nav-wrap {
    text-align: right;
}

.hw-nav-wrap ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ---- Top-level menu items ---- */
.hw-nav-menu {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    text-align: right;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hw-nav-menu>li {
    display: inline-block;
    position: relative;
    vertical-align: middle;
    margin: 0;
}

.hw-nav-menu>li>a {
    display: block;
    line-height: 50px;
    height: 50px;
    padding: 0 10px;
    color: #262626;
    text-transform: uppercase;
    text-decoration: none;
    font-size: 16px;
    font-weight: inherit;
    font-family: inherit;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.hw-nav-menu>li>a:hover,
.hw-nav-menu>li>a:focus {
    color: #b2282f;
    text-decoration: none;
}

/* Dropdown indicator arrow */
.hw-nav-menu>li.hw-has-dropdown>a::after {
    content: " \25BE";
    font-size: 10px;
    margin-left: 4px;
    vertical-align: middle;
}

/* ---- Mega dropdown panel ---- */
.hw-mega-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 999;
    background-color: rgba(0, 0, 0, 0.9);
    padding: 20px 15px;
    white-space: nowrap;
    border-radius: 0;
}

/* Invisible bridge above dropdown to maintain hover while mouse travels down */
.hw-mega-dropdown::before {
    content: "";
    position: absolute;
    top: -30px;
    left: 0;
    right: 0;
    height: 30px;
}

/* Make megamenu parent position static so dropdown spans full header width */
.site-header {
    position: relative;
    z-index: 999;
}

.hw-nav-menu>li.hw-has-dropdown {
    position: static;
}

.hw-mega-dropdown {
    left: 0;
    right: 0;
    width: 100%;
}

/* Show on hover */
.hw-nav-menu>li.hw-has-dropdown:hover>.hw-mega-dropdown,
.hw-nav-menu>li.hw-has-dropdown:focus-within>.hw-mega-dropdown {
    display: block;
}

/* ---- Dropdown items (image cards) ---- */
.hw-mega-items {
    display: flex;
    justify-content: center;
    gap: 0;
    flex-wrap: nowrap;
    padding: 0;
    margin: 0;
    list-style: none;
}

.hw-mega-items>li {
    display: block;
    flex: 0 0 auto;
    padding: 10px 15px;
    text-align: center;
}

.hw-mega-items>li>a {
    display: block;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: bold;
    font-family: inherit;
    text-align: center;
    transition: opacity 0.2s ease;
}

.hw-mega-items>li>a:hover {
    opacity: 0.8;
    text-decoration: none;
    color: #fff;
}

/* Menu item thumbnail images */
.hw-mega-items>li>a .hw-menu-img {
    display: block;
    width: 200px;
    height: 100px;
    object-fit: cover;
    margin-bottom: 8px;
    border-radius: 0;
}

/* Menu item label text */
.hw-mega-items>li>a .hw-menu-label {
    display: block;
    padding-top: 2px;
}

/* ---- Fade-in animation ---- */
@keyframes hwMenuFadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hw-nav-menu>li.hw-has-dropdown:hover>.hw-mega-dropdown {
    animation: hwMenuFadeIn 0.2s ease-out;
}

/* ---- Mobile hamburger toggle ---- */
.hw-mobile-toggle {
    display: none;
    background: #222;
    border: none;
    padding: 18px 14px;
    cursor: pointer;
    border-radius: 2px;
    position: relative;
    z-index: 1000;
}

.hw-mobile-toggle span,
.hw-mobile-toggle span::before,
.hw-mobile-toggle span::after {
    display: block;
    width: 28px;
    height: 3px;
    background: #ddd;
    border-radius: 2px;
    position: relative;
    transition: all 0.3s ease;
}

.hw-mobile-toggle span::before,
.hw-mobile-toggle span::after {
    content: "";
    position: absolute;
    left: 0;
}

.hw-mobile-toggle span::before {
    top: -8px;
}

.hw-mobile-toggle span::after {
    top: 8px;
}

/* ---- Hamburger to X transform when active ---- */
.hw-mobile-toggle.hw-toggle-active span {
    background: transparent;
}

.hw-mobile-toggle.hw-toggle-active span::before {
    top: 0;
    transform: rotate(45deg);
}

.hw-mobile-toggle.hw-toggle-active span::after {
    top: 0;
    transform: rotate(-45deg);
}

/* ---- Mobile menu panel (drops below header) ---- */
.hw-mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(34, 34, 34, 0.97);
    z-index: 998;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 100px 0 30px;
}

.hw-mobile-menu.hw-mobile-open {
    display: block;
}

}

/* Mobile menu list */
.hw-mobile-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hw-mobile-list>li {
    position: relative;
    border-bottom: 1px solid #444;
}

.hw-mobile-list>li>a {
    display: block;
    padding: 14px 20px;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.hw-mobile-list>li>a:hover {
    color: #b2282f;
}

/* Dropdown arrow toggle button */
.hw-mobile-arrow {
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    height: 48px;
    background: none;
    border: none;
    border-left: 1px solid #444;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.hw-mobile-has-sub.hw-sub-open>.hw-mobile-arrow {
    transform: rotate(180deg);
}

/* Sub-panel (hidden by default) */
.hw-mobile-sub-panel {
    display: none;
    background: rgba(0, 0, 0, 0.5);
    padding: 15px;
}

.hw-mobile-has-sub.hw-sub-open>.hw-mobile-sub-panel {
    display: block;
}

/* 2-column image card grid */
.hw-mobile-sub-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.hw-mobile-card {
    display: block;
    text-decoration: none;
    color: #fff;
    text-align: left;
}

.hw-mobile-card img {
    display: block;
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 0;
}

.hw-mobile-card span {
    display: block;
    padding: 6px 0;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
}

.hw-mobile-card:hover span {
    color: #fff;
}

/* ---- Responsive ---- */
@media only screen and (max-width: 900px) {
    .hw-nav-menu {
        display: none;
    }

    .hw-mobile-toggle {
        display: block;
        float: right;
    }

    .header-menu {
        position: relative;
    }
}

@media only screen and (min-width: 901px) {

    .hw-mobile-toggle,
    .hw-mobile-menu {
        display: none !important;
    }
}