/* Team cards - FSOL. Uses the site palette (styles.css variables) with safe fallbacks. */
.tm-page{
  --tm-green:      var(--first-color, #3e6a55);
  --tm-green-dark: var(--first-color-alt, #355e4a);
  --tm-yellow:     #fbf456;                 /* the FSOL logo / carousel yellow */
  --tm-text:       #2c3a32;                 /* dark enough to read on the light card */
  --tm-card:       #e8f2cb;                 /* a lighter tint of the page green (#d2e497) */
  max-width: 1080px;
  margin: 0 auto;
  padding: 10.5rem 1rem 4rem;
  font-family: inherit;                     /* same font as the rest of the site (home page etc.) */
}
@media (max-width: 991px){
  .tm-page{
    padding-top: 9.5rem;
  }
}
@media (max-width: 575px){
  .tm-page{
    padding-top: 10.5rem;
  }
}
/*
.tm-title{
  margin: 0 0 2.5rem;
  text-align: center;
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  font-weight: 700;
  color: var(--tm-green-dark);
  letter-spacing: .01em;
}
*/
.tm-title{
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 2.5rem;
  text-align: center;
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  font-weight: 700;
  color: var(--tm-green-dark);
  letter-spacing: .01em;
}
/*
.tm-title::after{
  content: "";
  display: block;
  width: 72px; height: 5px;
  margin: .6rem auto 0;
  border-radius: 3px;
  background: var(--tm-yellow);
  box-shadow: 0 0 0 1px rgba(53,94,74,.15);
}
*/
.tm-title::after{
  content: "";
  display: block;
  width: 100%;
  height: 5px;
  margin-top: .6rem;
  border-radius: 3px;
  background: var(--tm-yellow);
  box-shadow: 0 0 0 1px rgba(53,94,74,.15);
}
.tm-list{
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

.tm-card{
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  padding: 1.25rem;
  background: var(--tm-card);
  border-radius: 16px;
  border-inline-start: 6px solid var(--tm-green);
  box-shadow: 0 8px 22px rgba(38,70,54,.14);
  transition: transform .25s ease, box-shadow .25s ease;
}
.tm-card:hover{ transform: translateY(-3px); box-shadow: 0 12px 28px rgba(38,70,54,.20); }
@media (min-width: 576px){
  .tm-card{ grid-template-columns: 170px 1fr; gap: 1.5rem; padding: 1.4rem; }
}
@media (min-width: 992px){
  .tm-card{ grid-template-columns: 210px 1fr; gap: 2rem; padding: 1.6rem; }
}

/* every photo gets exactly the same frame */
.tm-photo{
  width: 100%;
  max-width: 220px;
  aspect-ratio: 4 / 5;
  margin-inline: auto;
  border-radius: 12px;
  overflow: hidden;
  background: #d2e497;
  box-shadow: 0 3px 10px rgba(38,70,54,.18);
}
@media (min-width: 576px){ .tm-photo{ max-width: none; margin: 0; } }
.tm-photo img{
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
}
.tm-photo--empty{
  display: flex; align-items: center; justify-content: center;
  font-size: 3.2rem; color: var(--tm-green);
}

.tm-body{ min-width: 0; }
.tm-name{
  margin: 0 0 .55rem;
  font-size: clamp(1.3rem, 1rem + 1vw, 1.7rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--tm-green-dark);
}
.tm-desc{
  margin: 0 0 1rem;
  font-size: clamp(1rem, .94rem + .35vw, 1.15rem);
  line-height: 1.85;
  color: var(--tm-text);
  text-align: start;
  overflow-wrap: anywhere;
}
.tm-actions{ display: flex; flex-wrap: wrap; gap: .6rem; }
.tm-card .tm-btn{
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .5rem 1.05rem;
  border-radius: 999px;
  background: var(--tm-green);
  color: #fff;
  font-size: .95rem; font-weight: 600;
  text-decoration: none;
  transition: background .2s, color .2s;
}
.tm-card .tm-btn:hover,
.tm-card .tm-btn:focus-visible{ background: var(--tm-yellow); color: #1f3a2e; }
.tm-card .tm-btn--icon{ padding: .5rem .8rem; }

/* sponsors: logos are shown whole (contain) in a square frame */
.tm-photo--logo{
  aspect-ratio: 1 / 1;
  background: #fff;
  padding: .75rem;
}
.tm-photo--logo img{
  object-fit: contain;
  object-position: center;
}

/* ===== one-time title animation (3 effects, picked per page load by PHP: tm-fx-1..3) ===== */
.tm-page{ --tm-d: 1; }
.tm-page[dir="rtl"]{ --tm-d: -1; }

/* 1) Rise */
.tm-fx-1{ animation: tm-rise .7s cubic-bezier(.2,.7,.2,1) both; }
.tm-fx-1::after{ animation: tm-bar .6s .35s cubic-bezier(.2,.7,.2,1) both; }

/* 2) Focus */
.tm-fx-2{ animation: tm-focus .8s ease-out both; }
.tm-fx-2::after{ animation: tm-bar-spring .7s .4s cubic-bezier(.34,1.56,.64,1) both; }
.tm-page[dir="rtl"] .tm-fx-2{ animation-name: tm-focus-ar; }   /* no letter-spacing on Arabic */

/* 3) Slide */
.tm-fx-3{ animation: tm-slide .7s cubic-bezier(.2,.7,.2,1) both; }
.tm-fx-3::after{ animation: tm-bar .6s .35s cubic-bezier(.2,.7,.2,1) both; transform-origin: left center; }
.tm-page[dir="rtl"] .tm-fx-3::after{ transform-origin: right center; }

@keyframes tm-rise  { from{ opacity:0; transform: translateY(18px); } to{ opacity:1; transform:none; } }
@keyframes tm-slide { from{ opacity:0; transform: translateX(calc(var(--tm-d) * -28px)); } to{ opacity:1; transform:none; } }
@keyframes tm-focus { from{ opacity:0; filter: blur(8px); letter-spacing: .14em; } to{ opacity:1; filter:none; letter-spacing:.01em; } }
@keyframes tm-focus-ar{ from{ opacity:0; filter: blur(8px); transform: scale(.94); } to{ opacity:1; filter:none; transform:none; } }
@keyframes tm-bar   { from{ transform: scaleX(0); } to{ transform: scaleX(1); } }
@keyframes tm-bar-spring{ from{ transform: scaleX(0); } to{ transform: scaleX(1); } }

@media (prefers-reduced-motion: reduce){
  .tm-title[class*="tm-fx-"], .tm-title[class*="tm-fx-"]::after{ animation: none !important; }
}