/* =========================================
   Team Page
   Mobile First
   ========================================= */

/* =========================================
   Hero
   ========================================= */

.teamHero {
  position: relative;

  width: 100%;
  overflow: hidden;
}

.teamHeroImage {
  width: 100%;
  height: 450px;

  object-fit: cover;
  object-position: center 35%;
}

.teamHeroOverlay {
  position: absolute;
  inset: 0;

  display: flex;
  align-items: flex-end;

  background: linear-gradient(to top, rgb(0 0 0 / 65%), transparent 60%);
}

.teamHeroInner {
  width: 100%;
  max-width: 1200px;

  margin-inline: auto;

  padding: 24px;
}

.teamHeroTitle {
  margin: 0;

  color: white;

  font-size: 2rem;
  line-height: 1.2;
}

/* =========================================
   Team Page Content
   ========================================= */

.teamPage {
  padding-top: 24px;
}

/* =========================================
   Team Navigation
   ========================================= */

.teamNavigation {
  overflow: visible;

  border: 1px solid #ccc;
  border-radius: 8px;

  background-color: white;
}

.teamNavigation button {
  appearance: none;
  margin: 0;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.teamPanel[hidden] {
  display: none;
}

/* Desktop-Navigation auf Mobile ausblenden */

.teamNavigationDesktop {
  display: none;
}

/* Mobile Navigation */

.teamNavigationMobile {
  display: block;
}

.teamNavigationMobile summary {
  padding: 14px 18px;

  color: var(--color-primary);

  font-weight: 600;

  cursor: pointer;
}

.teamNavigationMobile summary:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

.teamNavigationMobile ul {
  display: flex;
  flex-direction: column;

  width: 100%;

  margin: 0;
  padding: 0;

  list-style: none;

  border-top: 1px solid #ddd;
}

.teamNavigationMobile button {
  display: block;
  width: 100%;

  padding: 12px 18px;

  color: #333;

  text-decoration: none;

  border-bottom: 0;
}

.teamNavigationMobile button[aria-pressed="true"] {
  color: var(--color-primary);

  background-color: rgb(4 170 109 / 8%);

  font-weight: 600;
}

.teamNavigation button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -4px;
}

/* =========================================
   Team Info
   ========================================= */

.teamPanel {
  margin-top: 32px;
}

.teamInfoSection + .teamInfoSection {
  margin-top: 40px;
}

.teamInfoSection > h2,
.teamPanel > h2 {
  margin: 0 0 var(--heading-section-gap);

  font-size: var(--heading-section-size);
  font-weight: 700;
  line-height: var(--heading-line-height);
}

.teamLeague {
  display: inline-block;

  margin-bottom: 16px;
  padding: 6px 12px;

  border-radius: 6px;

  background-color: rgb(4 170 109 / 10%);

  color: var(--color-primary);

  font-size: 0.9rem;
  font-weight: 600;
}

.teamDescription {
  max-width: 800px;

  line-height: 1.8;
}

/* Ansprechpartner */

.teamContactGrid {
  display: grid;

  grid-template-columns: minmax(0, 1fr);

  gap: 20px;
  padding-top: 64px;
  row-gap: 88px;
}

.teamInfo .teamContactCard {
  padding-top: 0;
  text-align: center;
}

.teamInfo .teamContactCard p {
  text-align: center;
}

.teamInfo .teamContactPortrait {
  width: min(180px, 100%);
  height: auto;
  aspect-ratio: 6 / 7;
  object-fit: contain;
  object-position: bottom;
  margin: -64px auto 20px;
}

.teamInfo .teamContactPending {
  color: #666;
  font-size: 0.85rem;
}

.teamInfoCard {
  padding: 24px;

  border: 1px solid #ddd;
  border-radius: 10px;

  background-color: white;
}

.teamInfoCard h3 {
  margin-bottom: 12px;

  font-size: var(--heading-card-size);
  font-weight: 700;
  line-height: var(--heading-line-height);
}

.teamInfoCard p {
  text-align: left;
}

.teamInfoCard a {
  color: var(--color-primary);

  text-underline-offset: 3px;
}

.teamInfoLabel {
  margin-bottom: 8px;

  color: #08774e;

  font-size: 0.85rem;
  font-weight: 600;
}

/* Training */

.teamTrainingTimes {
  max-width: 640px;

  padding: 8px 24px;

  border-left: 4px solid var(--color-primary);
  border-radius: 0 10px 10px 0;

  background-color: white;
}

.teamTrainingTimes h3 {
  margin-bottom: 12px;

  font-size: 1rem;
}

.teamTrainingTimes p {
  text-align: left;

  line-height: 1.8;
}

.teamInfo .teamTrainingRow {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 14px;
}

.teamInfo .teamTrainingRow + .teamTrainingRow {
  border-top: 1px solid #eee;
}

.teamInfo .teamTrainingRow strong {
  font-weight: 600;
}

.teamInfo .teamInfoLink {
  display: inline-block;
  margin-top: 16px;
  color: #08774e;
  text-underline-offset: 4px;
}

.teamInfo .teamInfoLink:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.teamInfo .teamTrainingLocation {
  padding: 24px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background-color: white;
  text-align: left;
}

.teamInfo .teamTrainingLocationHeader {
  display: flex;
  align-items: center;
  gap: 16px;
}

.teamInfo .teamTrainingLocationHeader > div {
  min-width: 0;
}

.teamInfo .teamTrainingLocationIcon {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  padding: 12px;
  border-radius: 10px;
  color: #08774e;
  background-color: rgb(4 170 109 / 10%);
}

.teamInfo .teamTrainingLocation p {
  text-align: left;
  font-size: 1.1rem;
  font-weight: 600;
}

/* Trainingsort */

.teamInfo .teamMapConsent {
  margin-top: 20px;
}

.teamInfo .teamMapNotice {
  padding: 24px;
  border-radius: 10px;
  background: #e5ece8;
}

.teamInfo .teamMapNotice p {
  margin-bottom: 12px;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.6;
}

.teamInfo .teamMapNotice a {
  display: inline-block;
  margin: 0 16px 12px 0;
  color: #08774e;
  text-underline-offset: 3px;
}

.teamInfo .teamMapButton {
  display: block;
  max-width: 100%;
  margin-top: 12px;
  padding: 12px 18px;
  border: 0;
  border-radius: 8px;
  background: #08774e;
  color: white;
  font: inherit;
  cursor: pointer;
}

.teamInfo .teamMapConsent [hidden] {
  display: none;
}

.teamInfo .teamMapButton:focus-visible {
  outline: 2px solid #08774e;
  outline-offset: 4px;
}

.teamTrainingMap {
  display: block;

  width: 100%;
  height: clamp(280px, 40vw, 400px);

  margin-top: 16px;

  border: 0;
  border-radius: 10px;

  background-color: #e5ece8;
}

/* =========================================
   Hover
   ========================================= */

@media (hover: hover) {
  .teamNavigation button:hover {
    color: var(--color-primary);

    background-color: rgb(4 170 109 / 8%);
  }
}

/* =========================================
   Desktop
   ========================================= */

@media (min-width: 992px) {
  .teamHeroImage {
    height: 700px;
  }

  .teamHeroInner {
    padding: 36px 24px;
  }

  .teamHeroTitle {
    font-size: 2.8rem;
  }

  .teamPage {
    padding-top: 32px;
  }

  .teamNavigation {
    overflow-x: auto;

    border: 0;
    border-top: 1px solid #ddd;
    border-bottom: 2px solid #ddd;
    border-radius: 0;

    background-color: transparent;
  }

  .teamNavigationMobile {
    display: none;
  }

  .teamNavigationDesktop {
    display: flex;

    gap: 4px;

    width: max-content;
    min-width: 100%;

    margin: 0;
    padding: 0;

    list-style: none;
  }

  .teamNavigationDesktop button {
    display: block;

    padding: 12px 18px;

    color: #333;

    text-decoration: none;
    white-space: nowrap;

    border-bottom: 3px solid transparent;
  }

  .teamNavigationDesktop button[aria-pressed="true"] {
    color: var(--color-primary);

    border-bottom-color: var(--color-primary);

    font-weight: 600;
  }

  .teamPanel {
    margin-top: 40px;
  }

}

@media (min-width: 761px) {
  .teamInfo .teamContactGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
