/* Takımlar dizini — eşit boyutta yatay kartlar + açılır kadro */

.td-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 120px 20px 90px;
  width: 100%;
  box-sizing: border-box;
}

.td-head {
  margin-bottom: 22px;
}

.td-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 0 0 22px;
}

.td-search {
  flex: 1 1 240px;
  min-width: 0;
  background: rgba(17, 0, 8, 0.75);
  border: 1px solid rgba(255, 26, 26, 0.22);
  border-radius: 12px;
  color: var(--white);
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 14px;
}

.td-search:focus {
  outline: none;
  border-color: var(--red);
}

.td-count {
  color: var(--gray);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
}

.td-page [hidden] {
  display: none !important;
}

.td-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
  width: 100%;
}

.td-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
  min-height: 148px;
  background:
    linear-gradient(90deg, rgba(42, 0, 18, 0.35) 0%, transparent 38%),
    linear-gradient(180deg, rgba(26, 0, 16, 0.94), rgba(17, 0, 8, 0.98));
  border: 1px solid rgba(255, 26, 26, 0.2);
  border-radius: 16px;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.td-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, transparent, var(--red), transparent);
  pointer-events: none;
  z-index: 2;
}

.td-card:hover {
  border-color: rgba(255, 26, 26, 0.48);
  box-shadow: 0 10px 32px rgba(255, 26, 26, 0.08);
}

.td-card.is-open {
  border-color: rgba(255, 26, 26, 0.4);
}

.td-card-row {
  display: flex;
  align-items: stretch;
  height: 148px;
  min-height: 148px;
  max-height: 148px;
}

.td-cover {
  position: relative;
  width: 128px;
  flex-shrink: 0;
  height: 148px;
  background: linear-gradient(135deg, #3a0018, #14000c 55%, #1a000e);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.td-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 42%, rgba(17, 0, 8, 0.92) 100%);
  pointer-events: none;
}

.td-cover-link {
  display: block;
  width: 100%;
  height: 100%;
}

.td-card-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 12px 14px 10px 6px;
}

.td-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  flex: 1;
}

.td-identity:hover .td-meta h2 {
  color: #fff;
}

.td-logo {
  width: 56px;
  height: 56px;
  margin-left: -28px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(26, 0, 16, 0.96);
  border: 2px solid rgba(248, 240, 242, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Orbitron', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--white);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  position: relative;
  z-index: 1;
}

.td-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.td-meta {
  min-width: 0;
  flex: 1;
}

.td-meta h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--white);
  margin: 0 0 6px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.td-tag {
  color: var(--red);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.td-sub {
  color: var(--gray);
  font-size: 0.9rem;
}

.td-card-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  flex-shrink: 0;
  padding-left: 8px;
}

.td-places {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.td-place {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.td-place--1 {
  background: rgba(243, 186, 47, 0.14);
  color: #f3ba2f;
  border: 1px solid rgba(243, 186, 47, 0.35);
}

.td-place--2 {
  background: rgba(186, 199, 214, 0.12);
  color: #c5d0dc;
  border: 1px solid rgba(186, 199, 214, 0.28);
}

.td-place--3 {
  background: rgba(205, 127, 50, 0.14);
  color: #d08a4a;
  border: 1px solid rgba(205, 127, 50, 0.32);
}

.td-place--4 {
  background: rgba(140, 150, 165, 0.12);
  color: #9aa6b4;
  border: 1px solid rgba(140, 150, 165, 0.26);
}

.td-foot {
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.td-foot:hover {
  color: #ff4d4d;
}

.td-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: auto;
  padding: 8px 4px 2px;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: var(--gray);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: left;
}

.td-toggle:hover,
.td-card.is-open .td-toggle {
  color: var(--white);
}

.td-toggle-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 26, 26, 0.16);
  color: var(--white);
  font-size: 0.72rem;
}

.td-toggle-chevron {
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.18s ease;
}

.td-card.is-open .td-toggle-chevron {
  transform: rotate(225deg) translate(-1px, -1px);
}

.td-panel {
  border-top: 1px solid rgba(255, 26, 26, 0.16);
  background: rgba(0, 0, 0, 0.18);
  padding: 16px 20px 18px;
}

.td-panel-label {
  margin: 0 0 10px;
  color: var(--gray);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.td-place-list {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: var(--gray);
  font-size: 0.84rem;
  line-height: 1.4;
}

.td-place-list strong {
  color: var(--white);
  font-weight: 600;
}

.td-roster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}

.td-player {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 8px 10px;
}

.td-player--captain {
  border-color: rgba(255, 26, 26, 0.32);
  background: rgba(255, 26, 26, 0.06);
}

.td-chip-av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 26, 26, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--white);
  flex-shrink: 0;
}

.td-chip-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.td-player-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.td-player-name {
  color: var(--white);
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.td-player-role {
  color: var(--gray);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.td-player--captain .td-player-role {
  color: var(--red);
  font-weight: 700;
}

@media (max-width: 900px) {
  .td-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .td-card-row {
    flex-direction: column;
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .td-cover {
    width: 100%;
    height: 96px;
  }

  .td-cover::after {
    background: linear-gradient(180deg, transparent 30%, rgba(17, 0, 8, 0.92) 100%);
  }

  .td-card-main {
    padding: 8px 16px 12px;
  }

  .td-logo {
    width: 56px;
    height: 56px;
    margin-left: 0;
    margin-top: -28px;
  }

  .td-meta h2 {
    white-space: normal;
  }

  .td-identity {
    flex-wrap: wrap;
    align-items: flex-end;
  }

  .td-card-side {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .td-card,
  .td-toggle-chevron {
    transition: none;
  }
}
