/* ============================================================
   Barragan Financial Services — Shared Stylesheet
   style.css · /assets/css/style.css
   ============================================================ */

/* ── GLOBAL RESET & VARIABLES ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --navy:        #1a2e4a;
  --navy-dark:   #0f1e30;
  --navy-mid:    #1e3a5f;
  --green:       #5cb85c;
  --green-dark:  #449d44;
  --green-light: #6fce6f;
  --white:       #ffffff;
  --off-white:   #f7f9fc;
  --light-gray:  #eef1f6;
  --mid-gray:    #6c7a8d;
  --text:        #2d3748;
  --text-light:  #718096;
  --border:      #dde3ec;
}
html  { scroll-behavior: smooth; }
body  { font-family: 'Open Sans', sans-serif; color: var(--text); line-height: 1.6; overflow-x: hidden; font-size: 15px; }
a     { text-decoration: none; }

/* ── NAV ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 0 2.5rem; height: 68px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.nav-logo { font-family: 'Montserrat', sans-serif; font-size: 1.2rem; font-weight: 800; color: var(--navy); letter-spacing: -0.01em; text-decoration: none; }
.nav-logo span { color: var(--green); }
.nav-links { display: flex; align-items: center; gap: 1.75rem; list-style: none; }
.nav-links > li > a { font-size: 0.82rem; font-weight: 600; color: var(--text); letter-spacing: 0.02em; transition: color 0.2s; }
.nav-links > li > a:hover,
.nav-links > li > a.active { color: var(--green); }

/* ── DESKTOP DROPDOWN ── */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  cursor: pointer; display: flex; align-items: center; gap: 0.3rem;
  font-size: 0.82rem; font-weight: 600; color: var(--text);
  transition: color 0.2s; user-select: none;
}
.nav-dropdown-toggle:hover { color: var(--green); }
.nav-dropdown-toggle svg {
  width: 10px; height: 10px; stroke: currentColor; fill: none;
  stroke-width: 2.5; transition: transform 0.2s;
}
/* Dropdown menu — margin-top removed; padding-top creates the visual gap
   while keeping the hover zone unbroken so the menu doesn't close mid-travel. */
.nav-dropdown-menu {
  display: none;
  position: absolute; top: 100%; left: 0;
  background: var(--white); border: 1px solid var(--border);
  border-radius: 4px; min-width: 220px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  padding: 0.75rem 0 0.5rem;   /* top padding replaces margin-top */
  margin-top: 0;
  z-index: 300;
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown:hover .nav-dropdown-toggle svg { transform: rotate(180deg); }
.nav-dropdown-menu a {
  display: block; padding: 0.6rem 1.25rem;
  font-size: 0.8rem; font-weight: 600; color: var(--text);
  transition: all 0.15s; border-left: 2px solid transparent;
}
.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active { color: var(--green); border-left-color: var(--green); background: var(--off-white); }

/* CTA button in nav */
.nav-cta {
  background: var(--green) !important; color: var(--white) !important;
  font-size: 0.78rem !important; font-weight: 700 !important;
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.6rem 1.4rem; border-radius: 3px; transition: background 0.2s !important;
}
.nav-cta:hover { background: var(--green-dark) !important; color: var(--white) !important; }

/* ── MOBILE HAMBURGER ── */
.nav-hamburger {
  display: none; flex-direction: column; justify-content: center;
  gap: 5px; width: 36px; height: 36px;
  cursor: pointer; background: none; border: none; padding: 4px; z-index: 300;
}
.nav-hamburger span {
  display: block; height: 2px; background: var(--navy);
  border-radius: 2px; transition: all 0.25s ease; transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(15,30,48,0.6); z-index: 150; backdrop-filter: blur(2px);
}
.nav-mobile-overlay.open { display: block; }

.nav-mobile-menu {
  display: none; position: fixed; top: 68px; left: 0; right: 0;
  background: var(--white); border-bottom: 1px solid var(--border);
  z-index: 200; padding: 0.5rem 0 1rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.nav-mobile-menu.open { display: block; }
.nav-mobile-section-label {
  display: block; padding: 0.75rem 1.5rem 0.3rem;
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-light);
}
.nav-mobile-menu a {
  display: block; padding: 0.65rem 1.5rem;
  font-size: 0.88rem; font-weight: 600; color: var(--text);
  transition: color 0.15s, background 0.15s; border-left: 3px solid transparent;
}
.nav-mobile-menu a:hover,
.nav-mobile-menu a.active { color: var(--green); background: var(--off-white); border-left-color: var(--green); }
.nav-mobile-divider { height: 1px; background: var(--border); margin: 0.5rem 1.5rem; }
.nav-mobile-cta-wrap { padding: 0.75rem 1.5rem 0.25rem; }
.nav-mobile-cta {
  display: block; text-align: center;
  background: var(--green); color: var(--white) !important;
  font-family: 'Montserrat', sans-serif; font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.9rem 1.5rem; border-radius: 3px; transition: background 0.2s;
}
.nav-mobile-cta:hover { background: var(--green-dark) !important; }

/* ── SHARED BUTTONS ── */
.btn-green {
  background: var(--green); color: var(--white);
  font-family: 'Montserrat', sans-serif; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.85rem 2rem; border-radius: 3px;
  display: inline-block; transition: background 0.2s, transform 0.15s;
  border: none; cursor: pointer;
}
.btn-green:hover { background: var(--green-dark); transform: translateY(-1px); color: var(--white); }
.btn-outline-white {
  background: transparent; color: rgba(255,255,255,0.8);
  font-family: 'Montserrat', sans-serif; font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.85rem 2rem; border-radius: 3px;
  border: 1.5px solid rgba(255,255,255,0.3);
  display: inline-block; transition: all 0.2s;
}
.btn-outline-white:hover { border-color: var(--green); color: var(--green); }

/* ── PAGE HERO (inner pages) ── */
.page-hero {
  background: var(--navy); padding: 7.5rem 2.5rem 4rem;
  position: relative; overflow: hidden;
}
.page-hero::after {
  content: ''; position: absolute; right: -80px; top: -80px;
  width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(92,184,92,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero-inner { max-width: 1100px; margin: 0 auto; width: 100%; }
/* Constrain direct children too so the fix works even without the wrapper div */
.page-hero > .page-hero-eyebrow,
.page-hero > h1,
.page-hero > .page-hero-sub {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  display: block;
}
.page-hero > h1 { max-width: 760px; }
.page-hero-eyebrow {
  display: inline-block;
  background: rgba(92,184,92,0.15); border: 1px solid rgba(92,184,92,0.3);
  color: var(--green-light); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.4rem 1rem; border-radius: 2px; margin-bottom: 1.25rem;
}
.page-hero h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.75rem, 3.5vw, 2.75rem); font-weight: 800;
  color: var(--white); line-height: 1.2; margin-bottom: 1rem; max-width: 760px;
}
.page-hero-sub {
  font-size: 0.95rem; color: rgba(255,255,255,0.6);
  max-width: 580px; line-height: 1.8; font-weight: 300;
}

/* ── PAGE CONTENT LAYOUT (with sidebar) ── */
.page-content {
  max-width: 1100px; margin: 0 auto; padding: 4rem 2.5rem 5rem;
  display: grid; grid-template-columns: 1fr 300px; gap: 4rem; align-items: start;
}
.content-body h2 {
  font-family: 'Montserrat', sans-serif; font-size: 1.35rem; font-weight: 800;
  color: var(--navy); margin: 2.5rem 0 0.75rem; line-height: 1.3;
  padding-top: 1.5rem; border-top: 1px solid var(--border);
}
.content-body h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.content-body p { font-size: 0.92rem; color: var(--text-light); line-height: 1.85; margin-bottom: 1.1rem; }
.content-body ul, .content-body ol { margin: 0.5rem 0 1.25rem 1.4rem; }
.content-body li { font-size: 0.9rem; color: var(--text-light); line-height: 1.75; margin-bottom: 0.5rem; }
.content-body strong { color: var(--text); font-weight: 600; }
.content-body blockquote {
  background: var(--off-white); border-left: 3px solid var(--green);
  padding: 1.25rem 1.5rem; margin: 1.5rem 0; border-radius: 0 4px 4px 0;
}
.content-body blockquote p { font-size: 0.85rem; color: var(--text-light); line-height: 1.75; margin-bottom: 0; }
.content-body blockquote strong { color: var(--navy); display: block; margin-bottom: 0.5rem; }
.cite-source { display: block; font-size: 0.75rem; color: #a0aec0; margin-top: 0.75rem; font-style: italic; }
.content-body table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: 0.85rem; }
.content-body th {
  background: var(--navy); color: var(--white); padding: 0.75rem 1rem;
  text-align: left; font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em;
}
.content-body td { padding: 0.7rem 1rem; border-bottom: 1px solid var(--border); color: var(--text); }
.content-body tr:last-child td { border-bottom: none; }
.content-body tr:nth-child(even) td { background: var(--off-white); }
.content-body figure { margin: 1.5rem 0; border-radius: 6px; overflow: hidden; }
.content-body figure img { width: 100%; height: 260px; object-fit: cover; display: block; }
.content-body a { color: var(--green); }
.content-sidebar { position: sticky; top: 90px; }
.sidebar-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 6px; padding: 1.75rem; margin-bottom: 1.5rem;
}
.sidebar-card-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--green); margin-bottom: 0.75rem; }
.sidebar-card h3 { font-family: 'Montserrat', sans-serif; font-size: 1rem; font-weight: 800; color: var(--navy); margin-bottom: 0.6rem; line-height: 1.3; }
.sidebar-card p { font-size: 0.82rem; color: var(--text-light); line-height: 1.7; margin-bottom: 1rem; }
.sidebar-services { list-style: none; }
.sidebar-services li { border-bottom: 1px solid var(--border); }
.sidebar-services li:last-child { border-bottom: none; }
.sidebar-services a { display: flex; justify-content: space-between; align-items: center; padding: 0.7rem 0; font-size: 0.82rem; font-weight: 600; color: var(--text); transition: color 0.2s; }
.sidebar-services a:hover,
.sidebar-services a.active { color: var(--green); }
.sidebar-services a svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2.5; opacity: 0.5; }
.guarantee-card { background: var(--navy); border-radius: 6px; padding: 1.75rem; margin-bottom: 1.5rem; }
.guarantee-card p { font-size: 0.82rem; color: rgba(255,255,255,0.55); line-height: 1.7; margin-bottom: 1rem; }
.guarantee-num { font-family: 'Montserrat', sans-serif; font-size: 2.5rem; font-weight: 800; color: var(--green); line-height: 1; }
.guarantee-label { font-size: 0.72rem; font-weight: 700; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.75rem; }

/* ── FOOTER ── */
footer { background: var(--navy-dark); padding: 2rem 2.5rem; }
.footer-inner { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-logo { font-family: 'Montserrat', sans-serif; font-size: 1rem; font-weight: 800; color: var(--white); text-decoration: none; }
.footer-logo span { color: var(--green); }
.footer-links { display: flex; gap: 1.5rem; list-style: none; flex-wrap: wrap; }
.footer-links a { font-size: 0.75rem; color: rgba(255,255,255,0.4); transition: color 0.2s; }
.footer-links a:hover { color: var(--green); }
.footer-copy { font-size: 0.72rem; color: rgba(255,255,255,0.25); }
.footer-sister { font-size: 0.72rem; color: rgba(255,255,255,0.3); }
.footer-sister a { color: var(--green); }

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .nav { padding: 0 1.25rem; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  body.menu-open { overflow: hidden; }
  .page-hero { padding: 6rem 1.25rem 2.5rem; }
  .page-content { grid-template-columns: 1fr; padding: 3rem 1.25rem 4rem; }
  .content-sidebar { position: static; }
}
@media (max-width: 600px) {
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}