/**
 * Marítima Andina - Header & Mobile Drawer Widget CSS
 */

.mta-header-wrapper {
  position: relative;
  z-index: 100;
  width: 100%;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.mta-header {
  z-index: 10;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  width: min(1320px, 100% - 48px);
  height: 84px;
  margin: auto;
  display: flex;
  position: relative;
}

.mta-header .logo {
  flex-shrink: 0;
  align-items: center;
  display: flex;
  text-decoration: none;
}

.mta-header .logo img {
  width: 180px;
  height: auto;
  display: block;
}

/* Navegación Desktop */
.mta-header-nav {
  color: #2b3b4c;
  gap: clamp(18px, 2.7vw, 42px);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
}

.mta-header-nav a {
  color: #2b3b4c;
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
  padding: 8px 0;
}

.mta-header-nav a:hover {
  color: var(--mta-blue, #0879d9);
}

/* Estado activo del enlace */
.mta-header-nav a.active,
.mta-header-nav a[aria-current="page"] {
  color: var(--mta-blue, #0879d9);
  font-weight: 700;
}

.mta-header-nav a.active::after,
.mta-header-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--mta-blue, #0879d9);
  border-radius: 2px;
}

/* Botón CTA Header */
.mta-header .btn {
  background: var(--mta-navy, #061a2f);
  color: #fff;
  cursor: pointer;
  border: 0;
  border-radius: 100px;
  justify-content: center;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 650;
  transition: all 0.2s ease;
  display: inline-flex;
  text-decoration: none;
}

.mta-header .btn:hover {
  background: var(--mta-blue, #0879d9);
  transform: translateY(-2px);
  color: #fff;
}

/* Botón Menú Hamburguesa Móvil */
.mta-menu-btn {
  display: none;
  border: 1px solid var(--mta-line, #dce4ea);
  background: #fff;
  border-radius: 50%;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.mta-menu-btn:hover {
  background: var(--mta-wash, #f3f7f9);
  border-color: var(--mta-blue, #0879d9);
}

.mta-menu-btn i {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--mta-navy, #061a2f);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Drawer Off-Canvas Móvil */
.mta-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 26, 47, 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.3s;
}

.mta-drawer-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(360px, 85vw);
  background: #ffffff;
  z-index: 99999;
  box-shadow: -10px 0 35px rgba(6, 26, 47, 0.18);
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  transform: translateX(105%);
  visibility: hidden;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.32s;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.mta-drawer-open .mta-drawer-overlay {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0s;
}

.mta-drawer-open .mta-drawer-panel {
  transform: translateX(0);
  visibility: visible;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0s;
}

html.mta-drawer-open,
body.mta-drawer-open {
  overflow: hidden !important;
}

/* Encabezado del Drawer */
.mta-drawer-header {
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--mta-line, #dce4ea);
}

.mta-drawer-header .logo img {
  width: 140px;
  height: auto;
}

.mta-drawer-close {
  background: var(--mta-wash, #f3f7f9);
  border: 1px solid var(--mta-line, #dce4ea);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--mta-navy, #061a2f);
  transition: all 0.2s ease;
}

.mta-drawer-close:hover {
  background: var(--mta-navy, #061a2f);
  color: #fff;
}

.mta-drawer-close svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
}

/* Enlaces dentro del Drawer */
.mta-drawer-nav {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.mta-drawer-nav a {
  font-size: 16px;
  font-weight: 550;
  color: var(--mta-ink, #0a1725);
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 12px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mta-drawer-nav a:hover {
  background: var(--mta-wash, #f3f7f9);
  color: var(--mta-blue, #0879d9);
  transform: translateX(4px);
}

/* Enlace activo en el drawer móvil */
.mta-drawer-nav a.active,
.mta-drawer-nav a[aria-current="page"] {
  background: rgba(8, 121, 217, 0.08);
  color: var(--mta-blue, #0879d9);
  font-weight: 700;
  border-left: 4px solid var(--mta-blue, #0879d9);
}

.mta-drawer-nav a.active::after,
.mta-drawer-nav a[aria-current="page"]::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mta-blue, #0879d9);
}

/* Footer y botón del Drawer */
.mta-drawer-footer {
  padding: 24px;
  border-top: 1px solid var(--mta-line, #dce4ea);
  background: var(--mta-wash, #f3f7f9);
}

.mta-drawer-footer .btn {
  width: 100%;
  min-height: 48px;
  background: var(--mta-navy, #061a2f);
  color: #fff;
  border-radius: 100px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.mta-drawer-footer .btn:hover {
  background: var(--mta-blue, #0879d9);
}

/* Responsive Breakpoints */
@media (max-width: 1050px) {
  .mta-header-nav {
    gap: 18px;
  }
}

@media (max-width: 800px) {
  .mta-header {
    width: min(100% - 30px, 700px);
    height: 76px;
  }
  .mta-header-nav,
  .mta-header-cta-desktop {
    display: none !important;
  }
  .mta-menu-btn {
    display: flex;
  }
}

@media (max-width: 560px) {
  .mta-header {
    height: 70px;
  }
  .mta-header .logo img {
    width: 150px;
  }
}
