/* TagMate 1.8.40 — centered editorial embeds on single post pages only.
   Preserve visual width/height of embeds (CLS), never touch ad slots or scripts.
   Existing typical 20-28px margins + about 2cm extra vertical breathing room. */
body.single-post { --tm-editorial-gap: calc(24px + 2cm); }
body.single-post :is(.tagmate-poll,.tagmate-related,.tagmate-video,.tagmate-chart,.tagmate-article-gallery,.tagmate-readmore,.tagmate-article-continuation) {
  box-sizing: border-box;
  clear: both;
  margin-block-start: var(--tm-editorial-gap) !important;
  margin-block-end: var(--tm-editorial-gap) !important;
  margin-inline: auto !important;
}
/* Preserve the video player's existing generous width, 16:9 ratio and
   CSS positioning while explicitly centering its whole block. */
body.single-post .tagmate-video { margin-left: 50% !important; margin-right: 0 !important; transform: translateX(-50%) !important; }
body.single-post .tagmate-article-gallery { display: grid !important; max-width: 100%; }
body.single-post .tagmate-article-continuation { display: flex !important; }
body.single-post .tagmate-readmore { width: 100%; }
body.single-post .tagmate-post-tags { max-width: 100%; margin-inline: auto !important; }
body.single-post .tagmate-post-tags__heading { text-align: center; }
body.single-post .tagmate-post-tags__list { justify-content: center; }
/* On narrow devices use a smaller gap to avoid huge blank screens.
   1cm is still a noticeable separation and won't affect CLS. */
@media(max-width: 767px) {
 body.single-post { --tm-editorial-gap: calc(16px + 1cm); }
 body.single-post .tagmate-video { margin-left: 50% !important; margin-right: 0 !important; transform: translateX(-50%) !important; }
}

/* 2.3.32 – only one lightweight cover on the article. The photos load on
 * their own noindex URLs, never as a full carousel on article view. */
body.single-post .tagmate-topic-gallery{
  box-sizing:border-box;max-width:680px;margin:85px auto!important;
  padding:24px;border:1px solid #e3e8f0;border-radius:16px;
  text-align:center;background:#fff;clear:both;
}
.tagmate-topic-gallery__eyebrow{font-size:11px!important;letter-spacing:.11em;color:#536a80;font-weight:800;margin:0 0 8px!important}
.tagmate-topic-gallery h2{font-size:clamp(20px,2.4vw,28px);line-height:1.25;margin:0 0 20px!important;color:#17283e}
.tagmate-topic-gallery__cover{display:block;max-width:520px;margin:0 auto;text-align:center;text-decoration:none!important;color:#fff!important;overflow:hidden;border-radius:12px;background:#1b2b43}
.tagmate-topic-gallery__cover img{display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;max-height:350px;margin:0!important}
.tagmate-topic-gallery__cover span{display:block;padding:12px;font-weight:700;font-size:15px}
.tagmate-topic-gallery__disclaimer{font-size:12px!important;line-height:1.5;color:#617083;margin:15px auto 0!important;max-width:540px}
@media(max-width:760px){body.single-post .tagmate-topic-gallery{margin:42px auto!important;padding:16px}.tagmate-topic-gallery h2{font-size:20px}}

.tagmate-topic-gallery__grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;align-items:stretch}
.tagmate-topic-gallery__thumb,.tagmate-topic-gallery__cta{display:flex;align-items:center;justify-content:center;min-height:220px;border-radius:18px;overflow:hidden;text-decoration:none!important}
.tagmate-topic-gallery__thumb{background:#f4f6f8}
.tagmate-topic-gallery__thumb img{display:block;width:100%;height:100%;object-fit:cover;aspect-ratio:1/1}
.tagmate-topic-gallery__cta{background:#e30613;color:#fff!important;flex-direction:column;gap:14px;padding:20px;text-align:center;box-shadow:0 12px 30px rgba(227,6,19,.18)}
.tagmate-topic-gallery__cta strong{font-size:20px;line-height:1.3;font-weight:800}
.tagmate-topic-gallery__cta span{font-size:38px;line-height:1}
.tagmate-photo-page__thumb{display:block;background:#fff;border:1px solid #e5e7eb;border-radius:16px;overflow:hidden;text-decoration:none!important;color:#1f2937;box-shadow:0 6px 18px rgba(15,23,42,.05)}
.tagmate-photo-page__thumb.is-active{outline:2px solid #e11d2e;outline-offset:2px}
.tagmate-photo-page__thumb img{display:block;width:100%;aspect-ratio:1/1;object-fit:cover}
.tagmate-photo-page__thumb-index{display:block;padding:10px 12px 0;font-size:12px;font-weight:700;color:#5b6472}
.tagmate-photo-page__thumb-caption{display:block;padding:4px 12px 12px;font-size:13px;line-height:1.45;color:#253244}
.tagmate-photo-page__thumb-ad{grid-column:1/-1}
@media(max-width:900px){.tagmate-topic-gallery__grid{grid-template-columns:repeat(2,minmax(0,1fr))}.tagmate-topic-gallery__cta strong{font-size:18px}}
@media(max-width:560px){.tagmate-topic-gallery__grid{grid-template-columns:1fr}.tagmate-topic-gallery__thumb,.tagmate-topic-gallery__cta{min-height:180px}}

/* 2.3.38: Full-width, two-thumbnail gallery preview inside article column. */
body.single-post .tagmate-topic-gallery {
  display:block;
  width:100%;
  max-width:none;
  min-width:0;
  margin:clamp(34px,5vw,64px) 0!important;
  padding:clamp(12px,2vw,22px);
}
body.single-post .tagmate-topic-gallery__grid {
  display:grid;
  width:100%;
  grid-template-columns:repeat(3,minmax(0,1fr));
  align-items:stretch;
  gap:clamp(8px,1.3vw,16px);
}
body.single-post .tagmate-topic-gallery__thumb,
body.single-post .tagmate-topic-gallery__cta {
  min-height:0;
  aspect-ratio:1/1;
  border-radius:14px;
}
body.single-post .tagmate-topic-gallery__thumb img {aspect-ratio:1/1;width:100%;height:100%;object-fit:cover;}
body.single-post .tagmate-topic-gallery__cta strong {font-size:clamp(13px,1.7vw,20px);}
@media(max-width:520px) {
 body.single-post .tagmate-topic-gallery__grid {grid-template-columns:repeat(2,minmax(0,1fr));}
 body.single-post .tagmate-topic-gallery__cta {grid-column:1/-1;aspect-ratio:auto;min-height:88px;flex-direction:row;}
 body.single-post .tagmate-topic-gallery__cta span {font-size:28px;}
}


/* 2.3.39 – gallery photo detail: smaller image and clear, accessible navigation.
   Loaded only for article/gallery pages; no extra JS or remote assets. */
body.single-post .tagmate-photo-page {
  box-sizing:border-box;
  width:100%;
  max-width:1100px;
  min-height:60vh;
  margin:clamp(16px,3vw,36px) auto;
  padding:clamp(16px,3vw,28px);
}
body.single-post .tagmate-photo-page__return {margin:0 0 24px!important;}
body.single-post .tagmate-photo-page__counter {
  color:#556478;
  font-size:14px;
  font-weight:700;
  margin:12px 0!important;
}
body.single-post .tagmate-photo-page__figure {
  width:min(100%,480px);
  max-width:480px;
  margin:18px auto 24px!important;
  text-align:center;
}
body.single-post .tagmate-photo-page__figure .tagmate-photo-page__image {
  box-sizing:border-box;
  display:block;
  width:min(100%,420px);
  max-width:420px;
  height:auto;
  margin:0 auto;
  border-radius:14px;
  box-shadow:0 10px 28px rgba(18,37,58,.10);
}
body.single-post .tagmate-photo-page__caption {max-width:420px!important;}
body.single-post .tagmate-photo-page__nav {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:12px;
  margin:24px auto 36px;
}
body.single-post .tagmate-photo-page__button {
  box-sizing:border-box;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:46px;
  padding:11px 19px;
  border:1px solid #dce3ed;
  border-radius:12px;
  background:#f6f8fc;
  color:#23314a!important;
  text-decoration:none!important;
  font-size:14px;
  font-weight:750;
  line-height:1.4;
  box-shadow:0 3px 10px rgba(15,23,42,.04);
  transition:background-color .15s ease,border-color .15s ease;
}
body.single-post .tagmate-photo-page__button--next {
  border-color:#cf1021;
  background:#db1026;
  color:#fff!important;
}
body.single-post .tagmate-photo-page__button--back {
  background:#fff;
  border-color:#e0e5ed;
}
body.single-post .tagmate-photo-page__button:hover,
body.single-post .tagmate-photo-page__button:focus-visible {
  background:#eaf0fa;
  border-color:#9bb4db;
  color:#17253e!important;
}
body.single-post .tagmate-photo-page__button--next:hover,
body.single-post .tagmate-photo-page__button--next:focus-visible {
  background:#b4081c;
  border-color:#b4081c;
  color:#fff!important;
}
body.single-post .tagmate-photo-page__button:focus-visible {
  outline:3px solid #8bb8fd;
  outline-offset:3px;
}
@media(max-width:540px) {
  body.single-post .tagmate-photo-page__figure {width:100%;}
  body.single-post .tagmate-photo-page__figure .tagmate-photo-page__image {width:min(100%,420px);}
  body.single-post .tagmate-photo-page__nav {flex-direction:column;}
  body.single-post .tagmate-photo-page__nav .tagmate-photo-page__button {width:100%;}
}
@media(prefers-reduced-motion:reduce) {
  body.single-post .tagmate-photo-page__button {transition:none;}
}


/* 2.3.40 – stable, no-scroll photo gallery viewer. No global selectors or ad changes. */
body.single-post .tagmate-photo-page__viewer {
  width:100%;max-width:600px;margin:0 auto;
  scroll-margin-top:20px;
}
body.single-post .tagmate-photo-page__counter {text-align:center;margin:10px 0 12px!important;}
body.single-post .tagmate-photo-page__nav--primary {
  display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  width:min(100%,540px);gap:10px;margin:10px auto 16px;
}
body.single-post .tagmate-photo-page__nav--primary .tagmate-photo-page__button {
  min-width:0;width:100%;min-height:48px;padding:10px 12px;
}
body.single-post .tagmate-photo-page__nav--primary .is-disabled {visibility:hidden;pointer-events:none;}
body.single-post .tagmate-photo-page__figure {
  width:min(100%,440px);max-width:440px;
  margin:0 auto!important;
}
body.single-post .tagmate-photo-page__stage {
  box-sizing:border-box;aspect-ratio:1/1;
  width:min(100%,420px);max-width:420px;
  margin:0 auto;display:grid;place-items:center;
  overflow:hidden;border-radius:15px;
  background:#f4f6fa;position:relative;
}
body.single-post .tagmate-photo-page__stage .tagmate-photo-page__image {
  width:100%;height:100%;max-width:100%;max-height:100%;
  object-fit:contain;border-radius:0;box-shadow:none;
}
body.single-post .tagmate-photo-page__stage.is-loading:after {
  content:'Načítavam…';position:absolute;inset:auto 0 0;
  background:rgba(248,250,252,.93);padding:7px;
  color:#334155;text-align:center;font-size:12px;
}
body.single-post .tagmate-photo-page__details {
  width:min(100%,500px);margin:12px auto 22px;
}
body.single-post .tagmate-photo-page__caption {
  max-width:none!important;margin:8px 0!important;
  text-align:center;font-size:14px;line-height:1.6;color:#26344a;
  white-space:pre-line;
}
body.single-post .tagmate-photo-page__credit {
  font-size:12px;color:#5e6b7c;text-align:center;line-height:1.5;
}
body.single-post .tagmate-photo-page__thumbs {
  display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:14px;
}
@media(max-width:540px){
  body.single-post .tagmate-photo-page__nav--primary {flex-direction:row;gap:8px;}
  body.single-post .tagmate-photo-page__nav--primary .tagmate-photo-page__button {
    font-size:12px;line-height:1.3;padding:8px;min-height:50px;
  }
}
@media(prefers-reduced-motion:reduce){body.single-post .tagmate-photo-page__stage {scroll-behavior:auto;}}

/* 2.3.41 – direct links from article previews jump straight to the photo viewer.
   Anchors work natively even with JavaScript disabled; avoid forced JS scrolling.
   Leave room for the site's fixed/sticky navigation. */
body.single-post #tagmate-photo-viewer { scroll-margin-top: 88px; }
body.single-post #tagmate-article-gallery { scroll-margin-top: 88px; }
@media (max-width: 782px) {
  body.single-post #tagmate-photo-viewer,
  body.single-post #tagmate-article-gallery { scroll-margin-top: 68px; }
}
