.nav-fixed {
  position: fixed;
  z-index: 9999;
  top: 16px;
  left: 50%;
  display: block;
  width: calc(100% - 40px);
  transform: translateX(-50%);
  font-family: "Figtree", Arial, sans-serif;
}

.nav-shell {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  width: min(65rem, calc(100% - 88px));
  min-width: 0;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 58px;
  padding: 8px 8px 8px 20px;
  border: 2px solid #e4e2d4;
  border-radius: 10px;
  background: rgba(255, 255, 235, 0.94);
  box-shadow: 0 2px 0 rgba(26, 26, 26, 0.02);
  backdrop-filter: blur(10px);
  transition: background-color 320ms ease, border-color 320ms ease, box-shadow 320ms ease, backdrop-filter 320ms ease;
}

.nav-left,
.nav-right,
.nav-links,
.nav-tabs {
  display: flex;
  align-items: center;
}

.nav-left {
  min-width: 0;
  gap: 24px;
}

.brand {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
  color: #1a1a1a;
  text-decoration: none;
}

.brand img {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
}

.brand-name {
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
}

.nav-tabs {
  overflow: visible;
  gap: 10px;
  min-height: 36px;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  transition: background-color 320ms ease;
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 8px 15px;
  color: #1a1a1a;
  border-radius: 999px;
  background: #e9e7d8;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: color 260ms ease, background-color 320ms ease;
}

.nav-tab.is-active {
  background: #e9e7d8;
}

.nav-fixed.is-scrolled .nav-shell {
  border-color: rgba(6, 63, 56, 0.16);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.10);
  backdrop-filter: blur(18px) saturate(145%);
}

.nav-fixed.is-scrolled .nav-tabs {
  background: transparent;
}

.nav-fixed.is-scrolled .nav-tab.is-active {
  color: #ffffff;
  background: #063f38;
}

.nav-fixed.is-scrolled .windows-button {
  background: rgba(239, 209, 255, 0.82);
}

.tab-divider {
  display: none;
  width: 1px;
  height: 30px;
  opacity: 0.42;
  background: linear-gradient(transparent, rgba(26, 26, 26, 0.35), transparent);
}

.nav-right {
  flex: 0 0 auto;
  gap: 18px;
}

.nav-links {
  gap: 20px;
}

.nav-link {
  color: rgba(26, 26, 26, 0.72);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: color 180ms ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: #1a1a1a;
}

.windows-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 42px;
  padding: 13px 18px;
  color: #1a1a1a;
  border: 2px solid #1a1a1a;
  border-radius: 8px;
  background: #efd1ff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 2px 0 rgba(26, 26, 26, 0.08);
  transition: transform 200ms ease, box-shadow 200ms ease, background-color 200ms ease;
  will-change: transform;
}

.windows-button:hover,
.windows-button:focus-visible {
  transform: scale(0.98);
  background: #e9c4fd;
  box-shadow: 0 1px 0 rgba(26, 26, 26, 0.06);
}

.windows-button img {
  display: block;
  width: 18px;
  height: 18px;
}

.nav-languages {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
}

.nav-fixed > .nav-languages:not(.is-mobile) {
  position: absolute;
  top: 50%;
  right: 0;
  padding: 5px 2px 5px 0;
  transform: translateY(-50%);
}

.nav-languages a {
  display: grid;
  width: 25px;
  height: 25px;
  overflow: hidden;
  place-items: center;
  border-radius: 50%;
  opacity: 0.82;
  transition: transform 180ms ease, opacity 180ms ease, box-shadow 180ms ease;
}

.nav-languages a:hover,
.nav-languages a:focus-visible,
.nav-languages a.is-active {
  opacity: 1;
  transform: translateY(-1px) scale(1.05);
}

.nav-languages a.is-active {
  box-shadow: 0 0 0 2px rgba(26, 26, 26, 0.12);
}

.nav-languages img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-languages a[lang="en"] img {
  /* El dibujo del SVG ocupa solo 48 de sus 64 unidades de lienzo. */
  transform: scale(1.333);
}

.nav-languages.is-mobile {
  justify-content: center;
  padding: 8px 0 2px;
}

.roll-text {
  display: inline-flex;
  align-items: baseline;
}

.roll-letter {
  display: inline-flex;
  height: 1em;
  overflow: hidden;
  flex-direction: column;
  line-height: 1;
  vertical-align: top;
}

.roll-letter > span {
  display: block;
  min-height: 1em;
  transform: translateY(0);
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--letter-index) * 18ms);
}

.roll-space {
  display: inline-block;
  width: 0.29em;
}

[data-roll].is-hover .roll-letter > span,
[data-roll]:hover .roll-letter > span,
[data-roll]:focus-visible .roll-letter > span {
  transform: translateY(-100%);
}

.menu-button {
  position: relative;
  display: none;
  width: 44px;
  height: 40px;
  padding: 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.menu-button span {
  position: absolute;
  left: 10px;
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: #1a1a1a;
  transition: transform 260ms ease, opacity 180ms ease, top 260ms ease;
}

.menu-button span:nth-child(1) { top: 11px; }
.menu-button span:nth-child(2) { top: 19px; }
.menu-button span:nth-child(3) { top: 27px; }
.menu-button[aria-expanded="true"] span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.menu-button[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-button[aria-expanded="true"] span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

.mobile-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  display: grid;
  visibility: hidden;
  gap: 6px;
  padding: 10px;
  border: 2px solid #e4e2d4;
  border-radius: 10px;
  background: rgba(255, 255, 235, 0.98);
  box-shadow: 0 16px 36px rgba(26, 26, 26, 0.12);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 200ms ease, transform 240ms ease, visibility 200ms;
}

.mobile-panel.is-open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mobile-panel .nav-link {
  padding: 13px 12px;
  border-radius: 7px;
}

.mobile-panel .nav-link:hover,
.mobile-panel .nav-link:focus-visible {
  background: rgba(26, 26, 26, 0.055);
}

.mobile-panel .windows-button {
  width: 100%;
  margin-top: 4px;
}

@media (max-width: 991px) {
  .nav-shell { width: 100%; gap: 16px; }
  .nav-right { display: none; }
  .nav-fixed > .nav-languages:not(.is-mobile) { display: none; }
  .menu-button { display: block; flex: 0 0 auto; }
}

@media (max-width: 560px) {
  .nav-fixed { top: 10px; width: calc(100% - 20px); }
  .nav-shell { min-height: 54px; padding: 6px 7px 6px 14px; }
  .nav-left { gap: 12px; }
  .brand { gap: 8px; }
  .brand img { width: 32px; height: 32px; }
  .brand-name { font-size: 18px; }
  .nav-tabs { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-fixed *,
  .nav-fixed *::before,
  .nav-fixed *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}
