/* =========================================================
   BIODIVERSITY PAGE — poster / paper style + fluid larger cards
   Template: biodiversity-page.php
   Body class: .page-template-biodiversity-page
   ========================================================= */

/* ---------- Base / paper texture ---------- */
.page-template-biodiversity-page .site-main,
.page-template-biodiversity-page .bio-page{
  background: transparent;
}

.page-template-biodiversity-page{
  position: relative;
  background: #f3f2ee; /* warm paper base */
}

.page-template-biodiversity-page::before{
  content:"";
  position: fixed;
  inset: 0;
  background: url("https://marishkiizvor.org/wp-content/uploads/2026/01/paper-texture.webp") repeat;
  opacity: .32;
  pointer-events: none;
  z-index: 0;
}

.page-template-biodiversity-page .bio-page{
  position: relative;
  z-index: 1;
}

/* ---------- Hero ---------- */
.page-template-biodiversity-page .bio-hero{
  position: relative;
  padding: clamp(44px, 6vw, 78px) 0 clamp(18px, 3vw, 32px);
  background: transparent;
  overflow: hidden;
}

.page-template-biodiversity-page .bio-hero__overlay{ display:none; }

.page-template-biodiversity-page .bio-hero__inner{
  text-align: center;
  max-width: 980px;
  margin: 0 auto;
}

.page-template-biodiversity-page .bio-hero__title{
  margin: 0;
  font-weight: 700;
  font-size: calc(clamp(36px, 4.8vw, 62px) * var(--font-scale));
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #232323;
}

.page-template-biodiversity-page .bio-hero__subtitle{
  margin: 12px auto 0;
  max-width: 760px;
  font-size: calc(1.4em * var(--font-scale));
  line-height: 1.55;
  color: rgba(35,35,35,.78);
}

/* ---------- Intro ---------- */
.page-template-biodiversity-page .bio-intro{
  padding: 18px 0 34px;
}

.page-template-biodiversity-page .bio-intro .container{
  max-width: 980px;
}

.page-template-biodiversity-page .bio-intro__text{
  margin: 0 auto;
  text-align: center;
  font-size: calc(1.2em * var(--font-scale));
  line-height: 1.75;
  color: rgba(30,30,30,.78);
}

/* ---------- Sections ---------- */
.page-template-biodiversity-page .bio-sections{
  padding: 10px 0 64px;
}

.page-template-biodiversity-page .bio-block{
  margin: 34px 0 46px;
}

.page-template-biodiversity-page .bio-block__title{
  margin: 0 0 16px;
  text-align: center;
  letter-spacing: -0.02em;
  color: #2a2a2a;
  position: relative;
}

.page-template-biodiversity-page .bio-block__title::after{
  content:"";
  display:block;
  width: min(520px, 86%);
  height: 1px;
  margin: 14px auto 0;
  background: rgba(0,0,0,.10);
}

/* =========================================================
   GRID — fewer per row, larger cards
   ========================================================= */
.page-template-biodiversity-page .bio-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); /* 👈 bigger cards */
  gap: 18px;
  align-content: start;
  margin: 0 auto;
  padding-top: 10px;
  max-width: 1120px;
}

/* =========================================================
   CARD — fluid height (no overflow on font scaling)
   Requires markup:
   .bio-card__frame -> .bio-card__img + .bio-card__body
   .bio-card__body  -> .bio-card__name + .bio-card__desc
   ========================================================= */
.page-template-biodiversity-page .bio-card{
  display: flex;
}

.page-template-biodiversity-page .bio-card__frame{
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;

  border: 1px solid rgba(0,0,0,.12);
  border-radius: 18px;
  background: rgba(255,255,255,.20);
  transition: transform .18s ease;
}

.page-template-biodiversity-page .bio-card__frame:hover{
  transform: translateY(-2px);
}

/* Image scales nicely; no fixed px heights */
.page-template-biodiversity-page .bio-card__img{
  width: 100%;
  aspect-ratio: 4 / 3;   /* change to 1 / 1 for square */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Text area grows naturally */
.page-template-biodiversity-page .bio-card__body{
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px 14px;
}

/* Title wraps safely at larger font sizes */
.page-template-biodiversity-page .bio-card__name{
  text-align: center;
  font-weight: 700;
  line-height: 1.2;
  color: rgba(25,25,25,.92);
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Excerpt: visually limited, but never overflows */
.page-template-biodiversity-page .bio-card__desc{
  text-align: center;
  line-height: 1.45;
  color: rgba(25,25,25,.78);
  overflow-wrap: anywhere;
  word-break: break-word;

  /* IMPORTANT: no clamp, no cut */
  display: block;
  overflow: visible;
}

/* =========================================================
   MOBILE
   ========================================================= */
@media (max-width: 640px){
  .page-template-biodiversity-page .bio-hero{
    padding: 38px 0 18px;
  }

  .page-template-biodiversity-page .bio-intro{
    padding: 12px 0 26px;
  }

  .page-template-biodiversity-page .bio-intro__text{
    font-size: 15px;
  }

  .page-template-biodiversity-page .bio-hero__subtitle{
    font-size: clamp(14px, 1.7vw, 18px);
  }

  .page-template-biodiversity-page .bio-hero__title{
    font-size: clamp(34px, 6vw, 46px);
  }

  .page-template-biodiversity-page .bio-grid{
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    max-width: 100%;
  }

  .page-template-biodiversity-page .bio-card__body{
    padding: 10px 12px 12px;
  }

  .page-template-biodiversity-page .bio-card__desc{
    font-size: 13px;
    -webkit-line-clamp: 5;
  }
}