/*
Theme Name: Visio Wealth
Theme URI: https://visiowealth.in
Description: Purpose-built wealth management theme. No forced content widths. Full-site editing with glass header, responsive footer, and native block patterns.
Version: 4.9.8
Requires at least: 6.4
Tested up to: 6.6
Requires PHP: 7.4
License: GPL v2 or later
Text Domain: visio-wealth
*/

/* ══════════════════════════════════════════════════
   GLOBAL RESET
══════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
/* NOTE: do NOT set overflow-x:hidden on body — it kills backdrop-filter on sticky elements */
img { max-width: 100%; height: auto; }
p { text-wrap: pretty; }

/* ══════════════════════════════════════════════════
   WP PRESET COLOR CLASSES — reference only
   (auto-generated by theme.json)
══════════════════════════════════════════════════ */
.has-vw-cream-color      { color: #f5efdd !important; }
.has-vw-ink-color        { color: #0f1e28 !important; }
.has-vw-navy-color       { color: #223b48 !important; }
.has-vw-gold-color       { color: #B8952A !important; }
.has-vw-muted-color      { color: #9AACB4 !important; }
.has-vw-muted-2-color    { color: #BFD0D8 !important; }
.has-vw-cream-tx-color   { color: #EDE8D5 !important; }
.has-vw-header-bar-background-color { background-color: #faf5e8 !important; }

/* ══════════════════════════════════════════════════
   STICKY HEADER + GLASS EFFECT
   backdrop-filter needs:
   1. No overflow:hidden on ANY ancestor (use clip instead)
   2. Semi-transparent background (opacity < 1)
   3. No transform or will-change on the sticky element
══════════════════════════════════════════════════ */

/* Force clip (not hidden) on all likely WP.com wrappers.
   overflow:hidden on any ancestor silently kills backdrop-filter. */
html,
body,
.wp-site-blocks,
#page,
#content,
.site,
.site-content,
#wpcontent { overflow-x: clip !important; overflow-y: visible !important; }

header.wp-block-template-part {
  position: sticky;
  top: 0;
  z-index: 1000;
  /* NO transform, NO will-change — both kill backdrop-filter */
}

/* ── Glass: utility bars ─────────────────────────────────────────────
   Opacity guide: 0.65 = very glassy · 0.82 = balanced · 0.95 = solid
   Edit the LAST number in rgba() to change opacity. */
.vw-util-desktop,
.vw-util-mobile {
  background-color: rgba(22, 36, 46, 0.72) !important;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

/* ── Glass: main header bar ─────────────────────────────────────────
   Opacity guide: 0.65 = very glassy · 0.82 = balanced · 0.95 = solid
   Edit the LAST number in rgba() to change opacity. */
.vw-main-bar {
  background-color: rgba(250, 245, 232, 0.72) !important;
  backdrop-filter: blur(24px) saturate(180%) brightness(1.04);
  -webkit-backdrop-filter: blur(24px) saturate(180%) brightness(1.04);
  box-shadow: 0 1px 0 rgba(184,149,42,0.12);
  transition: box-shadow 0.25s ease;
}
.vw-main-bar.is-scrolled {
  box-shadow: 0 4px 28px rgba(34,59,72,0.13), 0 1px 0 rgba(184,149,42,0.18);
}

/* ══════════════════════════════════════════════════
   UTILITY BAR — SHOW/HIDE BY BREAKPOINT
══════════════════════════════════════════════════ */
@media (min-width: 782px) { .vw-util-mobile { display: none !important; } }
@media (max-width: 781px) { .vw-util-desktop { display: none !important; } }

/* Mobile utility bar — static single line, styled via wp:group block */

/* ══════════════════════════════════════════════════
   UTILITY BAR — TEXT + COLOUR
══════════════════════════════════════════════════ */
.vw-util-desktop p,
.vw-util-mobile p {
  color: #9AACB4 !important;
  margin: 0 !important;
}
.vw-util-desktop p a,
.vw-util-mobile p a {
  color: #9AACB4 !important;
  text-decoration: none !important;
}
.vw-util-desktop p a:hover,
.vw-util-mobile p a:hover { color: #d4aa44 !important; }


/* ══════════════════════════════════════════════════
   NAVIGATION
══════════════════════════════════════════════════ */
.vw-main-bar .wp-block-navigation a {
  color: #223b48 !important;
  font-size: 14.5px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  letter-spacing: 0.01em;
  transition: color 0.18s;
}
.vw-main-bar .wp-block-navigation a:hover { color: #B8952A !important; }
/* Ensure nav items have spacing */
.vw-main-bar .wp-block-navigation .wp-block-navigation__container {
  gap: 28px !important;
  flex-wrap: nowrap !important;
}

@media (max-width: 781px) {
  /* Main bar: tighter padding */
  .vw-main-bar { padding: 10px 14px !important; gap: 0 !important; }

  /* Left group (logo+name): allow shrinking, truncate if needed */
  .vw-main-bar > .wp-block-group:first-child {
    flex-shrink: 1 !important;
    min-width: 0 !important;
    gap: 8px !important;
    overflow: hidden;
  }

  /* Logo: fixed size, never squish */
  .vw-main-bar .wp-block-site-logo { flex-shrink: 0 !important; min-width: 34px !important; }
  .vw-main-bar .wp-block-site-logo img { width: 34px !important; height: 34px !important; min-width: 34px !important; object-fit: contain !important; }

  /* Site title: smaller, no overflow */
  .vw-main-bar .wp-block-site-title a {
    font-size: 16px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
  }
  /* Tagline: keep visible but very small */
  .vw-main-bar .wp-block-site-tagline { font-size: 7.5px !important; letter-spacing: 0.18em !important; }
  /* Name+tagline group: no gap */
  .vw-main-bar > .wp-block-group:first-child > .wp-block-group { gap: 0 !important; }

  /* Right group (nav + button): don't shrink, keep together */
  .vw-main-bar > .wp-block-group:last-child {
    flex-shrink: 0 !important;
    gap: 6px !important;
    align-items: center !important;
  }

  /* Login button: small compact pill — appears before hamburger */
  .vw-main-bar .wp-block-button { order: 1; }
  .vw-main-bar .wp-block-navigation { order: 2; }
  .vw-main-bar .wp-block-button a {
    font-size: 10px !important;
    padding: 6px 10px !important;
    white-space: nowrap !important;
    line-height: 1.3 !important;
    border-radius: 6px !important;
    letter-spacing: 0 !important;
  }

  /* Hamburger icon: dark, properly sized */
  .vw-main-bar .wp-block-navigation__responsive-container-open {
    padding: 4px !important;
    flex-shrink: 0 !important;
  }
  .vw-main-bar .wp-block-navigation__responsive-container-open svg {
    width: 24px !important;
    height: 24px !important;
    color: #223b48 !important;
    fill: #223b48 !important;
  }
}
.vw-main-bar .wp-block-navigation__responsive-container-open svg { color: #223b48 !important; fill: #223b48 !important; }

/* Mobile overlay nav — full viewport, centered items */
.wp-block-navigation__responsive-container.is-menu-open {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  z-index: 99999 !important;
  background: rgba(250, 245, 232, 0.98) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Nav list: centered column */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: 100% !important;
  padding: 0 !important;
  list-style: none !important;
}

/* Each menu item: centered text */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
  text-align: center !important;
  width: 100% !important;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
  display: block !important;
  text-align: center !important;
  color: #223b48 !important;
  font-size: 22px !important;
  font-weight: 400 !important;
  letter-spacing: 0.02em !important;
  padding: 14px 40px !important;
  text-decoration: none !important;
  transition: color 0.18s !important;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:hover {
  color: #B8952A !important;
}

/* Close button: top-right, visible */
/* Close button: hidden by default, only visible inside open overlay */
.wp-block-navigation__responsive-container-close { display: none !important; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
  display: flex !important;
  position: fixed !important;
  top: 20px !important;
  right: 20px !important;
  z-index: 100001 !important;
  background: rgba(34,59,72,0.08) !important;
  border-radius: 50% !important;
  width: 44px !important;
  height: 44px !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid rgba(34,59,72,0.12) !important;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close svg {
  color: #223b48 !important;
  fill: #223b48 !important;
  width: 20px !important;
  height: 20px !important;
}

/* ══════════════════════════════════════════════════
   FOOTER — BACKGROUND LOCK
   theme.json global cream bleeds in; override here.
══════════════════════════════════════════════════ */
footer.wp-block-template-part,
footer.wp-block-template-part > .wp-block-group,
footer.wp-block-template-part .alignfull {
  background-color: #223b48 !important;
}
/* Individual sections that override navy intentionally keep their own bg */
footer.wp-block-template-part .vw-footer-cta {
  background-color: #223b48 !important;
}

/* ══════════════════════════════════════════════════
   FOOTER — CTA STRIP
══════════════════════════════════════════════════ */
@media (max-width: 781px) {
  .vw-footer-cta {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    padding: 32px 24px !important;
    gap: 20px !important;
  }
  .vw-footer-cta h3 { font-size: 22px !important; }
}

/* ══════════════════════════════════════════════════
   FOOTER — COLUMN HEADINGS
══════════════════════════════════════════════════ */
.vw-col-head {
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  color: #B8952A !important;
  margin-bottom: 14px !important;
}

/* ══════════════════════════════════════════════════
   FOOTER — LINK LISTS (vw-footer-links)
══════════════════════════════════════════════════ */
.vw-footer-links {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 9px !important;
}
.vw-footer-links li { margin: 0 !important; }
.vw-footer-links li a {
  color: #BFD0D8 !important;
  font-size: 13.5px !important;
  text-decoration: none !important;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.18s, padding-left 0.18s;
}
.vw-footer-links li a::before { content: '▸'; font-size: 7px; color: #B8952A; opacity: 0.7; flex-shrink: 0; }
.vw-footer-links li a:hover { color: #d4aa44 !important; padding-left: 4px; }

/* ══════════════════════════════════════════════════
   FOOTER — REACH US
══════════════════════════════════════════════════ */
.vw-reach-links { display: flex; flex-direction: column; gap: 10px; }
.vw-reach-links p { margin: 0 !important; font-size: 13.5px !important; }
.vw-reach-links a { color: #BFD0D8 !important; text-decoration: none !important; transition: color 0.18s; }
.vw-reach-links a:hover { color: #d4aa44 !important; }

/* ══════════════════════════════════════════════════
   FUND PARTNERS — wp:details as chips
══════════════════════════════════════════════════ */
.vw-fund-section { text-align: center; }

.vw-amc-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 7px !important;
  justify-content: center !important;
}

/* Each chip = one wp:details */
.vw-amc-grid .wp-block-details {
  display: inline-block;
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
}

.vw-amc-grid .wp-block-details summary {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 7px;
  padding: 5px 13px;
  color: #BFD0D8;
  font-size: 12px;
  cursor: pointer;
  list-style: none;
  -webkit-appearance: none;
  user-select: none;
  transition: border-color 0.18s, background 0.18s, color 0.18s;
}
.vw-amc-grid .wp-block-details summary::-webkit-details-marker { display: none; }
.vw-amc-grid .wp-block-details summary:hover { border-color: rgba(184,149,42,0.4); background: rgba(184,149,42,0.07); color: #d4aa44; }

/* When expanded: chip expands to show details inline */
.vw-amc-grid .wp-block-details[open] {
  width: 100%;
  border: 1px solid rgba(184,149,42,0.25) !important;
  border-radius: 10px !important;
  padding: 12px 16px !important;
  background: rgba(255,255,255,0.03) !important;
}
.vw-amc-grid .wp-block-details[open] > summary {
  border: none;
  background: transparent;
  padding: 0 0 9px;
  border-bottom: 1px solid rgba(184,149,42,0.18);
  margin-bottom: 9px;
  font-weight: 600;
  color: #d4aa44;
  width: 100%;
}
.vw-amc-grid .wp-block-details[open] p {
  color: #9AACB4 !important;
  font-size: 12px !important;
  line-height: 1.6 !important;
  margin: 0 !important;
}

/* ══════════════════════════════════════════════════
   FOOTER — BOTTOM BAR + BADGES
══════════════════════════════════════════════════ */
.vw-footer-badge {
  display: inline-block;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 10px;
  color: #9AACB4;
  margin: 0 2px;
}

/* ══════════════════════════════════════════════════
   FOOTER — MOBILE RESPONSIVE
   (WP stacks columns natively with is-stacked-on-mobile)
══════════════════════════════════════════════════ */
@media (max-width: 781px) {

  /* Columns: WP auto-stacks; we center-align each */
  .vw-footer-cols.is-stacked-on-mobile {
    padding: 0 !important;
    gap: 0 !important;
  }
  .vw-footer-cols.is-stacked-on-mobile > .wp-block-column {
    width: 100% !important;
    text-align: center !important;
    padding: 22px 24px 10px !important;
    border-bottom: 1px solid rgba(255,255,255,0.05) !important;
  }

  /* Brand */
  .vw-col-brand .wp-block-site-logo { margin: 0 auto 10px !important; }
  .vw-col-brand h4, .vw-col-brand p { text-align: center !important; }
  .vw-col-brand .wp-block-social-links { justify-content: center !important; }

  /* Link lists: center, no arrows */
  .vw-footer-links { align-items: center !important; }
  .vw-footer-links li a { justify-content: center !important; }
  .vw-footer-links li a::before { display: none !important; }
  .vw-footer-links li a:hover { padding-left: 0 !important; }

  /* Reach Us: center */
  .vw-reach-links { align-items: center !important; }
  .vw-reach-links p { text-align: center !important; }

  /* Fund Partners */
  .vw-fund-section { padding: 22px 24px 24px !important; }

  /* AMC chips: keep flex + visible on mobile */
  .vw-amc-grid { display: flex !important; flex-wrap: wrap !important; justify-content: center !important; }
  .vw-amc-grid .wp-block-details { display: inline-block !important; }
  .vw-amc-grid .wp-block-details summary { display: block !important; }

  /* Bottom bar: stack vertically, centered */
  .vw-footer-bottom {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 8px !important;
    padding: 20px 24px !important;
  }
  .vw-footer-badges { justify-content: center !important; }

  /* Disclaimer */
  .vw-footer-disclaimer { padding: 0 24px 24px !important; text-align: center !important; }

}

/* ══════════════════════════════════════════════════
   SCROLL REVEAL ANIMATIONS
══════════════════════════════════════════════════ */
.reveal, .reveal-left, .reveal-right, .reveal-scale, .fade-in {
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal        { transform: translateY(28px); }
.reveal-left   { transform: translateX(-28px); }
.reveal-right  { transform: translateX(28px); }
.reveal-scale  { transform: scale(0.95); }
.fade-in       { transform: none; }

.reveal.is-visible, .reveal-left.is-visible, .reveal-right.is-visible,
.reveal-scale.is-visible, .fade-in.is-visible { opacity: 1; transform: none; }

/* Stagger: children animate in sequence */
.stagger > * { opacity: 0; transform: translateY(18px); transition: opacity 0.5s ease, transform 0.5s ease; }
.stagger.is-visible > * { opacity: 1; transform: none; }
.stagger.is-visible > *:nth-child(1) { transition-delay: 0.05s; }
.stagger.is-visible > *:nth-child(2) { transition-delay: 0.12s; }
.stagger.is-visible > *:nth-child(3) { transition-delay: 0.19s; }
.stagger.is-visible > *:nth-child(4) { transition-delay: 0.26s; }
.stagger.is-visible > *:nth-child(5) { transition-delay: 0.33s; }

/* Gold divider line animation */
.vw-divider { display: block; width: 0; height: 2px; background: #B8952A; margin: 12px 0; transition: width 0.9s cubic-bezier(.4,0,.2,1); }
.vw-divider.is-visible { width: 60px; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left, .reveal-right, .reveal-scale, .fade-in, .stagger { opacity: 1 !important; transform: none !important; }
  .stagger > * { opacity: 1 !important; transform: none !important; transition-delay: 0s !important; }
}

/* ══════════════════════════════════════════════════
   FORMS
══════════════════════════════════════════════════ */
input, textarea, select, button { font-family: inherit; font-size: 100%; }
input:focus, textarea:focus, select:focus { outline: 2px solid #B8952A; outline-offset: 2px; }
@media (max-width: 781px) { input, textarea, select { font-size: 16px; } }

/* ══════════════════════════════════════════════════
   TABLES
══════════════════════════════════════════════════ */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid rgba(34,59,72,0.12); }
th { font-weight: 600; }
@media (max-width: 600px) {
  table { overflow-x: auto; display: block; }
  th, td { padding: 10px 12px; font-size: 13px; white-space: nowrap; }
}

/* ══════════════════════════════════════════════════
   FOOTER — REACH US (pattern HTML version)
══════════════════════════════════════════════════ */
.vw-reach-section { display: flex; flex-direction: column; gap: 10px; }
.vw-reach-head {
  font-size: 11px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: #B8952A; margin-bottom: 4px;
}
.vw-reach-btn {
  display: flex; align-items: center; gap: 10px;
  color: #BFD0D8; text-decoration: none; font-size: 13.5px;
  padding: 6px 0; transition: color 0.18s;
}
.vw-reach-btn:hover { color: #d4aa44; }
.vw-reach-icon { font-size: 16px; flex-shrink: 0; width: 22px; text-align: center; }
.vw-reach-info { display: flex; flex-direction: column; }
.vw-reach-label { font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: #9AACB4; }
.vw-reach-value { font-size: 13.5px; color: #BFD0D8; }

/* ══════════════════════════════════════════════════
   FOOTER — AMC CHIPS (pattern HTML version)
══════════════════════════════════════════════════ */
.vw-amc-chips {
  display: flex; flex-wrap: wrap; gap: 7px; justify-content: center;
}
.vw-amc-item {
  position: relative; cursor: pointer;
}
.vw-amc-name {
  display: inline-block;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 7px; padding: 5px 13px; color: #BFD0D8; font-size: 12px;
  transition: border-color 0.18s, background 0.18s, color 0.18s;
}
.vw-amc-item:hover .vw-amc-name {
  border-color: rgba(184,149,42,0.4); background: rgba(184,149,42,0.07); color: #d4aa44;
}
.vw-amc-tip {
  display: none; position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%); background: #1a3448; border: 1px solid rgba(184,149,42,0.25);
  border-radius: 6px; padding: 6px 12px; font-size: 11px; color: #9AACB4;
  white-space: nowrap; z-index: 10;
}
.vw-amc-item:hover .vw-amc-tip { display: block; }

@media (max-width: 781px) {
  .vw-reach-section { align-items: center; text-align: center; }
  .vw-reach-btn { justify-content: center; }
  .vw-reach-info { align-items: center; }
}

/* ══════════════════════════════════════════════════
   OVERFLOW PROTECTION
   Use clip on site-blocks wrapper only — never on body
   (overflow:hidden on body/html kills backdrop-filter on sticky)
══════════════════════════════════════════════════ */
.wp-site-blocks { overflow-x: clip; }
.wp-block-group.alignfull { max-width: 100%; }
@media (max-width: 781px) {
  .wp-site-blocks { overflow-x: clip; }
}

/* ══════════════════════════════════════════════════
   FOOTER — MOBILE ACCORDION
   Collapses non-brand footer columns into tap-to-expand
   sections. JS in functions.php adds .vw-accordion-open.
══════════════════════════════════════════════════ */
@media (max-width: 781px) {
  .vw-footer-cols .wp-block-column:not(.vw-col-brand) > *:not(.vw-col-head) {
    max-height: 0 !important;
    overflow: hidden !important;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.25s ease;
    pointer-events: none;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }
  .vw-footer-cols .wp-block-column:not(.vw-col-brand).vw-accordion-open > *:not(.vw-col-head) {
    max-height: 400px !important;
    opacity: 1;
    pointer-events: auto;
    margin-bottom: 6px !important;
  }
  .vw-footer-cols .wp-block-column:not(.vw-col-brand) .vw-col-head {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    margin-bottom: 0 !important;
    padding-bottom: 4px;
  }
  .vw-footer-cols .wp-block-column:not(.vw-col-brand) .vw-col-head::after {
    content: '+';
    font-size: 18px;
    font-weight: 300;
    color: #B8952A;
    font-family: 'Inter', sans-serif;
    flex-shrink: 0;
    margin-left: 8px;
    line-height: 1;
    transition: transform 0.25s ease;
    font-style: normal;
  }
  .vw-footer-cols .wp-block-column:not(.vw-col-brand).vw-accordion-open .vw-col-head::after {
    transform: rotate(45deg);
  }
}


