/*==================================================================================
    Custom Stylesheet - Refined Sidebar & Offcanvas Navigation
====================================================================================*/

/* Base offcanvas drawer styling across all viewports */
.offcanvas.offcanvas-mainmenu,
.offcanvas.header-offcanvas2 {
  position: fixed;
  top: 0;
  right: -420px;
  width: 350px;
  max-width: 85vw;
  height: 100vh;
  background-color: #ffffff;
  background-image: url('/assets/img/pattern.png');
  background-repeat: repeat;
  z-index: 99999;
  padding: 100px 0 40px;
  overflow-y: auto;
  box-shadow: -5px 0 35px rgba(0, 0, 0, 0.12);
  transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.offcanvas.offcanvas-mainmenu.show,
.offcanvas.header-offcanvas2.show {
  right: 0 !important;
}

/* Close cancel button */
.offcanvas-mainmenu .offcanvas-cancel,
.header-offcanvas2 .offcanvas-cancel {
  position: absolute;
  top: 25px;
  right: 25px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #e8e8e8;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.offcanvas-mainmenu .offcanvas-cancel svg,
.header-offcanvas2 .offcanvas-cancel svg {
  width: 14px;
  height: 14px;
  fill: #333333;
  transition: all 0.25s ease;
}

.offcanvas-mainmenu .offcanvas-cancel:hover,
.header-offcanvas2 .offcanvas-cancel:hover {
  background-color: #222222;
  border-color: #222222;
  transform: rotate(90deg);
}

.offcanvas-mainmenu .offcanvas-cancel:hover svg,
.header-offcanvas2 .offcanvas-cancel:hover svg path {
  fill: #ffffff !important;
}

/* Offcanvas Menu Structure */
.offcanvas-mainmenu ul,
.header-offcanvas2 ul {
  list-style: none !important;
  margin: 0;
  padding: 0;
}

.offcanvas-mainmenu ul li,
.header-offcanvas2 ul li {
  list-style: none !important;
  margin: 0;
  padding: 0;
  position: relative;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Top-level menu links */
.offcanvas-mainmenu > ul > li > a,
.header-offcanvas2 > ul > li > a {
  display: block;
  padding: 14px 30px !important;
  color: #222222;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Roboto Condensed', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.25s ease;
}

.offcanvas-mainmenu > ul > li > a:hover,
.header-offcanvas2 > ul > li > a:hover,
.offcanvas-mainmenu > ul > li.active > a,
.header-offcanvas2 > ul > li.active > a {
  color: #ff5500;
  padding-left: 35px !important;
}

/* Submenu dropdowns */
.offcanvas-mainmenu ul li ul,
.header-offcanvas2 ul li ul {
  display: none;
  list-style: none !important;
  margin: 0;
  padding: 0;
  background-color: rgba(0, 0, 0, 0.025);
}

.offcanvas-mainmenu ul li ul.open,
.header-offcanvas2 ul li ul.open {
  display: block;
}

/* Level 1 Submenu Links */
.offcanvas-mainmenu ul li ul li a,
.header-offcanvas2 ul li ul li a {
  display: block;
  padding: 10px 30px 10px 45px !important;
  color: #666666;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Roboto Condensed', sans-serif;
  text-transform: capitalize;
  transition: all 0.2s ease;
}

.offcanvas-mainmenu ul li ul li a:hover,
.header-offcanvas2 ul li ul li a:hover {
  color: #ff5500;
  padding-left: 50px !important;
}

/* Level 2 Sub-Submenu Links */
.offcanvas-mainmenu ul li ul li ul li a,
.header-offcanvas2 ul li ul li ul li a {
  padding: 8px 30px 8px 60px !important;
  color: #888888;
  font-size: 13.5px;
  font-weight: 400;
}

.offcanvas-mainmenu ul li ul li ul li a:hover,
.header-offcanvas2 ul li ul li ul li a:hover {
  color: #ff5500;
  padding-left: 65px !important;
}

/* Arrow toggle button for items with submenus */
.offcanvas-mainmenu .submenu-button,
.header-offcanvas2 .submenu-button {
  position: absolute;
  right: 15px;
  top: 0;
  width: 45px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
}

.offcanvas-mainmenu .submenu-button:before,
.header-offcanvas2 .submenu-button:before {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #666666;
  transition: transform 0.25s ease, border-top-color 0.25s ease;
}

.offcanvas-mainmenu .submenu-button.submenu-opened:before,
.header-offcanvas2 .submenu-button.submenu-opened:before {
  transform: rotate(180deg);
  border-top-color: #ff5500;
}

.offcanvas-mainmenu ul li ul li .submenu-button,
.header-offcanvas2 ul li ul li .submenu-button {
  height: 41px;
}
