/* ====== Troupe page — в стиле основного сайта ====== */

/* секция */
.troupe {
  width: 99%;
  margin: 0 auto;
  padding: 40px min(20px, 3vw);
  color: #fff;
}

/* заголовки секций (используют твой .banner-text из main.css) */
.troupe .banner-text {
  margin: 18px 0 10px;
}

/* ---------- HERO: руководитель / админдир ---------- */

.troupe__hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(20px, 3vw, 36px);
  margin-bottom: 16px;
  margin-top: 30px;
}

/* коробка с обтекаемым кругом (как в "О нас") */
.troupe .box-wrape {
  --width-circle: clamp(120px, 16vw, 160px);
  background: rgba(20, 12, 40, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: clamp(14px, 2vw, 22px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  overflow: hidden; /* чтобы float не выползал */
}

/* круг слева/справа + обтекание */
.troupe .box-wrape .circle {
  float: left;
  width: var(--width-circle);
  aspect-ratio: 1;
  margin: 2px 22px 10px 0;
  border-radius: 50%;
  overflow: hidden;
  shape-outside: circle(50%);
  -webkit-shape-outside: circle(50%);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.45);
  background: #000;
}
.troupe .box-wrape .circle-right {
  float: right;
  margin: 2px 0 10px 22px;
}
.troupe .box-wrape .circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* текст внутри box */
.troupe .box-wrape h3 {
  font: 700 1.25rem/1.25 var(--font-text);
  color: #ff9933;
  margin: 0 0 6px;
}
.troupe .box-wrape p {
  font: italic 400 0.98rem/1.65 var(--font-text);
  color: #f5f5f5;
  text-align: justify;
  text-indent: 1.25em;
  margin: 0 0 10px;
}

/* ---------- GRID карточек актёров ---------- */

.troupe .content {
  position: relative;
  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(clamp(140px, 17vw, 180px), 1fr)
  );
  gap: clamp(14px, 1.8vw, 22px);
  margin: 18px auto 40px;
  max-width: 1250px;
}

/* карта */
.troupe .card {
  position: relative;
  background: rgba(20, 12, 40, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.troupe .card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.55);
}

/* постер */
.troupe .card .poster {
  width: 100%;
  aspect-ratio: 3/4; /* единая высота карточек */
  overflow: hidden;
}
.troupe .card .poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}
.troupe .card:hover .poster img {
  transform: scale(1.05);
}

/* нижняя подпись */
.troupe .card .details {
  padding: 10px 10px 12px;
  min-height: 66px;
  display: grid;
  align-content: start;
  gap: 6px;
}
.troupe .card .details h3 {
  font: 700 0.98rem/1.2 var(--font-text);
  text-align: center;
  color: #ffd27a;
}
.troupe .card .details p {
  font: italic 400 0.78rem/1.45 var(--font-text);
  color: #eee;
  text-indent: 0;
  text-align: center;
}

/* вариант с “презентацией” (раскрывается оверлей) */
.troupe .card.presentation .poster::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 60%;
  background: linear-gradient(0deg, rgba(74, 2, 30, 0.92) 0%, transparent 75%);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;
}
.troupe .card.presentation:hover .poster::before {
  opacity: 1;
}

.troupe .card.presentation .details {
  position: absolute;
  inset: auto 0 0 0;
  padding: 12px;
  min-height: 90px;
  transform: translateY(100%);
  transition: transform 0.45s ease;
  z-index: 2;
  background: linear-gradient(
    0deg,
    rgba(20, 12, 40, 0.85) 0%,
    rgba(20, 12, 40, 0.35) 100%
  );
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.troupe .card.presentation:hover .details {
  transform: translateY(0);
}

/* ---------- Фоновая “звёздная” анимация ---------- */

.bg-star {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0; /* позади контента */
}
.boxStar {
  position: absolute;
  color: rgba(255, 255, 255, 0.08);
  transition: color 0.9s, text-shadow 0.9s;
  will-change: color, text-shadow;
}
.boxStar::before {
  content: "\f005"; /* fa-star */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
}
.boxStar.animate {
  color: rgba(255, 255, 120, 0.45);
  text-shadow: 0 0 10px rgba(255, 255, 120, 0.6),
    0 0 26px rgba(255, 255, 120, 0.35);
}

/* чтобы контент был над звёздами */
.troupe,
.troupe__hero,
.troupe .content {
  position: relative;
  z-index: 1;
}

/* ---------- Адаптив ---------- */

@media (max-width: 900px) {
  .troupe__hero {
    grid-template-columns: 1fr;
  }
  .troupe .box-wrape .circle {
    float: none;
    margin: 0 auto 14px;
    shape-outside: none;
    -webkit-shape-outside: none;
  }
  .troupe .box-wrape .circle-right {
    float: none;
    margin: 0 auto 14px;
  }
  .troupe .box-wrape {
    text-align: center;
  }
  .troupe .box-wrape p {
    text-align: left;
    text-indent: 1em;
  }
}

@media (max-width: 520px) {
  .troupe .content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}
