/* ================================================================
   ZURÜCK-BUTTON (sticky, unter Header)
   ================================================================ */
.sq-back-btn {
  appearance: none;
  position: fixed;
  top: calc(var(--sch-header-height, 84px) + 85px);
  left: clamp(16px, 3vw, 32px);
  z-index: 9999;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;

  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 255, 255, 0.35);

  color: #fff;
  text-decoration: none;
  cursor: pointer;
  line-height: 1;

  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.sq-back-btn:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.08);
}

.sq-back-btn:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.sq-back-btn:active {
  transform: scale(0.95);
}

.sq-back-btn svg {
  display: none;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  pointer-events: none;
}

.sq-back-btn__fallback {
  display: block;
  pointer-events: none;
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .sq-back-btn {
    top: calc(var(--sch-header-height, 84px) + 85px);
    width: 42px;
    height: 42px;
  }

  .sq-back-btn svg {
    width: 20px;
    height: 20px;
  }
}

/* ================================================================
   SQUAD WIDGET – squad-style.css (mit Stats + Dual-Image-Hover)
   ================================================================ */

.squad-widget *,
.squad-widget *::before,
.squad-widget *::after {
  box-sizing: border-box;
}

.squad-widget {
  --sq-navy:     #0d1a2e;
  --sq-navy-mid: #122035;
  --sq-white:    #ffffff;
  --sq-accent:   #cc0000;
  --sq-gap:      4px;

  width:        100vw;
  position:     relative;
  left:         50%;
  margin-left:  -50vw;
  background:   var(--sq-navy);
  padding:      40px 0 80px 0;
  color:        var(--sq-white);
  font-family:  inherit;
  overflow-x:   hidden;
}

.squad-section {
  position:      relative;
  width:         100%;
  overflow:      hidden;
  margin-bottom: 60px;
}

.squad-section__watermark {
  position:       absolute;
  top:            0;
  left:           50%;
  transform:      translateX(-50%);
  font-family:    inherit;
  font-size:      clamp(80px, 14vw, 180px);
  font-weight:    900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color:          rgba(255,255,255,0.06);
  white-space:    nowrap;
  pointer-events: none;
  user-select:    none;
  line-height:    1;
  z-index:        0;
}

.squad-section--trainer .squad-section__watermark {
  font-size:      clamp(54px, 8.8vw, 128px);
  letter-spacing: 0.015em;
  max-width:      calc(100vw - 32px);
  text-align:     center;
}

.squad-section__grid {
  position:              relative;
  z-index:               1;
  display:               grid;
  grid-template-columns: repeat(4, 1fr);
  gap:                   var(--sq-gap);
  padding:               160px var(--sq-gap) var(--sq-gap) var(--sq-gap);
}

/* ================================================================
   SPIELER-KARTE mit DUAL-IMAGE-HOVER
   ================================================================ */
.sq-card {
  position:   relative;
  overflow:   hidden;
  cursor:     pointer;
  background: var(--sq-navy-mid);
}

.sq-card__img-wrap {
  position:    relative;
  width:       100%;
  padding-top: 140%;
  overflow:    hidden;
}

/* Haupt-Bild (Portrait) */
.sq-card__img-main {
  position:        absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit:      cover;
  object-position: top center;
  transition:      opacity 0.4s ease, transform 0.6s ease;
  display:         block;
  z-index:         1;
}

.sq-card:hover .sq-card__img-main {
  opacity:   0;
  transform: scale(1.02);
}

/* Hover-Bild (Action-Shot) – versteckt, erscheint erst beim Hover */
.sq-card__img-hover {
  position:        absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit:      cover;
  object-position: center center;
  display:         block;
  z-index:         0;
  opacity:         0;
  transform:       scale(1.08);
  transition:      opacity 0.4s ease, transform 0.6s ease;
}

.sq-card:hover .sq-card__img-hover {
  opacity:   1;
  transform: scale(1);
}

/* Trikotnummer */
.sq-card__number {
  position:       absolute;
  bottom:         62px;
  left:           14px;
  font-family:    inherit;
  font-size:      clamp(36px, 5vw, 58px);
  font-weight:    900;
  color:          var(--sq-accent);
  opacity:        0.75;
  line-height:    1;
  pointer-events: none;
  user-select:    none;
  z-index:        2;
  transition:     opacity 0.3s ease;
}

.sq-card:hover .sq-card__number {
  opacity: 0.3;
}

/* Gradient */
.sq-card__gradient {
  position:   absolute;
  bottom: 0; left: 0; right: 0;
  height:     55%;
  background: linear-gradient(to top, rgba(10,22,42,0.97) 0%, rgba(10,22,42,0.5) 60%, transparent 100%);
  z-index:    1;
  transition: opacity 0.3s ease;
}

.sq-card:hover .sq-card__gradient {
  opacity: 0.7;
}

/* Name unten */
.sq-card__info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding:  14px 16px 16px;
  z-index:  3;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.sq-card:hover .sq-card__info {
  transform: translateY(10px);
  opacity:   0;
}

.sq-card__vorname {
  font-family:    inherit;
  font-size:      10px;
  font-weight:    500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color:          rgba(255,255,255,0.6);
  margin:         0 0 2px;
  line-height:    1.2;
}

.sq-card__nachname {
  font-family:    inherit;
  font-size:      clamp(14px, 2vw, 20px);
  font-weight:    800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color:          var(--sq-white);
  margin:         0;
  line-height:    1.1;
}

/* ================================================================
   HOVER-OVERLAY mit STATS
   ================================================================ */
.sq-card__hover-overlay {
  position:        absolute;
  bottom:          0;
  left:            0;
  right:           0;
  padding:         20px;
  opacity:         0;
  transform:       translateY(20px);
  transition:      opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s;
  z-index:         5;
}

.sq-card:hover .sq-card__hover-overlay {
  opacity:   1;
  transform: translateY(0);
}

.sq-card__stats {
  display:         flex;
  gap:             16px;
  justify-content: center;
}

.sq-stat {
  display:        flex;
  flex-direction: column;
  align-items:    center;
  background:     rgba(255,255,255,0.12);
  border-radius:  6px;
  padding:        10px 18px;
  backdrop-filter: blur(8px);
  border:         1px solid rgba(255,255,255,0.15);
}

.sq-stat-num {
  font-family:    inherit;
  font-size:      28px;
  font-weight:    900;
  color:          var(--sq-white);
  line-height:    1;
  margin-bottom:  4px;
}

.sq-stat-label {
  font-family:    inherit;
  font-size:      9px;
  font-weight:    600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color:          rgba(255,255,255,0.6);
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1100px) {
  .squad-section__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 720px) {
  .squad-section__grid      { grid-template-columns: repeat(2, 1fr); padding-top: 110px; }
  .squad-section__watermark {
    width: 100%;
    max-width: 100vw;
    padding: 0 8px;
    overflow: visible;
    font-size: clamp(30px, 8.4vw, 68px);
    letter-spacing: 0.015em;
    text-align: center;
  }
  .squad-section--trainer .squad-section__watermark {
    font-size: clamp(24px, 6.2vw, 46px);
    letter-spacing: 0;
    max-width: calc(100vw - 16px);
  }
  .sq-card__img-wrap        { padding-top: 130%; }
  .sq-card__img-main {
    object-fit: contain;
    object-position: center bottom;
    background: var(--sq-navy-mid);
  }
  .sq-card__img-hover {
    object-fit: cover;
    object-position: center center;
    background: var(--sq-navy-mid);
  }
  .squad-section            { margin-bottom: 40px; }
  .squad-widget             { padding: 28px 0 56px; }
  .sq-card__stats           { gap: 10px; }
  .sq-stat                  { padding: 8px 14px; }
  .sq-stat-num              { font-size: 22px; }
  .sq-stat-label            { font-size: 8px; }
  /* Touch: Name immer sichtbar, stats immer sichtbar */
  .sq-card__info { opacity: 1 !important; transform: none !important; }
  .sq-card__hover-overlay { opacity: 1 !important; transform: translateY(0) !important; }
  .sq-card__img-hover { opacity: 0 !important; }
  .sq-card__img-main { opacity: 1 !important; transform: none !important; }
  .sq-card__gradient { opacity: 1 !important; }
  .sq-card__number { opacity: 0.75 !important; }
  /* Stats kompakter */
  .sq-card__stats { justify-content: flex-start; }
  .sq-card__hover-overlay { padding: 14px; }
}

@media (max-width: 420px) {
  .squad-section__grid { gap: 2px; padding-top: 80px; }
  .sq-card__img-wrap   { padding-top: 125%; }
  .squad-section__watermark {
    font-size: clamp(28px, 8vw, 38px);
    letter-spacing: 0;
  }
  .squad-section--trainer .squad-section__watermark {
    font-size: clamp(19px, 5.6vw, 26px);
  }
  .sq-card__nachname   { font-size: 13px; }
  .sq-card__vorname    { font-size: 9px; }
  .squad-section       { margin-bottom: 30px; }
  .squad-widget        { padding: 20px 0 44px; }
  .sq-card__stats      { gap: 6px; }
  .sq-stat             { padding: 6px 10px; }
  .sq-stat-num         { font-size: 18px; }
  .sq-card__hover-overlay { padding: 10px; }
  .sq-card__number     { font-size: clamp(24px, 7vw, 40px); bottom: 50px; }
}

/* ================================================================
   SKELETON
   ================================================================ */
.sq-skeleton {
  display:               grid;
  grid-template-columns: repeat(4, 1fr);
  gap:                   var(--sq-gap);
  padding:               160px var(--sq-gap) var(--sq-gap);
}

@media (max-width: 1100px) { .sq-skeleton { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px)  { .sq-skeleton { grid-template-columns: repeat(2, 1fr); padding-top: 110px; } }

.sq-skel-card { background: rgba(255,255,255,0.05); animation: sq-pulse 1.6s ease-in-out infinite; }
.sq-skel-img  { width: 100%; padding-top: 140%; background: rgba(255,255,255,0.07); }
.sq-skel-info { padding: 14px; }
.sq-skel-line { height: 10px; background: rgba(255,255,255,0.08); border-radius: 2px; margin-bottom: 8px; }
.sq-skel-line:last-child { width: 55%; margin-bottom: 0; }

@keyframes sq-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.45; }
}

.sq-error {
  padding:        60px 20px;
  text-align:     center;
  color:          rgba(255,255,255,0.4);
  font-family:    inherit;
  font-size:      14px;
  letter-spacing: 0.05em;
}
