/* =========================================================================
   ZÁPISKY A ČLÁNKY – css/texty.css
   Vzhľad stránok potulky.html (zoznam) a zapisok.html (jeden zápisok).
   Farby a písma sa berú zo site.css (premenné --text, --accent, --serif…).
   ========================================================================= */

/* --- Úvodná veta pod nadpisom „Z potuliek“ --- */
.tx-lead { margin: 22px 0 0; max-width: 46ch; font-family: var(--serif); font-style: italic; font-size: clamp(1.05rem, 1.6vw, 1.3rem); line-height: 1.6; color: var(--muted); }

/* --- ZOZNAM: karty zápiskov (fotka + text, striedavo vľavo/vpravo) --- */
.tx-list { display: grid; gap: clamp(40px, 7vw, 96px); }
.tx-card { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; gap: clamp(24px, 4vw, 64px); }
.tx-card:nth-child(even) .tx-card-img { order: 2; }            /* každý druhý zápisok má fotku vpravo */
.tx-card.no-photo { grid-template-columns: 1fr; max-width: 720px; }
.tx-card-img { position: relative; overflow: hidden; aspect-ratio: 3 / 2; background: var(--bg-raised); }
.tx-card-img img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.03); transition: opacity .9s, transform 1.4s var(--ease); }
.tx-card-img img.is-loaded { opacity: 1; transform: none; }
.tx-card:hover .tx-card-img img { transform: scale(1.04); }
.tx-card-text { display: grid; gap: 14px; }
.tx-meta { margin: 0; font-size: .74rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.tx-draft { display: inline-block; margin-right: 10px; padding: 2px 9px; font-weight: 500; color: #111; background: var(--muted); border-radius: 999px; letter-spacing: .1em; }
.tx-card-title { font-weight: 300; font-size: clamp(1.6rem, 3.2vw, 2.6rem); line-height: 1.12; letter-spacing: -.02em; transition: color .3s; }
.tx-card:hover .tx-card-title { color: var(--accent); }
.tx-card-excerpt { font-family: var(--serif); font-size: 1.02rem; line-height: 1.75; color: #d9d3c7; }
.tx-more { display: inline-flex; align-items: center; gap: 10px; font-size: .78rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; }
.tx-more svg { transition: transform .4s var(--ease); }
.tx-card:hover .tx-more svg { transform: translateX(5px); }
.tx-empty { padding: 48px 0; color: var(--muted); font-family: var(--serif); font-style: italic; font-size: 1.15rem; }
@media (max-width: 800px) {
  .tx-card { grid-template-columns: 1fr; }
  .tx-card:nth-child(even) .tx-card-img { order: 0; }
}

/* --- JEDEN ZÁPISOK: veľká titulná fotka s nadpisom --- */
.tx-hero { position: relative; min-height: 78vh; min-height: 78svh; display: flex; align-items: flex-end; isolation: isolate; overflow: hidden; background: #000; }
.tx-hero-img { position: absolute; inset: 0; z-index: -2; }
.tx-hero-img img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.05); transition: opacity 1.4s, transform 2.4s var(--ease); }
.tx-hero-img img.is-loaded { opacity: .85; transform: none; }
.tx-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, var(--bg) 0%, rgba(12,12,11,.45) 40%, rgba(12,12,11,.15) 100%); }
.tx-hero-text { padding-top: calc(var(--header-h) + 40px); padding-bottom: clamp(28px, 5vw, 56px); }
.tx-title { margin: 14px 0 0; max-width: 18ch; font-weight: 300; font-size: clamp(2.2rem, 6vw, 5rem); line-height: 1.02; letter-spacing: -.03em; text-wrap: balance; }
.tx-article.is-plain .tx-hero { min-height: 0; background: none; }

/* --- Text zápisku --- */
.tx-body-wrap { padding-block: clamp(24px, 4vw, 48px) clamp(56px, 8vw, 110px); }
.tx-note { max-width: 66ch; margin: 0 auto 28px; padding: 12px 16px; font-size: .9rem; color: var(--muted); border-left: 2px solid var(--accent); background: var(--bg-raised); }
.tx-body { max-width: 66ch; margin: 0 auto; font-family: var(--serif); font-size: clamp(1.05rem, 1.3vw, 1.18rem); line-height: 1.85; color: #e2dccf; }
.tx-body p { margin: 0 0 1.2em; }
.tx-body > p:first-child::first-letter { float: left; font-size: 3.6em; line-height: .9; padding: .06em .1em 0 0; color: var(--accent); font-weight: 500; }
.tx-body h2 { margin: 1.8em 0 .6em; font-family: var(--sans); font-weight: 400; font-size: 1.5rem; letter-spacing: -.01em; color: var(--text); }
.tx-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.tx-body strong { color: var(--text); font-weight: 600; }
/* Citát v texte (riadok začínajúci znakom >) */
.tx-body blockquote { margin: 1.8em 0; padding: .2em 0 .2em 1.2em; border-left: 2px solid var(--accent); font-style: italic; font-size: 1.12em; color: var(--text); }
.tx-body blockquote p { margin: 0; }
/* Fotka vložená medzi odseky ([foto kód]) – širšia ako text, na stred */
.tx-body .tx-inline { position: relative; left: 50%; width: min(1100px, calc(100vw - 2 * var(--gutter))); margin: 2.4em 0; transform: translateX(-50%); }
.tx-body .tx-inline.is-portrait { width: min(720px, calc(100vw - 2 * var(--gutter))); }
.tx-body .tx-inline figcaption { font-size: .95rem; line-height: 1.5; }

/* --- Fotky pod textom --- */
.tx-photos { display: grid; gap: clamp(24px, 4vw, 48px); max-width: 1100px; margin: clamp(32px, 5vw, 64px) auto 0; }
.tx-photo { margin: 0; }
.tx-photo img { width: 100%; height: auto; display: block; background: var(--bg-raised); opacity: 0; transition: opacity .9s; }
.tx-photo img.is-loaded { opacity: 1; }
.tx-photo.is-portrait { max-width: 720px; margin-inline: auto; }   /* fotky na výšku užšie */
.tx-photo figcaption { margin-top: 10px; text-align: center; font-family: var(--serif); font-style: italic; font-size: .95rem; color: var(--muted); }
.tx-photo figcaption, .tx-cover-cap { display: grid; gap: 4px; }
/* Technické údaje (EXIF) – malé, nenápadné, bez kurzívy */
.tx-tech { font-family: var(--sans); font-style: normal; font-size: .72rem; letter-spacing: .08em; color: var(--muted); opacity: .8; }
/* Popisok titulnej fotky – vpravo pod veľkou fotkou */
.tx-cover-cap { max-width: 1100px; margin: 0 auto 28px; text-align: right; font-family: var(--serif); font-style: italic; font-size: .95rem; color: var(--muted); }
@media (max-width: 800px) { .tx-cover-cap { text-align: left; } }

/* --- Novší / starší zápisok --- */
.tx-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 1100px; margin: clamp(56px, 8vw, 96px) auto 0; padding-top: 32px; border-top: 1px solid var(--line); }
.tx-pager a { display: grid; gap: 8px; }
.tx-pager .tx-next { text-align: right; }
.tx-pager small { font-size: .72rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.tx-pager strong { font-weight: 300; font-size: clamp(1.15rem, 2.2vw, 1.6rem); transition: color .3s; }
.tx-pager a:hover strong { color: var(--accent); }

/* Odkaz „Z albumu …“ pod fotkou (fotka vybratá z galérie) */
.tx-from { font-family: var(--sans); font-style: normal; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent) !important; text-decoration: none !important; }
.tx-from:hover { text-decoration: underline !important; }
