/*
 * AquaForge Navigation Styles
 * Primary nav dropdowns, utility nav, language switcher, mobile menu
 * Applied on top of Blocksy's default header styles.
 */

/* ========================================
   Header — Navy background per Phase 4 color palette
   ======================================== */

.ct-header [data-row] {
  --theme-text-color: #FFF;
  --theme-link-initial-color: rgb(255 255 255 / 85%);
  --theme-link-hover-color: #FFF;
  --height: 70px !important;
  background: linear-gradient(to bottom, var(--navy: #1B3A5C), var(--cyan: #2EC4D4));
}


/* Hide text site-title when custom logo is set (logo includes the name) */
.ct-header .site-title {
  display: none;
}

.ct-header .site-logo img {
  max-height: 48px;
  width: auto;
}

/* ========================================
   Primary Nav (desktop)
   ======================================== */

.ct-header [data-id="menu"] .menu > li > a {
  font-family: var(--af-font-sans);
  font-weight: 500;
  font-size: 15px;
  color: rgb(255 255 255 / 85%);
  padding: 16px 14px;
  transition: color 0.15s ease;
}

.ct-header [data-id="menu"] .menu > li > a:hover,
.ct-header [data-id="menu"] .menu > li.current-menu-item > a {
  color: #FFF;
}

/* Dropdown containers — white bg pops against navy header */
.ct-header [data-id="menu"] .sub-menu {
  background-color: #FFF;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgb(27 58 92 / 12%);
  border: 1px solid rgb(100 116 139 / 10%);
  padding: 8px 0;
  min-width: 240px;
}

.ct-header [data-id="menu"] .sub-menu li a {
  padding: 10px 16px;
  color: var(--af-navy);
  font-size: 15px;
  transition: background-color 0.1s ease, color 0.1s ease;
}

.ct-header [data-id="menu"] .sub-menu li a:hover {
  background-color: var(--af-ice);
  color: var(--af-cyan);
}

/* ========================================
   Menu-embedded CTAs (Login, Try the Demo)
   ======================================== */

.ct-header .menu > li.af-nav-cta,
.ct-header .menu > li.af-nav-cta-primary {
  display: flex;
  align-items: center;
}

.ct-header .menu > li.af-nav-cta > a,
.ct-header .menu > li.af-nav-cta-primary > a {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  margin: 0 4px;
  border: 2px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  height: auto;
}

/* Login — white outline on navy header */
.ct-header .menu > li.af-nav-cta > a,
.ct-header .menu > li.af-nav-cta > a:link,
.ct-header .menu > li.af-nav-cta > a:visited {
  color: #FFF;
  border-color: rgb(255 255 255 / 50%);
  background-color: transparent;
}

.ct-header .menu > li.af-nav-cta > a:hover,
.ct-header .menu > li.af-nav-cta > a:focus {
  background-color: rgb(255 255 255 / 15%);
  border-color: #FFF;
  color: #FFF;
}

/* Try the Demo — cyan fill, navy text (WCAG AA ~4.6:1) */
.ct-header .menu > li.af-nav-cta-primary > a,
.ct-header .menu > li.af-nav-cta-primary > a:link,
.ct-header .menu > li.af-nav-cta-primary > a:visited {
  background-color: var(--af-cyan);
  color: var(--af-navy);
  border-color: var(--af-cyan);
}

.ct-header .menu > li.af-nav-cta-primary > a:hover,
.ct-header .menu > li.af-nav-cta-primary > a:focus {
  background-color: #FFF;
  border-color: #FFF;
  color: var(--af-navy);
}

/* Language switcher — compact EN|FR toggle in nav */
.ct-header .menu > li.af-nav-lang > a {
  color: rgb(255 255 255 / 70%);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 8px 10px;
}

.ct-header .menu > li.af-nav-lang > a:hover,
.ct-header .menu > li.af-nav-lang > a:focus {
  color: #FFF;
}

/* ========================================
   Utility Nav (Blocksy header elements)
   ======================================== */

.ct-header [data-id="button"] .ct-button {
  font-family: var(--af-font-sans);
  font-weight: 600;
  font-size: 14px;
  border-radius: 8px;
  padding: 10px 20px;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

/* WPML language switcher in header */
/* stylelint-disable-next-line selector-class-pattern */
.ct-header .wpml-ls-statics-shortcode_actions,
.ct-header .wpml-ls {
  font-family: var(--af-font-sans);
  font-size: 14px;
  font-weight: 600;
}

.ct-header .wpml-ls a {
  color: rgb(255 255 255 / 70%);
  padding: 8px 10px;
  transition: color 0.15s ease;
}

.ct-header .wpml-ls a:hover {
  color: #FFF;
}

/* ========================================
   Sticky Header
   ======================================== */

.ct-header[data-sticky] {
  position: sticky;
  top: 0;
  z-index: 100;
}

.ct-header[data-sticky] [data-row] {
  background: linear-gradient(to bottom, var(--af-navy), var(--af-cyan));
  box-shadow: 0 2px 12px rgb(0 0 0 / 25%);
}

/* ========================================
   Mobile Navigation
   ======================================== */

@media (width <= 999px) {
  .ct-header [data-id="menu"] .menu > li > a {
    font-size: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid rgb(255 255 255 / 10%);
    color: var(--af-navy);
  }

  /* Mobile offcanvas panel — white bg for readability */
  .ct-panel .ct-panel-content {
    background-color: #FFF;
  }

  .ct-panel .ct-panel-content .menu > li > a {
    color: var(--af-navy);
  }

  /* Mobile CTAs */
  .ct-header [data-id="button"] {
    margin-top: 16px;
    margin-bottom: 16px;
  }

  .ct-header [data-id="button"] .ct-button {
    width: 100%;
    justify-content: center;
  }

  /* Mobile CTA buttons in menu — revert to normal colors */
  .ct-panel .menu > li.af-nav-cta > a {
    color: var(--af-navy);
    border-color: var(--af-navy);
  }

  .ct-panel .menu > li.af-nav-cta-primary > a {
    background-color: var(--af-cyan);
    color: var(--af-navy);
    border-color: var(--af-cyan);
  }

  /* ========================================
     Mobile Language Switcher (EN | FR)
     ======================================== */

  /* Force visibility — overrides any inherited display:none from header rules */
  .ct-panel .menu > li.af-nav-lang,
  .ct-header [data-id="menu"] .menu > li.af-nav-lang {
    display: block !important;
  }

  /* Style the lang link to be readable on the white mobile panel
     and tappable at the minimum 44px touch-target recommended by WCAG 2.5.5 */
  .ct-panel .menu > li.af-nav-lang > a,
  .ct-header [data-id="menu"] .menu > li.af-nav-lang > a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    color: var(--af-navy);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 14px 20px;
    min-height: 44px;
    border-bottom: 1px solid rgb(27 58 92 / 8%);
    background-color: transparent;
    transition: background-color 0.15s ease, color 0.15s ease;
  }

  .ct-panel .menu > li.af-nav-lang > a:hover,
  .ct-panel .menu > li.af-nav-lang > a:focus,
  .ct-header [data-id="menu"] .menu > li.af-nav-lang > a:hover,
  .ct-header [data-id="menu"] .menu > li.af-nav-lang > a:focus {
    background-color: var(--af-ice);
    color: var(--af-cyan);
  }

  /* If the lang switcher is a WPML widget rather than a menu item,
     mirror the same treatment so it isn't lost on mobile */
  .ct-panel .wpml-ls,
  .ct-panel .wpml-ls-statics-shortcode_actions {
    display: block;
    padding: 0;
  }

  .ct-panel .wpml-ls a {
    display: flex;
    align-items: center;
    color: var(--af-navy);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 14px 20px;
    min-height: 44px;
    border-bottom: 1px solid rgb(27 58 92 / 8%);
  }

  .ct-panel .wpml-ls a:hover,
  .ct-panel .wpml-ls a:focus {
    background-color: var(--af-ice);
    color: var(--af-cyan);
  }
}

/* ========================================
   Custom Footer (4-column)
   ======================================== */
.af-footer {
  background-color: var(--af-navy);
  color: rgb(255 255 255 / 80%);
  padding: 48px 0 0;
  font-family: var(--af-font-sans);
  font-size: 14px;
  line-height: 1.6;
}
.af-footer a {
  color: rgb(255 255 255 / 80%);
  text-decoration: none;
  transition: color 0.15s ease;
}
.af-footer a:hover {
  color: var(--af-cyan);
}
.af-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 40px;
}
/* ========================================
   Footer Brand: logo + social icons
   Authoritative — overrides Blocksy ul/li defaults
   ======================================== */
.af-footer .af-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
}
.af-footer .af-footer__logo {
  display: inline-block;
  line-height: 0;
  transition: opacity 0.15s ease;
}
.af-footer .af-footer__logo:hover {
  opacity: 0.85;
}
.af-footer .af-footer__logo img {
  height: 40px;
  width: auto;
  max-width: 220px;
  display: block;
}
.af-footer .af-footer__social {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap;
  gap: 12px;
  align-items: center;
}
.af-footer .af-footer__social li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: inline-flex;
}
.af-footer .af-footer__social li::before,
.af-footer .af-footer__social li::marker {
  content: none !important;
  display: none !important;
}
.af-footer .af-footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.af-footer .af-footer__social a:hover,
.af-footer .af-footer__social a:focus-visible {
  background-color: rgb(255 255 255 / 8%);
  transform: translateY(-1px);
}
.af-footer .af-footer__social img {
  width: 24px;
  height: 24px;
  display: block;
  object-fit: contain;
}
/* ========================================
   Footer Nav Columns
   ======================================== */
.af-footer__col-title {
  color: #FFF;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}
.af-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.af-footer__links li {
  margin-bottom: 6px;
}
.af-footer__links a {
  font-size: 14px;
}
.af-footer__bottom {
  border-top: 1px solid rgb(255 255 255 / 12%);
  padding: 20px;
  text-align: center;
  font-size: 13px;
  color: rgb(255 255 255 / 50%);
  max-width: 1200px;
  margin: 0 auto;
}
.af-footer__bottom a {
  color: rgb(255 255 255 / 50%);
}
@media (width <= 768px) {
  .af-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}
@media (width <= 480px) {
  .af-footer__grid {
    grid-template-columns: 1fr;
  }
  .af-footer .af-footer__brand {
    align-items: center;
    text-align: center;
  }
}
/* Hide Blocksy's default footer — replaced by .af-footer */
footer.ct-footer {
  display: none;
}
/* Hide Blocksy's default search icon in header nav */
.ct-header [data-id="search"] {
  display: none;
}