/* ============================
   OFF-CANVAS MENU PANEL
============================ */
.offcanvas-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 80%;
  max-width: 360px;
  height: 100%;
  background: #fff;
  z-index: var(--z-offcanvas, 9999);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.offcanvas-panel[aria-hidden="false"] {
  transform: translateX(0);
}

.offcanvas-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: var(--z-backdrop, 9998);
}

/* ============================
   OFF-CANVAS MENU ITEM INNER
============================ */
.offcanvas-panel .menu-item-inner {
  display: flex;
  align-items: center;
  justify-content: space-between; /* text left, toggle right */
  padding: 12px 16px;
  gap: 10px; /* space between text and + */
}

.offcanvas-panel .menu-item-inner > a {
  flex: 1; /* take remaining space */
  display: block;
  text-decoration: none;
  color: var(--exhibitio-menu);
  font-family: "Roboto", sans-serif;
  font-weight: 400;
}
.offcanvas-panel .menu,
.offcanvas-panel .menu li {
  list-style: none;
  margin: 0;
  padding: 0;
}
/* ============================
   SUBMENU TOGGLE BUTTON
============================ */
.offcanvas-panel .submenu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2em;
  line-height: 1;
  color: inherit;
  flex-shrink: 0; /* don’t shrink, always visible */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;  /* consistent size */
  height: 24px;
  padding: 0;
}

.offcanvas-panel .submenu-toggle .icon {
  font-weight: 300;
  display: block;
  font-size: 1.6rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

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

/* ============================
   OFF-CANVAS SUBMENU (Accordion)
============================ */
.offcanvas-panel .menu .sub-menu {
  position: static; /* stay in flow */
  background: transparent !important; /* ✅ force transparent */
  border: 0;
  margin: 0;
  padding: 0 0 0 1rem; /* indent */
  list-style: none;

  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
  box-shadow: none;
  /* reset desktop dropdown styles */
  top: auto !important;
  left: auto !important;
  transform: none !important;
  clip-path: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.offcanvas-panel .menu .sub-menu.is-open {
  max-height: 1000px; /* expanded by JS */
}

/* ============================
   OFF-CANVAS 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);
  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);
  background: none;
}
/* ============================
   OFF-CANVAS CLOSE BUTTON
============================ */
/* Close button */
.offcanvas-panel .offcanvas-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--exhibitio-text, #222);
  cursor: pointer;
  z-index: 10001;
  padding: 4px 8px;
}

/* Push menu content down so it's not under the close button */
.offcanvas-panel .offcanvas-menu {
  margin-top: 48px; /* adjust to button size */
}

/* ============================
   OFF-CANVAS BRANDING (Top)
============================ */
.offcanvas-branding {
  text-align: center;
  padding: 20px 16px;
  border-bottom: 1px solid var(--exhibitio-border, #eee);
}

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

/* ============================
   OFF-CANVAS NAV (Middle)
============================ */
.offcanvas-nav {
  padding: 10px 0;
}

.offcanvas-nav .offcanvas-menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ============================
   OFF-CANVAS FOOTER (Bottom)
============================ */
.offcanvas-footer {
  margin-top: auto; /* push to bottom */
  padding: 20px 16px;
  border-top: 1px solid var(--exhibitio-border, #eee);
  background: #f9f9f9;
  font-size: 0.9rem;
  color: var(--exhibitio-muted, #666);

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

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

.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, #333);
  font-size: 1.2rem;
  transition: color 0.2s ease;
}

.offcanvas-social .social-links a:hover {
  color: var(--exhibitio-accent, #503AA8);
}
/* ============================
   OFF-CANVAS BRANDING (Top)
============================ */
.offcanvas-branding {
  text-align: center;
  padding: 20px 16px;
  border-top: 1px solid var(--exhibitio-border, #eee);   /* ⬅ NEW top border */
  border-bottom: 1px solid var(--exhibitio-border, #eee);
  margin-top: 60px; /* ensure no gap above */
}

.offcanvas-branding img.offcanvas-logo {
  max-width: 180px;
  height: auto;
  display: inline-block;
}
/* ============================
   OFF-CANVAS CONTACT INFO
============================ */
.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, #333);
  text-decoration: none;
  transition: color 0.2s ease;
}

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