/*
  Antrenorii Seven (docs/58). Designul cardurilor din kitul Sporte, pagina „coaches":
  grid de 4, poze cu colțuri rotunde, la hover urcă de jos un strat închis cu datele.
  main.css nu se atinge.
*/

.tc-coaches {
  --gap: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--gap);
}
.tc-coaches > .tc-coach { flex: 0 0 100%; }
@media (min-width: 560px) {
  .tc-coaches > .tc-coach { flex-basis: calc((100% - var(--gap)) / 2); }
}
@media (min-width: 1024px) {
  .tc-coaches > .tc-coach { flex-basis: calc((100% - 3 * var(--gap)) / 4); }
}

.tc-coach {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  aspect-ratio: 4 / 5;
  background: var(--navy-soft);
  box-shadow: var(--shadow-soft);
  outline: none;
  cursor: default;
  scroll-margin-top: 6rem;
}
.tc-coach:focus-visible { box-shadow: 0 0 0 3px var(--cyan); }

.tc-coach__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Numele și rolul jos, mereu vizibile */
.tc-coach__base {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 3.5rem 1.25rem 1.1rem;
  background: linear-gradient(0deg, rgba(11, 31, 58, 0.88) 0%, rgba(11, 31, 58, 0) 100%);
  z-index: 1;
  transition: opacity 0.3s ease;
}

/* Stratul de la hover: urcă de jos, ca în kit */
.tc-coach::before {
  content: "";
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  height: 100%;
  background: rgba(11, 31, 58, 0.88);
  z-index: 2;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.tc-coach__hover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.25rem;
  text-align: center;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12%);
  transition: all 0.4s ease;
}

.tc-coach:hover::before,
.tc-coach:focus-within::before,
.tc-coach:focus::before { top: 0; opacity: 1; visibility: visible; }

.tc-coach:hover .tc-coach__hover,
.tc-coach:focus-within .tc-coach__hover,
.tc-coach:focus .tc-coach__hover { opacity: 1; visibility: visible; transform: translateY(0); }

.tc-coach:hover .tc-coach__base,
.tc-coach:focus .tc-coach__base { opacity: 0; }

.tc-coach:hover .tc-coach__img,
.tc-coach:focus .tc-coach__img { transform: scale(1.05); }

.tc-coach__name {
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1.05;
  text-transform: uppercase;
  color: #fff;
  margin: 0;
}
.tc-coach__role {
  color: var(--cyan);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0.3rem 0 0;
}
.tc-coach__hover .tc-coach__role { margin: 0 0 0.4rem; }
.tc-coach__text {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0.7rem 0 0;
}
@media (min-width: 1024px) {
  .tc-coach__hover .tc-coach__name { font-size: 1.35rem; }
  .tc-coach__text { font-size: 0.8rem; line-height: 1.45; }
}

.tc-coaches__more { margin: 2rem 0 0; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .tc-coach__img,
  .tc-coach::before,
  .tc-coach__hover,
  .tc-coach__base { transition: none; }
  .tc-coach:hover .tc-coach__img,
  .tc-coach:focus .tc-coach__img { transform: none; }
}

/* Home: Flabio mare, echipa ca un rând de fețe (docs/58, varianta A) */
.tc-team { margin-top: 1.75rem; }
.tc-team__label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
  margin: 0 0 0.75rem;
}
.tc-team__faces { display: flex; flex-wrap: wrap; padding-left: 12px; }
.tc-face {
  position: relative;
  display: block;
  width: 64px;
  height: 64px;
  margin-left: -12px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 4px 14px rgba(11, 31, 58, 0.18);
  transition: transform 0.25s ease;
  z-index: 1;
}
.tc-face img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.tc-face:hover,
.tc-face:focus-visible { transform: translateY(-4px) scale(1.15); z-index: 3; outline: none; }
.tc-face:focus-visible { box-shadow: 0 0 0 3px var(--cyan); }

.tc-face__tip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--navy);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  text-align: center;
  padding: 0.45rem 0.7rem;
  border-radius: 0.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.2s ease;
}
.tc-face__tip small {
  display: block;
  color: var(--cyan);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tc-face__tip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -6px;
  border: 6px solid transparent;
  border-top-color: var(--navy);
}
.tc-face:hover .tc-face__tip,
.tc-face:focus-visible .tc-face__tip { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

.tc-team__more {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  border-bottom: 2px solid var(--cyan);
  padding-bottom: 2px;
}
.tc-team__more:hover { color: var(--cyan); }

@media (max-width: 420px) {
  .tc-face { width: 52px; height: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  .tc-face, .tc-face__tip { transition: none; }
}

/* Pe telefon și tabletă (fără mouse): numele, rolul și textul stau sub poză, vizibile direct (docs/58, F-A). */
@media (hover: none) {
  .tc-coach {
    aspect-ratio: auto;
    display: flex;
    flex-direction: column;
    background: var(--navy);
  }
  .tc-coach__img {
    position: static;
    aspect-ratio: 4 / 5;
    height: auto;
    transform: none !important;
  }
  .tc-coach__base,
  .tc-coach::before { display: none; }
  .tc-coach__hover {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    justify-content: flex-start;
    text-align: left;
    padding: 1.1rem 1.25rem 1.35rem;
    transition: none;
  }
  .tc-coach__hover .tc-coach__name { font-size: 1.45rem; }
  .tc-coach__text { font-size: 0.9rem; }
}
