/*
Theme Name: Probate Leader
Author: David Prulhiere
Version: 1.2 (Clean Consolidated Navigation)
*/

/* =========================================================
   0) Resets & Base Hygiene
   ========================================================= */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", Arial, sans-serif;
  color: #222;
  background-color: #f8f9fa;
  margin: 0;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}
img, svg, video, canvas { max-width: 100%; height: auto; display: block; }
iframe { width: 100%; height: auto; aspect-ratio: 16/9; }
:focus-visible { outline: 3px solid #0a73bb; outline-offset: 2px; }

/* =========================================================
   1) Typography & Links
   ========================================================= */
h1, h2, h3 { color: #0a2a4a; font-weight: 600; line-height: 1.3; }
h1 {
  font-size: clamp(26px, 5vw, 32px);
  margin: 0 0 .6rem 0;
  text-align: center;
  border-bottom: 3px solid #0a73bb;
  padding-bottom: .5rem;
}
h2 { margin-top: 2rem; color: #0a73bb; font-size: clamp(20px, 3.5vw, 26px); }
h3 { font-size: clamp(18px, 3vw, 22px); }

p, li { font-size: 1.06rem; }
ul { margin: .5rem 0 0 1.2rem; padding-left: 1.2rem; }

a { color: #0a73bb; text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

/* =========================================================
   2) Buttons
   ========================================================= */
.cta-btn,
.button,
.btn,
button,
[role="button"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0a73bb;
  color: #fff;
  padding: .8rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .2s ease, box-shadow .2s ease;
  cursor: pointer;
  border: none;
}
.cta-btn:hover,
.cta-btn:focus,
.button:hover,
.button:focus { background: #094d7e; }
@media (max-width: 560px){
  .cta-btn, .button, .btn, button, [role="button"] { width: 100%; text-align: center; }
}

/* =========================================================
   3) Layout
   ========================================================= */
main {
  max-width: 980px;
  margin: 60px auto;
  padding: 0 22px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 14px rgba(0,0,0,.06);
}
article.page-content {
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 2px 14px rgba(0,0,0,.06);
}

.section { margin: 26px 0; }
.stack > * + * { margin-top: 1rem; }

/* Prevent header overlap on in-page anchors */
:target::before { content: ""; display: block; height: 80px; margin-top: -80px; }
@media (max-width: 992px){
  :target::before { height: 60px; margin-top: -60px; }
}

/* =========================================================
   4) Header & Navigation (clean, consolidated)
   ========================================================= */
header, footer {
  background-color: #0a2a4a;
  color: #fff;
  text-align: center;
  padding: 1.5rem 0;
}
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.header-inner {
  max-width: 980px;
  margin: auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
  width: 100%;
  flex-wrap: wrap;
}
.site-title { margin: 0; flex: 0 0 auto; font-size: clamp(18px, 3.8vw, 24px); }
.site-title a { color: #fff; text-decoration: none; }
.custom-logo-link img { height: auto; max-height: 48px; width: auto; }

.menu-toggle {
  border: 1px solid rgba(255,255,255,.25);
  background: transparent;
  color: #fff;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  display: none;
}
.menu-toggle__label { margin-right: 6px; }

/* =========================================================
   NAVIGATION — FINAL CONSOLIDATED BLOCK
   ========================================================= */
.site-nav { width: 100%; }
.site-nav .menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.site-nav .menu > li { position: relative; }
.site-nav .menu a {
  color: #fff;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 6px;
  font-weight: 600;
  display: inline-block;
}
.site-nav .menu a:hover,
.site-nav .menu .current-menu-item > a { background: rgba(255,255,255,.12); }

.site-nav .menu > li.menu-item-has-children > a::after {
  content: "▾";
  font-size: 0.75em;
  margin-left: 6px;
  transition: transform .18s ease;
  display: inline-block;
  vertical-align: middle;
  opacity: .9;
}

/* ---------- Desktop (>= 993px) ---------- */
@media (min-width: 993px){
  .site-nav .menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    list-style: none;
    margin-top: 10px;
    padding: 6px 0;
    background: rgba(7,28,54,.98);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    box-shadow: 0 14px 30px rgba(0,0,0,.35);
    backdrop-filter: saturate(120%) blur(6px);
    -webkit-backdrop-filter: saturate(120%) blur(6px);
    display: block;
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity .16s ease, transform .16s ease;
    z-index: 1000;
    text-align: left;
  }
  .site-nav .menu .sub-menu a {
    display: block;
    padding: 10px 14px;
    color: #fff;
    white-space: nowrap;
  }
  .site-nav .menu .sub-menu li + li a {
    border-top: 1px solid rgba(255,255,255,.06);
  }
  .site-nav .menu > li:hover > .sub-menu,
  .site-nav .menu > li:has(> .sub-menu:hover) > .sub-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .site-nav .menu .sub-menu .sub-menu {
    top: 0;
    left: 100%;
    margin-left: 6px;
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
  }
  .site-nav .menu .sub-menu li:hover > .sub-menu,
  .site-nav .menu .sub-menu li:has(> .sub-menu:hover) > .sub-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .site-nav .menu > li::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 12px;
  }
  .site-nav .menu > li:hover > a::after {
    transform: rotate(180deg);
  }
}

/* ---------- Mobile (<= 992px) ---------- */
@media (max-width: 992px){
  .menu-toggle { display: inline-flex; align-items: center; gap: 6px; }

  .site-nav {
    display: none;
    width: 100%;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity .18s ease, transform .18s ease;
    position: relative;
    z-index: 1001;
  }
  .site-nav.is-open,
  .menu-toggle[aria-expanded="true"] ~ nav.site-nav {
    display: block;
    opacity: 1;
    transform: translateY(0);
    background: #0a2a4a;
    padding: 8px 0 12px;
    border-top: 1px solid rgba(255,255,255,.1);
    box-shadow: 0 10px 20px rgba(0,0,0,.18);
  }

  .site-nav .menu {
    display: block;
    margin: 0;
    padding: 8px 0 0;
    gap: 0;
  }
  .site-nav .menu > li { display: block; }
  .site-nav .menu > li > a {
    display: block;
    padding: 12px 14px;
    color: #fff;
  }
  .site-nav .menu > li > a:hover {
    background: rgba(255,255,255,.12);
    color: #fff;
  }

  .site-nav .menu .sub-menu {
    display: none;
    position: static;
    margin: 6px 0 6px 10px;
    padding-left: 12px;
    border-left: 2px solid rgba(255,255,255,.15);
    background: transparent;
    box-shadow: none;
  }
  .site-nav .menu li.open > .sub-menu { display: block; }

  .site-nav .menu .sub-menu a {
    color: #fff;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: .98rem;
    line-height: 1.35;
  }

  .site-nav .menu li.open > a::after { transform: rotate(180deg); }
  .cta-btn { width: 100%; }
}

/* Ensure above content */
nav.site-nav { position: relative; z-index: 1001; }

/* =========================================================
   5) Footer
   ========================================================= */
footer { font-size: 0.9rem; margin-top: 3rem; }
.footer-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(4, 1fr);
  max-width: 980px;
  margin: 0 auto;
  padding: 0 22px;
}
@media (max-width: 992px){ .footer-grid{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px){ .footer-grid{ grid-template-columns: 1fr; } }

.footer-group-title {
  margin: 0 0 .5rem;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}
.footer-menu { list-style: none; margin: 0; padding: 0; }
.footer-menu li + li { margin-top: .35rem; }
.footer-menu a {
  color: #9ec3e6;
  text-decoration: none;
  transition: color .2s ease;
}
.footer-menu a:hover { color: #fff; text-decoration: underline; }

@media(max-width:820px){
  footer .footer-grid { grid-template-columns: 1fr; }
  .footer-group { border-top: 1px solid rgba(255,255,255,.1); padding-top: 10px; }
  .footer-group-title {
    display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; padding: 10px 0;
  }
  .footer-group-title::after {
    content:"▾"; font-size:.9em; transition:transform .2s ease;
  }
  .footer-group[aria-expanded="false"] .footer-menu { display:none; }
  .footer-group[aria-expanded="true"] .footer-group-title::after { transform: rotate(180deg); }
}

/* =========================================================
   6) Misc. Extras
   ========================================================= */
#breadcrumbs {
  font-size: 0.95rem;
  margin: 0.6rem 0 1rem;
  color: #555;
}
#breadcrumbs a { color: #0a73bb; text-decoration: none; }
#breadcrumbs a:hover { text-decoration: underline; }

.page-hero {
  background: #0a2a4a;
  color: #fff;
  text-align: center;
  padding: 28px;
  margin-bottom: 22px;
  border-radius: 12px;
  position: relative;
  z-index: 1;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: inherit;
  z-index: -1;
}
.page-hero .lede {
  margin: 0 auto;
  max-width: 70ch;
  line-height: 1.6;
}

.hero { position: relative; overflow: hidden; }
.hero::before { content:""; position:absolute; inset:0; background:inherit; z-index:-1; }
.hero .lede { margin:0 auto; max-width:70ch; text-align:center; line-height:1.6; }

@media print {
  header, footer, .menu-toggle, .cta-btn { display: none !important; }
  main { box-shadow: none; background: #fff; margin: 0; max-width: 100%; }
  a::after { content: " (" attr(href) ")"; font-size: .9em; }
}