/* ==========================================================================
   Ryaan Ranch: Team page
   ========================================================================== */
html { scroll-behavior: smooth; }

.rr-team-lead { max-width: 820px; margin: 0 auto 60px; }

/* Overview grid */
.rr-team-grid {
  --rr-cols: 4;
  --rr-gap: 30px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--rr-gap);
}
.rr-team-grid > .rr-team-card {
  flex: 0 0 calc((100% - (var(--rr-cols) - 1) * var(--rr-gap)) / var(--rr-cols));
  max-width: calc((100% - (var(--rr-cols) - 1) * var(--rr-gap)) / var(--rr-cols));
}
.rr-team-card {
  display: block;
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(var(--theme-color2-rgb), 0.08);
  box-shadow: 0 10px 30px rgba(var(--theme-color2-rgb), 0.05);
  transition: transform .4s ease, box-shadow .4s ease, border-color .4s ease;
  color: inherit;
}
.rr-team-card:hover {
  transform: translateY(-6px);
  border-color: rgba(var(--theme-color1-rgb), 0.45);
  box-shadow: 0 24px 50px rgba(var(--theme-color2-rgb), 0.1);
}
.rr-team-card__img {
  position: relative;
  aspect-ratio: 4 / 4.4;
  overflow: hidden;
  background: var(--theme-color-lighter2);
}
.rr-team-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s ease;
}
.rr-team-card:hover .rr-team-card__img img { transform: scale(1.05); }
.rr-team-card__img::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 4px;
  background: var(--theme-color1);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s ease;
}
.rr-team-card:hover .rr-team-card__img::after { transform: scaleX(1); }
.rr-team-card__body { padding: 24px 26px 26px; }
.rr-team-card__name {
  font-family: var(--heading-font-family);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--headings-color);
  margin-bottom: 6px;
}
.rr-team-card__role {
  font-size: 15px;
  line-height: 1.5;
  color: var(--theme-color1);
  font-weight: 500;
}

/* Detailed profiles */
.rr-profile {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 70px;
  align-items: start;
  scroll-margin-top: 130px;
}
.rr-profile + .rr-profile {
  margin-top: 90px;
  padding-top: 90px;
  border-top: 1px solid rgba(var(--theme-color2-rgb), 0.1);
}
.rr-profile--reverse { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.rr-profile--reverse .rr-profile__photo { order: 2; }

.rr-profile__photo {
  position: sticky;
  top: 120px;
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--theme-color-lighter2);
  box-shadow: 0 24px 50px rgba(var(--theme-color2-rgb), 0.1);
}
.rr-profile__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.rr-profile__role {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--theme-color1);
  margin-bottom: 12px;
}
.rr-profile__name {
  font-size: 44px;
  line-height: 1.15;
  color: var(--headings-color);
  margin: 0 0 26px;
  padding-bottom: 22px;
  position: relative;
}
.rr-profile__name::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;
  height: 3px;
  border-radius: 3px;
  background: var(--theme-color1);
}
.rr-profile .rr-text p { line-height: 1.8; }
.rr-profile .rr-text p:first-child { font-size: 18px; color: var(--headings-color); }
.rr-profile sup { font-size: .6em; }

/* Responsive */
@media (max-width: 1199.98px) {
  .rr-profile, .rr-profile--reverse { gap: 50px; }
  .rr-profile__name { font-size: 38px; }
}
@media (max-width: 991.98px) {
  .rr-team-grid { --rr-cols: 2; --rr-gap: 24px; }
  .rr-profile, .rr-profile--reverse { grid-template-columns: 1fr; gap: 36px; }
  .rr-profile--reverse .rr-profile__photo { order: 0; }
  .rr-profile__photo { position: relative; top: 0; max-width: 460px; }
  .rr-profile + .rr-profile { margin-top: 60px; padding-top: 60px; }
}
@media (max-width: 575.98px) {
  .rr-team-lead { margin-bottom: 40px; }
  .rr-team-grid { --rr-cols: 2; --rr-gap: 14px; }
  .rr-team-card { border-radius: 16px; }
  .rr-team-card__body { padding: 14px 14px 16px; }
  .rr-team-card__name { font-size: 17px; }
  .rr-team-card__role { font-size: 13px; }
  .rr-profile__photo { max-width: 100%; border-radius: 18px; }
  .rr-profile__name { font-size: 30px; }
  .rr-profile .rr-text p:first-child { font-size: 17px; }
}


/* ---------- About page: team strip ---------- */
.rr-team-strip__lead { max-width: 780px; margin: 0 auto 50px; }
.rr-team-strip__row {
  --rr-cols: 4;
  max-width: 1080px;
  margin: 0 auto;
  --rr-gap: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 34px var(--rr-gap);
}
.rr-team-mini {
  flex: 0 0 calc((100% - (var(--rr-cols) - 1) * var(--rr-gap)) / var(--rr-cols));
  max-width: calc((100% - (var(--rr-cols) - 1) * var(--rr-gap)) / var(--rr-cols));
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: inherit;
}
.rr-team-mini__img {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 20px;
  overflow: hidden;
  background: var(--theme-color-lighter2);
  margin-bottom: 16px;
  box-shadow: 0 12px 30px rgba(var(--theme-color2-rgb), 0.08);
}
.rr-team-mini__img::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid var(--theme-color1);
  border-radius: inherit;
  opacity: 0;
  transition: opacity .35s ease;
}
.rr-team-mini__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.rr-team-mini:hover .rr-team-mini__img img { transform: scale(1.06); }
.rr-team-mini:hover .rr-team-mini__img::after,
.rr-team-mini:focus-visible .rr-team-mini__img::after { opacity: 1; }
.rr-team-mini__name {
  font-family: var(--heading-font-family);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--headings-color);
  margin-bottom: 4px;
  transition: color .3s ease;
}
.rr-team-mini:hover .rr-team-mini__name { color: var(--theme-color1); }
.rr-team-mini__role { font-size: 14px; line-height: 1.45; color: var(--theme-color1); }
.rr-team-strip__cta { margin-top: 50px; }

@media (max-width: 767.98px)  { .rr-team-strip__row { --rr-cols: 2; --rr-gap: 18px; } }
@media (max-width: 575.98px)  {
  .rr-team-strip__row { --rr-cols: 2; --rr-gap: 14px; row-gap: 26px; }
  .rr-team-strip__lead { margin-bottom: 36px; }
  .rr-team-mini__img { border-radius: 16px; margin-bottom: 12px; }
  .rr-team-mini__name { font-size: 16px; }
  .rr-team-mini__role { font-size: 13px; }
  .rr-team-strip__cta { margin-top: 36px; }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .rr-team-grid { --rr-gap: 22px; }
  .rr-team-card__body { padding: 20px 20px 22px; }
  .rr-team-card__name { font-size: 19px; }
}
