/* ============================================
   MOBILE MENU - MINIMALISTA & PRÁTICO
   FuturaMente Consultoria & Corretora
   Hamburger fixo no header
   ============================================ */

:root {
  --fm-navy: #001845;
  --fm-navy-light: #0a2654;
  --fm-blue: #334bc6;
  --fm-blue-light: #5b7dd4;
  --fm-white: #ffffff;
  --fm-muted: #a0aec0;
  --fm-line: #1e3a5f;
}

* {
  box-sizing: border-box;
}

/* ============================================
   HAMBURGER BUTTON - FIXO NO HEADER
   ============================================ */

.mobile-menu-trigger {
  display: none;
  position: fixed;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 120;
}

.mobile-menu-trigger span {
  display: block;
  position: absolute;
  width: 24px;
  height: 2px;
  background: var(--fm-navy);
  border-radius: 1px;
  left: 50%;
  transform: translateX(-50%);
  transition: all 300ms ease;
}

.mobile-menu-trigger span:nth-child(1) {
  top: 12px;
}

.mobile-menu-trigger span:nth-child(2) {
  top: 21px;
  opacity: 1;
}

.mobile-menu-trigger span:nth-child(3) {
  top: 30px;
}

.mobile-menu-trigger.is-active span {
  background: var(--fm-white);
}

.mobile-menu-trigger.is-active span:nth-child(1) {
  transform: translateX(-50%) translateY(9px) rotate(45deg);
}

.mobile-menu-trigger.is-active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-trigger.is-active span:nth-child(3) {
  transform: translateX(-50%) translateY(-9px) rotate(-45deg);
}

/* ============================================
   OVERLAY
   ============================================ */

.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  z-index: 110;
  transition: background 300ms ease;
}

.mobile-menu-overlay.is-active {
  background: rgba(0, 0, 0, 0.5);
}

/* ============================================
   MENU PANEL
   ============================================ */

.mobile-menu-panel {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 360px;
  height: 100vh;
  background: var(--fm-navy);
  z-index: 115;
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.3);
  transform: translateX(100%);
  transition: transform 320ms cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  -webkit-overflow-scrolling: touch;
}

.mobile-menu-panel.is-active {
  transform: translateX(0);
}

/* ============================================
   MENU HEADER
   ============================================ */

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--fm-navy);
  border-bottom: 1px solid var(--fm-line);
  flex-shrink: 0;
  gap: 12px;
}

.mobile-menu-header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.mobile-menu-header-logo img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.mobile-menu-header-logo span {
  font-size: 15px;
  font-weight: 700;
  color: var(--fm-white);
}

.mobile-menu-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--fm-white);
  font-size: 24px;
  transition: all 200ms ease;
  flex-shrink: 0;
}

.mobile-menu-close:hover {
  transform: rotate(90deg);
}

/* ============================================
   MENU CONTENT
   ============================================ */

.mobile-menu-content {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

/* ============================================
   NAVIGATION
   ============================================ */

.mobile-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mobile-menu-nav-item {
  border-bottom: 1px solid var(--fm-line);
}

.mobile-menu-nav-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  color: var(--fm-white);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: all 200ms ease;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.mobile-menu-nav-link:hover {
  background: var(--fm-navy-light);
  padding-left: 24px;
}

.mobile-menu-nav-link.is-active {
  background: var(--fm-blue);
  color: var(--fm-white);
}

.mobile-menu-nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.mobile-menu-nav-link[data-submenu-toggle]::after {
  content: '▼';
  margin-left: auto;
  font-size: 10px;
  transition: transform 200ms ease;
}

.mobile-menu-nav-link[data-submenu-toggle].is-active::after {
  transform: rotate(180deg);
}

/* ============================================
   SUBMENU
   ============================================ */

.mobile-menu-submenu {
  display: none;
  flex-direction: column;
  gap: 0;
  background: rgba(0, 0, 0, 0.2);
  max-height: 0;
  overflow: hidden;
  transition: max-height 300ms ease;
}

.mobile-menu-submenu.is-active {
  display: flex;
  max-height: 1000px;
}

.mobile-menu-submenu-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px 12px 50px;
  color: var(--fm-muted);
  text-decoration: none;
  font-weight: 400;
  font-size: 14px;
  transition: all 200ms ease;
}

.mobile-menu-submenu-link:hover {
  color: var(--fm-white);
  background: rgba(51, 75, 198, 0.1);
  padding-left: 54px;
}

/* ============================================
   MENU FOOTER
   ============================================ */

.mobile-menu-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border-top: 1px solid var(--fm-line);
  background: var(--fm-navy);
  flex-shrink: 0;
  margin-top: auto;
}

.mobile-menu-footer-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--fm-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 8px;
}

.mobile-menu-footer-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 6px;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 200ms ease;
  text-decoration: none;
  color: inherit;
}

.mobile-menu-footer-btn.primary {
  background: var(--fm-blue);
  color: var(--fm-white);
  width: 100%;
}

.mobile-menu-footer-btn.primary:hover {
  background: var(--fm-blue-light);
  transform: translateY(-2px);
}

.mobile-menu-footer-btn.secondary {
  background: transparent;
  color: var(--fm-blue);
  border: 1px solid var(--fm-blue);
  width: 100%;
}

.mobile-menu-footer-btn.secondary:hover {
  background: rgba(51, 75, 198, 0.1);
}

/* ============================================
   CONTACT SECTION
   ============================================ */

.mobile-menu-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--fm-line);
}

.mobile-menu-contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.mobile-menu-contact-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fm-blue);
  flex-shrink: 0;
  font-size: 14px;
}

.mobile-menu-contact-text {
  color: var(--fm-muted);
  flex: 1;
}

.mobile-menu-contact-link {
  color: var(--fm-blue);
  text-decoration: none;
  font-weight: 600;
  transition: all 200ms ease;
}

.mobile-menu-contact-link:hover {
  color: var(--fm-blue-light);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .mobile-menu-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-menu-overlay {
    display: block;
  }

  .mobile-menu-panel {
    display: flex;
  }
}

@media (max-width: 480px) {
  .mobile-menu-trigger {
    top: 12px;
    right: 12px;
  }

  .mobile-menu-panel {
    max-width: 100%;
  }

  .mobile-menu-header {
    padding: 14px 16px;
  }

  .mobile-menu-nav-link,
  .mobile-menu-submenu-link {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .mobile-menu-footer {
    padding: 16px;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.mobile-menu-trigger:focus,
.mobile-menu-close:focus,
.mobile-menu-nav-link:focus,
.mobile-menu-footer-btn:focus {
  outline: 2px solid var(--fm-blue);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .mobile-menu-trigger span,
  .mobile-menu-panel,
  .mobile-menu-overlay,
  .mobile-menu-nav-link,
  .mobile-menu-footer-btn {
    transition: none !important;
  }
}

@media print {
  .mobile-menu-trigger,
  .mobile-menu-overlay,
  .mobile-menu-panel {
    display: none !important;
  }
}
