/* =========================================================
   Mendoza & Asociados — Navbar compartido
   Se usa en la home y en las páginas con hero de foto a todo
   el ancho (por ahora: Invertí en Paraguay). Va encima de la foto,
   con logo blanco, desplegables, selector de idiomas y botón
   "Contáctenos". Todo lleva el prefijo .mya- para no mezclarse
   con los estilos viejos de styles.css.
   ========================================================= */

.mya-header {
  /* Variables propias del navbar */
  --mh-green-dark: #2C4220;
  --mh-green-deep: #1E2B17;
  --mh-green-light: #B9CFA9;
  --mh-stone: #F3F3EF;
  --mh-ink: #23281F;
  --mh-font: "Figtree", system-ui, sans-serif;
  --mh-gutter: clamp(20px, 3vw, 32px);
  --mh-ease: cubic-bezier(.2, .7, .2, 1);

  position: fixed; inset: 0 0 auto 0; z-index: 30; /* ajuste 56: fija al bajar (antes absolute) */
  color: #fff;
  font-family: var(--mh-font);
}
.mya-header a { color: inherit; }
.mya-header ul { margin: 0; padding: 0; list-style: none; }

.mya-header .header__bar {
  max-width: 1376px; margin-inline: auto; padding-inline: var(--mh-gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: 124px;
  transition: height .3s var(--mh-ease);
}
.mya-header .header__logo { flex: none; }
.mya-header .header__logo img { display: block; width: 270px; height: auto; } /* ajuste 16: más chico */
.mya-header .header__nav { display: flex; align-items: center; gap: 36px; }

/* Menú principal con desplegables */
.mya-header .menu { display: flex; align-items: center; gap: 28px; }
.mya-header .menu__item { position: relative; }
.mya-header .menu__row { display: flex; align-items: center; gap: 2px; }
.mya-header .menu__link {
  font: 500 1rem/1 var(--mh-font); /* 16 px (ajuste 16) */
  text-decoration: none;
  padding-block: 12px;
  white-space: nowrap;
}
.mya-header .menu__link:hover { text-decoration: underline; text-underline-offset: 6px; }
.mya-header .menu__toggle {
  display: grid; place-items: center;
  width: 28px; height: 28px; padding: 0;
  background: none; border: 0; color: inherit; cursor: pointer;
}
.mya-header .menu__toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s var(--mh-ease); }
.mya-header .menu__dd {
  position: absolute; top: 100%; left: -18px; z-index: 5;
  min-width: 270px;
  padding: 10px;
  background: #fff; color: var(--mh-ink);
  box-shadow: 0 24px 48px -20px rgba(20,30,15,.45); /* taste-skill-ignore: menú desplegable real */
  display: none;
}
.mya-header .menu__dd a {
  display: block; padding: 11px 14px;
  font: 500 1rem/1.35 var(--mh-font);
  text-decoration: none;
  transition: background-color .15s;
}
.mya-header .menu__dd a:hover, .mya-header .menu__dd a:focus-visible { background: var(--mh-stone); color: var(--mh-green-dark); }
/* Se abre al pasar el mouse, con teclado o al tocar la flecha */
.mya-header .menu__item:hover .menu__dd,
.mya-header .menu__item:focus-within .menu__dd,
.mya-header .menu__item.is-open .menu__dd { display: block; animation: mh-dd-in .2s var(--mh-ease); }
@keyframes mh-dd-in { from { opacity: 0; transform: translateY(8px); } }
.mya-header .menu__item:hover .menu__toggle svg,
.mya-header .menu__item.is-open .menu__toggle svg { transform: rotate(180deg); }

.mya-header .header__tools { display: flex; align-items: center; gap: 20px; }
/* Botón "Contáctenos" en forma de píldora */
.mya-header .header__cta {
  display: inline-flex; align-items: center;
  padding: 15px 26px;
  border-radius: 999px;
  background: #fff; color: var(--mh-green-dark);
  font: 600 1rem/1 var(--mh-font);
  text-decoration: none; white-space: nowrap;
  transition: background-color .2s var(--mh-ease);
}
.mya-header .header__cta:hover { background: var(--mh-green-light); }

/* Selector de idiomas en píldoras (bandera + código) */
.mya-lang { display: flex; align-items: center; gap: 4px; }
.mya-lang__opt {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 13px;
  border-radius: 999px;
  border: 1px solid transparent; /* taste-skill-ignore: píldora del idioma activo, referencia del cliente */
  font: 600 .875rem/1 var(--mh-font); letter-spacing: .06em;
  text-decoration: none;
  opacity: .82;
  transition: opacity .2s, background-color .2s;
}
.mya-lang__opt:hover { opacity: 1; }
.mya-lang__opt.is-active { opacity: 1; border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.12); }
.mya-lang__flag { width: 22px; height: 15px; border-radius: 2px; flex: none; }

.mya-header .header__burger { display: none; }

/* Notebooks (1181–1420 px): logo y links algo más chicos para que entre todo */
@media (max-width: 1420px) {
  .mya-header .header__logo img { width: 230px; }
  .mya-header .header__nav { gap: 24px; }
  .mya-header .menu { gap: 20px; }
  .mya-header .menu__link { font-size: .9375rem; }
  .mya-header .header__tools { gap: 12px; }
  .mya-header .header__cta { font-size: .9375rem; padding: 14px 22px; }
  .mya-lang__opt { padding: 8px 10px; }
}

/* Pantallas medianas y celular: menú en hamburguesa */
@media (max-width: 1180px) {
  .mya-header .header__bar { height: 96px; }
  .mya-header .header__logo img { width: 240px; }
  .mya-header .header__burger {
    display: grid; gap: 7px; place-content: center;
    width: 48px; height: 48px; padding: 0;
    background: transparent; border: 0; cursor: pointer; color: #fff;
    position: relative; z-index: 2;
  }
  .mya-header .header__burger span { display: block; width: 28px; height: 2px; background: currentColor; transition: transform .25s var(--mh-ease); }
  .mya-header.menu-open .header__burger span:first-child { transform: translateY(4.5px) rotate(45deg); }
  .mya-header.menu-open .header__burger span:last-child { transform: translateY(-4.5px) rotate(-45deg); }
  .mya-header .header__nav {
    position: fixed; inset: 0;
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 32px;
    padding: 120px var(--mh-gutter) 40px;
    overflow-y: auto;
    background: var(--mh-green-deep);
    visibility: hidden; opacity: 0;
    transition: opacity .25s var(--mh-ease), visibility .25s;
  }
  .mya-header.menu-open .header__nav { visibility: visible; opacity: 1; }
  .mya-header.menu-open .header__logo { position: relative; z-index: 2; }
  .mya-header .menu { flex-direction: column; align-items: stretch; gap: 4px; }
  .mya-header .menu__row { justify-content: space-between; }
  .mya-header .menu__link { font: 600 1.625rem/1.2 var(--mh-font); padding-block: 10px; }
  .mya-header .menu__toggle { width: 48px; height: 48px; }
  .mya-header .menu__toggle svg { width: 24px; height: 24px; }
  /* En el menú de celular los desplegables se abren como acordeón, solo con la flecha */
  .mya-header .menu__dd {
    position: static; min-width: 0; padding: 0 0 12px;
    background: transparent; color: #fff;
    box-shadow: none; /* taste-skill-ignore: quita la sombra del desplegable */
  }
  .mya-header .menu__item:hover .menu__dd, .mya-header .menu__item:focus-within .menu__dd { display: none; }
  .mya-header .menu__item.is-open .menu__dd { display: block; }
  .mya-header .menu__item:hover .menu__toggle svg { transform: none; }
  .mya-header .menu__item.is-open .menu__toggle svg { transform: rotate(180deg); }
  .mya-header .menu__dd a { padding: 10px 0 10px 16px; font-size: 1.0625rem; color: rgba(255,255,255,.85); }
  .mya-header .menu__dd a:hover, .mya-header .menu__dd a:focus-visible { background: transparent; color: #fff; }
  .mya-header .header__tools { flex-direction: column; align-items: flex-start; gap: 20px; }
}

@media (max-width: 600px) {
  .mya-header .header__logo img { width: 240px; }
}

@media (prefers-reduced-motion: reduce) {
  .mya-header .menu__item.is-open .menu__dd,
  .mya-header .menu__item:hover .menu__dd { animation: none; }
}


/* =========================================================
   Ajuste 56 — Barra fija con sombra (Ronda 13, 04/11)
   Sobre el hero la barra es transparente. Al bajar, aparece detrás
   un fondo verde muy oscuro semitransparente con desenfoque (efecto
   vidrio) y una sombra suave, como en la referencia
   _archivo/fuentes/referencia-navbar-sombra.webp. La forma no cambia:
   a todo el ancho y sin bordes redondeados.
   El fondo va en una capa aparte (::before) y no en la barra misma:
   si la barra tuviera el desenfoque, el menú de celular (que se abre
   a pantalla completa) quedaría encerrado dentro de la barra.
   ========================================================= */
.mya-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: rgba(30, 43, 23, .84); /* con menos opacidad se veía gris sobre las secciones claras */
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .10), 0 10px 34px rgba(10, 14, 8, .30);
  opacity: 0; transition: opacity .3s var(--mh-ease);
}
.mya-header.is-scrolled::before { opacity: 1; }
.mya-header.is-scrolled .header__bar { height: 92px; }
/* Al saltar a una sección (#ancla), que la barra fija no tape el título */
html:has(.mya-header) { scroll-padding-top: 108px; }
@media (max-width: 1180px) {
  .mya-header.is-scrolled .header__bar { height: 76px; }
  html:has(.mya-header) { scroll-padding-top: 92px; }
}
@media (prefers-reduced-motion: reduce) {
  .mya-header::before, .mya-header .header__bar { transition: none; }
}
