/* FGCC shared frame (header, nav, footer) — built once, step B4.
   Source: _t35_chrome.json (runtime authority) + Canonical Footer Spec v3.
   Token aliases map the wireframe-era names onto theme.json presets. */

:root {
  --blue-primary: var(--wp--preset--color--blue-primary, #0077B3);
  --green-primary: var(--wp--preset--color--green-primary, #78BE20);
  --teal-primary: var(--wp--preset--color--teal-primary, #00A87E);
  --teal-accessible: var(--wp--preset--color--teal-accessible, #007A5E);
  --teal-bg: var(--wp--preset--color--teal-bg, #E5F5F0);
  --cream: var(--wp--preset--color--cream, #FEF7E8);
  --gray-light: var(--wp--preset--color--gray-light, #F5F5F5);
  --white: var(--wp--preset--color--white, #FFFFFF);
  --text-dark: var(--wp--preset--color--text-dark, #1A1A1A);
    --blue-accessible: var(--wp--preset--color--blue-accessible, #00689E);
    --teal-section: var(--wp--preset--color--teal-section, #008767);
    --gold-primary: var(--wp--preset--color--gold-primary, #FFB81C);
    --gold-light: var(--wp--preset--color--gold-light, #FFD060);
    --gold: var(--gold-primary);
    --blue-bg: var(--wp--preset--color--blue-bg, #E5F2F8);
    --gray-border: var(--wp--preset--color--gray-border, #DDDDDD);
    --focus-ring: 0 0 0 3px rgba(0, 119, 179, 0.4);
    --text-muted: #5A5A5A;
    --rule: #e6e6e6;
  --font-headline: 'Barlow', sans-serif;
  --font-body: 'Bricolage Grotesque', sans-serif;
}

/* ---------- Header ---------- */
.fgcc-header { background: var(--white); padding: 15px 25px 20px; position: relative; z-index: 100; line-height: 1.6; }
.fgcc-header::after { content: ''; position: absolute; bottom: -8px; left: 0; right: 0; height: 8px;
  background: linear-gradient(to right, var(--green-primary), var(--blue-primary)); }
.fgcc-header img { display: block; }
.header-inner { max-width: 1200px; margin: 0 auto; width: 100%; display: flex; justify-content: space-between; align-items: center; }
.logo img { height: 65px; width: auto; }

.nav { display: flex; align-items: center; gap: 8px; }
.nav-item { position: relative; }
.nav-link { display: flex; align-items: center; gap: 5px; padding: 10px 18px; font-family: var(--font-headline);
  font-weight: 600; font-size: 17px; color: var(--blue-primary); text-decoration: none; text-transform: uppercase;
  letter-spacing: 0.5px; transition: color 0.2s; cursor: pointer; }
.nav-link:hover, .nav-link:focus-visible { color: var(--teal-primary); }
.nav-link .arrow { font-size: 10px; transition: transform 0.2s; }
.nav-item:hover .nav-link .arrow, .nav-item:focus-within .nav-link .arrow, .nav-item.open .nav-link .arrow { transform: rotate(180deg); }

.dropdown { position: absolute; top: 100%; left: 0; min-width: 240px; background: var(--white);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12); border-top: 3px solid var(--teal-primary);
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: all 0.25s ease; z-index: 200; }
.nav-item:hover .dropdown, .nav-item:focus-within .dropdown, .nav-item.open .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item { display: block; padding: 14px 20px; font-family: var(--font-headline); font-weight: 500;
  font-size: 14px; color: var(--text-dark); text-decoration: none; border-bottom: 1px solid #f0f0f0; transition: all 0.2s; }
.dropdown-item:hover, .dropdown-item:focus-visible { background: var(--teal-bg); color: var(--teal-primary); padding-left: 25px; }
.dropdown-item:last-child { border-bottom: none; }
.dropdown-item.view-all { background: var(--gray-light); color: var(--teal-primary); font-weight: 600;
  text-transform: uppercase; font-size: 12px; letter-spacing: 0.5px; }
.dropdown-item.view-all:hover { background: var(--teal-primary); color: var(--white); }

.nav-btn { background: var(--blue-primary); color: var(--white); padding: 10px 22px; margin-left: 10px;
  font-family: var(--font-headline); font-weight: 700; font-size: 14px; text-decoration: none;
  text-transform: uppercase; letter-spacing: 1px; border: none; border-radius: 4px; cursor: pointer; transition: background 0.2s; }
.nav-btn:hover, .nav-btn:focus-visible { background: var(--teal-primary); }

/* ---------- Hamburger + mobile nav ---------- */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 10px; z-index: 1001;
  background: none; border: none; }
.hamburger span { display: block; width: 25px; height: 3px; background: var(--blue-primary); transition: all 0.3s; }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

.mobile-nav { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: var(--white);
  z-index: 1000; padding: 90px 25px 30px; overflow-y: auto; }
.mobile-nav.active { display: block; }
.mobile-nav-section { border-bottom: 1px solid #eee; }
.mobile-nav-header { display: flex; justify-content: space-between; align-items: center; padding: 18px 0;
  font-family: var(--font-headline); font-weight: 600; font-size: 18px; color: var(--blue-primary);
  text-transform: uppercase; cursor: pointer; width: 100%; background: none; border: none; text-align: left; }
.mobile-nav-header .toggle { font-size: 20px; color: var(--teal-primary); transition: transform 0.3s; }
.mobile-nav-section.open .mobile-nav-header .toggle { transform: rotate(45deg); }
.mobile-nav-items { display: none; padding: 0 0 15px 15px; }
.mobile-nav-section.open .mobile-nav-items { display: block; }
.mobile-nav-items a { display: block; padding: 10px 0; font-family: var(--font-body); font-weight: 400;
  font-size: 16px; color: #666; border-bottom: 1px solid #f5f5f5; text-decoration: none; }
.mobile-nav-items a:hover { color: var(--teal-primary); }
.mobile-nav-simple { display: block; padding: 18px 0; font-family: var(--font-headline); font-weight: 600;
  font-size: 18px; color: var(--blue-primary); text-transform: uppercase; border-bottom: 1px solid #eee; text-decoration: none; }
.mobile-nav .nav-btn { display: block; width: 100%; margin: 25px 0 0 0; text-align: center; padding: 18px; font-size: 16px; }

/* ---------- Footer ---------- */
.fgcc-footer { background: var(--cream); padding: 45px 25px 35px; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: auto 1fr 1fr;
  gap: 60px; align-items: start; }
.footer-logo img { height: 80px; width: auto; }
.footer-contact h3, .footer-social h3 { font-family: var(--font-headline); font-weight: 700; font-size: 14px;
  color: var(--blue-primary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }
.footer-contact p { font-family: var(--font-body); font-weight: 400; font-size: 14px; color: var(--blue-primary); line-height: 1.6; }
.footer-contact a { color: var(--teal-accessible); text-decoration: none; }
.footer-contact a:hover { color: var(--green-primary); }
.social-icons { display: flex; gap: 12px; }
.social-icon { width: 34px; height: 34px; background: var(--teal-accessible); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: var(--white); transition: background 0.2s; }
.social-icon:hover, .social-icon:focus-visible { background: var(--blue-primary); }
.social-icon svg { display: block; }
.social-icons a:nth-child(3) svg { transform: translateY(-2px); }
.footer-legal { max-width: 1200px; margin: 35px auto 0; padding-top: 25px; border-top: 1px solid rgba(0,119,179,0.2);
  font-family: var(--font-body); font-size: 13px; color: var(--teal-accessible); }

/* ---------- Breakpoints (Typography Reference v7) ---------- */
@media (max-width: 1023px) {
  .nav { display: none; }
  .hamburger { display: flex; }
  .logo img { height: 50px; }
  .fgcc-footer { padding: 45px 25px; }
  .footer-inner { grid-template-columns: 1fr; gap: 35px; }
}
@media (max-width: 767px) {
  .fgcc-header { padding: 12px 20px 16px; }
  .fgcc-footer { padding: 35px 20px 25px; }
  .footer-inner { grid-template-columns: 1fr; gap: 30px; }
}

/* U3-close 2026-07-10: theme-level skip link (WCAG 2.4.1 bypass block).
   Wireframe .skip-link canon, restored at the frame layer; target is
   the theme main landmark id="main-content" (templates/index.html). */
.skip-link { position: absolute; top: -9999px; left: -9999px;
  background: var(--blue-primary); color: var(--white);
  padding: 10px 20px; font-family: var(--font-headline);
  font-weight: 600; z-index: 10000; text-decoration: none; }
.skip-link:focus { top: 10px; left: 10px; }

/* U3-close 2026-07-16 (MXCC letter BT-A, supersedes the 07-10 square
   icon): back-to-top as a teal text pill - same vocabulary as the P&S
   in-page "BACK TO TOP" links, teal so it never reads as a DONATE
   button. Injected by assets/js/backtotop.js on every page; appears
   after two screens of scroll; the script raises it as the footer
   scrolls into view so it docks just above the footer, never over it.
   4px radius per the buttons convention; teal-accessible keeps the
   white 13px text at 4.5:1 or better (AA). */
.fgcc-back-to-top { position: fixed; right: 22px; bottom: 22px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 4px; border: 0;
  background: var(--teal-accessible); color: var(--white);
  font-family: var(--font-headline); font-weight: 700; font-size: 13px;
  letter-spacing: 1px; text-transform: uppercase; line-height: 1;
  cursor: pointer; opacity: 0; visibility: hidden;
  transform: translateY(8px); z-index: 900;
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
  transition: opacity .2s, transform .2s, visibility .2s; }
.fgcc-back-to-top.show { opacity: 1; visibility: visible; transform: none; }
.fgcc-back-to-top:hover { background: var(--blue-primary); }
.fgcc-back-to-top:focus-visible { outline: 3px solid var(--gold);
  outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .fgcc-back-to-top { transition: none; }
}
