/*
 * Grants360 Footer — Stylesheet v1.0.0
 *
 * Palette derived from the Grants360.AI logo:
 *   navy (logo "T" disc)  #0d1b2b
 *   brand royal blue      #0057b2
 * Footer sits on a deeper navy than the logo disc so the disc and the
 * white/blue wordmark still read clearly on top of it.
 *
 * No webfont is loaded — system stack only, so a strict
 * Content-Security-Policy (style-src 'self') can never blank the type.
 * Icons are inline SVG (see inc/icons.php) for the same reason.
 */

#g360-footer {
  --t-navy:        #0d1b2b;               /* logo disc */
  --t-bg:          #070f1a;               /* footer base, one step deeper */
  --t-bg-2:        #0a1626;               /* subtle gradient partner */
  --t-blue:        #0057b2;               /* brand royal blue (buttons) */
  --t-blue-hover:  #0a66cc;
  --t-blue-bright: #3d8ff5;               /* link hovers / accents on navy */
  --t-text:        #a9b4c6;
  --t-text-dim:    #74809a;
  --t-white:       #ffffff;
  --t-border:      rgba(255,255,255,.09);
  --t-card:        rgba(255,255,255,.04);
  --t-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --t-ease: cubic-bezier(.22,.61,.36,1);

  background: linear-gradient(180deg, var(--t-bg-2) 0%, var(--t-bg) 55%);
  color: var(--t-text);
  font-family: var(--t-font);
  font-size: 15px;
  line-height: 1.6;
  border-top: 2px solid;
  border-image: linear-gradient(90deg, #ff7a3d, var(--t-blue-bright), var(--t-blue)) 1;
}
#g360-footer * { box-sizing: border-box; }
#g360-footer a { color: inherit; }
#g360-footer img { max-width: 100%; height: auto; }

.g360-shell { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ── Inline SVG icon base ──
   SVGs don't scale with font-size the way an icon-font glyph did, so
   the base rule sizes them at 1em (inherits ambient font-size) and
   specific spots override with explicit px. fill/stroke:currentColor
   inside the SVGs means color flows from the parent as normal. */
#g360-footer .tf-icon-svg { width: 1em; height: 1em; display: block; }

/* ═══ CTA hero band ═══ */
.g360-hero {
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px; flex-wrap: wrap;
  padding: 58px 0 8px;
}
.g360-hero-h {
  margin: 0 0 10px; color: var(--t-white);
  font-size: 34px; font-weight: 800; line-height: 1.22; letter-spacing: -.4px;
}
.g360-hero-h strong { color: var(--t-blue-bright); font-weight: 800; }
.g360-hero-sub { margin: 0; max-width: 520px; color: var(--t-text); font-size: 15.5px; }

.g360-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  color: #fff; background: var(--t-blue);
  border-radius: 8px; border: 0;
  text-decoration: none; white-space: nowrap;
  font-size: 15px; font-weight: 700; line-height: 1;
  padding: 15px 26px; cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,87,178,.35);
  transition: background .25s, transform .3s var(--t-ease), box-shadow .3s;
}
.g360-btn .tf-icon-svg { width: 13px; height: 13px; transition: transform .3s var(--t-ease); }
.g360-btn:hover {
  background: var(--t-blue-hover); color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0,87,178,.45);
}
.g360-btn:hover .tf-icon-svg { transform: translateX(3px); }

/* ═══ Ask-AI band ═══ */
.g360-ai { padding: 26px 0 6px; }
.g360-ai-h { margin: 0 0 14px; color: var(--t-text); font-size: 14.5px; font-weight: 600; }
.g360-ai-h strong { color: var(--t-white); }
.g360-ai-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* Brand-colored AI pills (v1.1.0).
   Each button carries its AI's brand identity: at rest a soft tint of
   the brand color (background + border) with the icon in the full
   brand color; on hover the pill fills with the brand color, lifts,
   and glows in the same hue. Brand is assigned per-button by PHP
   (g360f_ai_brand) as a g360-ai-btn--{brand} class, so admin-managed
   rows keep their colors automatically. Unknown buttons fall back to
   the Grants360 blue set on .g360-ai-btn itself. */
.g360-ai-btn {
  --ai:        #3d8ff5;                    /* brand color            */
  --ai-soft:   rgba(61,143,245,.12);       /* rest background tint   */
  --ai-border: rgba(61,143,245,.42);       /* rest border            */
  --ai-glow:   rgba(61,143,245,.42);       /* hover shadow           */
  --ai-ink:    #ffffff;                    /* hover text/icon color  */

  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ai-soft); color: #dfe7f4;
  border: 1px solid var(--ai-border); border-radius: 999px;
  padding: 9px 18px;
  font-size: 13.5px; font-weight: 600; text-decoration: none; line-height: 1;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1),
              box-shadow .25s, background .22s, color .22s, border-color .22s;
}
.g360-ai-btn .g360-ai-ic { color: var(--ai); transition: color .22s, transform .3s cubic-bezier(.34,1.56,.64,1); }
.g360-ai-btn:hover {
  background: var(--ai); color: var(--ai-ink);
  border-color: transparent;
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 26px var(--ai-glow);
}
.g360-ai-btn:hover .g360-ai-ic { color: var(--ai-ink); transform: rotate(-8deg) scale(1.15); }

/* ChatGPT — OpenAI green */
.g360-ai-btn--chatgpt {
  --ai: #10a37f; --ai-soft: rgba(16,163,127,.13);
  --ai-border: rgba(16,163,127,.45); --ai-glow: rgba(16,163,127,.45);
}
/* Claude — Anthropic coral */
.g360-ai-btn--claude {
  --ai: #d97757; --ai-soft: rgba(217,119,87,.14);
  --ai-border: rgba(217,119,87,.48); --ai-glow: rgba(217,119,87,.45);
}
/* Perplexity — turquoise */
.g360-ai-btn--perplexity {
  --ai: #22b3c4; --ai-soft: rgba(34,179,196,.13);
  --ai-border: rgba(34,179,196,.45); --ai-glow: rgba(34,179,196,.45);
}
/* Grok / X — monochrome: white-on-navy at rest, inverts to a white
   pill with black text on hover so it stays on-brand AND visible. */
.g360-ai-btn--grok {
  --ai: #ffffff; --ai-soft: rgba(255,255,255,.09);
  --ai-border: rgba(255,255,255,.38); --ai-glow: rgba(255,255,255,.30);
  --ai-ink: #0b1524;
}
/* Gemini — Google's blue→purple→coral gradient */
.g360-ai-btn--gemini {
  --ai: #9b72cb; --ai-soft: rgba(155,114,203,.14);
  --ai-border: rgba(155,114,203,.48); --ai-glow: rgba(155,114,203,.48);
}
.g360-ai-btn--gemini:hover {
  background: linear-gradient(90deg, #4285f4 0%, #9b72cb 50%, #d96570 100%);
}

.g360-ai-ic { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; }
.g360-ai-ic svg { width: 16px; height: 16px; }
.g360-ai-ic img { width: 17px; height: 17px; object-fit: contain; display: block; }
.g360-ai-ic .tf-icon-svg { width: 14px; height: 14px; } /* Grok uses fa-x-twitter, sized to match the marks */

.g360-rule {
  border: 0; border-top: 1px solid var(--t-border);
  margin: 30px 0 0;
}

/* ═══ Link columns ═══ */
.g360-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px 32px;
  padding: 44px 0 48px;
}
.g360-col-h {
  margin: 0 0 18px; color: var(--t-white);
  font-size: 16px; font-weight: 700; letter-spacing: .1px;
  position: relative; padding-bottom: 10px;
}
.g360-col-h::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 30px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--t-blue-bright), var(--t-blue));
}

.g360-links { list-style: none; margin: 0; padding: 0; }
.g360-links li { margin: 0 0 11px; }
.g360-links a {
  position: relative; display: inline-block;
  color: var(--t-text); text-decoration: none; font-size: 14.5px;
  transition: color .2s, padding-left .25s var(--t-ease);
}
.g360-links a::before {
  /* Pure-CSS chevron (border-drawn) — no icon font, no glyph codepoint,
     nothing a CSP can block. Revealed on hover. */
  content: "";
  position: absolute; left: 0; top: 50%;
  width: 6px; height: 6px;
  border-top: 2px solid var(--t-blue-bright);
  border-right: 2px solid var(--t-blue-bright);
  transform: translateY(-50%) rotate(45deg);
  opacity: 0; transition: opacity .2s;
}
.g360-links a:hover { color: var(--t-white); padding-left: 15px; }
.g360-links a:hover::before { opacity: 1; }

/* ── Certificate badge(s) ── */
.g360-certs { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.g360-cert {
  display: block; width: 118px;
  background: #fff; border-radius: 10px; padding: 6px;
  border: 1px solid var(--t-border);
  transition: transform .25s var(--t-ease), box-shadow .25s;
}
.g360-cert img { display: block; width: 100%; border-radius: 6px; }
a.g360-cert:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(0,0,0,.4); }

/* ── Contact column ── */
.g360-contact { list-style: none; margin: 0 0 22px; padding: 0; }
.g360-contact li { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 14px; }
.g360-contact-ic {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 34px; height: 34px; border-radius: 9px;
  background: rgba(61,143,245,.14); color: var(--t-blue-bright);
  margin-top: 1px;
}
.g360-contact-ic .tf-icon-svg { width: 14px; height: 14px; }
.g360-contact a, .g360-contact li > span:not(.g360-contact-ic) {
  color: var(--t-text); text-decoration: none; font-size: 14.5px; transition: color .2s;
}
.g360-contact a:hover { color: var(--t-white); }

/* ── Socials ── */
.g360-socials { display: flex; gap: 10px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.g360-socials a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  color: #fff; text-decoration: none;
  border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.05);
  transition: background .25s var(--t-ease), border-color .25s, transform .25s var(--t-ease);
}
.g360-socials a .tf-icon-svg { width: 14px; height: 14px; }
.g360-socials a:hover {
  background: var(--t-blue); border-color: var(--t-blue);
  transform: translateY(-3px);
}

/* ═══ Bottom bar ═══ */
.g360-bottom { border-top: 1px solid var(--t-border); background: rgba(0,0,0,.28); }
.g360-bottom-in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px;
}
.g360-brand img { display: block; width: 225px; max-width: 100%; height: auto; }
.g360-copy { margin: 0; font-size: 13px; color: var(--t-text-dim); }
.g360-copy a { color: inherit; text-decoration: none; transition: color .2s; }
.g360-copy a:hover { color: var(--t-white); }

/* ═══ Responsive ═══ */
@media (max-width: 1080px) {
  .g360-grid { grid-template-columns: repeat(2, 1fr); }
  .g360-hero-h { font-size: 29px; }
}
@media (max-width: 640px) {
  .g360-grid { grid-template-columns: 1fr; gap: 34px; }
  .g360-hero { padding-top: 44px; }
  .g360-hero-h { font-size: 25px; }
  .g360-btn { width: 100%; }
  .g360-bottom-in { flex-direction: column; align-items: flex-start; }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  #g360-footer *, #g360-footer *::before { transition: none !important; }
}

/* Keyboard focus */
#g360-footer a:focus-visible {
  outline: 2px solid var(--t-blue-bright);
  outline-offset: 3px;
  border-radius: 4px;
}
