/*
 * Header dropdowns and the footer (October 2026), now the site has guides,
 * the forecast and the year pages. Tokens come from conditions.css.
 */

/* ---- Header: desktop dropdowns ---- */
.hnav__list { align-items: center; display: flex; gap: 4px; list-style: none; margin: 0 8px 0 0; padding: 0; }
.hnav__item { position: relative; }

.hnav__trigger {
  align-items: center;
  background: none;
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  gap: 8px;
  line-height: 16px;
  padding: 10px 14px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.hnav__trigger:hover,
.hnav__item.is-open .hnav__trigger,
.hnav__item:focus-within .hnav__trigger { background: rgba(255, 255, 255, 0.18); }
.hnav__trigger:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.hnav__chevron {
  border-bottom: 2px solid currentColor;
  border-right: 2px solid currentColor;
  display: inline-block;
  height: 6px;
  margin-top: -3px;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  width: 6px;
}

.is-open > .hnav__trigger .hnav__chevron,
.is-open > .mnav__trigger .hnav__chevron { margin-top: 3px; transform: rotate(-135deg); }

.hnav__panel {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 28px 60px -24px rgba(49, 22, 100, 0.5), 0 0 0 1px rgba(49, 22, 100, 0.06);
  left: 50%;
  opacity: 0;
  padding: 18px;
  pointer-events: none;
  position: absolute;
  top: calc(100% + 10px);
  transform: translate(-50%, 8px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  visibility: hidden;
  z-index: 60;
}

/* An invisible bridge so the panel doesn't close crossing the gap. */
.hnav__panel::before { content: ""; height: 14px; left: 0; position: absolute; right: 0; top: -14px; }

.hnav__item:hover > .hnav__panel,
.hnav__item:focus-within > .hnav__panel,
.hnav__item.is-open > .hnav__panel {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
  visibility: visible;
}

/* The last dropdown lines up with the right edge so it stays on screen. */
.hnav__item:last-child > .hnav__panel { left: auto; right: 0; transform: translate(0, 8px); }
.hnav__item:last-child:hover > .hnav__panel,
.hnav__item:last-child:focus-within > .hnav__panel,
.hnav__item:last-child.is-open > .hnav__panel { transform: none; }

.hnav__tiles { display: grid; gap: 10px; grid-auto-columns: 150px; grid-auto-flow: column; list-style: none; margin: 0; padding: 0; }

.hnav__tile {
  aspect-ratio: 4 / 3;
  background: linear-gradient(160deg, #3f2080 0%, var(--wb-purple) 60%, #22104a 100%);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  justify-content: flex-end;
  overflow: hidden;
  padding: 10px 12px;
  position: relative;
  text-decoration: none;
}

.hnav__tile picture,
.hnav__tile img { height: 100%; inset: 0; object-fit: cover; position: absolute; transition: transform 0.6s cubic-bezier(0.215, 0.61, 0.355, 1); width: 100%; z-index: -2; }
.hnav__tile::after { background: linear-gradient(180deg, rgba(20, 8, 46, 0) 35%, rgba(20, 8, 46, 0.85) 100%); content: ""; inset: 0; position: absolute; z-index: -1; }
.hnav__tile:hover img { transform: scale(1.06); }
.hnav__tile:focus-visible { outline: 3px solid var(--wb-teal); outline-offset: 2px; }

header a.hnav__tile .hnav__tile-title { color: #fff; font-size: 14px; font-weight: 800; line-height: 1.2; }
header a.hnav__tile .hnav__tile-count { color: rgba(255, 255, 255, 0.85); font-size: 12px; font-weight: 600; }

.hnav__foot {
  align-items: center;
  border-top: 1px solid var(--wb-line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
}

.hnav__links { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; }
header .hnav__links a { border-radius: 999px; color: var(--wb-purple); display: block; font-size: 13px; font-weight: 700; padding: 6px 10px; text-decoration: none; }
header .hnav__links a:hover { background: #f5f3fa; }
header a.hnav__action { color: var(--wb-purple); font-size: 13px; font-weight: 800; margin-left: auto; text-decoration: none; white-space: nowrap; }
header a.hnav__action span { color: var(--wb-teal); }

/* ---- Header: mobile menu, sections open with a tap ---- */
.mnav__list { list-style: none; margin: 0; padding: 0; }
.mnav__item { border-bottom: 1px solid #f2f2f2; }

.mnav__trigger {
  align-items: center;
  background: none;
  border: 0;
  color: #677897;
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  justify-content: space-between;
  padding: 16px 20px;
  width: 100%;
}

.mnav__links { display: none; list-style: none; margin: 0; padding: 0 20px 14px; }
.mnav__item.is-open .mnav__links { display: block; }
header .mnav__links a { color: var(--wb-purple); display: block; font-size: 15px; font-weight: 700; padding: 9px 0; text-decoration: none; }
header .mnav__links a.mnav__action { color: #677897; font-size: 14px; }

/* ---- Footer ---- */
.site-footer {
  background: #f5f3fa;
  color: #4a4a5a;
  padding-bottom: 40px;
  padding-top: 56px;
}

.site-footer__top {
  align-items: center;
  border-bottom: 1px solid #e3def0;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 36px;
  padding-bottom: 28px;
}

.site-footer__brand { align-items: center; color: #5a5a6e; display: flex; font-size: 14px; gap: 14px; text-decoration: none; }
.site-footer__brand strong { color: var(--wb-purple); display: block; font-size: 18px; }
.site-footer__social { display: flex; gap: 10px; }
.site-footer__social .icon img { display: block; height: 36px; width: 36px; }

.site-footer .site-footer__menu {
  display: grid !important;
  gap: 28px 24px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer .site-footer__menu > li { border: 0 !important; padding: 0 !important; }

.site-footer .site-footer__menu .menu-heading-label {
  color: var(--wb-purple);
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.site-footer .site-footer__menu .sub-menu { display: block !important; list-style: none; margin: 0; padding: 0; }

.site-footer .site-footer__menu .sub-menu a {
  color: #5a5a6e;
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  margin: 0;
  padding: 5px 0;
  text-decoration: none;
}

.site-footer .site-footer__menu .sub-menu a:hover { color: var(--wb-purple); text-decoration: underline; text-decoration-color: var(--wb-teal); text-underline-offset: 3px; }
.site-footer .site-footer__menu .sub-menu a:focus-visible { outline: 2px solid var(--wb-teal); outline-offset: 2px; }

.site-footer__copyright { border-top: 1px solid #e3def0; color: #8a8a9a; font-size: 12px; margin: 36px 0 0; padding-top: 20px; }

@media (max-width: 59.99em) {
  .site-footer .site-footer__menu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.site-footer__brand img { flex: none; height: auto; width: 66px; }
.site-footer__copyright a { color: inherit; }
