/* Day Trips From Marrakech — custom mobile menu styling.
   The WoodMart icon font (woodmart-font-1-400.woff2) is missing/unrecoverable, which
   left the burger, close "X" and submenu arrows invisible and the menu unstyled.
   WoodMart's mobile JS also wraps each parent link + its submenu in a <small> and adds
   an (invisible) .wd-nav-opener arrow. This restyles everything with CSS-drawn icons
   and a collapsible accordion driven by .dtfm-open. */

/* ---- Burger icon on the header opener (drawn in CSS) ---- */
.wd-header-mobile-nav .wd-tools-icon {
  display: inline-block;
  width: 24px;
  height: 2px;
  background: currentColor;
  position: relative;
  vertical-align: middle;
  margin-top: 9px;
}
.wd-header-mobile-nav .wd-tools-icon::before,
.wd-header-mobile-nav .wd-tools-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 24px;
  height: 2px;
  background: currentColor;
}
.wd-header-mobile-nav .wd-tools-icon::before { top: -7px; }
.wd-header-mobile-nav .wd-tools-icon::after  { top: 7px; }

/* ---- Panel ---- */
.mobile-nav.wd-opened { box-shadow: 0 0 40px rgba(0, 0, 0, 0.28); background: #fff; }
.mobile-nav .wd-heading {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid #ececec;
  min-height: 48px;
}

/* ---- Close button → label + drawn X ---- */
.mobile-nav .wd-cross-icon a {
  position: relative;
  display: inline-block;
  padding: 6px 32px 6px 8px;
  font-weight: 600;
  font-size: 14px;
  color: #222;
  text-decoration: none;
}
.mobile-nav .wd-cross-icon a::before,
.mobile-nav .wd-cross-icon a::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 16px;
  height: 2px;
  background: #222;
}
.mobile-nav .wd-cross-icon a::before { transform: translateY(-50%) rotate(45deg); }
.mobile-nav .wd-cross-icon a::after  { transform: translateY(-50%) rotate(-45deg); }

/* ---- Menu lists ---- */
.mobile-nav ul.menu,
.mobile-nav ul.wd-nav-mobile,
.mobile-nav ul.wd-sub-menu,
.mobile-nav ul.sub-sub-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mobile-nav small { display: block; font-size: inherit; }
.mobile-nav .wd-nav-mobile > li { border-bottom: 1px solid #ededed; }
.mobile-nav .wd-nav-mobile a {
  display: block;
  padding: 14px 18px;
  font-size: 15px;
  line-height: 1.3;
  color: #222;
  text-decoration: none;
}
.mobile-nav .wd-nav-mobile a:active,
.mobile-nav .wd-nav-mobile a:hover { background: #f7f7f7; color: #ff6600; }

/* Indent nested levels */
.mobile-nav .wd-sub-menu a  { padding-left: 34px; font-size: 14px; color: #555; }
.mobile-nav .sub-sub-menu a { padding-left: 50px; font-size: 13px; }
.mobile-nav .wd-sub-menu li { border-top: 1px solid #f2f2f2; }

/* ---- Collapsible submenus ----
   Hide all submenus and neutralise WoodMart's desktop hover-dropdown; reveal only the
   direct submenu of an open parent. The submenu <ul> may be a direct child or wrapped
   in <small>, so both cases are handled. */
.mobile-nav li.menu-item-has-children { position: relative; }
.mobile-nav .wd-sub-menu,
.mobile-nav .sub-sub-menu {
  position: static !important;
  display: none !important;
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  left: auto !important;
  top: auto !important;
  width: auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  pointer-events: auto !important;
}
.mobile-nav li.menu-item-has-children.dtfm-open > .wd-sub-menu,
.mobile-nav li.menu-item-has-children.dtfm-open > .sub-sub-menu,
.mobile-nav li.menu-item-has-children.dtfm-open > small > .wd-sub-menu,
.mobile-nav li.menu-item-has-children.dtfm-open > small > .sub-sub-menu {
  display: block !important;
}

/* Hide WoodMart's broken (icon-font) arrow opener; we draw our own chevron. */
.mobile-nav .wd-nav-opener { display: none !important; }

/* Chevron on the parent link itself (full-width → reliable position). */
.mobile-nav li.menu-item-has-children > a,
.mobile-nav li.menu-item-has-children > small > a {
  position: relative;
  padding-right: 50px;
}
.mobile-nav li.menu-item-has-children > a::after,
.mobile-nav li.menu-item-has-children > small > a::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid #999;
  border-bottom: 2px solid #999;
  transform: translateY(-65%) rotate(45deg);
  transition: transform 0.2s ease;
}
.mobile-nav li.menu-item-has-children.dtfm-open > a::after,
.mobile-nav li.menu-item-has-children.dtfm-open > small > a::after {
  transform: translateY(-35%) rotate(-135deg);
}
