﻿/* center the primary nav on desktop; keep the mobile bar unchanged */
@media (min-width: 1240px) {
  .nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }
  .brand { grid-column: 1; justify-self: start; }
  .nav-links {
    grid-column: 2;
    justify-self: center;
    margin-left: 0;
  }
  .lang-switch {
    grid-column: 3;
    justify-self: end;
    margin-left: 0;
  }
  .nav-toggle { display: none; }
}


/* keep the 免费咨询 CTA in its original right-hand position */
@media (min-width: 1240px) {
  .nav { position: relative; grid-template-columns: 1fr auto 1fr; }
  .nav-links { grid-column: 2; justify-self: center; margin-left: 0; }
  .nav-links .nav-cta {
    position: absolute;
    right: 130px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
  }
  .lang-switch { grid-column: 3; justify-self: end; margin-left: 0; }
}
@media (max-width: 1239px) {
  .nav-links .nav-cta {
    position: static;
    right: auto;
    top: auto;
    transform: none;
    margin-left: 10px;
  }
}

@media (min-width: 1240px) { .nav-links .nav-cta { right: 90px; font-size: 11.5px; padding: 10px 14px; } }


@media (min-width: 1240px) { .nav-links a { font-size: 12.5px; padding-left: 8px; padding-right: 8px; } .nav-links .nav-cta { right: 150px; } }


@media (min-width: 1240px) { .nav-links a.nav-cta:hover, .nav-links a.nav-cta:focus { transform: translateY(-50%) !important; } }
@media (max-width: 1239px) { .nav-links a.nav-cta:hover, .nav-links a.nav-cta:focus { transform: none !important; } }

/* Spanish labels are longer: the absolutely placed CTA covered "Preguntas frecuentes", so in Spanish the CTA
   stays in the link row and the row's padding is tightened */
@media (min-width: 1240px) {
  html[lang="es"] .nav-links a:not(.nav-cta) { padding-left: 7px; padding-right: 7px; }
  html[lang="es"] .nav-links .nav-cta { position: static; transform: none; margin-left: 8px; }
  html[lang="es"] .brand small { display: none; }
  html[lang="es"] .brand span { white-space: nowrap; }
}
