/*
 * WaveLocal adjustments. Loaded last. Everything here is a deliberate difference from the
 * reference stylesheets, kept in one place so the converted reference CSS stays untouched.
 */

/* ---- Accessibility ---------------------------------------------------- */

/* The reference's skip link is permanently invisible. Show it when it receives keyboard focus. */
.skip:focus {
  z-index: 100000;
  opacity: 1;
  top: 1rem;
  left: 1rem;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  background: #fff;
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

/* Clear keyboard focus ring (mouse users do not see it). */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--secondary);
  outline-offset: 3px;
}

/* ---- Layout fixes ----------------------------------------------------- */

/* Equal-height service cards when a title wraps onto two lines. */
#services-966 .cs-link {
  height: 100%;
}

/* ---- Breadcrumbs (new component) -------------------------------------- */
.cs-breadcrumbs {
  width: 100%;
  margin: 0 0 1.5rem;
}
.cs-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cs-breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.875rem;
  color: #707070;
}
.cs-breadcrumbs li + li:before {
  content: "/";
  opacity: 0.6;
}
.cs-breadcrumbs a {
  font-size: inherit;
  color: var(--primary);
  text-decoration: none;
}
.cs-breadcrumbs a:hover {
  text-decoration: underline;
}
html.dark-mode .cs-breadcrumbs li,
html.dark-mode .cs-breadcrumbs a {
  color: #fff;
}

/* ---- Motion preferences ------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html,
  body {
    scroll-behavior: auto;
  }
  .universe *,
  .cs-ufo-wrapper,
  .cs-ufo,
  .cs-beam,
  .shooting-star {
    animation: none !important;
  }
}

/* ---- FAQ: hide closed answers from assistive technology ---------------- */
#faq-2066 .cs-faq-item:not(.active) .cs-item-p {
  visibility: hidden;
}

/* ---- Blog additions ------------------------------------------------------ */
.blog-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0 0;
}
.blog-pagination span {
  font-weight: 700;
}
.blog-category-link .feature-h3 {
  margin: 0;
}
.main-content .cs-breadcrumbs {
  margin-bottom: 1rem;
}

/* ---- Keyboard access for desktop dropdowns ------------------------------ */
/* The reference only opens dropdowns on mouse hover. JS adds .cs-active for keyboard users. */
@media only screen and (min-width: 1024px) {
  #cs-navigation .cs-dropdown.cs-active .cs-drop-ul {
    visibility: visible;
    opacity: 1;
    transform: scaleY(1);
  }
  #cs-navigation .cs-dropdown.cs-active .cs-drop-li {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Colour contrast (WCAG AA) ------------------------------------------
 * The reference uses bright blue (#43b7ff) for some text on white (2.2:1). That is fine for
 * buttons and on dark backgrounds, but too faint for text on white, so light mode uses a deeper
 * blue of the same hue (5:1). Dark mode and the dark mobile menu keep the original bright blue.
 */
:root {
  --linkOnLight: #0a74b5;
}
@media only screen and (min-width: 1024px) {
  html:not(.dark-mode) #cs-navigation .cs-li-link.cs-active {
    color: var(--linkOnLight);
  }
}
html:not(.dark-mode) .blog-article #blog-content a,
html:not(.dark-mode) .blog-article #blog-content strong {
  color: var(--linkOnLight);
}

/* ---- Links inside intro text (FAQ, contact) ------------------------------ */
.cs-text a {
  color: var(--linkOnLight);
  font-weight: 700;
}
html.dark-mode .cs-text a {
  color: var(--secondary);
}

/* Banner title when it is the page's <h1>: same look as the reference's <span>. */
h1.cs-int-title {
  margin: 0;
}

/* ---- Logo ----------------------------------------------------------------
 * WaveLocal's logo is wider than the reference's, so the header gives it a little more room.
 */
@media only screen and (min-width: 1024px) {
  #cs-navigation .cs-logo {
    max-width: 11rem;
  }
}
@media only screen and (max-width: 1023px) {
  /*
   * Size the mobile logo by HEIGHT (like desktop) instead of "width: 100% of an auto-width parent".
   * The percentage version can collapse to nothing for an SVG in some mobile browsers.
   * Proportions come from the SVG itself, so the logo is never stretched.
   */
  #cs-navigation .cs-logo {
    align-items: center;
    max-width: none;
    width: auto;
  }
  #cs-navigation .cs-logo img { /* both header logos are then sized by width in header.css */
    height: 1.9375rem;
    max-width: none;
    width: auto;
  }
}

/* The neon "After Dark" sign sat over the old logo's tiny tagline. The new logo's tagline is larger,
 * so the sign now hangs just below the logo and the two stay legible. */
#cs-navigation .neon {
  bottom: -1.3rem;
}
