/* Čistírnajímka · prostor článků a navigace rubrik · 20261119.4
   Aktivuje pouze doprovodný JS na ověřených stránkách blogu. */

body.cj-blog-layout {
  --cj-bl-ink: #10243e;
  --cj-bl-text: #33465a;
  --cj-bl-muted: #66788b;
  --cj-bl-blue: #1565c0;
  --cj-bl-line: #dbe4ec;
  --cj-bl-soft: #f4f8fc;
  --cj-bl-sidebar: 252px;
  --cj-bl-gap: 36px;
}

body.cj-blog-layout #content-wrapper.container.content-wrapper {
  box-sizing: border-box;
  width: 100% !important;
  max-width: 1440px !important;
  margin: 24px auto 48px !important;
  padding: 0 32px !important;
}

body.cj-blog-layout #content-wrapper > .content-wrapper-in {
  display: grid !important;
  grid-template-columns: var(--cj-bl-sidebar) minmax(0, 1fr);
  align-items: start;
  column-gap: var(--cj-bl-gap);
  width: 100% !important;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
}

body.cj-blog-layout #content-wrapper > .content-wrapper-in > main#content {
  grid-column: 2 !important;
  grid-row: 1 !important;
  box-sizing: border-box;
  float: none !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  container: cj-blog-main / inline-size;
}

body.cj-blog-layout #content-wrapper #content > .content-inner,
body.cj-blog-layout #content-wrapper #content .news-item-detail,
body.cj-blog-layout #content-wrapper #content .news-item-detail > .text {
  box-sizing: border-box;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

body.cj-blog-layout #content-wrapper #content .news-item-detail > h1,
body.cj-blog-layout #content-wrapper #content > .content-inner > h1 {
  width: 100% !important;
  max-width: none !important;
  margin: 0 0 14px !important;
  color: var(--cj-bl-ink);
  font-size: clamp(28px, 2.7vw, 42px) !important;
  line-height: 1.2;
  letter-spacing: -.025em;
  overflow-wrap: break-word;
  text-wrap: balance;
}

body.cj-blog-layout #content-wrapper #content .news-item-detail > time {
  width: 100% !important;
  max-width: none !important;
  margin: 0 0 24px !important;
  color: var(--cj-bl-muted);
  font-size: 13px;
}

/* Původní uzly zůstávají na místě pro ostatní skripty. */
body.cj-blog-layout #content-wrapper > .content-wrapper-in > aside.sidebar.cj-blog-layout__sidebar {
  grid-column: 1 !important;
  grid-row: 1 !important;
  box-sizing: border-box;
  display: block !important;
  float: none !important;
  position: relative;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent;
}

body.cj-blog-layout #content-wrapper > .content-wrapper-in > .cj-blog-layout__sidebar > :not(.cj-blog-nav) {
  display: none !important;
}

body.cj-blog-layout .cj-blog-nav,
body.cj-blog-layout .cj-blog-nav * {
  box-sizing: border-box;
}

body.cj-blog-layout .cj-blog-nav {
  padding: 22px 16px 16px;
  border: 1px solid var(--cj-bl-line);
  border-radius: 16px;
  background: var(--cj-bl-soft);
  color: var(--cj-bl-text);
  font-family: Inter, "Noto Sans", sans-serif;
  line-height: 1.45;
}

body.cj-blog-layout .cj-blog-nav__intro {
  padding: 0 10px 17px;
}

body.cj-blog-layout .cj-blog-nav__eyebrow {
  display: block;
  margin-bottom: 7px;
  color: var(--cj-bl-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}

body.cj-blog-layout .cj-blog-nav__heading {
  margin: 0;
  color: var(--cj-bl-ink);
  font: 700 21px/1.25 Inter, "Noto Sans", sans-serif;
  letter-spacing: -.025em;
}

body.cj-blog-layout .cj-blog-nav__toggle {
  display: none !important;
}

body.cj-blog-layout .cj-blog-nav__list,
body.cj-blog-layout .cj-blog-nav__children {
  list-style: none;
  margin: 0;
  padding: 0;
}

body.cj-blog-layout .cj-blog-nav__item {
  margin: 3px 0;
  padding: 0;
}

body.cj-blog-layout .cj-blog-nav__row {
  display: flex;
  align-items: stretch;
  min-width: 0;
  border-radius: 9px;
}

body.cj-blog-layout .cj-blog-nav__link,
body.cj-blog-layout .cj-blog-nav__group {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  padding: 11px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--cj-bl-text);
  font: 600 14px/1.45 Inter, "Noto Sans", sans-serif;
  text-align: left;
  text-decoration: none;
  overflow-wrap: break-word;
  cursor: pointer;
}

body.cj-blog-layout .cj-blog-nav__all {
  margin-bottom: 12px;
  padding: 12px 10px;
  border: 1px solid var(--cj-bl-line);
  background: #fff;
}

body.cj-blog-layout .cj-blog-nav__row:hover,
body.cj-blog-layout .cj-blog-nav__all:hover {
  background: #e8f1fb;
}

body.cj-blog-layout .cj-blog-nav__row.is-current,
body.cj-blog-layout .cj-blog-nav__all[aria-current] {
  background: #e4effd;
}

body.cj-blog-layout .cj-blog-nav__link[aria-current],
body.cj-blog-layout .cj-blog-nav__row.is-current > .cj-blog-nav__group {
  color: #0d56a8;
  font-weight: 750;
}

body.cj-blog-layout .cj-blog-nav__row.is-ancestor > .cj-blog-nav__link,
body.cj-blog-layout .cj-blog-nav__row.is-ancestor > .cj-blog-nav__group {
  color: var(--cj-bl-ink);
}

body.cj-blog-layout .cj-blog-nav__branch {
  display: flex;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--cj-bl-muted);
  cursor: pointer;
}

body.cj-blog-layout .cj-blog-nav__chevron {
  display: inline-block;
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-right: 1.7px solid currentColor;
  border-bottom: 1.7px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
}

body.cj-blog-layout [data-cj-blog-branch][aria-expanded="true"] .cj-blog-nav__chevron,
body.cj-blog-layout .cj-blog-nav__toggle[aria-expanded="true"] .cj-blog-nav__chevron {
  transform: rotate(225deg) translate(-1px, -1px);
}

body.cj-blog-layout .cj-blog-nav__children {
  margin: 4px 0 10px 12px;
  padding-left: 8px;
  border-left: 1px solid #ccdce9;
}

body.cj-blog-layout .cj-blog-nav__children .cj-blog-nav__link,
body.cj-blog-layout .cj-blog-nav__children .cj-blog-nav__group {
  padding: 9px 8px;
  font-size: 13px;
  font-weight: 500;
}

body.cj-blog-layout .cj-blog-nav__group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

body.cj-blog-layout .cj-blog-nav [hidden] {
  display: none !important;
}

body.cj-blog-layout .cj-blog-nav :is(a, button):focus-visible {
  outline: 3px solid #1565c0;
  outline-offset: 2px;
}

/* /jak-vybrat/ má vlastní druhou drobečkovou navigaci uvnitř obsahu.
   Nativní navigace nad obsahem zůstává zachovaná. */
body.cj-blog-layout.in-jak-vybrat #content .howto-page > nav.howto-breadcrumbs {
  display: none !important;
}

/* Přehled blogu si ponechává vlastní karty, vyhledávání a filtry. */
body.cj-blog-layout #content .blog-hub {
  width: 100%;
  min-width: 0;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

body.cj-blog-layout #content .blog-hub h1 {
  font-size: clamp(30px, 2.9vw, 44px);
  line-height: 1.15;
}

/* Hub má nyní vedlejší navigaci: jeho karty reagují na prostor hlavního sloupce. */
@container cj-blog-main (max-width: 1040px) {
  body.cj-blog-layout #content .blog-featured { grid-template-columns: minmax(0, 1fr); }
  body.cj-blog-layout #content .blog-featured__side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
  }
  body.cj-blog-layout #content .blog-topics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  body.cj-blog-layout #content .blog-guides { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.cj-blog-layout #content .blog-all__controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.cj-blog-layout #content .blog-stage { grid-template-columns: minmax(0, 1fr); }
  body.cj-blog-layout #content .blog-stage__controls { grid-column: auto; }
  body.cj-blog-layout #content .blog-cta { grid-template-columns: 56px minmax(0, 1fr); }
  body.cj-blog-layout #content .blog-cta .blog-button { grid-column: auto; }
}

@container cj-blog-main (max-width: 640px) {
  body.cj-blog-layout #content .blog-featured__side,
  body.cj-blog-layout #content .blog-guides,
  body.cj-blog-layout #content .blog-all__controls { grid-template-columns: minmax(0, 1fr); }
  body.cj-blog-layout #content .blog-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.cj-blog-layout #content .blog-article-card--feature { display: block; min-height: 0; }
  body.cj-blog-layout #content .blog-cta .blog-button { grid-column: 1 / -1; }
}

@media (min-width: 1024px) and (max-width: 1199px) {
  body.cj-blog-layout { --cj-bl-sidebar: 240px; --cj-bl-gap: 32px; }
  body.cj-blog-layout #content-wrapper.container.content-wrapper { padding-inline: 24px !important; }
}

@media (max-width: 1023px) {
  body.cj-blog-layout #content-wrapper.container.content-wrapper { padding-inline: 24px !important; }
  body.cj-blog-layout #content-wrapper > .content-wrapper-in {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 24px;
  }
  body.cj-blog-layout #content-wrapper > .content-wrapper-in > main#content {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }
  body.cj-blog-layout .cj-blog-nav { padding: 0; border-radius: 12px; }
  body.cj-blog-layout .cj-blog-nav__intro { display: none; }
  body.cj-blog-layout .cj-blog-nav__toggle {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    min-height: 56px;
    padding: 16px 20px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--cj-bl-ink);
    font: 700 16px/1.4 Inter, "Noto Sans", sans-serif;
    text-align: left;
    cursor: pointer;
  }
  body.cj-blog-layout .cj-blog-nav__panel { padding: 0 14px 14px; }
  body.cj-blog-layout .cj-blog-nav__link,
  body.cj-blog-layout .cj-blog-nav__group { min-height: 44px; }
  body.cj-blog-layout .cj-blog-nav__branch { flex-basis: 44px; width: 44px; }
}

@media (max-width: 767px) {
  body.cj-blog-layout #content-wrapper.container.content-wrapper {
    margin-top: 16px !important;
    padding-inline: 16px !important;
  }
  body.cj-blog-layout #content-wrapper > .content-wrapper-in { row-gap: 20px; }
  body.cj-blog-layout #content-wrapper #content .news-item-detail > h1,
  body.cj-blog-layout #content-wrapper #content > .content-inner > h1 {
    font-size: clamp(26px, 6.5vw, 34px) !important;
    line-height: 1.22;
    text-wrap: pretty;
  }
}


/* Výběrové centrum: reaguje na skutečnou šířku článku vedle blogové navigace. */
@container cj-blog-main (max-width: 1100px) {
  body.cj-blog-layout.in-jak-vybrat #content .howto-hero {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: center;
    min-height: 0;
    overflow: visible;
    padding-bottom: 24px;
  }
  body.cj-blog-layout.in-jak-vybrat #content .howto-hero__copy {
    min-width: 0;
    width: 100%;
    padding: 24px 0;
  }
  body.cj-blog-layout.in-jak-vybrat #content .howto-hero h1 {
    max-width: 100%;
    font-size: clamp(34px, 4.4cqw, 44px) !important;
    line-height: 1.12;
    overflow-wrap: break-word;
    text-wrap: balance;
  }
  body.cj-blog-layout.in-jak-vybrat #content .howto-hero__lead {
    max-width: 100%;
    font-size: 17px;
    line-height: 1.55;
  }
  body.cj-blog-layout.in-jak-vybrat #content .howto-actions {
    width: 100%;
    max-width: 100%;
    gap: 10px;
    margin-top: 22px;
  }
  body.cj-blog-layout.in-jak-vybrat #content .howto-actions .howto-button {
    max-width: 100%;
    white-space: normal;
  }
  body.cj-blog-layout.in-jak-vybrat #content .howto-hero__visual {
    position: relative;
    inset: auto;
    align-self: center;
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: auto;
    aspect-ratio: 1.15;
    overflow: hidden;
    border-radius: 16px;
    background: #f4f8fc;
    isolation: isolate;
  }
  body.cj-blog-layout.in-jak-vybrat #content .howto-hero__drawing {
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
  body.cj-blog-layout.in-jak-vybrat #content .howto-hero__product--vertical {
    top: 5%; left: 8%; right: auto; bottom: auto;
    width: 43%; height: 58%;
  }
  body.cj-blog-layout.in-jak-vybrat #content .howto-hero__product--tank {
    top: auto; left: 7%; right: auto; bottom: 8%;
    width: 58%; height: 43%;
  }
  body.cj-blog-layout.in-jak-vybrat #content .howto-hero__product--cov {
    top: auto; left: auto; right: 3%; bottom: 6%;
    width: 44%; height: 38%;
  }

  /* Původní čtyři pevné vnitřní sloupce se nevešly do 306px karet. */
  body.cj-blog-layout.in-jak-vybrat #content .howto-solution-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.cj-blog-layout.in-jak-vybrat #content .howto-solution-card {
    min-width: 0;
    grid-template-columns: 40px 105px minmax(0, 1fr) 20px;
    grid-template-rows: auto;
    gap: 10px;
    padding: 16px;
  }
  body.cj-blog-layout.in-jak-vybrat #content .howto-solution-card__icon {
    position: static;
    grid-column: 1; grid-row: 1;
    width: 40px; height: 40px;
  }
  body.cj-blog-layout.in-jak-vybrat #content .howto-solution-card > img {
    grid-column: 2; grid-row: 1;
    width: 105px; height: 100px;
  }
  body.cj-blog-layout.in-jak-vybrat #content .howto-solution-card > span:nth-last-child(2) {
    grid-column: 3; grid-row: 1;
    min-width: 0;
    overflow-wrap: break-word;
  }
  body.cj-blog-layout.in-jak-vybrat #content .howto-solution-card > [data-how-icon]:last-child {
    grid-column: 4; grid-row: 1;
    width: 20px; height: 20px;
  }

  /* Krok s objektem: počet osob nesmí zužovat dvě kolony voleb. */
  body.cj-blog-layout.in-jak-vybrat #content .howto-people-step {
    grid-template-columns: minmax(0, 1fr);
  }
  body.cj-blog-layout.in-jak-vybrat #content .howto-people-step .howto-option {
    min-width: 0;
  }
  body.cj-blog-layout.in-jak-vybrat #content .howto-people-step .howto-option > span:last-child {
    min-width: 0;
    overflow-wrap: break-word;
  }

  body.cj-blog-layout.in-jak-vybrat #content .howto-option-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  body.cj-blog-layout.in-jak-vybrat #content .howto-option-grid--four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.cj-blog-layout.in-jak-vybrat #content .howto-guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.cj-blog-layout.in-jak-vybrat #content .howto-compare-grid article {
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    gap: 12px;
  }
  body.cj-blog-layout.in-jak-vybrat #content .howto-compare-grid article > img {
    justify-self: center;
  }
}

@container cj-blog-main (max-width: 850px) {
  body.cj-blog-layout.in-jak-vybrat #content .howto-wizard__layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@container cj-blog-main (max-width: 760px) {
  body.cj-blog-layout.in-jak-vybrat #content .howto-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  body.cj-blog-layout.in-jak-vybrat #content .howto-hero__copy { padding: 16px 0 8px; }
  body.cj-blog-layout.in-jak-vybrat #content .howto-hero h1 {
    font-size: clamp(28px, 6cqw, 38px) !important;
  }
  body.cj-blog-layout.in-jak-vybrat #content .howto-hero__lead { font-size: 16px; }
  body.cj-blog-layout.in-jak-vybrat #content .howto-hero__visual {
    max-width: 480px;
    margin: 0 auto;
    aspect-ratio: 1.35;
  }
  body.cj-blog-layout.in-jak-vybrat #content .howto-solution-card {
    grid-template-columns: minmax(0, 1fr) 20px;
    grid-template-rows: 100px auto;
    gap: 8px;
    padding: 12px;
  }
  body.cj-blog-layout.in-jak-vybrat #content .howto-solution-card__icon {
    position: absolute;
    top: 9px; left: 9px;
    width: 35px; height: 35px;
  }
  body.cj-blog-layout.in-jak-vybrat #content .howto-solution-card > img {
    grid-column: 1 / -1; grid-row: 1;
    justify-self: center;
    width: 100%; height: 100px;
  }
  body.cj-blog-layout.in-jak-vybrat #content .howto-solution-card > span:nth-last-child(2) {
    grid-column: 1; grid-row: 2;
  }
  body.cj-blog-layout.in-jak-vybrat #content .howto-solution-card > [data-how-icon]:last-child {
    grid-column: 2; grid-row: 2;
  }
  body.cj-blog-layout.in-jak-vybrat #content .howto-compare-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  body.cj-blog-layout.in-jak-vybrat #content .howto-compare-grid article {
    grid-template-columns: 105px minmax(0, 1fr);
    grid-template-rows: auto auto;
  }
  body.cj-blog-layout.in-jak-vybrat #content .howto-compare-grid article > img {
    width: 105px; height: 105px;
  }
}

@container cj-blog-main (max-width: 520px) {
  body.cj-blog-layout.in-jak-vybrat #content .howto-option-grid,
  body.cj-blog-layout.in-jak-vybrat #content .howto-option-grid--four,
  body.cj-blog-layout.in-jak-vybrat #content .howto-guide-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
