/*
Theme Name: Impact UnitedWay
Theme URI: https://impactforcontinuity.com/
Author: Antigravity
Author URI: https://impactforcontinuity.com/
Description: Conversion-focused, accessible, modern theme for Impact for Continuity built on the United Way Worldwide design system.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: impact-unitedway
*/

@import url('https://fonts.googleapis.com/css2?family=Antonio:wght@400;600;700&family=Palanquin:wght@400;500;600;700&display=swap');

:root {
  /* Brand Tokens */
  --color-blue-650: #0036B1;
  --color-blue-600: #003ECC;
  --color-blue-500: #004EFF;
  --color-blue-400: #3371FF;
  --color-blue-300: #6694FF;
  --color-red-700: #841515;
  --color-red-600: #B01C1C;
  --color-red-550: #C61F1F;
  --color-red-500: #DC2323;
  --color-red-400: #E34F4F;
  --color-red-300: #EA7B7B;
  --color-sunglow: #FFD23F;
  --color-sunglow-shaded: #977405;
  --color-lightninggreen: #26A769;
  --color-gray-800: #22252A;
  --color-gray-700: #55565B;
  --color-gray-600: #75767B;
  --color-gray-500: #919297;
  --color-gray-400: #ADAEB3;
  --color-divider: #E2E6EE;
  --color-surface: #F8F9FC;
  --color-surface-subtle: #EDF1F7;
  --color-white: #FFFFFF;

  /* Typography */
  --font-heading: 'Antonio', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Palanquin', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 48px;
  --space-9: 64px;
  --space-10: 80px;

  /* Shapes */
  --radius-sm: 40px;
  --radius-md: 100%;
  --radius-card: 16px;
  --radius-badge: 20px;

  /* Elevation */
  --shadow-sm: 0 2px 8px rgba(0, 54, 177, 0.06);
  --shadow-md: 0 10px 30px rgba(0, 54, 177, 0.10);
  --shadow-card: 0 4px 20px rgba(34, 37, 42, 0.06);
  --shadow-hover: 0 12px 36px rgba(0, 54, 177, 0.14);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-gray-800);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.25s ease;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.15;
  color: var(--color-blue-650);
}

h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 700; }
h2 { font-size: clamp(28px, 3.8vw, 42px); font-weight: 700; margin-bottom: 16px; }
h3 { font-size: 24px; font-weight: 600; margin-bottom: 12px; }
h4 { font-size: 20px; font-weight: 600; }
h5 { font-size: 18px; font-weight: 600; }

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 54, 177, 0.08);
  color: var(--color-blue-650);
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.section-tag.tag-accent {
  background: rgba(176, 28, 28, 0.1);
  color: var(--color-red-600);
}

.section-tag.tag-green {
  background: rgba(38, 167, 105, 0.12);
  color: var(--color-lightninggreen);
}

.section-subtitle {
  font-size: 18px;
  color: var(--color-gray-700);
  max-width: 720px;
  margin-bottom: 40px;
}

/* Button System (Token driven) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

.btn-primary {
  background: var(--color-red-600);
  color: var(--color-white);
  box-shadow: 0 4px 14px rgba(176, 28, 28, 0.3);
}

.btn-primary:hover {
  background: var(--color-red-700);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(176, 28, 28, 0.4);
}

.btn-blue {
  background: var(--color-blue-650);
  color: var(--color-white);
  box-shadow: 0 4px 14px rgba(0, 54, 177, 0.25);
}

.btn-blue:hover {
  background: var(--color-blue-600);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 54, 177, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--color-blue-650);
  border: 1.5px solid var(--color-blue-650);
}

.btn-outline:hover {
  background: var(--color-blue-650);
  color: var(--color-white);
  transform: translateY(-2px);
}

.btn-gold {
  background: var(--color-sunglow);
  color: var(--color-gray-800);
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(255, 210, 63, 0.35);
}

.btn-gold:hover {
  background: #f0c32f;
  transform: translateY(-2px);
}

/* Top Notification Bar */
.top-bar {
  background: var(--color-blue-650);
  color: var(--color-white);
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-bar-badge {
  background: var(--color-sunglow);
  color: var(--color-gray-800);
  padding: 2px 10px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.top-bar-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.9);
}

.top-bar-link:hover {
  color: var(--color-sunglow);
}

/* Header & Navigation */
.site-header {
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.header-logo {
  display: flex;
  align-items: center;
  max-height: 60px;
}

.site-header .custom-logo,
.custom-logo-link img,
.custom-logo-link,
.header-logo img,
.header-logo .custom-logo {
  max-height: 52px !important;
  height: 52px !important;
  width: auto !important;
  object-fit: contain !important;
  display: block !important;
}

.custom-logo-link {
  display: flex !important;
  align-items: center !important;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.header-nav a {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-gray-800);
  position: relative;
  padding: 8px 0;
}

.header-nav a:hover,
.header-nav a.active {
  color: var(--color-blue-650);
}

.header-nav a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-red-600);
  border-radius: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Hero Section */
.hero-section {
  position: relative;
  background: linear-gradient(135deg, #002B8C 0%, #0036B1 60%, #0045DC 100%);
  color: var(--color-white);
  padding: 80px 0 90px;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(255, 210, 63, 0.15) 0%, rgba(0, 54, 177, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
}

.hero-content h1 {
  color: var(--color-white);
  margin-bottom: 20px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.hero-content h1 span {
  color: var(--color-sunglow);
}

.hero-lead {
  font-size: 18px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 32px;
  max-width: 580px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-visual-card {
  position: relative;
  background: rgba(255, 255, 255, 0.1);
  padding: 12px;
  border-radius: 24px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px rgba(0, 20, 80, 0.3);
}

.hero-visual-card img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: 16px;
}

.hero-floating-stat {
  position: absolute;
  bottom: -20px;
  left: -20px;
  background: var(--color-white);
  color: var(--color-gray-800);
  padding: 16px 24px;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(38, 167, 105, 0.15);
  color: var(--color-lightninggreen);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon svg {
  width: 24px;
  height: 24px;
}

.stat-info .stat-val {
  font-family: var(--font-heading);
  font-size: 26px;
  color: var(--color-blue-650);
  line-height: 1;
}

.stat-info .stat-lbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-gray-600);
  text-transform: uppercase;
}

/* Metrics Bar */
.metrics-bar {
  background: var(--color-white);
  padding: 40px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  position: relative;
  z-index: 10;
  margin-top: -30px;
  border-radius: 20px;
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid var(--color-divider);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
  gap: 20px;
}

.metric-item {
  padding: 0 20px;
  border-right: 1px solid var(--color-divider);
}

.metric-item:last-child {
  border-right: none;
}

.metric-number {
  font-family: var(--font-heading);
  font-size: 44px;
  color: var(--color-red-600);
  line-height: 1;
  margin-bottom: 6px;
}

.metric-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-gray-700);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Commitment & Mission Section */
.commitment-section {
  padding: 90px 0;
  background: var(--color-surface);
}

.commitment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 56px;
}

.commitment-img-wrap {
  position: relative;
}

.commitment-img-wrap img {
  width: 100%;
  height: 440px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: var(--shadow-card);
}

.commitment-badge {
  position: absolute;
  top: 24px;
  left: 24px;
  background: var(--color-red-600);
  color: var(--color-white);
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(176, 28, 28, 0.35);
}

.pillars-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 32px;
}

.pillar-card {
  background: var(--color-white);
  padding: 24px;
  border-radius: 14px;
  border: 1px solid var(--color-divider);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease;
}

.pillar-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-blue-650);
}

.pillar-card h4 {
  color: var(--color-blue-650);
  margin-bottom: 8px;
  font-size: 18px;
}

.pillar-card p {
  font-size: 14px;
  color: var(--color-gray-700);
  line-height: 1.5;
}

/* Partners Section */
.partners-section {
  padding: 60px 0;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-divider);
  text-align: center;
}

.partners-section h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-gray-600);
  margin-bottom: 30px;
  letter-spacing: 1.5px;
}

.partners-row {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 36px;
}

.partner-logo-item {
  background: var(--color-white);
  border: 1px solid var(--color-divider);
  padding: 14px 24px;
  border-radius: 12px;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.partner-logo-item:hover {
  transform: translateY(-3px);
  border-color: var(--color-blue-650);
  box-shadow: var(--shadow-hover);
}

.partner-logo-item img {
  height: 56px;
  width: auto;
  object-fit: contain;
}

/* Core Services Section */
.services-section {
  padding: 90px 0;
  background: var(--color-white);
}

.services-header {
  text-align: center;
  max-width: 740px;
  margin: 0 auto 50px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-card);
  padding: 32px 24px;
  text-align: left;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  background: var(--color-white);
  transform: translateY(-6px);
  border-color: var(--color-blue-650);
  box-shadow: var(--shadow-hover);
}

.service-icon-box {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(0, 54, 177, 0.08);
  color: var(--color-blue-650);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.service-icon-box svg {
  width: 28px;
  height: 28px;
}

.service-card:hover .service-icon-box {
  background: var(--color-blue-650);
  color: var(--color-white);
}

.service-card h4 {
  margin-bottom: 12px;
  font-size: 20px;
}

.service-card p {
  font-size: 14px;
  color: var(--color-gray-700);
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 14px;
  color: var(--color-blue-650);
}

.service-link:hover {
  color: var(--color-red-600);
  gap: 10px;
}

/* Initiatives Section */
.initiatives-section {
  padding: 90px 0;
  background: var(--color-surface);
}

.initiatives-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 48px;
  flex-wrap: wrap;
  gap: 20px;
}

.initiatives-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.initiative-card {
  background: var(--color-white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-divider);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.initiative-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--color-blue-650);
}

.initiative-thumb {
  position: relative;
  height: 260px;
  overflow: hidden;
}

.initiative-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.initiative-card:hover .initiative-thumb img {
  transform: scale(1.05);
}

.initiative-category-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  background: var(--color-blue-650);
  color: var(--color-white);
  padding: 4px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.initiative-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.initiative-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.initiative-tag {
  background: rgba(0, 54, 177, 0.06);
  color: var(--color-blue-650);
  padding: 3px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
}

.initiative-body h3 {
  color: var(--color-gray-800);
  margin-bottom: 10px;
}

.initiative-body p {
  color: var(--color-gray-700);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 24px;
  flex-grow: 1;
}

.initiative-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--color-divider);
  padding-top: 18px;
}

/* Call to Action Banner */
.cta-banner {
  background: linear-gradient(135deg, #841515 0%, #B01C1C 60%, #DC2323 100%);
  color: var(--color-white);
  padding: 70px 0;
  text-align: center;
}

.cta-banner h2 {
  color: var(--color-white);
  font-size: 38px;
  margin-bottom: 16px;
}

.cta-banner p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
  max-width: 680px;
  margin: 0 auto 32px;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Contact & Map Section */
.contact-section {
  padding: 90px 0;
  background: var(--color-white);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 30px 0;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--color-surface);
  padding: 16px 20px;
  border-radius: 14px;
  border: 1px solid var(--color-divider);
}

.contact-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 54, 177, 0.1);
  color: var(--color-blue-650);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon svg {
  width: 20px;
  height: 20px;
}

.contact-details .label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-gray-600);
}

.contact-details .val {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-gray-800);
}

.contact-socials {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.social-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  color: var(--color-blue-650);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.social-icon-btn:hover {
  background: var(--color-blue-650);
  color: var(--color-white);
  transform: translateY(-2px);
}

.social-icon-btn svg {
  width: 18px;
  height: 18px;
}

.map-wrapper {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-divider);
  height: 440px;
}

.map-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Footer */
.site-footer {
  background: #001C5E;
  color: var(--color-white);
  padding: 70px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
}

.footer-brand img {
  max-height: 52px;
  max-width: 180px;
  width: auto;
  margin-bottom: 18px;
  background: #ffffff;
  padding: 6px 12px;
  border-radius: 8px;
  display: inline-block;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  line-height: 1.6;
  max-width: 320px;
}

.footer-col h4 {
  color: var(--color-sunglow);
  font-size: 18px;
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--color-white);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  flex-wrap: wrap;
  gap: 12px;
}

/* Subpage Clean Styling */
.page-hero {
  background: var(--color-blue-650);
  color: var(--color-white);
  padding: 60px 0;
  text-align: center;
}

.page-hero h1 {
  color: var(--color-white);
}

.page-content-wrap {
  padding: 60px 0;
  min-height: 400px;
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
  .hero-grid,
  .commitment-grid,
  .initiatives-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
  .metric-item:nth-child(2) {
    border-right: none;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .header-nav {
    display: none;
  }
}

@media (max-width: 600px) {
  .services-grid,
  .pillars-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  .metric-item {
    border-right: none;
    border-bottom: 1px solid var(--color-divider);
    padding-bottom: 20px;
  }
  .metric-item:last-child {
    border-bottom: none;
  }
}
