/* E200 Hamburger Menu Styles */
/* Using brand colors and fonts from Elementor global variables */
:root {
  --e200-blue: var(--e-global-color-29a1ef7, #2d2aa2); /* brand blue */
  --e200-pink: var(--e-global-color-09d8f56, #ff1878); /* brand pink */
  --e200-text: var(--e-global-color-29a1ef7, #2d2aa2);
  --e200-bg: #ffffff;
  --e200-shadow: 0 8px 24px rgba(0,0,0,.12);
  --e200-radius: 10px;
}

/* Wrapper ensures z-index context */
.e200-hamburger-wrapper {
  position: relative;
  z-index: 999;
}

/* Hamburger button (only visible under 1024px) */
.e200-hamburger {
  position: relative;
  width: 44px;
  height: 44px;
  border: none;
  background: var(--e200-bg);
  box-shadow: var(--e200-shadow);
  border-radius: 12px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: auto;
}

/* Remove any hover effects from hamburger button */
.e200-hamburger:hover,
.e200-hamburger:focus,
.e200-hamburger:active {
  background: var(--e200-bg);
  box-shadow: var(--e200-shadow);
  transform: none;
  filter: none;
  opacity: 1;
}

.e200-hamburger .bar {
  position: absolute;
  width: 22px;
  height: 2px;
  background: var(--e200-blue);
  transition: transform .25s ease, opacity .2s ease, top .25s ease, background .25s ease;
}

/* Keep hamburger bars same color on hover */
.e200-hamburger:hover .bar,
.e200-hamburger:focus .bar,
.e200-hamburger:active .bar {
  background: var(--e200-blue);
}

.e200-hamburger .bar:nth-child(1) { top: 16px; }
.e200-hamburger .bar:nth-child(2) { top: 21px; }
.e200-hamburger .bar:nth-child(3) { top: 26px; }

/* Active state turns into X */
.e200-hamburger.is-active .bar:nth-child(1) {
  transform: rotate(45deg);
  top: 21px;
}
.e200-hamburger.is-active .bar:nth-child(2) {
  opacity: 0;
}
.e200-hamburger.is-active .bar:nth-child(3) {
  transform: rotate(-45deg);
  top: 21px;
}

/* Drawer & overlay */
.e200-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,16,33,.45);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}

.e200-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.e200-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  height: 100dvh; /* Use dynamic viewport height on mobile */
  background: var(--e200-bg);
  box-shadow: var(--e200-shadow);
  transform: translateX(100%);
  transition: transform .3s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain; /* Prevent background scroll on mobile */
}

.e200-drawer.is-open {
  transform: translateX(0);
}

.e200-drawer-inner {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 22px 28px 22px;
  min-height: 100%;
}

.e200-drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
}

.e200-logo img {
  max-height: 40px;
  width: auto;
}

/* Close button */
.e200-close-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(45,42,162,0.1);
  border-radius: 8px;
  position: relative;
  cursor: pointer;
  transition: background .2s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.e200-close-btn:hover {
  background: rgba(255,24,120,0.15);
}

.e200-close-icon {
  font-size: 20px;
  line-height: 1;
  color: var(--e200-blue);
  font-weight: bold;
  position: absolute;
  top: calc(50% - 2px);
  left: 50%;
  transform: translate(-50%, -50%);
}

.e200-close-btn:hover .e200-close-icon {
  color: var(--e200-pink);
}

/* Menu list */
.e200-nav .e200-menu-items {
  list-style: none;
  padding: 0;
  margin: 6px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--e-global-typography-bae4a59-font-family, inherit);
  font-weight: var(--e-global-typography-bae4a59-font-weight, 400);
  letter-spacing: var(--e-global-typography-bae4a59-letter-spacing, 0);
  font-optical-sizing: auto;
}

.e200-nav .e200-menu-items li a {
  display: block;
  padding: 6px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--e200-text);
  font-weight: 400;
  font-size: 18px;
  line-height: var(--e-global-typography-bae4a59-line-height, 1.5);
  transition: all .2s ease;
  position: relative;
}

.e200-nav .e200-menu-items li a:hover,
.e200-nav .e200-menu-items li.current-menu-item > a {
  color: var(--e200-pink);
}

/* Sub-menu styles */
.e200-nav .e200-menu-items li.menu-item-has-children > a::after {
  content: "›";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  font-weight: 400;
  transition: transform 0.2s ease;
  color: var(--e200-blue);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
}

.e200-nav .e200-menu-items li.menu-item-has-children.e200-expanded > a::after {
  transform: translateY(-50%) rotate(90deg);
  color: var(--e200-pink);
}

.e200-nav .e200-menu-items li.menu-item-has-children > a::after:hover {
  background: rgba(255,24,120,0.1);
  color: var(--e200-pink);
}

.e200-nav .e200-menu-items .sub-menu {
  display: none;
  padding-left: 20px;
  margin-top: 4px;
  list-style: none;
}

.e200-nav .e200-menu-items li.e200-expanded .sub-menu {
  display: block;
}

.e200-nav .e200-menu-items .sub-menu li a {
  font-size: 16px;
  padding: 4px 10px;
  opacity: 0.8;
}

.e200-nav .e200-menu-items .sub-menu li a:hover {
  color: var(--e200-pink);
  opacity: 1;
}

/* Parent items now have normal cursor since they can be clicked for navigation */
.e200-nav .e200-menu-items li.menu-item-has-children > a {
  cursor: pointer;
}

/* CTA buttons */
.e200-ctas {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.e200-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 22px;
  border-radius: 10px;
  color: #fff;
  text-decoration: none;
  font-family: var(--e-global-typography-bae4a59-font-family, inherit);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: var(--e-global-typography-bae4a59-letter-spacing, 0);
  font-optical-sizing: auto;
  box-shadow: var(--e200-shadow);
}

.e200-btn-join { 
  background: var(--e200-blue); 
}

.e200-btn-support { 
  background: var(--e200-pink); 
}

/* Prevent any hover color changes on button text */
.e200-btn:hover {
  color: #fff;
}

/* Responsive behavior */
@media (max-width: 1024px) {
  .e200-hamburger { display: inline-flex; }
  .e200-drawer { 
    width: 65vw; 
    max-width: 400px;
  }
}

@media (max-width: 767px) {
  .e200-drawer { 
    width: 100vw; 
  }
  
  /* Larger touch targets for mobile */
  .e200-nav .e200-menu-items li a {
    padding: 10px 12px;
    font-size: 18px;
    line-height: 1.4;
    font-weight: 400;
  }
  
  .e200-nav .e200-menu-items .sub-menu li a {
    font-size: 16px;
    padding: 6px 12px;
  }
  
  .e200-nav .e200-menu-items {
    gap: 4px;
  }
  
  /* Larger close button for mobile */
  .e200-close-btn {
    width: 42px;
    height: 42px;
  }
  
  .e200-close-icon {
    font-size: 24px;
  }
  
  /* Better mobile button sizing */
  .e200-btn {
    height: 48px;
    font-size: 18px;
    font-weight: 500;
  }
  
  /* Improved mobile drawer spacing */
  .e200-drawer-inner {
    padding: 20px 24px 32px 24px;
    gap: 24px;
  }
  
  .e200-drawer-top {
    padding-top: 12px;
  }
}

@media (max-width: 480px) {
  .e200-drawer { 
    width: 100vw; 
  }
  
  /* Even more generous spacing on small screens */
  .e200-nav .e200-menu-items li a {
    padding: 12px 14px;
    font-size: 18px;
    font-weight: 400;
  }
  
  .e200-nav .e200-menu-items .sub-menu li a {
    font-size: 16px;
    padding: 8px 14px;
  }
  
  .e200-nav .e200-menu-items {
    gap: 6px;
  }
  
  .e200-btn {
    height: 52px;
    font-size: 18px;
    font-weight: 500;
  }
}

/* Prevent body scroll when menu is open */
body.e200-no-scroll {
  overflow: hidden;
}

/* Improve mobile safari handling */
@supports (-webkit-touch-callout: none) {
  .e200-drawer {
    height: -webkit-fill-available;
  }
}

/* Hide on desktop (Optionally ensure no accidental display) */
@media (min-width: 1025px) {
  .e200-hamburger, .e200-drawer, .e200-overlay { display: none !important; }
}
