
/* ==========================================================
   EXHIBITIO — OFF-CANVAS MENU
========================================================== */

:root {
    --z-offcanvas-backdrop: 20000;
    --z-offcanvas-panel: 20001;
}

/* ============================
   OFF-CANVAS BACKDROP
============================ */

#exhibitio-offcanvas-backdrop.offcanvas-backdrop {
    position: fixed;
    inset: 0;

    background: rgba(0, 0, 0, 0.5);

    z-index: var(--z-offcanvas-backdrop);

    opacity: 1;
}

/* Respect HTML hidden attribute */
#exhibitio-offcanvas-backdrop[hidden] {
    display: none !important;
}

/* ============================
   OFF-CANVAS PANEL
============================ */

#exhibitio-offcanvas.offcanvas-panel {
    position: fixed;

    top: 0;
    right: 0;
    bottom: 0;

    width: 80%;
    max-width: 360px;

    height: 100vh;
    height: 100dvh;

    background: #ffffff;

    z-index: var(--z-offcanvas-panel);

    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;

    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;

    transition:
        transform 0.3s ease,
        visibility 0.3s ease;

    -webkit-overflow-scrolling: touch;
}

/* Open panel */
#exhibitio-offcanvas.offcanvas-panel[aria-hidden="false"] {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
    /* Make the close button focusable as soon as the drawer opens. */
    transition-property: transform;
}

/* ============================
   OFF-CANVAS INNER
============================ */

.offcanvas-panel .offcanvas-inner {
    display: flex;
    flex-direction: column;

    min-height: 100%;

    background: #ffffff;
}

/* ============================
   CLOSE BUTTON
============================ */

.offcanvas-panel .offcanvas-close {
    position: absolute;

    top: 12px;
    right: 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;

    padding: 0;

    background: transparent;
    border: none;

    color: var(--exhibitio-text, #222222);

    font-size: 30px;
    line-height: 1;

    cursor: pointer;

    z-index: 10;
}

/* ============================
   BRANDING
============================ */

.offcanvas-branding {
    text-align: center;

    padding: 20px 16px;

    margin-top: 60px;

    border-top: 1px solid var(--exhibitio-border, #eeeeee);
    border-bottom: 1px solid var(--exhibitio-border, #eeeeee);
}

.offcanvas-branding img.offcanvas-logo {
    max-width: 260px;
    height: auto;
    display: inline-block;
}

/* ============================
   NAVIGATION
============================ */

.offcanvas-nav {
    padding: 10px 0;
}

.offcanvas-panel .offcanvas-menu {
    margin: 0;
    padding: 0;

    list-style: none;
}

.offcanvas-panel .menu,
.offcanvas-panel .menu li {
    list-style: none;

    margin: 0;
    padding: 0;
}

/* ============================
   MENU ITEM INNER
============================ */

.offcanvas-panel .menu-item-inner {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 10px;

    padding: 12px 16px;
}

.offcanvas-panel .menu-item-inner > a {
    display: block;

    flex: 1;
    min-width: 0;

    color: var(--exhibitio-menu, #222222);

    font-family: "Roboto", sans-serif;
    font-weight: 400;

    text-decoration: none;
}

.offcanvas-panel .menu-item-inner > a:hover {
    color: var(--exhibitio-accent, #503AA8);
}

/* ============================
   SUBMENU TOGGLE
============================ */

.offcanvas-panel .submenu-toggle {
    display: flex;

    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    width: 24px;
    height: 24px;

    padding: 0;

    background: transparent;
    border: none;

    color: inherit;

    font-size: 1.2em;
    line-height: 1;

    cursor: pointer;
}

.offcanvas-panel .submenu-toggle .icon {
    display: block;

    font-size: 1.6rem;
    font-weight: 300;
    line-height: 1;

    transition: transform 0.2s ease;
}

.offcanvas-panel
.submenu-toggle[aria-expanded="true"] .icon {
    transform: rotate(45deg);
}

/* ============================
   SUBMENU ACCORDION
============================ */

#exhibitio-offcanvas .menu .sub-menu {
    position: static !important;

    top: auto !important;
    left: auto !important;

    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 0 0 0 1rem;

    background: transparent !important;

    border: none;
    box-shadow: none;

    list-style: none;

    overflow: hidden;

    max-height: 0;

    transform: none !important;
    clip-path: none !important;

    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;

    transition: max-height 0.3s ease;
}

/* Expanded submenu */
#exhibitio-offcanvas .menu .sub-menu.is-open {
    max-height: 1000px;
}

/* Prevent desktop animation interference */
#exhibitio-offcanvas .sub-menu li {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
}

/* ============================
   SUBMENU LINKS
============================ */

.offcanvas-panel .menu .sub-menu li .menu-item-inner {
    padding: 4px 10px;
}

.offcanvas-panel .menu .sub-menu li a {
    display: block;

    padding: 6px 0;

    font-size: 0.95rem;

    color: var(--exhibitio-menu, #222222);

    text-decoration: none;

    white-space: normal;

    border: none;
    border-radius: 0;

    transition: color 0.2s ease;
}

.offcanvas-panel .menu .sub-menu li a:hover {
    color: var(--exhibitio-accent, #503AA8);
    background: transparent;
}

/* ============================
   OFF-CANVAS FOOTER
============================ */

.offcanvas-footer {
    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 12px;

    margin-top: auto;

    padding: 20px 16px;

    border-top: 1px solid var(--exhibitio-border, #eeeeee);

    background: #f9f9f9;

    color: var(--exhibitio-muted, #666666);

    font-size: 0.9rem;
}

/* ============================
   CONTACT DETAILS
============================ */

.offcanvas-address {
    text-align: center;
    line-height: 1.4;
}

.offcanvas-phone,
.offcanvas-email {
    display: flex;
    align-items: center;

    gap: 8px;

    font-size: 0.95rem;

    margin: 4px 0;
}

.offcanvas-phone i,
.offcanvas-email i {
    color: var(--exhibitio-accent, #503AA8);

    font-size: 1rem;

    width: 18px;

    text-align: center;
}

.offcanvas-phone a,
.offcanvas-email a {
    color: var(--exhibitio-text, #333333);

    text-decoration: none;

    transition: color 0.2s ease;
}

.offcanvas-phone a:hover,
.offcanvas-email a:hover {
    color: var(--exhibitio-accent, #503AA8);
}

/* ============================
   SOCIAL ICONS
============================ */

.offcanvas-social {
    text-align: center;
}

.offcanvas-social .social-links {
    display: flex;

    gap: 12px;

    justify-content: center;

    list-style: none;

    padding: 0;
    margin: 0;
}

.offcanvas-social .social-links a {
    color: var(--exhibitio-text, #333333);

    font-size: 1.2rem;

    transition: color 0.2s ease;
}

.offcanvas-social .social-links a:hover {
    color: var(--exhibitio-accent, #503AA8);
}

/* ============================
   MOBILE RESPONSIVENESS
============================ */

@media (max-width: 480px) {

    #exhibitio-offcanvas.offcanvas-panel {
        width: 85%;
        max-width: 360px;
    }

}
