/* ============================================
   RENEWABLE ENERGY ADVISORS — Global Styles
   Shared nav, footer, and utility classes
   ============================================ */

/* Google Fonts loaded per-page to avoid flash */

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
a { text-decoration: none; }

/* ── GLOBAL NAV ── */
.site-header {
  background: #1C3A2A;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.site-header .logo {
  font-family: 'Fraunces', serif;
  font-weight: 900;
  font-size: 1.1rem;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.site-header .logo .sun { color: #F5C842; }
.header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.header-nav a {
  font-family: 'Jost', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255,255,255,0.62);
  padding: 6px 10px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.header-nav a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.header-nav a.active { color: #fff; background: rgba(255,255,255,0.12); }

/* Hamburger for mobile */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.25s;
}
.mobile-nav {
  display: none;
  background: #142c1f;
  padding: 16px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mobile-nav a {
  display: block;
  font-family: 'Jost', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover { color: #fff; }
.mobile-nav.open { display: block; }

@media (max-width: 820px) {
  .header-nav { display: none; }
  .nav-toggle { display: flex; }
}

/* ── GLOBAL FOOTER ── */
.site-footer {
  background: #0e1e15;
}
.footer-top {
  max-width: 1060px;
  margin: 0 auto;
  padding: 52px 28px 36px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}
@media(max-width:860px){ .footer-top { grid-template-columns: 1fr 1fr; } }
@media(max-width:520px){ .footer-top { grid-template-columns: 1fr; } }

.footer-brand .logo {
  font-family: 'Fraunces', serif;
  font-weight: 900;
  font-size: 1.05rem;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}
.footer-brand .logo .sun { color: #F5C842; }
.footer-brand p {
  font-family: 'Jost', sans-serif;
  font-size: 0.84rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.7;
  margin-bottom: 16px;
}
.footer-badge {
  display: inline-block;
  background: rgba(74,140,92,0.2);
  border: 1px solid rgba(74,140,92,0.4);
  color: #8FBF9A;
  font-family: 'Jost', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 99px;
}

.footer-col h4 {
  font-family: 'Jost', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 14px;
}
.footer-col a {
  display: block;
  font-family: 'Jost', sans-serif;
  font-size: 0.86rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 9px;
  transition: color 0.2s;
}
.footer-col a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 18px 28px;
  max-width: 1060px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-bottom p {
  font-family: 'Jost', sans-serif;
  font-size: 0.76rem;
  color: rgba(255,255,255,0.28);
}
.footer-bottom a { color: rgba(255,255,255,0.4); }
.footer-bottom a:hover { color: rgba(255,255,255,0.7); }

/* ── UTILITY ── */
.container { max-width: 860px; margin: 0 auto; padding: 0 20px; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }

/* ── BACK TO TOP ── */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 42px;
  height: 42px;
  background: #1C3A2A;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: #2D5E40; }
