/* FTPM 0.38.44 – Slider Autoplay Runtime & Mobile Hero Word Integrity
 *
 * One owner for the migrated homepage:
 * - Astra owns global typography and button appearance.
 * - FTPM owns the image hero overlay, homepage cards, statistics and layout.
 * - No legacy ftpm-home visual rules are required outside this file.
 */

body.ftpm-public-page--home .ftpm-public-home-hero {
  min-height: clamp(560px, 72vh, 760px);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
}

/* The cover image must stay below both FTPM overlay layers. */
body.ftpm-public-page--home .ftpm-public-home-hero > .wp-block-cover__image-background {
  z-index: 0;
}

body.ftpm-public-page--home .ftpm-public-home-hero::before,
body.ftpm-public-page--home .ftpm-public-home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

body.ftpm-public-page--home .ftpm-public-home-hero::before {
  background:
    linear-gradient(90deg,
      rgba(12, 53, 29, .92) 0%,
      rgba(13, 58, 31, .84) 46%,
      rgba(13, 58, 31, .68) 72%,
      rgba(13, 58, 31, .56) 100%);
}

body.ftpm-public-page--home .ftpm-public-home-hero::after {
  background:
    linear-gradient(118deg,
      transparent 54%,
      rgba(255, 255, 255, .075) 54%,
      rgba(255, 255, 255, .075) 66%,
      transparent 66%);
}

body.ftpm-public-page--home .ftpm-public-home-hero > .wp-block-cover__background {
  z-index: 1;
}

body.ftpm-public-page--home .ftpm-public-home-hero > .wp-block-cover__inner-container {
  position: relative;
  z-index: 2;
  width: 100%;
}

body.ftpm-public-page--home .ftpm-public-home-hero__inner {
  width: min(var(--wp--style--global--wide-size, 1200px), calc(100% - 48px));
  min-height: inherit;
  margin-inline: auto;
  padding-block: clamp(72px, 10vw, 128px) clamp(48px, 7vw, 88px);
  display: grid;
  align-content: end;
  gap: clamp(28px, 4vw, 48px);
}

body.ftpm-public-page--home .ftpm-public-home-hero__main {
  max-width: 820px;
  margin-inline: auto;
  text-align: center;
}

body.ftpm-public-page--home .ftpm-public-home-hero__title {
  max-width: 18ch;
  margin: 0 auto;
  color: #fff !important;
  font-size: clamp(2.6rem, 5.5vw, 5.2rem);
  line-height: .98;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  text-wrap: balance;
}

body.ftpm-public-page--home .ftpm-public-home-hero__intro {
  max-width: 760px;
  margin: 24px auto 0;
  color: rgba(255, 255, 255, .96) !important;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .24);
}

body.ftpm-public-page--home .ftpm-public-home-hero__actions {
  justify-content: center;
  margin-top: 28px;
}

body.ftpm-public-page--home .ftpm-public-home-hero__news {
  width: min(760px, 100%);
  margin-inline: auto;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 18px;
  background: rgba(8, 38, 22, .68);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .18);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  text-align: left;
}

body.ftpm-public-page--home .ftpm-public-home-hero__news,
body.ftpm-public-page--home .ftpm-public-home-hero__news :where(p, li, time) {
  color: rgba(255, 255, 255, .96) !important;
}

body.ftpm-public-page--home .ftpm-public-home-hero__news-label.ftpm-public-hero__eyebrow {
  margin-bottom: 10px;
  color: #fff !important;
}


body.ftpm-public-page--home .ftpm-public-home-hero__news .wp-block-latest-posts {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.ftpm-public-page--home .ftpm-public-home-hero__news-item {
  position: relative;
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
}

body.ftpm-public-page--home .ftpm-public-home-hero__news-item > :first-child {
  margin-block-start: 0;
}

body.ftpm-public-page--home .ftpm-public-home-hero__news-item > :last-child {
  margin-block-end: 0;
}

body.ftpm-public-page--home .ftpm-public-home-hero__news-title {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: #fff !important;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
}

body.ftpm-public-page--home .ftpm-public-home-hero__news-title:hover,
body.ftpm-public-page--home .ftpm-public-home-hero__news-title:focus-visible {
  color: var(--ast-global-color-3, #ebcb4f) !important;
}

body.ftpm-public-page--home .ftpm-public-home-hero__news-action {
  width: fit-content;
  margin-top: 6px;
}


/* Public homepage sections are real Foundation cards again. */
body.ftpm-public-page--home .ftpm-public-section--home:not(.ftpm-public-home-partners) {
  width: min(var(--wp--style--global--wide-size, 1200px), calc(100% - 48px));
  margin-block: clamp(38px, 6vw, 72px);
  margin-inline: auto;
  padding: clamp(28px, 4.2vw, 56px);
  border: 1px solid var(--ast-border-color, #d8e1da);
  border-radius: 22px;
  background: var(--ast-global-color-5, #fff);
  box-shadow: 0 18px 44px rgba(18, 55, 31, .08);
}

body.ftpm-public-page--home .ftpm-public-section--home > :first-child {
  margin-top: 0;
}

body.ftpm-public-page--home .ftpm-public-section--home > :last-child {
  margin-bottom: 0;
}

/* Statistics: data comes from the block; layout and CI surface live here. */
body.ftpm-public-page--home .ftpm-home-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 20px;
  margin-top: 30px;
}

/* The grid owns spacing. WordPress flow margins must not offset grid items. */
body.ftpm-public-page--home .ftpm-home-stat-grid > .ftpm-home-stat-card {
  margin-block-start: 0;
  margin-block-end: 0;
}

body.ftpm-public-page--home .ftpm-home-stat-card {
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid color-mix(in srgb, var(--ast-global-color-1, #35643b) 72%, #fff 28%);
  border-radius: 18px;
  background:
    linear-gradient(145deg,
      color-mix(in srgb, var(--ast-global-color-0, #174a2a) 94%, #000 6%),
      color-mix(in srgb, var(--ast-global-color-1, #35643b) 88%, #000 12%));
  box-shadow: 0 14px 34px rgba(18, 55, 31, .16);
  color: rgba(255, 255, 255, .9);
}


body.ftpm-public-page--home .ftpm-home-stat-card > :last-child {
  margin-block-end: 0;
}

body.ftpm-public-page--home .ftpm-home-stat-card .ftpm-home-stat {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--ftpm-home-stat-suffix-gap, .38rem);
  margin: 0 0 18px;
}

body.ftpm-public-page--home .ftpm-home-stat-card .ftpm-home-stat-number {
  display: inline-flex;
  align-items: baseline;
  gap: var(--ftpm-home-stat-suffix-gap, .38rem);
  color: #fff;
  line-height: 1;
}

body.ftpm-public-page--home .ftpm-home-stat-card .ftpm-home-stat-value {
  color: inherit;
  font-size: clamp(2.85rem, 5vw, 4.35rem);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: .88;
}

body.ftpm-public-page--home .ftpm-home-stat-card .ftpm-home-stat-suffix {
  color: #fff !important;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  font-weight: 800;
  line-height: 1;
}

body.ftpm-public-page--home .ftpm-home-stat-card .ftpm-home-stat-label {
  color: #fff !important;
  font-size: .76rem;
  font-weight: 750;
  letter-spacing: .055em;
  line-height: 1.25;
  text-transform: uppercase;
}

body.ftpm-public-page--home .ftpm-home-stat-card :where(h3, p) {
  color: inherit;
}

body.ftpm-public-page--home .ftpm-home-stat-card h3 {
  margin-top: 0;
  color: #fff;
}

body.ftpm-public-page--home .ftpm-home-stat-card > p:last-child {
  margin-top: auto;
}

body.ftpm-public-page--home .ftpm-public-home-partners {
  margin-block: clamp(44px, 7vw, 84px);
  padding-block: clamp(44px, 6vw, 72px);
  background: linear-gradient(120deg, var(--ast-global-color-0, #164a2a), var(--ast-global-color-1, #35643b));
  color: #fff;
}

body.ftpm-public-page--home .ftpm-public-home-partners > * {
  width: min(var(--wp--style--global--wide-size, 1200px), calc(100% - 48px));
  margin-inline: auto;
}

body.ftpm-public-page--home .ftpm-public-home-partners :where(h2, p) {
  color: #fff;
}

body.ftpm-public-page--home .ftpm-home-slider .ftpm-species-slider {
  margin-top: 30px;
}

body.ftpm-public-page--home .ftpm-home-slider-action {
  margin-top: auto;
  align-self: flex-start;
}

body.ftpm-public-page--home .ftpm-home-contacts {
  margin-bottom: clamp(48px, 8vw, 96px);
}

/* Homepage contacts: five equal columns, one spacing owner, aligned actions. */
body.ftpm-public-page--home .ftpm-home-contacts .ftpm-contact-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  gap: clamp(12px, 1.4vw, 18px);
  margin-block: 28px 0;
}

body.ftpm-public-page--home .ftpm-home-contacts .ftpm-contact-cards > .ftpm-contact-card {
  display: flex !important;
  min-width: 0;
  min-height: 0 !important;
  height: 100%;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  margin: 0 !important;
  padding: clamp(22px, 2vw, 28px) clamp(14px, 1.6vw, 20px) !important;
  text-align: center !important;
}

body.ftpm-public-page--home .ftpm-home-contacts .ftpm-contact-card-photo {
  width: 88px !important;
  height: 88px !important;
  flex: 0 0 88px !important;
  margin: 0 auto 6px !important;
}

body.ftpm-public-page--home .ftpm-home-contacts .ftpm-contact-card-body {
  display: flex !important;
  width: 100% !important;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center !important;
  gap: 5px !important;
}

body.ftpm-public-page--home .ftpm-home-contacts .ftpm-contact-card-name {
  margin: 0;
  line-height: 1.25 !important;
}

body.ftpm-public-page--home .ftpm-home-contacts .ftpm-contact-card-role {
  display: block;
  min-height: 2.8em;
  line-height: 1.4;
}

body.ftpm-public-page--home .ftpm-home-contacts .ftpm-contact-card-mail-button {
  width: 100% !important;
  max-width: 190px !important;
  margin-top: auto !important;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  body.ftpm-public-page--home .ftpm-home-contacts .ftpm-contact-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 781px) {
  body.ftpm-public-page--home .ftpm-home-contacts .ftpm-contact-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.ftpm-public-page--home .ftpm-home-contacts .ftpm-contact-card-role {
    min-height: 0;
  }
}

@media (max-width: 544px) {
  body.ftpm-public-page--home .ftpm-home-contacts .ftpm-contact-cards {
    grid-template-columns: 1fr;
  }

  body.ftpm-public-page--home .ftpm-home-contacts .ftpm-contact-card-mail-button {
    max-width: none !important;
  }
}

@media (max-width: 921px) {
  body.ftpm-public-page--home .ftpm-home-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.ftpm-public-page--home .ftpm-home-stat-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 781px) {
  body.ftpm-public-page--home .ftpm-public-home-hero__inner {
    width: min(calc(100% - 32px), 720px);
    padding-block: 72px 52px;
  }

  body.ftpm-public-page--home .ftpm-public-section--home:not(.ftpm-public-home-partners) {
    width: calc(100% - 32px);
    padding: 28px;
    border-radius: 18px;
  }

  body.ftpm-public-page--home .ftpm-home-stat-grid {
    grid-template-columns: 1fr;
  }

  body.ftpm-public-page--home .ftpm-home-stat-card:last-child {
    grid-column: auto;
  }
}

@media (max-width: 544px) {
  body.ftpm-public-page--home .ftpm-public-home-hero {
    min-height: 0;
    overflow: hidden;
  }

  body.ftpm-public-page--home .ftpm-public-home-hero__inner {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 56px 20px 28px;
    box-sizing: border-box;
    gap: 28px;
  }

  body.ftpm-public-page--home .ftpm-public-home-hero__main {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    text-align: left;
  }

  body.ftpm-public-page--home .ftpm-public-home-hero__title {
    width: 100%;
    max-width: 100%;
    font-size: clamp(1.48rem, 6vw, 2rem);
    line-height: 1.06;
    letter-spacing: -.025em;
    overflow-wrap: normal !important;
    word-break: normal !important;
    -webkit-hyphens: none !important;
    hyphens: none !important;
    text-wrap: balance;
  }

  body.ftpm-public-page--home .ftpm-public-home-hero__intro {
    max-width: 100%;
    font-size: 1rem;
    line-height: 1.65;
    overflow-wrap: break-word;
  }

  body.ftpm-public-page--home .ftpm-public-home-hero__news {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 20px;
    box-sizing: border-box;
  }

  body.ftpm-public-page--home .ftpm-public-home-hero__news-title {
    width: 100%;
    max-width: 100%;
    overflow-wrap: break-word;
  }

  body.ftpm-public-page--home .ftpm-public-home-hero__main {
    text-align: left;
  }

  body.ftpm-public-page--home .ftpm-public-home-hero__title,
  body.ftpm-public-page--home .ftpm-public-home-hero__intro {
    margin-inline: 0;
  }

  body.ftpm-public-page--home .ftpm-public-home-hero__actions {
    justify-content: flex-start;
  }

  body.ftpm-public-page--home .ftpm-public-home-hero__actions .wp-block-button,
  body.ftpm-public-page--home .ftpm-public-home-hero__actions .wp-block-button__link {
    width: 100%;
  }

  body.ftpm-public-page--home .ftpm-public-home-hero__actions .wp-block-button,
  body.ftpm-public-page--home .ftpm-public-home-hero__actions .wp-block-button__link,
  body.ftpm-public-page--home .ftpm-public-home-hero__news-action,
  body.ftpm-public-page--home .ftpm-public-home-hero__news-action .wp-block-button__link {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  body.ftpm-public-page--home .ftpm-public-home-hero__actions .wp-block-button__link {
    white-space: normal;
    text-align: center;
  }

  body.ftpm-public-page--home .ftpm-public-section--home:not(.ftpm-public-home-partners) {
    padding: 22px;
  }

  body.ftpm-public-page--home .ftpm-public-home-partners > * {
    width: calc(100% - 32px);
  }

  body.ftpm-public-page--home .ftpm-home-slider-action,
  body.ftpm-public-page--home .ftpm-home-slider-action .wp-block-button__link {
    width: 100%;
  }
}
