/*
 * The new header, as plain CSS, for the pages still served from the mirror.
 * Everything is prefixed and reset locally because it lands inside the old
 * old template stylesheet, which has an opinion about every element.
 */
.eslnav,
.eslnav * {
  box-sizing: border-box;
}

.eslnav {
  position: sticky;
  top: 0;
  z-index: 999;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  font-family: Figtree, ui-sans-serif, system-ui, -apple-system, sans-serif;
}

.eslnav__bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 1400px;
  height: 64px;
  margin: 0 auto;
  padding: 0 1rem;
}

.eslnav__logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.eslnav__logo img {
  height: 36px;
  width: auto;
  display: block;
}

.eslnav__links {
  display: none;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
}
.eslnav__link,
.eslnav__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  border: 0;
  background: none;
  font: inherit;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.2;
  color: #1b1f2a;
  text-decoration: none;
  cursor: pointer;
}
.eslnav__link:hover,
.eslnav__toggle:hover,
.eslnav__toggle[aria-expanded="true"] {
  color: #0040bc;
  text-decoration: none;
}
.eslnav__toggle svg {
  width: 14px;
  height: 14px;
}

.eslnav__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}
.eslnav__login {
  padding: 0.625rem 1rem;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  color: #0040bc;
  text-decoration: none;
}
.eslnav__login:hover {
  background: #f5f8ff;
  text-decoration: none;
}
.eslnav__join {
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: #0040bc;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}
.eslnav__join:hover {
  background: #2a51e0;
  color: #fff;
  text-decoration: none;
}

/* Full-width panel: the old dropdown could not hold "Lessons&Vocabulary I". */
.eslnav__panel {
  display: none;
  position: absolute;
  inset-inline: 0;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 18px 40px -24px rgba(0, 26, 77, 0.45);
}
.eslnav__panel[data-open="true"] {
  display: block;
}
.eslnav__panel-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.75rem 1.25rem;
}
.eslnav__panel-title {
  margin: 0 0 1rem;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #636b7a;
}
.eslnav__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.25rem 2rem;
}
.eslnav__grid a {
  padding: 0.5rem;
  font-size: 16px;
  color: #1b1f2a;
  text-decoration: none;
}
.eslnav__grid a:hover {
  color: #0040bc;
  text-decoration: none;
}

.eslnav__burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  color: #0040bc;
  cursor: pointer;
}
.eslnav__burger svg {
  width: 26px;
  height: 26px;
}

.eslnav__drawer {
  display: none;
  border-top: 1px solid #e5e7eb;
  padding: 0.5rem 1.25rem 1.25rem;
}
.eslnav__drawer[data-open="true"] {
  display: block;
}
.eslnav__drawer a {
  display: block;
  padding: 0.7rem 0;
  font-size: 17px;
  font-weight: 500;
  color: #1b1f2a;
  text-decoration: none;
  border-bottom: 1px solid #f1f3f7;
}
.eslnav__drawer a.is-sub {
  padding-left: 1rem;
  font-size: 15px;
  font-weight: 400;
  color: #636b7a;
}

@media (min-width: 640px) {
  .eslnav__bar {
    gap: 2rem;
    height: 80px;
    padding: 0 1.25rem;
  }
  .eslnav__logo img {
    height: 48px;
  }
  .eslnav__join {
    padding: 0.75rem 1.5rem;
  }
}

@media (min-width: 1024px) {
  .eslnav__links {
    display: flex;
  }
  .eslnav__burger {
    display: none;
  }
  .eslnav__drawer {
    display: none !important;
  }
  .eslnav__grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .eslnav__grid--lessons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---- Search: a magnifier that opens a real field, as on the rebuilt pages ---- */
.eslnav__search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: #4b5262;
  cursor: pointer;
}
.eslnav__search-btn:hover {
  background: #f5f8ff;
  color: #0040bc;
}
.eslnav__search-btn svg {
  width: 20px;
  height: 20px;
}

.eslnav__search {
  display: none;
  align-items: center;
  gap: 0.75rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
}
.eslnav__search[data-open="true"] {
  display: flex;
}
.eslnav__search svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #0040bc;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}
.eslnav__search input {
  flex: 1;
  height: 44px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 17px;
  color: #1b1f2a;
  outline: none;
}
.eslnav__search button {
  flex-shrink: 0;
  padding: 0.65rem 1.25rem;
  border: 0;
  border-radius: 999px;
  background: #0040bc;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
}
.eslnav__search button:hover {
  background: #001a4d;
}

/* The search strip sits on its own row under the bar. */
.eslnav__search[data-open="true"] {
  border-top: 1px solid #e5e7eb;
  background: rgba(236, 242, 255, 0.6);
  max-width: none;
}
.eslnav__search[data-open="true"] > * {
  max-width: 1400px;
}

/* The three stars beside HOPE AI, matching the rebuilt header. */
.eslnav__spark {
  width: 1.05em;
  height: 1.05em;
  flex-shrink: 0;
  color: #3366ff;
  vertical-align: -0.15em;
}
.eslnav__drawer .eslnav__spark {
  margin-right: 0.4rem;
}

/* ---- Keep the bar on one line ----
 * Adding Contact Us and the HOPE AI stars pushed the nav past its width, and
 * these items were both shrinkable and wrappable, so "E-Book" broke across two
 * lines. They keep their own width now, and the bar gives back the room by
 * tightening up until there is space again.
 */
.eslnav__link,
.eslnav__toggle {
  white-space: nowrap;
  flex-shrink: 0;
}
.eslnav__links {
  gap: 0;
}
@media (max-width: 1439px) {
  .eslnav__link,
  .eslnav__toggle {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    font-size: 15px;
  }
  .eslnav__logo img {
    height: 32px;
  }
}

@media (max-width: 639px) {
  .eslnav__login {
    white-space: nowrap;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  .eslnav__actions {
    gap: 0.25rem;
  }
  .eslnav__logo img {
    height: 30px;
  }
}

/* The About panel holds four long labels; six columns broke "Where to Start
   Learning English" over two lines. */
@media (min-width: 1024px) {
  .eslnav__grid--about {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .eslnav__grid--about a {
    white-space: nowrap;
  }
}

/* The "Join free" at the foot of the phone menu, matching the React one. */
.eslnav__drawer .eslnav__drawer-cta {
  margin: 12px 0 4px;
  padding: 14px 20px;
  border: 0;
  border-radius: 999px;
  background: #0040bc;
  color: #fff;
  font-weight: 600;
  text-align: center;
}
.eslnav__drawer .eslnav__drawer-cta:hover {
  background: #001a4d;
  color: #fff;
}

/* ---- The star on the sign-up button ----
 * White, not the blue the star wears on the bar: on a blue button the blue
 * star disappears. The button lays its two children out in a row so the star
 * cannot sit on its own line when the label wraps.
 */
.eslnav__join,
.eslnav__drawer .eslnav__drawer-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.eslnav__join .eslnav__spark,
.eslnav__drawer .eslnav__drawer-cta .eslnav__spark {
  color: #fff;
  margin-right: 0;
}

/* ---- The panel, sliding down out of the bar ----
 * It used to appear whole, which on a full-width panel reads as the page
 * having jumped rather than as a menu opening.
 */
@keyframes eslPanelDrop {
  from {
    opacity: 0;
    transform: translateY(-10px);
    clip-path: inset(0 0 100% 0);
  }
  to {
    opacity: 1;
    transform: none;
    clip-path: inset(0 0 0 0);
  }
}
.eslnav__panel[data-open="true"] {
  animation: eslPanelDrop 0.22s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
@media (prefers-reduced-motion: reduce) {
  .eslnav__panel[data-open="true"] {
    animation: none;
  }
}

/* ---- The Home panel: two pages, each with a line saying which is which ---- */
.eslnav__panel[data-panel="home"] .eslnav__grid a {
  display: block;
}
.eslnav__panel[data-panel="home"] strong {
  display: block;
  font-weight: 600;
}
.eslnav__panel[data-panel="home"] span {
  display: block;
  margin-top: 0.1rem;
  font-size: 14px;
  line-height: 1.35;
  color: #636b7a;
}

/* ---- The bar has to fit wherever the burger shows ----
 * Logo, search, Log in, the trial button and the burger do not fit in one
 * row on a phone — Terri, 24 Aug 2026 (2): "the title bar is cut off". A
 * hide rule for exactly this already existed higher up, and lost: the
 * star-on-the-button rule below it also sets display, and with equal
 * specificity the later rule wins — which quietly re-showed the button on
 * every phone. So the hide lives here, at the end of the file, where
 * nothing can come after it. And it now covers everything under 1024px:
 * hiding only below 640px left a band, 640 to 1023, where the button came
 * back beside the burger and overflowed all over again. Below the full
 * desktop nav the button lives in the drawer, which is where the rebuilt
 * pages put it too.
 */
@media (max-width: 1023px) {
  .eslnav__join {
    display: none;
  }
}
