/* ============================================================
   HELLO ELEMENTOR + ELEMENTOR FULL-WIDTH OVERRIDES
   Header/footer use 100vw full-bleed pattern to break out of
   any constraining wrapper Elementor or Hello Elementor adds.
   ============================================================ */

/* Ensure no Elementor wrapper constrains the page layout */
.site-main > .elementor,
.elementor-page .elementor-location-header,
.elementor-page .elementor-location-footer {
  max-width: none;
  width: 100%;
}

/* ============================================================
   ELEMENTOR OVERRIDES
   Ensures Elementor widgets inherit brand styles.
   ============================================================ */

/* Typography */
.elementor-page body,
.elementor-widget-text-editor,
.elementor-widget-heading {
  font-family: var(--font);
}

.elementor-widget-heading .elementor-heading-title {
  color: var(--navy);
  line-height: 1.2;
}

.elementor-widget-text-editor p {
  color: var(--text-muted);
  line-height: 1.75;
}

/* Buttons — Elementor button widget */
.elementor-widget-button .elementor-button {
  font-family: var(--font);
  font-weight: 700;
  font-size: .9375rem;
  letter-spacing: .02em;
  border-radius: var(--radius-sm);
  padding: .9375rem 2rem;
  min-height: 44px;
  transition: background .2s, transform .2s, box-shadow .2s;
}
.elementor-widget-button .elementor-button:hover {
  filter: brightness(.85);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.2);
}
/* Hero buttons — consistent width so side-by-side buttons match */
.elementor-widget-button .elementor-button {
  min-width: 170px;
  text-align: center;
}

/* Icon Box — pillar cards */
.elementor-widget-icon-box .elementor-icon-box-title {
  color: var(--navy);
  font-weight: 700;
}
.elementor-widget-icon-box .elementor-icon-box-description {
  color: var(--text-muted);
  font-size: .9375rem;
  line-height: 1.65;
}

/* Image widget — ensure border-radius on pillar cards */
.cf-card .elementor-widget-image img {
  border-radius: var(--radius);
}

/* Section backgrounds */
.cf-bg-navy    { background: var(--navy) !important; }
.cf-bg-teal    { background: var(--teal) !important; }
.cf-bg-cream   { background: var(--cream) !important; }
.cf-bg-cream-mid { background: var(--cream-mid) !important; }

/* Text on dark backgrounds */
.cf-bg-navy .elementor-heading-title,
.cf-bg-navy .elementor-widget-heading .elementor-heading-title,
.cf-bg-teal .elementor-heading-title,
.cf-bg-teal .elementor-widget-heading .elementor-heading-title { color: #fff; }
.cf-bg-navy .elementor-widget-text-editor p,
.cf-bg-teal .elementor-widget-text-editor p { color: rgba(255,255,255,.85); }

/* Section label style (apply via CSS class on Text Editor widget) */
.cf-section-label,
.cf-section-label p {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: .75rem;
}
.cf-bg-navy .cf-section-label,
.cf-bg-navy .cf-section-label p {
  color: #fff;
}

/* Program / pillar cards — stretch to fill column so rows are equal height */
.cf-pillar-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
  height: 100%;
}
.cf-pillar-card .elementor-widget-image img {
  max-width: 150px;
  height: auto;
}
.cf-pillar-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

/* Donate card (navy) */
.cf-donate-card {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  text-align: center;
}
.cf-donate-card .elementor-heading-title { color: #fff; }
.cf-donate-card .elementor-widget-text-editor p { color: rgba(255,255,255,.85); }

/* Fund method cards */
.cf-fund-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.cf-fund-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

/* Securities note (left border accent) */
.cf-securities-note,
.cf-securities-note p {
  font-size: .9rem;
  line-height: 1.65;
  color: var(--text-muted);
  border-left: 3px solid var(--teal-bright);
  padding-left: 1rem;
}

/* Founder photo — rectangular with rounded corners, scaled up 50%.
   Target both the CSS class (after reset) AND the section context (before reset). */
.cf-founder-photo img,
.cf-bg-cream-mid .elementor-widget-image img {
  border-radius: var(--radius);
  border: 4px solid var(--border);
  width: 220px;
  height: auto;
}

/* Value items (About page pillar list) */
.cf-value-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  margin-top: 5px;
}
.cf-value-dot--science      { background: var(--navy); }
.cf-value-dot--education    { background: var(--navy); }
.cf-value-dot--environment  { background: var(--green); }
.cf-value-dot--humanitarian { background: var(--teal); }


/* ============================================================
   WPFORMS OVERRIDES
   Match the original contact form design.
   ============================================================ */
.wpforms-container {
  font-family: var(--font);
}

.wpforms-container .wpforms-field-label {
  font-size: .875rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: .375rem;
}

.wpforms-container .wpforms-field input,
.wpforms-container .wpforms-field select,
.wpforms-container .wpforms-field textarea {
  width: 100%;
  padding: .8125rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .9375rem;
  color: var(--navy);
  background: var(--cream);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  appearance: none;
  -webkit-appearance: none;
}

.wpforms-container .wpforms-field input:focus,
.wpforms-container .wpforms-field select:focus,
.wpforms-container .wpforms-field textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13,94,83,.15);
}

.wpforms-container .wpforms-field textarea {
  resize: vertical;
  min-height: 140px;
}

.wpforms-container .wpforms-submit-container {
  margin-top: 1.5rem;
}

.wpforms-container button[type="submit"],
.wpforms-container .wpforms-submit {
  background: var(--teal);
  color: #fff;
  font-family: var(--font);
  font-weight: 700;
  font-size: 1rem;
  padding: 1rem;
  border: none;
  border-radius: var(--radius-sm);
  min-height: 44px;
  width: 100%;
  cursor: pointer;
  transition: background .2s, transform .2s;
}

.wpforms-container button[type="submit"]:hover,
.wpforms-container .wpforms-submit:hover {
  background: var(--teal-hover);
  transform: translateY(-2px);
}

.wpforms-container button[type="submit"]:focus-visible,
.wpforms-container .wpforms-submit:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

/* Confirmation message */
.wpforms-confirmation-container-full {
  text-align: center;
  padding: 2rem 0;
  color: var(--navy);
}

/* Error states */
.wpforms-container .wpforms-error {
  border-color: #c0392b;
}
.wpforms-container label.wpforms-error {
  color: #c0392b;
  font-size: .8rem;
  font-weight: 600;
}


/* ============================================================
   REDUCED MOTION — also for Elementor widgets
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .cf-pillar-card:hover,
  .cf-fund-card:hover,
  .elementor-widget-button .elementor-button:hover,
  .wpforms-container button[type="submit"]:hover {
    transform: none;
    box-shadow: none;
  }
}
