/* Polo Care Foundation - shared density + typography */
:root {
  --pc-green: #009444;
  --pc-blue: #2E3192;
  --pc-text: #1c2434;
  --pc-muted: #5a6578;
  --pc-line: #e6e9ef;
  --pc-soft: #f4f6f9;
  --pc-radius: 10px;
  --pc-font: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

html { font-size: 16px; }

body {
  font-family: var(--pc-font) !important;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--pc-text);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--pc-font) !important;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.section { padding: 52px 0 !important; }
.section-header {
  margin-bottom: 24px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
}
.section-title {
  font-size: clamp(1.35rem, 2.2vw, 1.7rem) !important;
  margin: 0 auto 8px !important;
  display: block !important;
  width: fit-content !important;
}
.section-subtitle {
  font-size: 0.95rem !important;
  line-height: 1.55 !important;
  max-width: 680px !important;
  color: var(--pc-muted) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
.section-tag {
  display: block !important;
  width: fit-content !important;
  font-size: 0.75rem !important;
  padding: 4px 12px !important;
  margin: 0 auto 10px !important;
}

/* Dense 4-column card grids */
.stats-grid,
.programs-grid,
.news-grid,
.gallery-grid,
.projects-grid,
.events-grid,
.focus-areas,
.program-cards,
.staff-grid,
.blog-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

.stat-card,
.program-card,
.news-card,
.gallery-card,
.project-card,
.event-card,
.focus-card,
.blog-card,
.staff-card {
  border-radius: var(--pc-radius) !important;
  box-shadow: 0 1px 3px rgba(16, 18, 40, 0.06) !important;
  overflow: hidden !important;
}

.stat-card { text-align: center; padding: 16px 12px !important; }
.program-card,
.news-card,
.event-card,
.blog-card,
.staff-card { padding: 0 !important; }
.gallery-card,
.project-card,
.focus-card { padding: 0 !important; }

.stat-icon {
  width: 42px !important;
  height: 42px !important;
  line-height: 42px !important;
  font-size: 1.1rem !important;
  margin-bottom: 8px !important;
}
.stat-number { font-size: 1.65rem !important; margin-bottom: 4px !important; }
.stat-label { font-size: 0.78rem !important; letter-spacing: 0.04em; }

/* Card photo frames: aspect-ratio box, image pinned to fill it */
.pc-card,
.program-card,
.news-card,
.gallery-card,
.project-card,
.focus-card,
.event-card,
.blog-card {
  display: flex !important;
  flex-direction: column !important;
  height: auto !important;
  overflow: hidden !important;
  background: #fff !important;
}

.pc-card__media,
.program-image,
.news-image,
.event-image,
.project-image-wrapper,
.gallery-card .gallery-image-wrap,
.gallery-item .gallery-image-wrapper,
.focus-photo-wrap,
.gallery-scroll .gallery-item {
  position: relative !important;
  width: 100% !important;
  margin: 0 !important;
  overflow: hidden !important;
  background: #eef1f5 !important;
  flex-shrink: 0 !important;
}

.pc-card__media--wide,
.program-image,
.news-image,
.event-image,
.project-image-wrapper,
.focus-photo-wrap {
  aspect-ratio: 16 / 10 !important;
}

.pc-card__media--square,
.gallery-card .gallery-image-wrap,
.gallery-scroll .gallery-item {
  aspect-ratio: 1 / 1 !important;
}

.pc-card__media img,
.program-image img,
.news-image img,
.event-image img,
.project-image-wrapper img,
.project-image,
.gallery-card .gallery-image-wrap img,
.gallery-image,
.gallery-item .gallery-image-wrapper img,
.focus-photo-wrap img,
.focus-photo,
.gallery-scroll .gallery-item img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center center !important;
  display: block !important;
}

/* Gallery page: each photo keeps its own dimensions */
.gallery-bento .gallery-item .gallery-image-wrapper {
  aspect-ratio: auto !important;
  height: auto !important;
  min-height: 0 !important;
  position: static !important;
  background: transparent !important;
}
.gallery-bento .gallery-item .gallery-image-wrapper img.gallery-image {
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: none !important;
  object-fit: unset !important;
}

.program-icon { display: none !important; }

.gallery-card .gallery-overlay,
.gallery-item .gallery-content,
.pc-card__body,
.program-content,
.project-content,
.focus-card-body,
.news-content {
  flex: 0 0 auto !important;
  margin-top: 0 !important;
}

.program-title,
.news-title,
.project-title,
.event-title,
.blog-card h3 {
  font-size: 1rem !important;
  margin-bottom: 6px !important;
}

.program-description,
.news-excerpt,
.project-card p,
.event-card p {
  font-size: 0.875rem !important;
  line-height: 1.45 !important;
  color: var(--pc-muted);
}

/* Non-home heroes: readable dark scrim + thin brand veil */
.page-hero::before,
.contact-hero::before,
.about-hero::before,
.blog-hero::before,
.events-hero::before,
.gallery-hero::before,
.multimedia-hero::before,
.staff-hero::before,
.donate-hero::before {
  z-index: 1 !important;
}

.page-hero::after,
.contact-hero::after,
.about-hero::after,
.blog-hero::after,
.events-hero::after,
.gallery-hero::after,
.multimedia-hero::after,
.staff-hero::after,
.donate-hero::after,
.programs-header::after {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: rgba(16, 18, 40, 0.62) !important;
  box-shadow: inset 0 0 0 9999px rgba(46, 49, 146, 0.3) !important;
  pointer-events: none !important;
  z-index: 2 !important;
  display: block !important;
}

.page-hero .page-hero-inner,
.page-hero .hero-content,
.page-hero .container,
.contact-hero .hero-content,
.contact-hero .container,
.about-hero .hero-content,
.about-hero .container,
.blog-hero .hero-content,
.blog-hero .container,
.events-hero .hero-content,
.events-hero .container,
.gallery-hero .hero-content,
.gallery-hero .container,
.multimedia-hero .hero-content,
.multimedia-hero .container,
.staff-hero .hero-content,
.staff-hero .container,
.donate-hero .hero-content,
.donate-hero .container {
  position: relative !important;
  z-index: 3 !important;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

.page-hero h1,
.contact-hero h1,
.about-hero h1,
.blog-hero h1,
.events-hero h1,
.gallery-hero h1,
.multimedia-hero h1,
.staff-hero h1,
.donate-hero h1 {
  color: #fff !important;
}

.page-hero p,
.contact-hero p,
.about-hero p,
.blog-hero p,
.events-hero p,
.gallery-hero p,
.multimedia-hero p,
.staff-hero p,
.donate-hero p {
  color: rgba(255, 255, 255, 0.95) !important;
  opacity: 1 !important;
}

@media (max-width: 992px) {
  .stats-grid,
  .programs-grid,
  .news-grid,
  .gallery-grid,
  .projects-grid,
  .events-grid,
  .focus-areas,
  .program-cards,
  .staff-grid,
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 640px) {
  .stats-grid,
  .programs-grid,
  .news-grid,
  .gallery-grid,
  .projects-grid,
  .events-grid,
  .focus-areas,
  .program-cards,
  .staff-grid,
  .blog-grid {
    grid-template-columns: 1fr !important;
  }
  .section { padding: 40px 0 !important; }
}
