/*
- Name: righthamburger-dropdown.css
- Description: Hamburger-only menu, right-aligned, submenus push down (accordion)
- Version: 1.1
- Updated: Sticky / fixed header version
*/

:root {
  --rh-color-primary-bg: #3a0404;
  --rh-color-primary-hover: #A88043;
  --rh-color-submenu-bg: rgba(58, 4, 4, 0.65);
  --rh-color-submenu-hover: #DBA140;

  /* Menu text - light, matches header title */
  --rh-color-white: #fff;
  --rh-color-black: #f2d1bd;
  --rh-color-gray-dark: #333333;
  --rh-color-goldish: #f2d1bd;
  --rh-color-transparent: transparent;

  --rh-panel-width: 280px;
  --rh-transition-duration: 0.35s;

  /* Header bar */
  --rh-header-bg: #3a0404;
  --rh-header-icon-color: #ffffff;
  --rh-header-height: 90px;
  --rh-header-title-color: #F0D6A5;

  /* Fixed strip under header (divider.png). Set to match actual image height in px. */
  --rh-divider-height: 13px;
}

/* =========================================
   GLOBAL HEADER OFFSET
   Prevent page content from hiding behind
   the fixed sticky header
========================================= */
body {
  padding-top: calc(var(--rh-header-height) + var(--rh-divider-height));
}

@media (max-width: 768px) {
  body {
  padding-top: calc(var(--rh-header-height) + var(--rh-divider-height));
}
}

/* =========================================
   CONTAINER - hamburger always visible
========================================= */
.menu.righthamburger,
.menu-container.righthamburger {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.menu.righthamburger {
  position: relative;
}

/* =========================================
   STICKY / FIXED HEADER CONTAINER
   This is the key change
========================================= */
.menu-container.righthamburger {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1002;

  background-color: var(--rh-header-bg);
  line-height: 1em;
  min-height: var(--rh-header-height);
  overflow-x: hidden;

  /* Optional subtle edge definition */
  /* border-bottom: 2px solid rgba(171, 74, 3, 0.4); */
}

/* =========================================
   HEADER BAR
   Logo left, title center, hamburger right
========================================= */
.menu.righthamburger .menu-mobile,
.menu-container.righthamburger .menu-mobile {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: var(--rh-header-height);
  padding: 0 15px;
  position: relative;
  z-index: 10002;
  box-sizing: border-box;
  background-color: var(--rh-header-bg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.75);
}

/* =========================================
   LOGO
========================================= */
.rh-header-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  min-width: 0;
}

.rh-header-logo img {
  max-height: 70px;
  width: auto;
  height: auto;
  object-fit: contain;
  vertical-align: middle;
}

/* =========================================
   TITLE
========================================= */
.rh-header-title {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: Lora, sans-serif;
  font-size: 1.8rem;
  font-weight: 400;
  line-height: 1.2;
  color: var(--rh-header-title-color);
  white-space: nowrap;
  text-shadow:
    1px 1px 2px rgba(255, 255, 255, 0.4),
    2px 2px 4px rgba(0, 0, 0, 0.15);
  max-width: calc(100% - 140px);
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  pointer-events: none;
}

/* =========================================
   MOBILE HEADER
========================================= */
@media (max-width: 768px) {
  :root {
    --rh-header-height: 60px;
  }

  .menu-container.righthamburger {
    min-height: var(--rh-header-height);
  }

  .menu.righthamburger .menu-mobile,
  .menu-container.righthamburger .menu-mobile {
    min-height: var(--rh-header-height);
    padding: 0 10px;
  }

  .rh-header-logo {
    display: none !important;
  }

  .rh-header-title {
    font-size: 1.1rem;
    max-width: calc(100% - 60px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .menu.righthamburger .menu-mobile .menu-icon,
  .menu-container.righthamburger .menu-mobile .menu-icon {
    min-width: 30px;
    min-height: 44px;
    padding: 10px;
    margin: -10px -10px -10px 0;
  }
}

@media (max-width: 480px) {
  .rh-header-title {
    font-size: 0.95rem;
    max-width: calc(100% - 100px);
  }
}

/* =========================================
   HAMBURGER BUTTON
========================================= */
.menu.righthamburger .menu-mobile .menu-icon,
.menu-container.righthamburger .menu-mobile .menu-icon {
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu.righthamburger .menu-icon,
.menu-container.righthamburger .menu-icon {
  position: relative;
  width: 30px;
  height: 22px;
  margin: 0;
}

.menu.righthamburger .menu-mobile .menu-icon .nav-icon,
.menu.righthamburger .menu-mobile .menu-icon .nav-icon::before,
.menu.righthamburger .menu-mobile .menu-icon .nav-icon::after,
.menu-container.righthamburger .menu-mobile .menu-icon .nav-icon,
.menu-container.righthamburger .menu-mobile .menu-icon .nav-icon::before,
.menu-container.righthamburger .menu-mobile .menu-icon .nav-icon::after {
  display: block;
  position: absolute;
  width: 100%;
  height: 4px;
  background: var(--rh-header-icon-color);
  border-radius: 2px;
  transition: all 0.4s ease-in-out;
}

.menu.righthamburger .menu-icon .nav-icon::before,
.menu-container.righthamburger .menu-icon .nav-icon::before {
  content: '';
  top: -8px;
}

.menu.righthamburger .menu-icon .nav-icon::after,
.menu-container.righthamburger .menu-icon .nav-icon::after {
  content: '';
  top: 8px;
}

.menu-open .menu.righthamburger .menu-mobile .menu-icon .nav-icon,
.menu-open .menu-container.righthamburger .menu-mobile .menu-icon .nav-icon {
  background: var(--rh-color-transparent);
}

.menu-open .menu.righthamburger .menu-mobile .menu-icon .nav-icon::before,
.menu-open .menu-container.righthamburger .menu-mobile .menu-icon .nav-icon::before,
.menu-open .menu.righthamburger .menu-mobile .menu-icon .nav-icon::after,
.menu-open .menu-container.righthamburger .menu-mobile .menu-icon .nav-icon::after {
  transform: rotate(45deg);
  top: 0;
}

.menu-open .menu.righthamburger .menu-mobile .menu-icon .nav-icon::after,
.menu-open .menu-container.righthamburger .menu-mobile .menu-icon .nav-icon::after {
  transform: rotate(-45deg);
}

/* =========================================
   OVERLAY
   Begins below the fixed header
========================================= */
.rh-overlay {
  position: fixed;
  top: var(--rh-header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--rh-transition-duration) ease,
    visibility var(--rh-transition-duration) ease;
}

.rh-overlay.visible {
  opacity: 1;
  visibility: visible;
}

/* =========================================
   MAIN SLIDE-OUT PANEL
   Opens below the fixed header
========================================= */
.rh-panel {
  position: fixed;
  top: var(--rh-header-height);
  right: 0;
  width: var(--rh-panel-width);
  max-width: 90vw;
  height: calc(100% - var(--rh-header-height));
  background: var(--rh-color-primary-bg);
  z-index: 10001;
  transform: translateX(100%);
  transition: transform var(--rh-transition-duration) ease-in-out;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
}

.rh-panel.open {
  transform: translateX(0);
}

.rh-panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0;
}

/* =========================================
   HIDE HORIZONTAL NAV
========================================= */
.menu.righthamburger > ul,
.menu-container.righthamburger .menu > ul {
  display: none !important;
}

/* =========================================
   MENU LIST
========================================= */
.rh-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rh-menu-list li {
  margin: 0;
  padding: 0;
  border: none;
}

.rh-menu-list a,
.rh-menu-list .rh-dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
  color: var(--rh-color-white);
  text-decoration: none;
  font-family: Roboto, sans-serif;
  font-weight: 500;
  font-size: 1.2rem;
  text-transform: uppercase;
  background: var(--rh-color-transparent);
  cursor: pointer;
  transition: background var(--rh-transition-duration) ease;
  border: none;
  width: 100%;
  text-align: left;
  box-sizing: border-box;
}

.rh-menu-list a:hover,
.rh-menu-list .rh-dropdown-trigger:hover {
  background-color: var(--rh-color-primary-hover);
}

/* =========================================
   CHEVRON
========================================= */
.rh-dropdown-trigger::after {
  content: "\f489";
  font-family: "Ionicons";
  font-size: 1.8em;
  font-weight: 500;
  transition: transform var(--rh-transition-duration) ease;
}

.rh-dropdown-trigger.expanded::after {
  transform: rotate(90deg);
}

/* =========================================
   SUBMENUS
========================================= */
.rh-dropdown-submenu {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  background: var(--rh-color-submenu-bg);
  transition: max-height var(--rh-transition-duration) ease-in-out;
}

.rh-dropdown-submenu.expanded {
  max-height: 1000px;
}

.rh-dropdown-submenu li a,
.rh-dropdown-submenu .rh-dropdown-trigger {
  color: var(--rh-color-black);
  font-size: 22px;
  font-weight: 700;
  padding: 10px 25px 10px 35px;
  border-radius: 8px;
}

.rh-dropdown-submenu li a:hover,
.rh-dropdown-submenu .rh-dropdown-trigger:hover {
  background-color: var(--rh-color-submenu-hover);
  color: var(--rh-color-white);
}

/* =========================================
   TERTIARY LEVEL
========================================= */
.rh-dropdown-submenu .rh-dropdown-submenu li a,
.rh-dropdown-submenu .rh-dropdown-submenu .rh-dropdown-trigger {
  color: var(--rh-color-white);
  font-weight: 500;
  padding: 8px 15px 8px 35px;
  border-radius: 8px;
}

.rh-dropdown-submenu .rh-dropdown-submenu li a:hover,
.rh-dropdown-submenu .rh-dropdown-submenu .rh-dropdown-trigger:hover {
  color: var(--rh-color-goldish);
  background: var(--rh-color-transparent);
}

.rh-panel-content-inner {
  position: relative;
}
/* =========================================
   DIVIDER UNDER HEADER (righthamburger.inc.php)
   Fixed: does not scroll; z-index above .rh-panel / .rh-overlay
========================================= */
.rh-header-divider {
  position: fixed !important;
  top: var(--rh-header-height);
  left: 0;
  right: 0;
  width: 100%;
  z-index: 10050;
  line-height: 0;
  font-size: 0;
  pointer-events: none;
  transform: translateZ(0);
}

.rh-header-divider img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: bottom;
}
