/* =========================================================
   Valley Financial Advisors: shared site styles
   Header, menu, footer and the shared page pieces.
   Every page loads this file. Edit the menu here, not inside
   each page, so all pages stay identical.
   ========================================================= */

:root {
  --navy: #1e3c72;
  --navy-2: #2a5298;
  --navy-dark: #152b52;
  --ink: #2d3748;
  --muted: #5a6475;
  --line: #e3e8f0;
  --soft: #f5f7fb;
  --accent: #667eea;
  --green: #2e7d32;
  --header-h: 76px;
}

html { scroll-padding-top: calc(var(--header-h) + 12px); }
body { overflow-x: hidden; }
img, svg, video { max-width: 100%; }

/* ---------- Header ---------- */
header.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  margin: 0;
  padding: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Old pages pushed their first section down to make room for a
   fixed header. The header now takes its own space, so cancel it. */
header.site-header + * { margin-top: 0 !important; }

nav.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1200px;
  height: var(--header-h);
  margin: 0 auto;
  padding: 0 20px;
  background: none;
  position: static;
}

.site-logo { display: flex; align-items: center; flex-shrink: 0; }
.site-logo a { display: flex; align-items: center; }
.site-logo img { height: 60px; width: auto; display: block; }

.site-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-menu li { list-style: none; margin: 0; padding: 0; border: 0; }
.site-menu a,
.site-menu .site-sub-toggle {
  color: #fff;
  text-decoration: none;
  font: inherit;
  font-weight: 500;
  font-size: 0.97rem;
  white-space: nowrap;
}
.site-menu > li > a,
.site-menu .site-parent > a {
  display: inline-block;
  padding: 0.55rem 0.7rem;
  border-radius: 6px;
}
.site-menu > li > a:hover,
.site-menu .site-parent > a:hover { background: rgba(255, 255, 255, 0.12); }
.site-menu a[aria-current="page"] { background: rgba(255, 255, 255, 0.18); }

.site-menu .site-cta {
  background: #fff;
  color: var(--navy) !important;
  font-weight: 700;
  margin-left: 0.4rem;
}
.site-menu .site-cta:hover { background: #e9eefb !important; }

/* Dropdowns (desktop) */
.site-drop { position: relative; }
.site-parent { display: flex; align-items: center; }
.site-parent > a { padding-right: 0.15rem !important; }
.site-sub-toggle {
  background: none;
  border: 0;
  cursor: pointer;
  width: 28px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 0;
}
.site-sub-toggle:hover { background: rgba(255, 255, 255, 0.12); }
.site-sub-toggle svg { width: 12px; height: 12px; transition: transform 0.2s; }
.site-drop.is-open .site-sub-toggle svg { transform: rotate(180deg); }

.site-sub {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 230px;
  list-style: none;
  margin: 0;
  padding: 0.4rem 0;
  background: var(--navy-dark);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  z-index: 1001;
}
.site-sub::before { /* hover bridge so the menu doesn't close in the gap */
  content: "";
  position: absolute;
  top: -8px; left: 0; right: 0;
  height: 8px;
}
.site-sub a {
  display: block;
  padding: 0.6rem 1.1rem;
  font-size: 0.95rem;
}
.site-sub a:hover,
.site-sub a[aria-current="page"] { background: rgba(255, 255, 255, 0.12); }

@media (hover: hover) and (min-width: 1101px) {
  .site-drop:hover .site-sub { display: block; }
}
.site-drop.is-open .site-sub { display: block; }

/* Hamburger button */
.site-burger {
  display: none;
  width: 46px;
  height: 46px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  position: relative;
  z-index: 1002;
  -webkit-tap-highlight-color: transparent;
}
.site-burger span {
  display: block;
  width: 24px;
  height: 3px;
  margin: 0;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.25s, opacity 0.2s;
}
.site-header.menu-open .site-burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.site-header.menu-open .site-burger span:nth-child(2) { opacity: 0; }
.site-header.menu-open .site-burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Phone and tablet menu ---------- */
@media (max-width: 1100px) {
  :root { --header-h: 66px; }
  .site-logo img { height: 50px; }
  .site-burger { display: inline-flex; }

  .site-menu {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    width: 100%;
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 0 1rem;
    background: var(--navy-dark);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  }
  .site-header.menu-open .site-menu { display: flex; }

  .site-menu > li { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
  .site-menu > li:last-child { border-bottom: 0; }
  .site-menu > li > a,
  .site-menu .site-parent > a {
    display: block;
    padding: 0.85rem 1.4rem;
    border-radius: 0;
    font-size: 1.05rem;
  }
  .site-parent > a { flex: 1; }
  /* On phones the sub-pages are always listed, no second tap needed */
  .site-sub-toggle { display: none; }

  .site-sub {
    display: block;
    position: static;
    min-width: 0;
    box-shadow: none;
    border-radius: 0;
    padding: 0 0 0.4rem;
    background: rgba(0, 0, 0, 0.18);
  }
  .site-sub::before { display: none; }
  .site-sub a { padding: 0.7rem 1.4rem 0.7rem 2.4rem; font-size: 0.98rem; white-space: normal; }

  .site-menu .site-cta {
    margin: 0.75rem 1.4rem 0;
    text-align: center;
    border-radius: 8px !important;
  }
  .site-menu > li:has(.site-cta) { border-bottom: 0; }
}

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--navy);
  color: #dfe7f7;
  padding: 3rem 0 1.5rem;
  margin: 0;
  text-align: left;
  font-size: 0.95rem;
  line-height: 1.6;
}
.site-footer .sf-wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.site-footer .sf-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
}
.site-footer h4 {
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 0.45rem; }
.site-footer a { color: #cfdcff; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .sf-brand p { margin: 0 0 0.4rem; }
.site-footer .sf-brand strong { color: #fff; font-size: 1.05rem; }
.site-footer .sf-ids { font-size: 0.82rem; color: #b8c6e6; margin-top: 0.75rem; }
.site-footer .sf-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin-top: 2rem;
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  font-size: 0.85rem;
  color: #b8c6e6;
}
@media (max-width: 860px) {
  .site-footer .sf-grid { grid-template-columns: 1fr 1fr; }
  .site-footer .sf-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .site-footer .sf-grid { grid-template-columns: 1fr; }
}

/* ---------- Phone fixes for older page styles ---------- */
@media (max-width: 768px) {
  .hero { background-attachment: scroll !important; }
  .about-strip { flex-direction: column; gap: 1.5rem !important; }
  .about-strip img { max-width: 180px; }
  .fa-contact-grid { grid-template-columns: 1fr !important; gap: 2rem !important; }
}
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1rem 0; }
.table-scroll table { margin: 0; }
a[href^="mailto:"] { overflow-wrap: anywhere; }

/* =========================================================
   Shared content pieces (Resources pages, comparison table)
   ========================================================= */
.r-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #3b4fa8 100%);
  color: #fff;
  padding: 3.25rem 0 2.75rem;
}
.r-hero .r-wrap { max-width: 1100px; }
.r-hero h1 { font-size: clamp(1.8rem, 4.5vw, 2.7rem); line-height: 1.2; margin: 0 0 0.6rem; color: #fff; }
.r-hero p { font-size: clamp(1rem, 2.4vw, 1.2rem); opacity: 0.92; margin: 0; max-width: 720px; }
.r-crumbs { font-size: 0.88rem; margin-bottom: 1rem; opacity: 0.9; }
.r-crumbs a { color: #cfdcff; text-decoration: none; }
.r-crumbs a:hover { text-decoration: underline; }

.r-wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.r-section { padding: 3rem 0; }
.r-section.alt { background: var(--soft); }
.r-section h2 { color: var(--navy); font-size: clamp(1.5rem, 3.5vw, 2rem); margin: 0 0 0.5rem; }
.r-lead { color: var(--muted); margin: 0 0 1.75rem; max-width: 720px; }

.r-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.r-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.4rem 1.4rem 1.25rem;
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
a.r-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(30, 60, 114, 0.12); border-color: #c9d4ea; }
.r-card .r-icon { font-size: 1.6rem; line-height: 1; margin-bottom: 0.7rem; }
.r-card h3 { color: var(--navy); font-size: 1.12rem; line-height: 1.35; margin: 0 0 0.45rem; }
.r-card p { color: var(--muted); font-size: 0.95rem; margin: 0 0 0.9rem; flex: 1; }
.r-card .r-go { color: var(--navy-2); font-weight: 700; font-size: 0.93rem; }
.r-card .r-tag {
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy-2);
  background: #eaf0fd;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  margin-bottom: 0.7rem;
}

.r-doorways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 900px) { .r-doorways { grid-template-columns: 1fr; } }
.r-door {
  display: block;
  border-radius: 14px;
  padding: 1.6rem;
  color: #fff;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.r-door:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18); }
.r-door h3 { font-size: 1.3rem; margin: 0.5rem 0 0.4rem; color: #fff; }
.r-door p { margin: 0 0 0.9rem; opacity: 0.92; font-size: 0.97rem; }
.r-door span.r-go { font-weight: 700; }
.r-door.tax { background: linear-gradient(135deg, #2e7d32, #43a047); }
.r-door.fed { background: linear-gradient(135deg, var(--navy), var(--navy-2)); }
.r-door.dl { background: linear-gradient(135deg, #5b3fa0, #7b5cc4); }

/* Article layout */
.r-article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 900px) { .r-article-layout { grid-template-columns: 1fr; } }
.r-article { color: var(--ink); font-size: 1.04rem; line-height: 1.75; min-width: 0; }
.r-article h2 { color: var(--navy); font-size: 1.4rem; margin: 2rem 0 0.6rem; }
.r-article h2:first-child { margin-top: 0; }
.r-article p { margin: 0 0 1rem; }
.r-article ul, .r-article ol { margin: 0 0 1.1rem; padding-left: 1.4rem; }
.r-article li { margin-bottom: 0.45rem; }
.r-article a { color: var(--navy-2); }
.r-note, .r-warn, .r-tip {
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.2rem;
  margin: 1.25rem 0;
  font-size: 0.98rem;
}
.r-note { background: #f0f4ff; border-left: 4px solid var(--navy); }
.r-warn { background: #fff7e0; border-left: 4px solid #e0a800; color: #5c4600; }
.r-tip  { background: #eef8ef; border-left: 4px solid var(--green); }
.r-note p:last-child, .r-warn p:last-child, .r-tip p:last-child,
.r-note ul:last-child, .r-warn ul:last-child, .r-tip ul:last-child { margin-bottom: 0; }

.r-side { position: sticky; top: calc(var(--header-h) + 16px); }
@media (max-width: 900px) { .r-side { position: static; } }
.r-side-box {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.2rem;
  margin-bottom: 1rem;
}
.r-side-box h4 { color: var(--navy); font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 0.6rem; }
.r-side-box ul { list-style: none; margin: 0; padding: 0; }
.r-side-box li { margin: 0; border-bottom: 1px solid var(--line); }
.r-side-box li:last-child { border-bottom: 0; }
.r-side-box li a { display: block; padding: 0.55rem 0; color: var(--ink); text-decoration: none; font-size: 0.94rem; line-height: 1.4; }
.r-side-box li a:hover { color: var(--navy-2); }
.r-side-box li a[aria-current="page"] { color: var(--navy); font-weight: 700; }
.r-side-cta { background: var(--navy); color: #fff; border-color: var(--navy); }
.r-side-cta h4 { color: #fff; }
.r-side-cta p { font-size: 0.94rem; margin: 0 0 0.8rem; opacity: 0.92; }

.r-btn {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  padding: 0.75rem 1.4rem;
  border-radius: 8px;
  border: 2px solid var(--navy);
}
.r-btn:hover { background: var(--navy-2); border-color: var(--navy-2); }
.r-btn.light { background: #fff; color: var(--navy); border-color: #fff; }
.r-btn.light:hover { background: #e9eefb; }
.r-btn.ghost { background: transparent; color: var(--navy); }
.r-btn.block { display: block; text-align: center; }

.r-pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  margin-top: 2.25rem;
  padding-top: 1.25rem;
}
.r-pager a { color: var(--navy-2); text-decoration: none; font-weight: 600; max-width: 48%; }
.r-pager a:hover { text-decoration: underline; }
@media (max-width: 560px) { .r-pager a { max-width: 100%; } }

.r-cta-band { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; text-align: center; padding: 2.75rem 0; }
.r-cta-band h2 { color: #fff; margin: 0 0 0.5rem; font-size: clamp(1.4rem, 3.5vw, 1.9rem); }
.r-cta-band p { margin: 0 0 1.25rem; opacity: 0.92; }
.r-cta-band .r-btns { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.r-cta-band .r-btn.ghost { color: #fff; border-color: rgba(255, 255, 255, 0.8); }

.r-disclaimer { font-size: 0.85rem; color: var(--muted); margin-top: 1.5rem; }

/* Comparison table (Tax Services) */
.cmp-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.cmp { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 0.97rem; }
.cmp th, .cmp td { padding: 0.9rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.cmp thead th { background: var(--soft); color: var(--navy); font-size: 0.92rem; }
.cmp thead th.us { background: var(--navy); color: #fff; }
.cmp tbody th { color: var(--ink); font-weight: 600; width: 26%; background: #fcfdff; }
.cmp td.us { background: #f2f6ff; font-weight: 600; color: var(--navy); }
.cmp tr:last-child th, .cmp tr:last-child td { border-bottom: 0; }
.cmp .yes { color: var(--green); font-weight: 700; }
.cmp .meh { color: var(--muted); }
/* Phones: each row becomes a small card, our answer first */
@media (max-width: 700px) {
  .cmp-wrap { border: 0; background: none; overflow: visible; }
  .cmp { min-width: 0; }
  .cmp thead { display: none; }
  .cmp, .cmp tbody { display: block; }
  .cmp tr {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 0.9rem;
    overflow: hidden;
  }
  .cmp th, .cmp td { border: 0; padding: 0.55rem 1rem; width: auto; }
  .cmp tbody th { order: -2; width: auto; display: block; background: var(--navy); color: #fff; font-size: 1rem; padding: 0.7rem 1rem; }
  .cmp td.us { order: -1; padding-top: 0.75rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--line); }
  .cmp td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.1rem;
  }
  .cmp td.us::before { color: var(--navy-2); }
  .cmp tr td:last-child { padding-bottom: 0.8rem; }
}

.free-box {
  margin-top: 1.75rem;
  background: #fffaf0;
  border: 1px solid #f1dfb4;
  border-left: 5px solid #e0a800;
  border-radius: 0 12px 12px 0;
  padding: 1.4rem 1.5rem;
}
.free-box h3 { color: #6b4e00; margin: 0 0 0.6rem; font-size: 1.2rem; }
.free-box p, .free-box li { color: #4a3a10; font-size: 0.98rem; }
.free-box ul { padding-left: 1.3rem; margin: 0.5rem 0 0.75rem; }
.free-box .src { font-size: 0.82rem; color: #7a6a40; margin: 0.75rem 0 0; }
.free-box .src a { color: #7a5a00; }

/* Home page: doorway for tax clients */
.home-tax-strip {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  background: #f2b544;
  color: #1a2233;
  text-decoration: none;
  padding: 1rem 20px;
  font-size: 1.08rem;
  text-align: center;
}
.home-tax-strip:hover { background: #f5c25f; }
.home-tax-strip .hts-go { font-weight: 800; color: #152b52; white-space: nowrap; }
