/* Department Hero */
.tk-department-hero {
  padding: 1rem 0;
  border-radius: 0;
}

.tk-department-hero.tk-card-surface {
  border-radius: 0;
}

.tk-department-hero-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: center;
}

.tk-department-hero > .container {
  position: relative;
  width: 100%;
  max-width: none !important;
  margin-left: 0;
  margin-right: 0;
  padding-left: clamp(1.25rem, 2.25vw, 3rem);
  padding-right: clamp(1.25rem, 2.25vw, 3rem);
}

.tk-department-hero-logo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.tk-department-hero-logo-image {
  width: auto;
  height: clamp(130px, 9vw, 168px);
  max-width: min(100%, 280px);
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

.tk-department-hero-logo-fallback {
  width: clamp(130px, 9vw, 168px);
  height: clamp(130px, 9vw, 168px);
  border-radius: 8px;
  display: block;
}

.tk-department-hero-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 0.5rem;
}

.tk-department-hero-badge {
  display: inline-block;
  background: #0052cc;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
  position: absolute;
  top: .2rem;
  right: clamp(1.25rem, 2.25vw, 3rem);
}

.tk-department-hero .tk-department-toggle-all {
  position: absolute;
  top: 50%;
  right: clamp(1.25rem, 2.25vw, 3rem);
  margin: 0;
  transform: translateY(-50%);
}

.tk-department-hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0;
  color: #003d82;
  line-height: 1.2;
}

.tk-department-hero-description {
  font-size: 1.125rem;
  color: #555;
  margin: 0 0 1.5rem 0;
  line-height: 1.6;
}

.tk-department-hero-stats {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.tk-hero-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.tk-hero-stat-value {
  font-size: 1.875rem;
  font-weight: 700;
  color: #0052cc;
}

.tk-hero-stat-label {
  font-size: 0.875rem;
  color: #666;
  font-weight: 500;
}

/* Info Sections */
.tk-department-info-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  align-items: stretch;
  gap: 1rem;
  margin-bottom: 1rem;
}

.tk-department-info-section {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 1.2rem;
  border: 1px solid rgba(120, 161, 218, 0.22);
  border-radius: 18px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.99), rgba(246, 250, 255, 0.96));
  box-shadow: 0 16px 34px -28px rgba(17, 54, 106, 0.42);
}

.tk-department-info-section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, rgba(31, 112, 229, 0.78), rgba(74, 191, 214, 0.52));
}

.tk-department-info-section > .tk-widget-kicker {
  margin-bottom: 0.35rem;
}

.tk-section-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e8f1ff;
}

.tk-section-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0;
  color: #003d82;
}

.tk-info-rows {
  display: grid;
  gap: 0;
  margin-top: 0.75rem;
}

.tk-info-row {
  display: grid;
  grid-template-columns: minmax(100px, 0.8fr) minmax(0, 1.2fr);
  align-items: start;
  gap: 0.75rem;
  min-height: 0;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(128, 174, 233, 0.16);
}

.tk-info-row:last-child {
  border-bottom: 0;
}

.tk-info-label {
  display: block;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #60738f;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.tk-info-value {
  min-width: 0;
  max-width: 100%;
  color: #334a68;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.35;
  text-align: right;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.tk-info-value small,
.tk-info-value a {
  display: block;
  font: inherit;
}

.tk-department-person-value {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.tk-department-person-copy {
  min-width: 0;
  text-align: right;
}

.tk-department-person-name {
  display: block;
}

.tk-department-person-avatar {
  width: 48px;
  min-width: 48px;
  height: 48px;
  border: 2px solid rgba(255, 255, 255, 0.96);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 18px -10px rgba(23, 55, 96, 0.55);
}

.tk-department-person-avatar.is-placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #e8f1ff, #d6e6fb);
  color: #52739d;
}

.tk-department-person-avatar svg {
  width: 25px;
  height: 25px;
  fill: currentColor;
}

.tk-department-info-section .tk-member-info-list {
  gap: 0;
  margin-top: 0.75rem;
}

.tk-department-info-section .tk-member-info-row {
  display: grid;
  grid-template-columns: minmax(100px, 0.8fr) minmax(0, 1.2fr);
  align-items: start;
  gap: 0.75rem;
  min-height: 0;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(128, 174, 233, 0.16);
}

.tk-department-info-section .tk-member-info-row:last-child {
  border-bottom: 0;
}

.tk-department-info-section .tk-data-key-badge {
  display: block;
  justify-self: start;
  max-width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #60738f;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

.tk-department-info-section .tk-member-info-row strong {
  min-width: 0;
  color: #334a68;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.35;
  text-align: right;
  overflow-wrap: anywhere;
}

.tk-department-fees-card .tk-info-row {
  grid-template-columns: minmax(0, 1fr) max-content;
}

.tk-department-fees-card .tk-info-value {
  white-space: nowrap;
}

.tk-training-schedule {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tk-training-row {
  font-size: 0.95rem;
  color: #333;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f4ff;
  line-height: 1.6;
}

.tk-training-row:last-child {
  border-bottom: none;
}

.tk-training-time-badge {
  display: inline-block;
  background: #0052cc;
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  margin: 0 0.25rem;
  white-space: nowrap;
}


/* Teams Grid */
.tk-department-teams-section {
  padding: 0.5rem 0 !important;
  margin-top: -3.5rem;
}

.tk-section-head {
  margin-bottom: 0.5rem;
}

.tk-section-head h2 {
  margin: 0 0 0.25rem 0;
}

.tk-teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 2rem;
}

.tk-team-card {
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.tk-team-card-header {
  padding: 1.5rem;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8f1ff 100%);
  border-bottom: 2px solid #0052cc;
}

.tk-team-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 40px;
}

.tk-team-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: #003d82;
  flex: 0 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.tk-team-league-badge {
  display: inline-block;
  background: #f4e8d8;
  color: #8b5a00;
  padding: 0.375rem 0.875rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.tk-team-league-badge:hover {
  background: #e8d8c8;
  box-shadow: 0 2px 6px rgba(139, 90, 0, 0.15);
}

.tk-member-count-badge {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  color: #666;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.tk-team-card-photo {
  width: 100%;
  max-height: 300px;
  margin: 1rem 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.tk-team-card-photo-image {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 8px 20px -10px rgba(20, 48, 86, 0.42);
}

.tk-team-card-lineup {
  padding: 1.5rem;
  flex: 1;
}

.tk-lineup-tabs {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tk-lineup-tab {
  border: 1px solid #e8f1ff;
  border-radius: 8px;
  overflow: hidden;
}

.tk-lineup-tab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 1rem;
  background: #f9fbff;
  cursor: pointer;
  font-weight: 600;
  color: #003d82;
  font-size: 0.95rem;
  -webkit-user-select: none;
  user-select: none;
  transition: background 0.2s ease;
  border: none;
}

.tk-lineup-tab-header:hover {
  background: #f0f4ff;
}

.tk-lineup-tab[open] > .tk-lineup-tab-header {
  background: #e8f1ff;
  color: #0052cc;
}

.tk-lineup-tab-title {
  font-weight: 600;
}

.tk-lineup-count {
  display: inline-block;
  background: #0052cc;
  color: white;
  padding: 0.375rem 0.625rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 34px;
  text-align: center;
}

.tk-lineup-grid {
  padding: 1.5rem;
  background: white;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.25rem;
}

.tk-lineup-player-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  padding: 0.25rem 1rem;
  background: #f9fbff;
  border-radius: 8px;
  cursor: default;
}

.tk-player-position-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #0052cc;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.tk-player-name-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: #222;
  text-align: center;
  flex: 1;
  min-width: 80px;
  word-break: break-word;
  line-height: 1.3;
}

.tk-player-avatar-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 57px;
  height: 57px;
  border-radius: 50%;
  background: white;
  border: 1px solid #0052cc;
  overflow: hidden;
  flex-shrink: 0;
}

.tk-player-avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tk-avatar-initial {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0052cc;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
}

.tk-empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #999;
  font-size: 1.125rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .tk-teams-grid {
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  }
}

@media (max-width: 768px) {
  .tk-department-hero-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }

  .tk-department-hero-badge {
    position: static;
  }

  .tk-department-hero .tk-department-toggle-all {
    position: static;
    margin-left: .5rem;
    transform: none;
  }

  .tk-department-hero-title {
    font-size: 1.75rem;
  }

  .tk-department-hero-stats {
    justify-content: center;
  }

  .tk-department-info-sections {
    grid-template-columns: 1fr;
  }

  .tk-teams-grid {
    grid-template-columns: 1fr;
  }

  .tk-team-card-title {
    font-size: 1.125rem;
  }

  .tk-lineup-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    padding: 1rem;
  }

  .tk-lineup-player-card {
    padding: 0.75rem;
  }

  .tk-player-position-circle {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }

  .tk-player-avatar-circle {
    width: 52px;
    height: 52px;
    border-width: 2px;
  }

  .tk-player-name-text {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .tk-department-hero {
    padding: 2rem 0;
  }

  .tk-department-hero-title {
    font-size: 1.5rem;
  }

  .tk-team-card-title {
    font-size: 1rem;
  }

  .tk-hero-stat-value {
    font-size: 1.5rem;
  }

  .tk-info-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.125rem;
  }

  .tk-info-value {
    text-align: left;
  }

  .tk-department-person-value {
    justify-content: space-between;
  }

  .tk-department-person-copy {
    text-align: left;
  }

  .tk-department-info-section .tk-member-info-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.35rem;
  }

  .tk-department-info-section .tk-member-info-row strong {
    text-align: left;
  }

  .tk-teams-grid {
    grid-template-columns: 1fr;
  }

  .tk-team-card-title-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .tk-lineup-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 1rem;
  }

  .tk-player-position-circle {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
  }

  .tk-player-avatar-circle {
    width: 48px;
    height: 48px;
    border-width: 2px;
  }

  .tk-player-name-text {
    font-size: 0.65rem;
  }

  .tk-team-league-badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
  }
}

/* Booking Section */
.tk-booking-section {
  padding: 1.5rem 0 !important;
}

.tk-booking-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 0;
}

.tk-booking-section-header .tk-section-head {
  flex: 1;
  margin: 0;
}

.tk-booking-section-header .btn {
  flex-shrink: 0;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tk-booking-section-header .btn img {
  width: 18px;
  height: 18px;
}

/* Groups Section */
.tk-department-groups-section {
  padding: 2rem 0 !important;
}

.tk-groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.tk-group-card {
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.tk-group-card:hover {
  box-shadow: 0 8px 24px rgba(0, 82, 204, 0.12);
  transform: translateY(-2px);
}

.tk-group-card-header {
  padding: 1.5rem;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8f1ff 100%);
  border-bottom: 2px solid #0052cc;
}

.tk-group-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0;
}

.tk-group-card-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #0052cc;
  flex: 1;
}

.tk-group-card-logo {
  height: 200px;
  overflow: hidden;
  background: #f5f8fc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tk-group-card-logo-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tk-group-card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tk-group-description {
  margin: 0;
  font-size: 0.95rem;
  color: #333;
  line-height: 1.5;
}

.tk-group-info-box {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.tk-group-info-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.75rem;
  align-items: flex-start;
}

.tk-group-info-row .tk-info-label {
  font-weight: 600;
  color: #555;
}

.tk-group-info-row .tk-info-value {
  color: #333;
  word-break: break-word;
}

.tk-group-info-row a.tk-info-value {
  color: #0052cc;
  text-decoration: none;
  transition: color 0.2s ease;
}

.tk-group-info-row a.tk-info-value:hover {
  color: #003d99;
  text-decoration: underline;
}

/* Responsive Groups Grid */
@media (max-width: 768px) {
  .tk-groups-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .tk-group-card-title-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .tk-group-info-row {
    grid-template-columns: 100px 1fr;
    gap: 0.5rem;
  }
}

/* Status Badges */
.tk-status-badge {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.tk-status-active {
  background: #dff0d8;
  color: #3c763d;
  border: 1px solid #d6e9c6;
}

.tk-status-inactive {
  background: #f2dede;
  color: #a94442;
  border: 1px solid #ebccd1;
}
.tk-department-toggle-all { margin-left: 1rem; cursor: pointer; }
.tk-department-accordion { margin: 1rem 1rem 0; }
.tk-department-accordion:first-of-type { margin-top: 1.75rem; }
.tk-department-accordion .section-block { margin-left: 0; margin-right: 0; }
.tk-department-accordion > .section-block { margin-top: 1rem !important; }
.tk-department-accordion > .section-block { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.tk-department-accordion .tk-homepage-settings-summary > .tk-homepage-settings-toggle {
  top: 1rem;
  right: 1rem;
}
.tk-department-blog-toolbar { display: flex; gap: .75rem; margin-bottom: 1.25rem; }
.tk-department-blog-section .tk-department-blog-toolbar,
.tk-department-blog-section .post-grid,
.tk-department-blog-section .tk-empty-state,
.tk-department-blog-section .tk-department-blog-pagination { margin-left: 1rem; margin-right: 1rem; }
.tk-department-blog-section .post-card-media { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.tk-department-blog-section .post-card-media img { display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; object-position: center; }
.tk-department-blog-toolbar .form-control { flex: 1; }
.tk-department-blog-toolbar .form-select { max-width: 180px; }
.tk-department-blog-pagination { display: flex; gap: .4rem; justify-content: center; margin-top: 1.25rem; }
@media (max-width: 600px) { .tk-department-blog-toolbar { flex-direction: column; } .tk-department-blog-toolbar .form-select { max-width: none; } }

@media (max-width: 768px) {
  .tk-department-hero-stats { justify-content: center; flex-wrap: wrap; }
  .tk-department-toggle-all { margin-left: .5rem; }
  .tk-department-accordion { margin-left: .75rem; margin-right: .75rem; }
}
