/* TJ Spartak Valtířov – Match Detail v1.6.8 */
:root {
  --spartak-teal: #16a8a4;
  --spartak-teal-dark: #0f8582;
  --spartak-dark: #26323b;
  --spartak-muted: #66737c;
  --spartak-border: #e3e8eb;
  --spartak-bg: #f4f7f8;
  --spartak-radius: 16px;
  --spartak-shadow: 0 10px 30px rgba(24, 39, 49, .09);
}

.spartak-match { margin: 0 0 32px; }
.spartak-match * { box-sizing: border-box; }

/* HERO */
.spartak-match-hero {
  position: relative;
  overflow: hidden;
  margin: 0 0 24px;
  padding: 22px 30px 0;
  min-height: 305px;
  border-radius: var(--spartak-radius);
  color: #fff;
  background:
    radial-gradient(circle at 50% 42%, rgba(22,168,164,.18), transparent 34%),
    linear-gradient(135deg, #26323b 0%, #1d2a32 58%, #0f8582 100%);
  box-shadow: var(--spartak-shadow);
}
.spartak-match-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .11;
  background-image: repeating-linear-gradient(125deg, transparent 0 38px, rgba(255,255,255,.18) 39px 40px);
  pointer-events: none;
}
.spartak-match-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  background: var(--spartak-teal);
}
.spartak-match-hero__watermark {
  position: absolute;
  right: -65px;
  top: 50%;
  width: 310px;
  height: 310px;
  transform: translateY(-52%) rotate(-8deg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: .045;
  filter: grayscale(1) brightness(3);
  pointer-events: none;
}
.spartak-match-hero__meta,
.spartak-match-hero__main,
.spartak-match-hero__title { position: relative; z-index: 1; }
.spartak-match-hero__meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 12px;
  color: rgba(255,255,255,.84);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .025em;
}
.spartak-match-hero__meta span + span::before {
  content: "•";
  margin-right: 18px;
  color: var(--spartak-teal);
}
.spartak-match-hero__main {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(150px,auto) minmax(0,1fr);
  align-items: center;
  gap: 20px;
  min-height: 190px;
}
.spartak-match-hero__team {
  min-width: 0;
  text-align: center;
}
.spartak-match-hero__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 175px;
  height: 175px;
  margin: 0 auto;
}
.spartak-match-hero__logo-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  filter: drop-shadow(0 10px 14px rgba(0,0,0,.28));
}
.spartak-match-hero__logo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 110px;
  height: 110px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  font-size: 42px;
  font-weight: 900;
}
.spartak-match-hero__score-wrap {
  min-width: 170px;
  text-align: center;
}
.spartak-match-hero__score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: clamp(58px, 8vw, 86px);
  line-height: .95;
  font-weight: 900;
  letter-spacing: -.045em;
  text-shadow: 0 5px 16px rgba(0,0,0,.22);
}
.spartak-match-hero__score b {
  color: var(--spartak-teal);
  font-weight: 800;
}
.spartak-match-hero__halftime {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.18);
  color: rgba(255,255,255,.75);
  font-size: 12px;
  font-weight: 700;
}
.spartak-match-hero__title {
  margin: 14px -30px 0;
  padding: 15px 22px;
  border-top: 1px solid rgba(255,255,255,.09);
  background: rgba(0,0,0,.22);
  color: #fff;
  font-size: 17px;
  line-height: 1.3;
  font-weight: 800;
  text-align: center;
}

.spartak-match-card,
.spartak-match-tabs {
  margin: 0 0 24px;
  padding: 24px;
  border: 1px solid var(--spartak-border);
  border-radius: var(--spartak-radius);
  background: #fff;
  box-shadow: var(--spartak-shadow);
}
.spartak-match-heading {
  margin: -24px -24px 22px;
  padding: 15px 22px;
  border-radius: var(--spartak-radius) var(--spartak-radius) 0 0;
  background: var(--spartak-dark);
  color: #fff;
  font-size: 18px;
  line-height: 1.25;
}
.spartak-match-heading::before { content: ""; display:inline-block; width:4px; height:18px; margin-right:10px; border-radius:4px; background:var(--spartak-teal); vertical-align:-3px; }
.spartak-match-report__content > :last-child { margin-bottom: 0; }

.spartak-match-motm { display:flex; align-items:center; gap:24px; padding:18px 22px; border-top:4px solid var(--spartak-teal); }
.spartak-match-motm__label { min-width:150px; color:var(--spartak-dark); font-size:16px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; }
.spartak-match-motm__label span { color:var(--spartak-teal); font-size:22px; }
.spartak-match-motm__player { display:flex; align-items:center; gap:14px; color:var(--spartak-dark); text-decoration:none; }
.spartak-match-motm__player:hover strong { color:var(--spartak-teal-dark); }
.spartak-match-motm__photo { display:flex;align-items:center;justify-content:center;width:64px;height:64px;overflow:hidden;border-radius:50%;background:var(--spartak-bg);color:var(--spartak-teal);font-size:28px; }
.spartak-match-motm__photo img { width:100%;height:100%;object-fit:cover; }
.spartak-match-motm__player strong,.spartak-match-motm__player span { display:block; }
.spartak-match-motm__player span { margin-top:3px;color:var(--spartak-muted);font-size:13px; }

.spartak-match-boxscore .sp-template { margin:0 0 20px; }
.spartak-match-boxscore .sp-template:last-child { margin-bottom:0; }
.spartak-match-boxscore .sp-table-caption { padding:10px 14px;border-radius:9px;background:var(--spartak-bg);color:var(--spartak-dark);font-size:15px; }
.spartak-match-boxscore .sp-data-table { border-collapse:separate;border-spacing:0;overflow:hidden;border:1px solid var(--spartak-border);border-radius:10px; }
.spartak-match-boxscore .sp-data-table th { background:var(--spartak-dark);color:#fff; }
.spartak-match-boxscore .sp-data-table td,.spartak-match-boxscore .sp-data-table th { padding:10px 11px;border-color:var(--spartak-border); }
.spartak-match-boxscore .sp-data-table tr:nth-child(even) td { background:#f8fafb; }
.spartak-match-boxscore .sp-event-stars { color:var(--spartak-teal); }

.spartak-match-tabs { padding:0; overflow:hidden; }
.spartak-match-tabs__nav { display:flex; gap:0; padding:0 18px; background:var(--spartak-dark); }
.spartak-match-tabs__button { position:relative; appearance:none; border:0; background:transparent; color:rgba(255,255,255,.72); padding:16px 18px; font:inherit; font-weight:800; cursor:pointer; }
.spartak-match-tabs__button::after { content:""; position:absolute; left:18px; right:18px; bottom:0; height:4px; border-radius:4px 4px 0 0; background:transparent; }
.spartak-match-tabs__button:hover,.spartak-match-tabs__button.is-active { color:#fff; }
.spartak-match-tabs__button.is-active::after { background:var(--spartak-teal); }
.spartak-match-tabs__panel { padding:24px; }
.spartak-match-tabs__panel[hidden] { display:none !important; }
.spartak-match-tabs__panel .sp-template:first-child .sp-table-caption { margin-top:0; }
.spartak-match-tabs__panel .sp-table-caption { padding:10px 14px;border-radius:9px;background:var(--spartak-bg);color:var(--spartak-dark);font-size:15px; }
.spartak-match-tabs__panel .sp-data-table { border:1px solid var(--spartak-border);border-radius:10px;overflow:hidden; }
.spartak-match-tabs__panel .gallery,.spartak-match-tabs__panel .wp-block-gallery { margin:0; }
.spartak-match-tabs__panel .gallery-item img,.spartak-match-tabs__panel .wp-block-gallery img { border-radius:10px; }


/* DETAILS TAB */
.spartak-match-details {
  display: grid;
  gap: 20px;
}
.spartak-match-details__grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.35fr);
  align-items: stretch;
  gap: 20px;
}
.spartak-match-details__column {
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  gap: 20px;
}
.spartak-match-details__column:first-child .spartak-match-attendance {
  margin-top: auto;
}
.spartak-match-details__column:last-child .spartak-match-detail-block--venue {
  height: 100%;
}
.spartak-match-detail-block {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--spartak-border);
  border-top: 4px solid var(--spartak-teal);
  border-radius: 14px;
  background: #fff;
}
.spartak-match-detail-block__title {
  margin: 0;
  padding: 14px 16px;
  background: var(--spartak-bg);
  color: var(--spartak-dark);
  font-size: 17px;
  line-height: 1.25;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .015em;
}
.spartak-match-detail-block .sp-template {
  margin: 0;
}
.spartak-match-detail-block .sp-table-caption {
  margin: 0 !important;
  padding: 14px 16px !important;
  border-radius: 0 !important;
  background: var(--spartak-bg) !important;
  color: var(--spartak-dark) !important;
  font-size: 17px !important;
  line-height: 1.25 !important;
  font-weight: 900 !important;
  text-transform: uppercase;
  letter-spacing: .015em;
}
.spartak-match-detail-block .sp-data-table {
  width: 100%;
  margin: 0;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none;
}
.spartak-match-detail-block .sp-data-table th,
.spartak-match-detail-block .sp-data-table td {
  padding: 11px 14px;
  border-right: 0;
  border-left: 0;
  border-color: var(--spartak-border);
}
.spartak-match-detail-block .sp-data-table th {
  background: #fff;
  color: var(--spartak-teal-dark);
}
.spartak-match-detail-block .sp-data-table tr:nth-child(even) td {
  background: #f8fafb;
}




.spartak-match-detail-block--officials .sp-data-table th {
  padding-bottom: 3px;
  font-size: 13px;
  font-weight: 800;
}
.spartak-match-detail-block--officials .sp-data-table td {
  padding-top: 3px;
}


.spartak-match-officials-list {
  display: grid;
}
.spartak-match-official {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--spartak-border);
}
.spartak-match-official:last-child {
  border-bottom: 0;
}
.spartak-match-official strong {
  color: var(--spartak-dark);
  font-size: 13px;
  line-height: 1.3;
  font-weight: 800;
}
.spartak-match-official span,
.spartak-match-official a {
  color: var(--spartak-dark) !important;
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
}
.spartak-match-official a:hover {
  color: var(--spartak-teal-dark) !important;
}

/* Attendance */
.spartak-match-attendance__content {
  display: flex;
  min-height: 142px;
  padding: 18px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}
.spartak-match-attendance__icon {
  margin-bottom: 5px;
  font-size: 27px;
  line-height: 1;
}
.spartak-match-attendance strong {
  color: var(--spartak-dark);
  font-size: clamp(38px, 6vw, 54px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -.035em;
}
.spartak-match-attendance__content > span:last-child {
  margin-top: 7px;
  color: var(--spartak-muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* Venue and Google map */
.spartak-match-detail-block--venue .sp-event-venue {
  display: flex;
  height: 100%;
  margin: 0;
  flex-direction: column;
}
.spartak-match-detail-block--venue iframe,
.spartak-match-detail-block--venue .sp-google-map,
.spartak-match-detail-block--venue .sp-event-venue-map {
  display: block;
  width: 100% !important;
  height: 235px !important;
  min-height: 235px !important;
  max-height: 235px !important;
  border: 0;
}
.spartak-match-detail-block--venue address,
.spartak-match-detail-block--venue .sp-event-venue-address {
  margin: 0;
  padding: 11px 16px;
  color: var(--spartak-muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

/* Match statistics */
.spartak-match-detail-block--statistics {
  grid-column: 1 / -1;
}
.spartak-match-statistics {
  padding: 18px 20px 22px;
}
.spartak-match-statistics__teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  margin-bottom: 14px;
  color: var(--spartak-dark);
  font-size: 14px;
}
.spartak-match-statistics__teams strong:first-child {
  text-align: left;
}
.spartak-match-statistics__teams strong:last-child {
  text-align: right;
}
.spartak-match-statistics__row {
  padding: 13px 0;
  border-top: 1px solid var(--spartak-border);
}
.spartak-match-statistics__row:first-of-type {
  border-top: 0;
}
.spartak-match-statistics__values {
  display: grid;
  grid-template-columns: 70px minmax(120px, 1fr) 70px;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.spartak-match-statistics__values strong {
  color: var(--spartak-dark);
  font-size: 18px;
  line-height: 1;
  font-weight: 900;
}
.spartak-match-statistics__values strong:first-child {
  text-align: left;
}
.spartak-match-statistics__values strong:last-child {
  text-align: right;
}
.spartak-match-statistics__values span {
  color: var(--spartak-muted);
  font-size: 13px;
  line-height: 1.25;
  font-weight: 800;
  text-align: center;
}
.spartak-match-statistics__bars {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
}
.spartak-match-statistics__bar {
  position: relative;
  height: 9px;
  overflow: hidden;
  background: #e8edef;
}
.spartak-match-statistics__bar--home {
  border-radius: 999px 0 0 999px;
}
.spartak-match-statistics__bar--away {
  border-radius: 0 999px 999px 0;
}
.spartak-match-statistics__bar span {
  position: absolute;
  top: 0;
  bottom: 0;
  display: block;
  border-radius: inherit;
  background: var(--spartak-teal);
}
.spartak-match-statistics__bar--home span {
  right: 0;
}
.spartak-match-statistics__bar--away span {
  left: 0;
}
.spartak-match-statistics__bar--away span {
  background: var(--spartak-dark);
}

@media (max-width: 680px) {
  .spartak-match-hero {
    min-height: 238px;
    padding: 16px 14px 0;
  }
  .spartak-match-hero__watermark {
    right: -55px;
    width: 220px;
    height: 220px;
  }
  .spartak-match-hero__meta {
    gap: 6px 10px;
    margin-bottom: 9px;
    font-size: 11px;
  }
  .spartak-match-hero__meta span + span::before { margin-right: 10px; }
  .spartak-match-hero__main {
    grid-template-columns: minmax(0,1fr) minmax(92px,auto) minmax(0,1fr);
    gap: 8px;
    min-height: 142px;
  }
  .spartak-match-hero__logo {
    width: 98px;
    height: 98px;
  }
  .spartak-match-hero__score-wrap { min-width: 92px; }
  .spartak-match-hero__score {
    gap: 7px;
    font-size: 44px;
  }
  .spartak-match-hero__halftime {
    margin-top: 7px;
    padding: 3px 7px;
    font-size: 10px;
  }
  .spartak-match-hero__title {
    margin: 10px -14px 0;
    padding: 12px 10px;
    font-size: 14px;
  }
  .spartak-match-card { padding:18px; }
  .spartak-match-heading { margin:-18px -18px 18px;padding:14px 17px; }
  .spartak-match-motm { align-items:flex-start;flex-direction:column;gap:12px; }
  .spartak-match-tabs__nav { padding:0 6px; }
  .spartak-match-tabs__button { flex:1;padding:14px 8px; }
  .spartak-match-tabs__panel { padding:16px; }
  .spartak-match-details__grid { grid-template-columns:1fr; gap:16px; }
  .spartak-match-details__column {
    display:grid;
    height:auto;
    gap:16px;
  }
  .spartak-match-details__column:first-child .spartak-match-attendance {
    margin-top:0;
  }
  .spartak-match-details__column:last-child .spartak-match-detail-block--venue {
    height:auto;
    min-height:0;
  }
  .spartak-match-details { gap:16px; }
  .spartak-match-statistics { padding:14px 14px 18px; }
  .spartak-match-statistics__teams { gap:20px; font-size:12px; }
  .spartak-match-statistics__values {
    grid-template-columns:48px minmax(92px,1fr) 48px;
    gap:8px;
  }
  .spartak-match-statistics__values strong { font-size:16px; }
  .spartak-match-statistics__values span { font-size:12px; }
  .spartak-match-detail-block--venue iframe,
  .spartak-match-detail-block--venue .sp-google-map,
  .spartak-match-detail-block--venue .sp-event-venue-map {
    height:210px !important;
    min-height:210px !important;
    max-height:210px !important;
  }
}

@media (max-width: 420px) {
  .spartak-match-hero__logo {
    width: 82px;
    height: 82px;
  }
  .spartak-match-hero__score {
    gap: 5px;
    font-size: 38px;
  }
  .spartak-match-hero__main {
    grid-template-columns: minmax(0,1fr) minmax(82px,auto) minmax(0,1fr);
  }
}


