/* Selector de idioma: integrado al lenguaje visual glass/pill del sitio. */
.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  padding: 0.18rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), 0 6px 18px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  flex: 0 0 auto;
}

.language-switcher button {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #dfe7ff;
  font: inherit;
  font-size: 0.76rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.46rem 0.58rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.language-switcher button:hover {
  color: #fff;
  transform: translateY(-1px);
}

.language-switcher button.is-active {
  color: #fff;
  background: linear-gradient(135deg, rgba(125, 92, 255, 0.94), rgba(0, 211, 255, 0.88));
  box-shadow: 0 4px 14px rgba(0, 211, 255, 0.2);
}

.language-switcher button:focus-visible {
  outline: 2px solid #97e6ff;
  outline-offset: 2px;
}

.web-pricing-title {
  margin: 0 0 1.5rem;
  text-align: center;
  font-size: clamp(1.15rem, 3vw, 1.4rem);
  line-height: 1.35;
}

/* En escritorio el selector también queda visualmente separado del menú. */
@media (min-width: 1001px) {
  .language-switcher {
    position: relative;
    margin-left: 0.7rem;
  }

  .language-switcher::before {
    content: "";
    position: absolute;
    left: -0.8rem;
    top: 18%;
    width: 1px;
    height: 64%;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(125, 92, 255, 0), rgba(125, 92, 255, 0.72) 45%, rgba(0, 211, 255, 0.88), rgba(0, 211, 255, 0));
  }
}

/* Compact header for phones and narrow laptop windows. */
@media (max-width: 1000px) {
  .site-header { position: static; }

  .nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand controls" "links links" "language language";
    align-items: center;
    gap: 0.72rem 1rem;
    padding: 0.75rem 0 0.82rem;
  }

  .nav > .brand {
    grid-area: brand;
    justify-self: start;
    min-width: 0;
    gap: 0.55rem;
    text-align: left;
    font-size: 1rem;
    line-height: 1.15;
  }

  .nav > .brand > span:last-child { min-width: 0; font-size: clamp(0.92rem, 3.6vw, 1.08rem); }

  .nav > .nav-links {
    grid-area: links;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    justify-self: center;
    width: min(100%, 34rem);
    max-width: none;
    gap: 0.4rem 0.55rem;
    margin: 0;
  }

  .nav .nav-links > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 0.45rem 0.5rem;
    border-radius: 14px;
    text-align: center;
    white-space: normal;
    line-height: 1.16;
    font-size: clamp(0.76rem, 3.2vw, 0.9rem);
    letter-spacing: 0;
  }

  .nav .nav-links > a:last-of-type:nth-of-type(odd) {
    grid-column: 1 / -1;
    width: calc(50% - 0.28rem);
    justify-self: center;
  }

  .nav > .language-switcher {
    position: relative;
    grid-area: language;
    display: grid;
    grid-template-columns: repeat(3, minmax(3rem, 3.35rem));
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 0.78rem 0 0;
    gap: 0.25rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .nav > .language-switcher::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--edge-strong) 35%, var(--cyan) 50%, var(--edge-strong) 65%, transparent);
    box-shadow: 0 0 12px rgba(0, 211, 255, 0.12);
  }

  .nav > .language-switcher button {
    min-width: 3rem;
    min-height: 42px;
    padding: 0.55rem 0.6rem;
    border: 1px solid var(--edge);
    border-radius: 999px;
    color: var(--text-muted);
    background: rgba(var(--surface-rgb), 0.45);
    font-size: 0.72rem;
    letter-spacing: 0.045em;
    box-shadow: none;
  }

  .nav > .language-switcher button:first-of-type,
  .nav > .language-switcher button:last-of-type {
    margin: 0;
    border-radius: 999px;
  }

  .nav > .language-switcher button.is-active {
    z-index: 1;
    border-color: transparent;
    color: #0e1024;
    background: var(--cyan);
    box-shadow: 0 5px 15px rgba(0, 211, 255, 0.2);
  }

  .nav > .accessibility-menu { grid-area: controls; justify-self: end; margin: 0; }
  .nav > .accessibility-menu > summary { width: 2.5rem; height: 2.5rem; }
}

@media (max-width: 420px) {
  .nav { gap: 0.62rem 0.75rem; padding-top: 0.72rem; }
  .nav .brand-monogram { width: 2.25rem; height: 2.25rem; border-radius: 11px; }
  .nav .nav-links { gap: 0.36rem 0.45rem; }
  .nav .nav-links > a { min-height: 40px; padding-inline: 0.38rem; }
  .nav > .language-switcher { padding-top: 0.68rem; }
  .nav > .language-switcher button { min-height: 40px; }
}
