/**
 * turista.css – Detail stránka účastníka (node--turista.html.twig)
 *
 * ZÁVISÍ OD tura.css (musí byť v knižnici turista:):
 *   .tura-layout → grid 1fr + 320px
 *   .tura-hero, .tura-hero__overlay, .tura-hero__content, .tura-hero__content
 *   .tura-title, .tura-date, .tura-hero__meta
 *   .tura-side, .tura-side__section
 *   .tura-lbl, .tura-meta, .tura-meta__row
 *   .tura-main, .tura-section, .tura-section__head, .tura-lbl__count
 *
 * Skopíruj panoramafb.jpg → themes/kakac/images/turista-hero.jpg
 */

/* ── Plná šírka – 6-krokový vzor (rovnaký ako psy.css) ──── */

#navbar-main,
div#main {
  width: 100%;
  max-width: 100%;
  margin-right: 0;
  margin-left: 0;
  --bs-gutter-x: 0;
}

.views-element-container.contextual-region {
  padding: 0 10px;
}

#main .row {
  --bs-gutter-x: 0;
}

body.page-node-type-turista #main,
body.page-node-type-turista .container,
body.page-node-type-turista .container-xxl {
  max-width: 100% !important;
  padding: 0 !important;
}

@media (min-width: 1400px) {
  body.page-node-type-turista .container,
  body.page-node-type-turista .container-xxl {
    max-width: 100% !important;
  }
}

body.page-node-type-turista .main-content {
  margin-left: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
}

body.page-node-type-turista div#main {
  width: 100%;
  max-width: 100%;
  margin: 0;
}

body.page-node-type-turista main#content {
  --bs-gutter-x: 0;
}

body.page-node-type-turista main#content.col {
  flex: 0 0 100% !important;
  max-width: 100% !important;
}

@media (min-width: 768px) {
  body.page-node-type-turista main#content.offset-md-1 {
    margin-left: 0 !important;
  }
}

/* ── Skryť duplikátny page title ──────────────────────────── */
body.page-node-type-turista .page-header,
body.page-node-type-turista h1.page-title,
body.page-node-type-turista .block-page-title-block,
body.page-node-type-turista #page-title {
  display: none !important;
}

body.page-node-type-turista main {
  padding-top: 0 !important;
}

/* ── Hero: panoramatická fotografia ──────────────────────── */
/* Chová sa IDENTICKY ako tura-hero — background-image override */
/* Výška 400px, overflow hidden, background-size cover → z tura.css */
.turista-hero {
  background-image: url('../images/turista-hero.jpg');
  background-color: #1c2a1a;
}

/* ── Hero inner: avatar bok po boku s menom ──────────────── */
.turista-hero__inner {
  display: flex;
  align-items: flex-end;
  gap: 20px;
}

/* ── Avatar 300×200 px ──────────────────────────────────── */
.turista-avatar {
  width: 300px;
  height: auto;
  border-radius: 5px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.28);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 3 / 2;
}

.turista-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.turista-avatar__init {
  font-family: 'Lora', serif;
  font-size: 34px;
  color: rgba(255, 255, 255, 0.3);
  line-height: 1;
}

/* ── Hero info ───────────────────────────────────────────── */
.turista-hero__info {
  flex: 1;
  min-width: 0;
}

/* ── Sidebar: tura-lbl bez border-top na prvom elemente ─── */
/* Prvý priamy child .tura-side je <span class="tura-lbl">   */
.turista-page .tura-side > span.tura-lbl:first-child {
  margin-top: 0;
}

.turista-page .tura-side > .tura-side__section:first-of-type {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

/* ── Štatistická tabuľka ─────────────────────────────────── */
.turista-stat-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Inter', sans-serif;
  margin-top: 10px;
}

.turista-stat-table thead th {
  font-size: 11px;          /* väčšie ako tura-lbl 9px */
  font-weight: 500;
  color: #a09c96;
  padding: 0 0 9px;
  text-align: left;
  border-bottom: 0.5px solid #e8e4dc;
  line-height: 1.3;
}

.turista-stat-table thead th:not(:first-child) {
  text-align: right;
}

.turista-stat-table tbody td {
  font-size: 13px;
  color: #1a1a18;
  padding: 5px 0;
  border-bottom: 0.5px solid #e8e4dc;
  vertical-align: middle;
}

.turista-stat-table tbody td:not(:first-child) {
  text-align: right;
  color: #4a4a48;
  font-variant-numeric: tabular-nums;
}

.turista-stat-table tbody tr:last-child td {
  border-bottom: none;
}

.turista-stat-table tfoot td {
  font-size: 13px;
  font-weight: 500;
  color: #1a1a18;
  padding: 8px 0 0;
  border-top: 0.5px solid #1a1a18;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.turista-stat-table tfoot td:first-child {
  text-align: left;
}

/* Rok odkaz */
.turista-stat-table a {
  color: #1a1a18;
  text-decoration: none;
}
.turista-stat-table a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.turista-stat-count {
  font-weight: 400;
  color: #a09c96;
  margin-left: 2px;
  font-size: 12px;
}

/* ── Bio text ──────────────────────────────────────────────── */
.turista-bio {
  font-family: 'Lora', serif;
  font-size: 13.5px;
  line-height: 1.75;
  color: #3a3a38;
}

.turista-bio p {
  margin: 0 0 0.75em;
}

.turista-bio p:last-child {
  margin-bottom: 0;
}

/* ── Chart wrapper ─────────────────────────────────────────── */
.turista-chart-wrap {
  position: relative;
  width: 100%;
  height: 420px; /* prepísané dynamicky v turista.js */
}

/* Header: tmavé pozadie, biele písmo, centered */
.turista-stat-table thead tr {
  background: #1a1a18;
}

.turista-stat-table thead th {
  color: #fff !important;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  padding: 8px 12px;
  letter-spacing: 0.3px;
}

.turista-stat-table thead th:first-child {
  text-align: left;
}

/* Bunky: padding L/R */
.turista-stat-table tbody td {
  padding: 5px;
}

.turista-stat-table tfoot td {
  padding: 8px 12px 0;
}

/* Stĺpce km a nastúpané metre: shrink na obsah, no-wrap v tfoot */
.turista-stat-table th:nth-child(2),
.turista-stat-table th:nth-child(3),
.turista-stat-table td:nth-child(2),
.turista-stat-table td:nth-child(3) {
  width: 1%;
  white-space: nowrap;
  padding-left: 16px;  /* vizuálny odstup od prvého stĺpca */
}

/* Tfoot: no-wrap pre istotu aj na mobile */
.turista-stat-table tfoot td {
  white-space: nowrap;
}

/* Header: centrovanie horizontálne aj vertikálne */
.turista-stat-table thead th {
  text-align: center;
  vertical-align: middle;
}

.turista-stat-table thead th:first-child {
  text-align: left;
}

/* ============================================================
   MOBILE (≤768px)
   ============================================================ */
@media (max-width: 768px) {
  .turista-hero__inner {
    gap: 12px;
  }

  .turista-avatar {
    width: 96px;
    height: 64px;
  }

  .turista-avatar__init {
    font-size: 24px;
  }

  .turista-chart-wrap {
    height: 300px;
  }

  .turista-stat-table thead th {
    font-size: 10px;
  }
}
