/* ============================================================
   Herrington Mega Menu — Industries Panel Styles
   ============================================================ */

/* ── WRAPPER ─────────────────────────────────────────────── */
.hmm-ind-wrap {
    display: flex;
    width: 100%;
    background: #141720;
    position: relative;
    max-width: 100%;
    overflow-x: hidden;
}

/* ── SIDEBAR ─────────────────────────────────────────────── */
.hmm-ind-sidebar {
    display: flex;
    flex-direction: column;
    min-width: 220px;
    max-width: 220px;
    border-right: 1px solid #1e2128;
    flex-shrink: 0;
}

.hmm-ind-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    color: #ccc;
    font-size: 13px;
    cursor: pointer;
    border-bottom: 1px solid #1e2128;
    border-left: 3px solid transparent;
    transition: background 0.15s, color 0.15s, border-left-color 0.15s;
    user-select: none;
    line-height: 1.4;
}

.hmm-ind-item:hover {
    background: #1a1d26;
    color: #fff;
}

.hmm-ind-item.hmm-ind-active {
    background: #1e2230;
    color: #fff;
    border-left-color: #4e9af1;
}

.hmm-ind-item:last-child {
    border-bottom: none;
}

.hmm-ind-icon {
    font-size: 15px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.hmm-ind-item-label {
    flex: 1;
}

.hmm-ind-arrow {
    font-size: 18px;
    color: #555;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.15s, transform 0.2s;
}

.hmm-ind-item.hmm-ind-active .hmm-ind-arrow {
    color: #4e9af1;
}

/* ── PANELS CONTAINER ────────────────────────────────────── */
.hmm-ind-panels {
    flex: 1;
    position: relative;
    min-height: 300px;
}

/* ── CONTENT BOX ─────────────────────────────────────────── */
.hmm-ind-content {
    display: none;
    flex-direction: column;
    gap: 20px;
    padding: 28px 32px 32px;
    background: #1a1e2b;
    height: 100%;
    animation: hmmFadeIn 0.18s ease;
}

.hmm-ind-content.hmm-ind-panel-active {
    display: flex;
}

@keyframes hmmFadeIn {
    from { opacity: 0; transform: translateX(6px); }
    to   { opacity: 1; transform: translateX(0); }
}

.hmm-ind-content-heading {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

.hmm-ind-content-heading a {
    color: inherit;
    font: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    text-decoration: none;
}

.hmm-ind-content-heading a:hover {
    text-decoration: underline;
}

.hmm-ind-content-desc {
    color: #888;
    font-size: 13px;
    line-height: 1.75;
    margin: 0;
    max-width: 560px;
    text-align: left;
    word-break: normal;
    overflow-wrap: anywhere;
}

/* ── CONTENT LINKS ───────────────────────────────────────── */
.hmm-ind-content-links {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.hmm-ind-link-col {
    display: flex;
    flex-direction: column;
    min-width: 160px;
    flex: 1;
}

.hmm-ind-link-col a {
    color: #999;
    font-size: 13px;
    text-decoration: none;
    padding: 10px 0;
    border-bottom: 1px solid #252836;
    transition: color 0.15s, padding-left 0.15s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hmm-ind-link-col a:hover {
    color: #4e9af1;
    padding-left: 4px;
}

.hmm-ind-link-col a:last-child {
    border-bottom: none;
}

/* ── CTA BUTTON ──────────────────────────────────────────── */
.hmm-ind-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #4e9af1;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 9px 20px;
    border-radius: 4px;
    text-decoration: none;
    align-self: flex-start;
    transition: background 0.15s;
    margin-top: 4px;
}

.hmm-ind-cta:hover {
    background: #2e7fd8;
    color: #fff;
}

/* ── ACCORDION MODE ──────────────────────────────────────── */
.hmm-ind-mode-accordion {
    flex-direction: column;
}

.hmm-ind-mode-accordion .hmm-ind-accordion {
    width: 100%;
}

.hmm-acc-item {
    border-bottom: 1px solid #1e2128;
}

.hmm-acc-item:last-child {
    border-bottom: none;
}

.hmm-ind-mode-accordion .hmm-ind-item {
    border-bottom: none;
    border-left: 3px solid transparent;
}

.hmm-ind-mode-accordion .hmm-ind-item .hmm-ind-arrow {
    transform: rotate(90deg);
    transition: transform 0.2s;
}

.hmm-ind-mode-accordion .hmm-acc-open .hmm-ind-item .hmm-ind-arrow {
    transform: rotate(270deg);
    color: #4e9af1;
}

.hmm-ind-mode-accordion .hmm-ind-content {
    display: none;
    height: auto;
    animation: hmmSlideDown 0.2s ease;
    border-top: 1px solid #1e2128;
}

.hmm-ind-mode-accordion .hmm-ind-content.hmm-ind-panel-active {
    display: flex;
}

@keyframes hmmSlideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── MOBILE — sidebar stacks to accordion ────────────────── */
@media (max-width: 991px) {

    /* Sidebar-flyout → collapses to accordion on mobile */
    .hmm-ind-mode-sidebar-flyout {
        flex-direction: column;
    }

    .hmm-ind-mode-sidebar-flyout .hmm-ind-sidebar {
        min-width: 100%;
        max-width: 100%;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #1e2128;
    }

    .hmm-ind-item {
        min-height: 44px;
        padding: 12px 14px;
    }

    /* On mobile, sidebar items act as accordion toggles */
    .hmm-ind-mode-sidebar-flyout .hmm-ind-panels {
        min-height: unset;
    }

    /* Hide the permanent panel; JS will insert content below each item */
    .hmm-ind-mode-sidebar-flyout .hmm-ind-panels {
        display: none;
    }

    .hmm-ind-mode-sidebar-flyout.hmm-mobile-ready .hmm-ind-sidebar {
        border-bottom: none;
    }

    /* Mobile inline content box */
    .hmm-ind-mobile-content {
        display: none;
        flex-direction: column;
        gap: 16px;
        padding: 16px 14px 20px;
        background: #1a1e2b;
        border-bottom: 1px solid #1e2128;
        animation: hmmSlideDown 0.2s ease;
        width: 100%;
    }

    .hmm-ind-mobile-content.hmm-mobile-open {
        display: flex;
    }

    .hmm-ind-mode-sidebar-flyout .hmm-ind-content-links {
        gap: 0;
        flex-direction: column;
    }

    .hmm-ind-mode-sidebar-flyout .hmm-ind-link-col {
        min-width: 100%;
    }

    .hmm-ind-link-col a {
        white-space: normal;
        word-break: break-word;
    }

    /* Arrow rotation on mobile */
    .hmm-ind-mode-sidebar-flyout .hmm-ind-item .hmm-ind-arrow {
        transform: rotate(90deg);
        transition: transform 0.2s;
    }

    .hmm-ind-mode-sidebar-flyout .hmm-ind-item.hmm-ind-active .hmm-ind-arrow {
        transform: rotate(270deg);
    }

    /* Accordion always stacked */
    .hmm-ind-mode-accordion .hmm-ind-content-links {
        flex-direction: column;
        gap: 0;
    }

    .hmm-ind-mode-accordion .hmm-ind-link-col {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .hmm-ind-content {
        padding: 20px 16px 24px;
    }
    .hmm-ind-content-heading {
        font-size: 16px;
    }
    .hmm-ind-content-desc,
    .hmm-ind-link-col a {
        font-size: 12px;
        line-height: 1.6;
    }
}
