/* ================================================
   MEGA MENU — Full-screen mobile overlay
   Attractive dark glass design with close button
   ================================================ */

/* Overlay */
.mega-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(8, 8, 8, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  overscroll-behavior: contain;
}

body.mega-menu-open .mega-menu-overlay {
  transform: translateX(0);
}

body.mega-menu-open {
  overflow: hidden;
}

/* Content container */
.mega-menu-content {
  max-width: 420px;
  margin: 0 auto;
  padding: 24px 24px 120px;
  position: relative;
  min-height: 100vh;
}

/* ===== Close button ===== */
.mega-menu-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
  z-index: 2;
}

.mega-menu-close:hover,
.mega-menu-close:focus-visible {
  background: rgba(227, 57, 34, 0.15);
  border-color: #e33922;
  color: #e33922;
}

.mega-menu-close:focus-visible {
  outline: 2px solid #e33922;
  outline-offset: 2px;
}

/* ===== Search section ===== */
.mega-menu-search-section {
  margin: 52px 0 32px;
}

.mega-menu-search-form {
  position: relative;
  margin: 0;
}

.mega-menu-search-form input[type="search"] {
  width: 100%;
  height: 52px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 0 16px 0 48px;
  color: #fff;
  font-size: 16px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s, background 0.2s;
}

.mega-menu-search-form input[type="search"]::placeholder {
  color: #666;
}

.mega-menu-search-form input[type="search"]:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(227, 57, 34, 0.5);
}

.mega-menu-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  font-size: 18px;
  pointer-events: none;
}

/* ===== Navigation sections ===== */
.mega-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mega-menu-section {
  margin-bottom: 20px;
}

.mega-menu-section h4 {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #666;
  margin-bottom: 8px;
  padding-left: 16px;
  font-weight: 600;
}

.mega-menu-section a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  color: #eee;
  font-size: 15px;
  font-weight: 500;
  border-radius: 14px;
  text-decoration: none;
  margin-bottom: 2px;
  transition: all 0.2s;
}

.mega-menu-section a .bi {
  font-size: 18px;
  color: #888;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
  transition: color 0.2s;
}

.mega-menu-section a:hover,
.mega-menu-section a:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.mega-menu-section a:hover .bi {
  color: #e33922;
}

.mega-menu-section a:focus-visible {
  outline: 2px solid #e33922;
  outline-offset: -2px;
}

/* CTA link (Publier) */
.mega-menu-cta {
  background: rgba(227, 57, 34, 0.1) !important;
  border: 1px solid rgba(227, 57, 34, 0.2);
}

.mega-menu-cta:hover {
  background: rgba(227, 57, 34, 0.2) !important;
  border-color: rgba(227, 57, 34, 0.4);
}

.mega-menu-cta .bi {
  color: #e33922 !important;
}

/* ===== wp_nav_menu support (ul > li > a structure) ===== */
.mega-menu-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mega-menu-links li {
  margin: 0;
}

.mega-menu-links li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  color: #eee;
  font-size: 15px;
  font-weight: 500;
  border-radius: 14px;
  text-decoration: none;
  margin-bottom: 2px;
  transition: all 0.2s;
}

.mega-menu-links li a:hover,
.mega-menu-links li a:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.mega-menu-links li a:focus-visible {
  outline: 2px solid #e33922;
  outline-offset: -2px;
}

/* Active/current menu item */
.mega-menu-links li.current-menu-item a,
.mega-menu-links li.current_page_item a {
  color: #e33922;
  background: rgba(227, 57, 34, 0.08);
}
