/**
 * EcoImpact Premium — Components
 */

/* ─── Buttons ───────────────────────────────────────────────── */
.ecoimpact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--eco-space-2);
  padding: 0.875rem 2rem;
  border-radius: var(--eco-radius-button);
  font-family: var(--eco-font-body);
  font-size: var(--eco-text-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition:
    background-color var(--eco-duration-normal) var(--eco-ease-out),
    color var(--eco-duration-normal) var(--eco-ease-out),
    transform var(--eco-duration-fast) var(--eco-ease-spring),
    box-shadow var(--eco-duration-normal) var(--eco-ease-out);
}

.ecoimpact-btn:hover {
  transform: translateY(-2px);
}

.ecoimpact-btn--primary {
  background: var(--eco-forest-green);
  color: var(--eco-white);
}

.ecoimpact-btn--primary:hover {
  background: var(--eco-earth-green);
  box-shadow: var(--eco-shadow-md);
}

.ecoimpact-btn--secondary {
  background: var(--eco-golden-accent);
  color: var(--eco-deep-charcoal);
}

.ecoimpact-btn--outline {
  background: transparent;
  color: var(--eco-white);
  border-color: var(--eco-white);
}

.ecoimpact-btn--outline:hover {
  background: var(--eco-white);
  color: var(--eco-forest-green);
}

/* ─── Header ────────────────────────────────────────────────── */
.ecoimpact-header {
  position: sticky;
  top: 0;
  z-index: var(--eco-z-header);
  background: var(--eco-overlay-light);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(27, 67, 50, 0.08);
  transition: box-shadow var(--eco-duration-normal) var(--eco-ease-out);
}

.ecoimpact-header.is-scrolled {
  box-shadow: var(--eco-shadow-sm);
}

.ecoimpact-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--eco-space-6);
  min-height: 112px;
}

.ecoimpact-header__brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}

.ecoimpact-header__brand .custom-logo-link {
  display: inline-flex;
  align-items: center;
}

.ecoimpact-header__brand .custom-logo {
  display: block;
  width: auto;
  height: auto;
  max-height: 100px;
  max-width: min(280px, 48vw);
  object-fit: contain;
}

.ecoimpact-header__site-title {
  font-family: var(--eco-font-heading);
  font-size: var(--eco-text-xl);
  font-weight: 600;
  color: var(--eco-forest-green);
  text-decoration: none;
  line-height: 1.2;
}

.ecoimpact-nav {
  display: flex;
  gap: var(--eco-space-8);
  list-style: none;
  margin: 0;
  padding: 0;
}

.ecoimpact-nav a {
  color: var(--eco-deep-charcoal);
  text-decoration: none;
  font-weight: 500;
  font-size: var(--eco-text-sm);
  transition: color var(--eco-duration-fast);
}

.ecoimpact-nav a:hover {
  color: var(--eco-earth-green);
}

/* ─── Hero ──────────────────────────────────────────────────── */
.ecoimpact-hero {
  position: relative;
  min-height: clamp(560px, 90vh, 900px);
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--eco-white);
}

.ecoimpact-hero__media {
  position: absolute;
  inset: 0;
}

.ecoimpact-hero__image,
.ecoimpact-hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ecoimpact-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(27, 67, 50, 0.85) 0%,
    rgba(27, 67, 50, 0.45) 50%,
    rgba(26, 26, 26, 0.35) 100%
  );
}

.ecoimpact-hero__content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding-block: var(--eco-space-24);
}

.ecoimpact-hero__title {
  color: var(--eco-white);
  margin-bottom: var(--eco-space-6);
}

.ecoimpact-hero__subtitle {
  font-size: var(--eco-text-xl);
  line-height: var(--eco-leading-normal);
  opacity: 0.92;
  margin-bottom: var(--eco-space-10);
}

.ecoimpact-hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--eco-space-4);
}

/* ─── Wave Divider ──────────────────────────────────────────── */
.ecoimpact-wave-divider {
  position: absolute;
  left: 0;
  right: 0;
  line-height: 0;
  pointer-events: none;
}

.ecoimpact-wave-divider--bottom {
  bottom: -1px;
}

.ecoimpact-wave-divider svg {
  width: 100%;
  height: auto;
  display: block;
}

.ecoimpact-wave-divider .eco-wave-fill {
  fill: var(--eco-soft-sand);
}

/* ─── Statistics ────────────────────────────────────────────── */
.ecoimpact-stats {
  background: var(--eco-soft-sand);
}

.ecoimpact-stats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--eco-space-8);
}

.ecoimpact-stat {
  text-align: center;
  padding: var(--eco-space-8);
  background: var(--eco-white);
  border-radius: var(--eco-radius-card);
  box-shadow: var(--eco-shadow-sm);
}

.ecoimpact-stat__number {
  font-family: var(--eco-font-heading);
  font-size: var(--eco-text-5xl);
  font-weight: 600;
  color: var(--eco-forest-green);
  line-height: 1;
}

.ecoimpact-stat__suffix {
  font-family: var(--eco-font-heading);
  font-size: var(--eco-text-3xl);
  color: var(--eco-golden-accent);
}

.ecoimpact-stat__label {
  margin-top: var(--eco-space-3);
  font-size: var(--eco-text-sm);
  font-weight: 500;
  color: var(--eco-deep-charcoal);
  opacity: 0.75;
}

/* ─── Cards ─────────────────────────────────────────────────── */
.ecoimpact-card {
  background: var(--eco-white);
  border-radius: var(--eco-radius-card);
  overflow: hidden;
  box-shadow: var(--eco-shadow-sm);
  transition:
    transform var(--eco-duration-normal) var(--eco-ease-out),
    box-shadow var(--eco-duration-normal) var(--eco-ease-out);
}

.ecoimpact-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--eco-shadow-lg);
}

.ecoimpact-card__media img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform var(--eco-duration-slow) var(--eco-ease-out);
}

.ecoimpact-card:hover .ecoimpact-card__media img {
  transform: scale(1.05);
}

.ecoimpact-card__body {
  padding: var(--eco-space-6);
}

.ecoimpact-card__meta {
  font-size: var(--eco-text-xs);
  font-weight: 600;
  letter-spacing: var(--eco-tracking-wide);
  text-transform: uppercase;
  color: var(--eco-earth-green);
}

.ecoimpact-card__title {
  margin: var(--eco-space-2) 0;
  font-size: var(--eco-text-2xl);
}

.ecoimpact-card__title a {
  color: inherit;
  text-decoration: none;
}

.ecoimpact-card__excerpt {
  font-size: var(--eco-text-sm);
  color: rgba(26, 26, 26, 0.75);
  margin-bottom: var(--eco-space-4);
}

.ecoimpact-card__link {
  font-size: var(--eco-text-sm);
  font-weight: 600;
  color: var(--eco-earth-green);
  text-decoration: none;
}

/* ─── Donation ──────────────────────────────────────────────── */
.ecoimpact-donate__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--eco-space-12);
  align-items: start;
}

.ecoimpact-progress {
  margin: var(--eco-space-8) 0;
  background: var(--eco-sage-mist);
  border-radius: var(--eco-radius-button);
  height: 12px;
  overflow: hidden;
  position: relative;
}

.ecoimpact-progress__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--eco-earth-green), var(--eco-sage));
  border-radius: var(--eco-radius-button);
  transition: width var(--eco-duration-slow) var(--eco-ease-out);
}

.ecoimpact-progress__label {
  margin-top: var(--eco-space-3);
  font-size: var(--eco-text-sm);
  font-weight: 500;
}

.ecoimpact-donate__amounts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--eco-space-4);
}

.ecoimpact-donate__amount {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--eco-space-6);
  border: 2px solid var(--eco-sage-mist);
  border-radius: var(--eco-radius-card);
  background: var(--eco-white);
  cursor: pointer;
  transition: border-color var(--eco-duration-fast), box-shadow var(--eco-duration-fast);
}

.ecoimpact-donate__amount:hover,
.ecoimpact-donate__amount.is-active {
  border-color: var(--eco-golden-accent);
  box-shadow: var(--eco-shadow-glow);
}

.ecoimpact-donate__amount-value {
  font-family: var(--eco-font-heading);
  font-size: var(--eco-text-3xl);
  color: var(--eco-forest-green);
}

.ecoimpact-donate__amount-impact {
  font-size: var(--eco-text-xs);
  text-align: center;
  margin-top: var(--eco-space-2);
  opacity: 0.7;
}

/* ─── Footer (Msafiri-style layout) ─────────────────────────── */
.ecoimpact-footer {
  --eco-footer-bg: #485b3f;
  position: relative;
  background: var(--eco-footer-bg);
  color: var(--eco-white);
  padding-bottom: 0;
  padding-top: 0;
  margin-top: -1px;
}

/* Eden-style organic curve into footer (matches Elementor negative bottom curve) */
.ecoimpact-footer__curve-band {
  position: relative;
  width: 100%;
  height: 34px;
  line-height: 0;
  margin-top: -33px;
  pointer-events: none;
  z-index: 2;
}

.ecoimpact-footer__curve {
  direction: ltr;
  left: 0;
  line-height: 0;
  overflow: hidden;
  position: absolute;
  width: 100%;
  bottom: -1px;
}

.ecoimpact-footer__curve svg {
  display: block;
  left: 50%;
  position: relative;
  transform: translateX(-50%);
  width: calc(100% + 1.3px);
  height: 34px;
}

.ecoimpact-footer__curve-fill {
  fill: var(--eco-footer-bg);
}

.ecoimpact-footer__inner {
  position: relative;
  z-index: 1;
  padding-top: var(--eco-space-12);
  padding-bottom: 0;
}

.ecoimpact-footer__main {
  display: grid;
  grid-template-columns: minmax(220px, 1.15fr) repeat(4, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
  padding-bottom: var(--eco-space-12);
}

.ecoimpact-footer__brand-col .custom-logo-link {
  display: inline-block;
  line-height: 0;
  margin-bottom: var(--eco-space-6);
}

.ecoimpact-footer__brand-col .custom-logo {
  max-height: 110px;
  max-width: 220px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.ecoimpact-footer__site-name {
  display: inline-block;
  font-family: var(--eco-font-heading);
  font-size: var(--eco-text-2xl);
  font-weight: 600;
  color: var(--eco-white);
  text-decoration: none;
  margin-bottom: var(--eco-space-6);
}

.ecoimpact-footer__phones {
  display: grid;
  gap: var(--eco-space-3);
  margin-bottom: var(--eco-space-5);
}

.ecoimpact-footer__phone-row {
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  gap: var(--eco-space-2);
}

.ecoimpact-footer__phone-icon,
.ecoimpact-footer__icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: var(--eco-white);
  text-decoration: none;
  transition: background var(--eco-duration-fast);
}

.ecoimpact-footer__phone-icon:hover,
.ecoimpact-footer__icon-link:hover {
  background: rgba(255, 255, 255, 0.22);
  color: var(--eco-white);
}

.ecoimpact-footer__icon-link--static {
  cursor: default;
}

.ecoimpact-footer__icon-img {
  display: block;
  width: auto;
  height: 22px;
  max-width: 42px;
  object-fit: contain;
}

.ecoimpact-footer__phone-number {
  color: var(--eco-white);
  font-size: var(--eco-text-base);
  font-weight: 600;
  text-decoration: none;
}

.ecoimpact-footer__phone-number:hover {
  text-decoration: underline;
}

.ecoimpact-footer__socials,
.ecoimpact-footer__icon-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--eco-space-5);
}

.ecoimpact-footer__addresses p {
  margin: 0 0 var(--eco-space-4);
  font-size: var(--eco-text-sm);
  line-height: 1.6;
  opacity: 0.92;
}

.ecoimpact-footer__col-title {
  margin: 0 0 var(--eco-space-5);
  font-family: var(--eco-font-body);
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--eco-white);
}

.ecoimpact-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ecoimpact-footer__links li + li {
  margin-top: 0.55rem;
}

.ecoimpact-footer__links a {
  color: rgba(255, 255, 255, 0.88);
  font-size: var(--eco-text-sm);
  line-height: 1.45;
  text-decoration: none;
  transition: color var(--eco-duration-fast);
}

.ecoimpact-footer__links a:hover {
  color: var(--eco-white);
  text-decoration: underline;
}

.ecoimpact-footer__bar {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr 0.8fr 1fr;
  gap: var(--eco-space-6);
  align-items: center;
  padding: var(--eco-space-6) 0 var(--eco-space-8);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.ecoimpact-footer__bar p,
.ecoimpact-footer__design-credit {
  margin: 0;
  font-size: var(--eco-text-sm);
}

.ecoimpact-footer__bar a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
}

.ecoimpact-footer__bar a:hover {
  color: var(--eco-white);
  text-decoration: underline;
}

.ecoimpact-footer__bar-title {
  margin: 0 0 var(--eco-space-3);
  font-size: var(--eco-text-sm);
  font-weight: 600;
  color: var(--eco-white);
}

.ecoimpact-footer__bar-col--payments .ecoimpact-footer__icon-row,
.ecoimpact-footer__bar-col--registered .ecoimpact-footer__icon-row {
  margin-bottom: 0;
}

.ecoimpact-footer__bar-col--credit {
  text-align: right;
}

/* ─── Scroll Animations ─────────────────────────────────────── */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity var(--eco-duration-slow) var(--eco-ease-out),
    transform var(--eco-duration-slow) var(--eco-ease-out);
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .ecoimpact-donate__grid {
    grid-template-columns: 1fr;
  }

  .ecoimpact-footer__main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ecoimpact-footer__brand-col {
    grid-column: 1 / -1;
  }

  .ecoimpact-footer__bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ecoimpact-footer__bar-col--credit {
    text-align: left;
  }

  .ecoimpact-header__nav {
    display: none;
  }
}

@media (max-width: 640px) {
  .ecoimpact-header__brand .custom-logo {
    max-height: 100px;
    max-width: min(260px, 58vw);
  }

  .ecoimpact-footer__main {
    grid-template-columns: 1fr;
  }

  .ecoimpact-footer__bar {
    grid-template-columns: 1fr;
  }

  .ecoimpact-hero__ctas {
    flex-direction: column;
  }

  .ecoimpact-btn {
    width: 100%;
  }
}

/* ─── Reduced Motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-animate] {
    opacity: 1;
    transform: none;
  }
}
