/**
 * Results page styles
 */

/* ── Hero ─────────────────────────────────────── */
.results-hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.results-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.results-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: brightness(0.45) saturate(1.1);
}

.results-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 20%, rgba(5,8,18,0.6) 60%, #050812 100%);
}

.results-hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0 0 56px;
}

.results-hero-badge,
.pr-hero .results-hero-badge {
  display: inline-block;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-primary, #FF4500);
  border: 1px solid rgba(255,69,0,0.4);
  padding: 4px 12px;
  border-radius: 2px;
  margin-bottom: 16px;
}

.results-hero h1,
.pr-hero h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(56px, 10vw, 100px);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 0.95;
  color: #fff;
  text-transform: uppercase;
  margin: 0 0 16px;
}

.results-hero h1 span,
.pr-hero h1 span {
  color: var(--color-primary, #FF4500);
}

.results-hero-sub,
.pr-hero .results-hero-sub {
  font-family: 'Barlow', sans-serif;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.55);
  max-width: 480px;
  line-height: 1.6;
}

/* ── Section ──────────────────────────────────── */
.results-section {
  padding: 48px 0 80px;
  background: #050812;
}

.results-section-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-primary, #FF4500);
  margin-bottom: 6px;
}

.results-section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  letter-spacing: 0.04em;
  color: #fff;
  line-height: 1;
}

/* ── Placeholder ──────────────────────────────── */
.results-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 400px;
  padding: 48px 24px;
  text-align: center;
}

.results-placeholder-icon { font-size: 3rem; opacity: 0.3; }

.results-placeholder-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}

.results-placeholder-sub {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.2);
  max-width: 360px;
  line-height: 1.6;
}

/* ── Toolbar ──────────────────────────────────── */
.res-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.res-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 380px;
}

.res-search-icon {
  position: absolute;
  left: 12px;
  font-size: 1.1rem;
  color: rgba(255,255,255,0.3);
  pointer-events: none;
  line-height: 1;
}

.res-search {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 10px 36px 10px 36px;
  font-size: 0.875rem;
  color: #fff;
  outline: none;
  transition: border-color 0.2s;
  font-family: 'Barlow', sans-serif;
}

.res-search::placeholder { color: rgba(255,255,255,0.25); }

.res-search:focus {
  border-color: rgba(255,69,0,0.5);
  background: rgba(255,255,255,0.07);
}

.res-search-clear {
  position: absolute;
  right: 10px;
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: rgba(255,255,255,0.3);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 4px;
  line-height: 1;
}

.res-search-clear:hover { color: rgba(255,255,255,0.7); }

/* ── Tabs ─────────────────────────────────────── */
.res-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 32px;
  padding-bottom: 0;
}

.res-tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 16px 12px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  border-radius: 4px 4px 0 0;
  margin-bottom: -1px;
  text-align: left;
}

.res-tab:hover {
  background: rgba(255,255,255,0.04);
}

.res-tab.is-active {
  border-bottom-color: var(--color-primary, #FF4500);
  background: rgba(255,69,0,0.05);
}

.res-tab-type {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-primary, #FF4500);
  opacity: 0.7;
}

.res-tab.is-active .res-tab-type { opacity: 1; }

.res-tab-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  white-space: nowrap;
}

.res-tab.is-active .res-tab-name { color: #fff; }

/* ── Panel ────────────────────────────────────── */
.res-panel { display: none; }
.res-panel.is-active { display: block; }

.res-panel-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.res-panel-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.res-panel-count {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}

.res-pdf-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border: 1px solid rgba(255,69,0,0.4);
  border-radius: 4px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-primary, #FF4500);
  text-decoration: none;
  transition: background 0.2s;
}

.res-pdf-btn:hover {
  background: rgba(255,69,0,0.1);
  color: var(--color-primary, #FF4500);
}

/* ── Category block ───────────────────────────── */
.res-category-block {
  margin-bottom: 40px;
}

.res-category-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 0;
}

/* ── Table ────────────────────────────────────── */
.res-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 0 0 6px 6px;
}

.res-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  font-family: 'Barlow', sans-serif;
}

.res-th {
  padding: 8px 10px;
  text-align: left;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  background: #0d1020;
  color: rgba(255,255,255,0.4);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.res-th--bike   { color: #7ab87a; }
.res-th--run    { color: #c9964a; }
.res-th--swim   { color: #5fa0c0; }
.res-th--transition { color: rgba(255,255,255,0.25); }

.res-tr {
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.15s;
}

.res-tr:last-child { border-bottom: none; }

.res-tr:nth-child(odd)  { background: rgba(255,255,255,0.015); }
.res-tr:nth-child(even) { background: transparent; }

.res-tr:hover { background: rgba(255,69,0,0.05); }

.res-tr.is-dnf .res-td,
.res-tr.is-dns .res-td,
.res-tr.is-dq  .res-td { color: rgba(255,255,255,0.25); }

.res-td {
  padding: 7px 10px;
  color: rgba(255,255,255,0.75);
  white-space: nowrap;
}

.res-td:first-child {
  font-weight: 700;
  color: var(--color-primary, #FF4500);
  width: 36px;
}

.res-td--tablecolumn-bike   { color: #7ab87a; }
.res-td--tablecolumn-run    { color: #c9964a; }
.res-td--tablecolumn-swim   { color: #5fa0c0; }

/* ── Deco / misc ──────────────────────────────── */
.results-deco-line {
  width: 60px;
  height: 3px;
  background: var(--color-primary, #FF4500);
  margin: 0 0 48px;
}

/* ── Responsive ───────────────────────────────── */
@media (max-width: 768px) {
  .results-hero { min-height: 320px; }
  .results-hero-content { padding-bottom: 40px; }

  .res-tabs { gap: 4px; }
  .res-tab  { padding: 8px 10px 10px; }
  .res-tab-name { font-size: 0.72rem; }

  .res-panel-header { flex-direction: column; align-items: flex-start; }
  .res-toolbar { justify-content: flex-start; }
  .res-search-wrap { max-width: 100%; }
}
