/* ============================================================
   PRŮVODCE DETAIL — guide-specific prose, layout, and TOC styles
   Forked from clanek.css: guides use Inter only (no Literata),
   a fixed 664px reading column that is ALWAYS dead-center on the
   page, with "V článku najdete" floating in the right margin.
   Kept separate from .article-body/clanek.css on purpose — blog
   articles (clanek-detail.php) are unaffected by this file.
   ============================================================ */

:root {
  --guide-col: 41.5rem;  /* 664px reading column (header, hero, body all share this) */
  --guide-gap: 2.5rem;   /* 40px gutter between the column and the aside */
  --guide-aside: 13.5rem; /* 216px TOC/aside column */
}

/* --- Outer page cap — matches max-w-7xl (1280px), the same container
   the nav (and every other page: index.php, clanek-detail.php, etc.)
   already uses. This must stay in lockstep with the nav's container,
   not just be "close" — it's what makes the breadcrumb land exactly
   under the logo instead of merely converging on very wide monitors.
   Named class rather than a bracket-arbitrary max-w-[80rem] value —
   same reasoning as everywhere else structural in this file (see
   clanek-detail.php's text-[13px] history). --- */
.guide-page-shell {
  max-width: 80rem; /* 1280px, same as max-w-7xl */
  margin-left: auto;
  margin-right: auto;
}

/* --- .guide-col: the reading column — hero, body, everything below
   the breadcrumb. Always capped/centered below 1280px; at 1280px+ it
   becomes exactly the grid's middle track, which the symmetric
   1fr/col/1fr split below keeps dead-center on the page. Below
   1280px it also carries the mobile row-gap to .guide-aside (reset
   to 0 at 1280px+, where it sits beside the aside, not above it). --- */
.guide-col {
  width: 100%;
  max-width: var(--guide-col);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 3rem;
}
@media (min-width: 1280px) {
  .guide-grid > .guide-col {
    grid-column: 2;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 0;
  }
}

/* --- .guide-lead: breadcrumb only. A grid sibling of .guide-col and
   .guide-aside (not nested inside .guide-col) so its baseline can
   line up with the other two at 1280px+ — see .guide-grid's
   align-items: baseline below. Below 1280px it's just the first
   stacked row, right above .guide-col. justify-self: start (not end)
   — the breadcrumb sits at the far edge of the lead track, flush
   with the nav logo above it, not hugging the text column. --- */
.guide-lead {
  margin-bottom: 0.75rem;
}
@media (min-width: 1280px) {
  .guide-lead {
    grid-column: 1;
    justify-self: start;
    margin-bottom: 0;
  }
}

/* --- Grid: single column until 1280px (breadcrumb, then guide-col,
   then guide-aside stack as separate rows — row spacing comes from
   each item's own margin above, not row-gap, since the three rows
   need different gaps). The 1fr/col/1fr split at 1280px+ is what
   guarantees true centering — both flanking tracks are forced equal,
   so the middle column stays dead-center regardless of what's in
   them. --- */
.guide-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  row-gap: 0;
}
@media (min-width: 1280px) {
  .guide-grid {
    /* minmax(0, 1fr), not bare 1fr — lets the lead/aside tracks shrink
       below their content's natural min-width instead of forcing the
       grid wider than the viewport if a breadcrumb or TOC item is
       ever longer than the ~244px these tracks resolve to. */
    grid-template-columns: minmax(0, 1fr) var(--guide-col) minmax(0, 1fr);
    column-gap: var(--guide-gap);
    /* baseline (not start): the breadcrumb, the date/reading-time
       line (first line of .guide-col), and the TOC title (first
       line of .guide-aside) are now three grid siblings in the same
       row, each using different font sizes — baseline is what lines
       up their text instead of just their box tops. */
    align-items: baseline;
  }
}

/* --- Aside: TOC + ad banner. Plain stacked block below 1280px (falls
   below the main column, ad banner still visible there); becomes the
   sticky right-margin column at 1280px+, hugging the gap next to the
   text rather than stretching across the whole flexible track. --- */
.guide-aside {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}
@media (min-width: 1280px) {
  .guide-aside {
    grid-column: 3;
    justify-self: start;
    width: 100%;
    max-width: var(--guide-aside);
    position: sticky;
    top: 5rem;
  }
}

/* --- Guide prose (Inter only — replaces .article-body/Literata for this template) --- */
.guide-body {
  font-family: 'InterVariable', Inter, system-ui, sans-serif;
  font-optical-sizing: auto;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}
.guide-body p {
  font-size: 1rem;
  font-weight: 400;
  color: #262626;
  line-height: 1.75;
  margin-bottom: 1.5rem;
  text-wrap: pretty;
}
.guide-body ul,
.guide-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
  color: #262626;
  line-height: 1.75;
  font-size: 1rem;
}
.guide-body ul { list-style-type: disc; }
.guide-body ol { list-style-type: decimal; }
.guide-body li { margin-bottom: 0.5rem; }
.guide-body h2 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: #262626;
  margin: 3rem 0 1rem;
  line-height: 1.25;
  text-wrap: pretty;
}
.guide-body h3 {
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #262626;
  margin: 2.5rem 0 0.75rem;
  line-height: 1.3;
  text-wrap: pretty;
}
.guide-body h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #262626;
  margin: 2rem 0 0.5rem;
  text-wrap: pretty;
}
.guide-body blockquote {
  border-left: 2px solid #d4d4d4;
  padding-left: 1.5rem;
  margin: 2.5rem 0;
  color: #525252;
  font-style: italic;
  font-size: 1.0625rem;
  line-height: 1.65;
}
.guide-body img {
  border-radius: 12px;
  width: 100%;
  height: auto;
  margin: 2.5rem 0;
}
.guide-body a {
  text-decoration: underline;
  text-decoration-color: #d4d4d4;
  text-underline-offset: 4px;
  color: #262626;
  transition: text-decoration-color 0.15s;
}
.guide-body a:hover { text-decoration-color: #262626; }
.guide-body strong { font-weight: 600; color: #262626; }
.guide-body em { font-style: italic; }
.guide-body hr {
  border: none;
  border-top: 1px solid #e5e5e5;
  margin: 3rem 0;
}

/* --- Tables: sentence-case headings, no card, single horizontal rules.
   Always capped at the 640px column, horizontal scroll on overflow —
   no breakout. Simpler, and it can never collide with the TOC. --- */
.guide-body table { border-collapse: collapse; }
.guide-body th {
  white-space: nowrap;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 500;
  color: #262626;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e5e5;
}
.guide-body td {
  font-size: 0.875rem;
  color: #262626;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e5e5;
  vertical-align: top;
}
.guide-body tr:last-child td { border-bottom: none; }
.guide-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 2rem 0;
}
.guide-table-scroll table {
  width: 100%;
  min-width: 32rem;
  margin: 0;
}

/* --- "V článku najdete" — title used for both the desktop floating
   outline and the mobile disclosure summary (same color/weight; mobile
   is a touch larger since it doubles as a tap target) --- */
.guide-toc-label {
  font-size: 0.8125rem; /* 13px */
  color: #262626;
  font-weight: 600;
}
.guide-toc-mobile-label {
  font-size: 0.9375rem; /* 15px */
  color: #262626;
  font-weight: 600;
}
.guide-toc-list {
  list-style: none;
}
.guide-toc-list a {
  display: block;
  padding: 0.4375rem 0 0.4375rem 0.875rem;
  margin-left: -0.875rem;
  font-size: 0.8125rem;
  color: #525252;
  border-left: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.guide-toc-list a:hover { color: #262626; }
.guide-toc-list a.is-active {
  color: #262626;
  border-left-color: #262626;
}

/* --- Mobile/tablet TOC disclosure (below 1280px) — mirrors the
   .faq-item pattern from caste-otazky.css for a consistent feel.
   The summary gets its own vertical padding (the parent's p-5 alone
   only sizes a ~24px tall clickable strip) so the toggle is a
   comfortable tap target; list links get extra vertical padding here
   too — both scoped to .guide-toc-mobile so the compact desktop nav
   (mouse-driven, no tap-target need) stays untouched. --- */
.guide-toc-mobile-summary {
  list-style: none;
  padding-block: 0.5rem;
  margin-block: -0.5rem;
}
.guide-toc-mobile-summary::-webkit-details-marker { display: none; }
.guide-toc-mobile-chevron {
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
}
.guide-toc-mobile[open] > .guide-toc-mobile-summary .guide-toc-mobile-chevron {
  transform: rotate(180deg);
}
.guide-toc-mobile .guide-toc-list a {
  padding-block: 0.75rem;
}
