/* =============================================
 *  Modern OffCanvas — Styles
 *  Version: 1.0.0
 * ============================================= */

/* ── Reset ── */
.moc-trigger-wrap,
.moc-trigger,
.moc-panel,
.moc-overlay,
.moc-close,
.moc-nav,
.moc-social {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Kill ALL theme default button styles ── */
.moc-trigger,
.moc-trigger:hover,
.moc-trigger:focus,
.moc-trigger:active,
.moc-trigger:visited,
.moc-close,
.moc-close:hover,
.moc-close:focus,
.moc-close:active,
.moc-close:visited,
.moc-submenu-toggle,
.moc-submenu-toggle:hover,
.moc-submenu-toggle:focus,
.moc-submenu-toggle:active {
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    text-shadow: none !important;
}

/* Kill theme link styles inside panel */
.moc-panel a,
.moc-panel a:hover,
.moc-panel a:focus,
.moc-panel a:active,
.moc-panel a:visited {
    background: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    text-shadow: none !important;
    border: none !important;
}

/* Kill theme focus ring pink/accent on buttons */
.moc-trigger:focus-visible,
.moc-close:focus-visible,
.moc-submenu-toggle:focus-visible {
    outline: 1px solid rgba(255, 255, 255, 0.4) !important;
    outline-offset: 2px;
}

/* ── Trigger Wrapper ── */
.moc-trigger-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* ── Hamburger Trigger ── */
.moc-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.2s ease;
}

.moc-trigger:hover {
    opacity: 0.8;
}

.moc-hamburger {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.moc-hamburger-line {
    display: block;
    width: 28px;
    height: 2px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: transform 0.35s cubic-bezier(0.77, 0, 0.175, 1),
                opacity 0.25s ease,
                background-color 0.2s ease;
    transform-origin: center center;
}

/* ── 2-Line Hamburger ── */
.moc-hamburger--2line {
    gap: 8px;
}

/* 2-Line → X animation */
.moc-trigger.is-active .moc-hamburger--2line .moc-hamburger-line:nth-child(1) {
    transform: translateY(calc(50% + 4px)) rotate(45deg);
}

.moc-trigger.is-active .moc-hamburger--2line .moc-hamburger-line:nth-child(2) {
    transform: translateY(calc(-50% - 4px)) rotate(-45deg);
}

/* ── 3-Line Hamburger → X animation ── */
.moc-trigger.is-active .moc-hamburger:not(.moc-hamburger--2line) .moc-hamburger-line:nth-child(1) {
    transform: translateY(calc(2px + 6px)) rotate(45deg);
}

.moc-trigger.is-active .moc-hamburger:not(.moc-hamburger--2line) .moc-hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.moc-trigger.is-active .moc-hamburger:not(.moc-hamburger--2line) .moc-hamburger-line:nth-child(3) {
    transform: translateY(calc(-2px - 6px)) rotate(-45deg);
}

/* ── Custom SVG Trigger ── */
.moc-trigger--custom {
    width: auto !important;
    height: auto !important;
}

.moc-custom-svg {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.moc-custom-svg img {
    display: block;
    width: 32px;
    height: auto;
}

.moc-custom-svg svg {
    display: block;
    width: 32px;
    height: auto;
}

/* ── Overlay ── */
.moc-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    z-index: 99998;
    cursor: pointer;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.moc-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

/* ── Panel ── */
.moc-panel {
    position: fixed;
    top: 0;
    width: 380px;
    height: 100%;
    background-color: #1c1c1e;
    padding: 40px;
    display: flex;
    flex-direction: column;
    z-index: 99999;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1),
                visibility 0.4s ease;
    visibility: hidden;
    -webkit-overflow-scrolling: touch;
}

/* Right panel */
.moc-panel--right {
    right: 0;
    transform: translateX(100%);
}

/* Left panel */
.moc-panel--left {
    left: 0;
    transform: translateX(-100%);
}

/* Active state */
.moc-panel.is-active {
    transform: translateX(0);
    visibility: visible;
}

/* Custom scrollbar */
.moc-panel::-webkit-scrollbar {
    width: 4px;
}

.moc-panel::-webkit-scrollbar-track {
    background: transparent;
}

.moc-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

/* ── Close Button ── */
.moc-close-wrap {
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

.moc-close {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 4px 0;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.5px;
    transition: color 0.2s ease, opacity 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.moc-close:hover {
    opacity: 0.7;
}

.moc-close svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    flex-shrink: 0;
    transition: fill 0.2s ease;
}

/* ── Navigation Menu ── */
.moc-nav {
    flex: 1;
}

.moc-nav .moc-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.moc-nav .moc-menu-list li {
    position: relative;
}

.moc-nav .moc-menu-list > li > a {
    display: block;
    padding: 12px 0;
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.3px;
    line-height: 1.4;
    transition: color 0.2s ease, padding-left 0.3s ease;
}

.moc-nav .moc-menu-list > li > a:hover {
    color: #cccccc;
    padding-left: 4px;
}

.moc-nav .moc-menu-list > li.current-menu-item > a {
    color: #ffffff;
    font-weight: 500;
}

/* ── Sub-menu ── */
.moc-nav .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0 0 0 16px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease;
    opacity: 0;
}

.moc-nav .sub-menu.is-open {
    max-height: 500px;
    opacity: 1;
}

.moc-nav .sub-menu a {
    display: block;
    padding: 8px 0;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: color 0.2s ease, padding-left 0.25s ease;
}

.moc-nav .sub-menu a:hover {
    color: #ffffff;
    padding-left: 4px;
}

/* Sub-menu toggle arrow */
.moc-submenu-toggle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

.moc-submenu-toggle svg {
    width: 12px;
    height: 12px;
    fill: rgba(255, 255, 255, 0.5);
    transition: transform 0.3s ease, fill 0.2s ease;
}

.moc-submenu-toggle:hover svg {
    fill: #ffffff;
}

.moc-submenu-toggle.is-open svg {
    transform: rotate(180deg);
}

/* Hide toggle for items without sub-menus (JS adds this) */
.menu-item:not(.menu-item-has-children) > .moc-submenu-toggle {
    display: none;
}

/* ── Social Icons ── */
.moc-social {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    flex-shrink: 0;
}

.moc-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.moc-social-icon:hover {
    transform: scale(1.1);
}

.moc-social-icon svg {
    width: 20px;
    height: 20px;
    fill: #ffffff;
    display: block;
    transition: fill 0.2s ease;
}

/* ── Body scroll lock ── */
body.moc-no-scroll {
    overflow: hidden;
    touch-action: none;
    -ms-touch-action: none;
}

/* ── Responsive ── */

/* Tablet */
@media (max-width: 1024px) {
    .moc-panel {
        width: 350px;
        padding: 32px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .moc-panel {
        width: 100%;
        padding: 24px;
    }

    .moc-nav .moc-menu-list > li > a {
        font-size: 15px;
        padding: 10px 0;
    }

    .moc-close-wrap {
        margin-bottom: 20px;
    }
}

/* ── Print ── */
@media print {
    .moc-trigger-wrap,
    .moc-panel,
    .moc-overlay {
        display: none !important;
    }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
    .moc-panel,
    .moc-overlay,
    .moc-hamburger-line,
    .moc-close,
    .moc-nav .sub-menu,
    .moc-social-icon {
        transition-duration: 0.01ms !important;
    }
}

/* ── Elementor Editor Overrides ── */
.elementor-editor-active .moc-panel,
.elementor-editor-active .moc-overlay {
    display: none;
}
