/* Integrační návody (homepage/integration-article.blade.php).
 * Vše je pod .lf-guide, aby styly nezasahovaly do šablony webu.
 * Bloky z editoru (.lf-block-*) a základ obsahu jsou ve sdíleném editor-content.css. */

.lf-guide {
  --lf-accent: #cb0c9f;
  --lf-accent-dark: #a30a80;
  --lf-accent-light: #ff9ce8;
  --lf-tint: #fbf3fa;
  --lf-tint-border: #eedcea;
  --lf-ink: #191a20;
  --lf-text: #33333b;
  --lf-muted: #6a6470;
  --lf-line: #eee9ee;
  --lf-soft: #f6f5f8;
  --lf-mono: 'SF Mono', Monaco, Consolas, 'Courier New', monospace;
  color: var(--lf-text);
  background: #fff;
  font-size: 16px;
  line-height: 1.65;
}

.lf-container {
  max-width: 1320px;
  margin: 0 auto;
  padding-left: clamp(16px, 4vw, 40px);
  padding-right: clamp(16px, 4vw, 40px);
}

/* Atribut hidden musí přebít display z pravidel níže */
.lf-guide [hidden] {
  display: none !important;
}

/* Horní část */
.lf-hero {
  background: var(--lf-ink);
  color: #d9d8df;
  padding: 140px 0 56px;
}

.lf-hero__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 56px;
  align-items: flex-end;
  justify-content: space-between;
}

.lf-hero__main {
  flex: 1 1 520px;
  min-width: 0;
  max-width: 800px;
}

.lf-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 14px;
  color: #a9a7b1;
}

.lf-breadcrumb a {
  color: #a9a7b1;
  text-decoration: underline !important;
}

.lf-breadcrumb span:last-child {
  color: #fff;
}

.lf-hero__title {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 18px;
}

.lf-logo {
  width: 76px;
  height: 76px;
  flex: none;
  border-radius: 18px;
  background: #fff;
  color: var(--lf-accent);
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lf-logo img {
  width: 66px;
  height: 66px;
  object-fit: contain;
}

.lf-eyebrow {
  font-size: 14px;
  font-weight: 600;
  color: var(--lf-accent-light);
}

.lf-eyebrow--dark {
  font-size: 13px;
  color: var(--lf-accent-dark);
}

.lf-hero h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.lf-lede {
  margin: 0 0 26px;
  font-size: 18px;
  line-height: 1.6;
  color: #d9d8df;
}

.lf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.lf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .15s;
}

.lf-btn--primary,
.lf-btn--primary:hover {
  background: var(--lf-accent);
  color: #fff !important;
}

.lf-btn--primary:hover {
  background: var(--lf-accent-dark);
}

.lf-btn--ghost,
.lf-btn--ghost:hover {
  background: transparent;
  border-color: #5a5b66;
  color: #fff !important;
}

.lf-btn--ghost:hover {
  background: #26272f;
}

.lf-facts {
  flex: 0 1 300px;
  margin: 0;
  padding: 20px 22px;
  background: #24252d;
  border: 1px solid #3a3b45;
  border-radius: 16px;
}

.lf-facts:empty {
  display: none;
}

.lf-facts__row + .lf-facts__row {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #3a3b45;
}

.lf-facts dt {
  font-size: 13px;
  font-weight: 400;
  color: #b9b7c0;
}

.lf-facts dd {
  margin: 0;
  font-weight: 500;
  color: #fff;
  overflow-wrap: anywhere;
}

.lf-facts dd a {
  color: var(--lf-accent-light);
}

.lf-facts__row--lead dd {
  font-size: 22px;
  font-weight: 600;
}

/* Rozložení */
.lf-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 64px;
  align-items: flex-start;
  padding-top: 48px;
  padding-bottom: 72px;
}

.lf-main {
  flex: 999 1 560px;
  min-width: 0;
  max-width: 820px;
}

/* Boční navigace */
.lf-rail {
  flex: 1 1 270px;
  min-width: 0;
  font-size: 15px;
}

.lf-rail__group {
  padding: 0 10px 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--lf-muted);
}

.lf-rail__group:not(:first-child) {
  padding-top: 18px;
}

.lf-rail__link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 4px 10px;
  border-radius: 10px;
  color: var(--lf-text);
}

.lf-rail__link:hover {
  background: var(--lf-soft);
  color: var(--lf-ink);
}

.lf-rail__logo {
  width: 30px;
  height: 30px;
  flex: none;
  border: 1px solid var(--lf-line);
  border-radius: 8px;
  background: #fff;
  color: var(--lf-accent-dark);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lf-rail__logo img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.lf-rail__current {
  margin: 4px 0;
  border-radius: 14px;
  background: var(--lf-tint);
}

.lf-rail__current .lf-rail__link,
.lf-rail__current .lf-rail__link:hover {
  background: transparent;
  color: var(--lf-accent-dark);
  font-weight: 600;
}

.lf-rail__current .lf-rail__logo {
  border-color: var(--lf-tint-border);
}

.lf-rail__contents--desktop {
  padding: 2px 6px 14px;
}

.lf-rail__toggle {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid #e4dfe4;
  border-radius: 12px;
  background: #fff;
  color: var(--lf-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.lf-rail__toggle i {
  font-size: 12px;
  color: var(--lf-muted);
  transition: transform .15s;
}

.lf-rail__toggle[aria-expanded="true"] i {
  transform: rotate(180deg);
}

.lf-progress {
  padding: 8px 8px 10px;
}

.lf-progress__label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13px;
  color: #45434d;
}

.lf-progress__label strong {
  font-weight: 600;
}

.lf-progress__track {
  height: 6px;
  border-radius: 3px;
  background: #efd9ea;
  overflow: hidden;
}

.lf-progress__track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 3px;
  background: var(--lf-accent);
  transition: width .2s;
}

.lf-toc {
  list-style: none;
  margin: 0;
  padding: 0;
}

.lf-toc a {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 2px 8px;
  border-radius: 8px;
  color: #45434d;
  font-size: 14px;
  line-height: 1.35;
}

.lf-toc a:hover {
  color: var(--lf-accent-dark);
}

.lf-toc a.is-active {
  background: #fff;
  color: var(--lf-accent-dark);
  font-weight: 600;
}

/* Na počítači je obsah přímo u aktuální platformy, na mobilu ve vlastním panelu */
@media (min-width: 992px) {
  .lf-layout {
    flex-wrap: nowrap;
  }

  .lf-rail {
    flex: 0 0 290px;
    position: sticky;
    top: 110px;
    max-height: calc(100vh - 130px);
    overflow-y: auto;
  }

  .lf-main {
    flex: 1 1 auto;
  }

  .lf-rail__toggle,
  .lf-rail__contents--mobile {
    display: none !important;
  }
}

@media (max-width: 991.98px) {
  .lf-hero {
    padding-top: 120px;
  }

  .lf-rail {
    flex: 1 1 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .lf-rail__panel {
    grid-column: 1 / -1;
  }

  .lf-rail__panel.is-collapsed {
    display: none;
  }

  .lf-rail__contents--desktop {
    display: none;
  }

  .lf-layout {
    padding-top: 16px;
  }
}

/* Shrnutí */
.lf-takeaways {
  margin-bottom: 40px;
  padding: 26px 28px;
  border-radius: 18px;
  background: var(--lf-tint);
}

.lf-takeaways h2 {
  margin: 0 0 14px;
  font-size: 20px;
  font-weight: 600;
  color: var(--lf-ink);
}

.lf-takeaways ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.lf-takeaways li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 16px;
  color: var(--lf-text);
}

.lf-takeaways i {
  flex: none;
  margin-top: 6px;
  color: var(--lf-accent);
  font-size: 14px;
}

/* Sekce a kroky */
.lf-section {
  margin-bottom: 48px;
  scroll-margin-top: 110px;
}

.lf-section > h2,
.lf-step__head h2 {
  margin: 0 0 14px;
  font-size: 26px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--lf-ink);
}

.lf-step {
  display: flex;
  gap: 20px;
  scroll-margin-top: 110px;
}

.lf-step + .lf-section {
  margin-top: 8px;
}

.lf-step__marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: none;
}

.lf-step__number,
.lf-step__check {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  background: var(--lf-accent);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lf-step__check {
  display: none;
  background: var(--lf-ink);
}

.lf-step__marker::after {
  content: "";
  flex: 1;
  width: 2px;
  margin-top: 8px;
  background: #f0dcec;
}

.lf-step:not(:has(+ .lf-step)) .lf-step__marker::after {
  display: none;
}

.lf-step__body {
  flex: 1;
  min-width: 0;
  padding-bottom: 44px;
}

.lf-step__head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  align-items: flex-start;
}

.lf-step__head > div {
  flex: 1 1 320px;
  min-width: 0;
}

.lf-step__done {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #d9d3d9;
  border-radius: 10px;
  background: #fff;
  color: var(--lf-text);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.lf-step.is-done .lf-step__number {
  display: none;
}

.lf-step.is-done .lf-step__check {
  display: flex;
}

.lf-step.is-done .lf-step__marker::after {
  background: var(--lf-ink);
}

.lf-step.is-done .lf-step__done {
  border-color: var(--lf-ink);
  background: var(--lf-ink);
  color: #fff;
}

/* Screenshoty */
.lf-shots {
  margin: 0 0 16px;
}

.lf-shots__grid {
  display: grid;
  gap: 10px;
}

.lf-shots--multi .lf-shots__grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.lf-shot {
  display: block;
  width: fit-content;
  max-width: 100%;
  border: 1px solid #e4dfe4;
  border-radius: 14px;
  overflow: hidden;
  background: var(--lf-soft);
  cursor: zoom-in;
}

/* Obrázek drží šířku z editoru, jinak svou vlastní, a nikdy se nezvětšuje nad ni */
.lf-guide .editor-content.editor-content .lf-shot img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 0;
}

.lf-shots figcaption {
  margin-top: 8px;
  font-size: 14px;
  color: var(--lf-muted);
}

.lf-lightbox {
  max-width: min(96vw, 1800px);
  padding: 12px;
  border: 0;
  border-radius: 14px;
  background: var(--lf-ink);
}

.lf-lightbox::backdrop {
  background: rgba(25, 26, 32, .9);
}

.lf-lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.lf-lightbox__counter {
  padding-left: 4px;
  font-size: 14px;
  color: #d9d8df;
}

.lf-lightbox__stage {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lf-lightbox__stage img {
  display: block;
  min-width: 0;
  max-width: 100%;
  max-height: 82vh;
  border-radius: 8px;
  touch-action: pan-y;
}

.lf-lightbox__nav {
  width: 44px;
  height: 44px;
  flex: none;
  border: 1px solid #5a5b66;
  border-radius: 50%;
  background: #26272f;
  color: #fff;
  cursor: pointer;
}

.lf-lightbox__nav:hover {
  background: #3a3b45;
}

.lf-lightbox__nav[hidden] {
  display: none;
}

/* Na úzkém displeji má obrázek celou šířku, tlačítka jsou přes něj */
@media (max-width: 575.98px) {
  .lf-lightbox__stage {
    position: relative;
  }

  .lf-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(38, 39, 47, .85);
  }

  .lf-lightbox__nav:first-child {
    left: 4px;
  }

  .lf-lightbox__nav:last-child {
    right: 4px;
  }
}

/* Kód */
.lf-code {
  position: relative;
  margin: 0 0 16px;
  border-radius: 14px;
  background: var(--lf-ink);
  overflow: hidden;
}

.lf-code__copy {
  position: absolute;
  top: 8px;
  right: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #4a4b55;
  border-radius: 8px;
  background: #26272f;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.lf-guide .editor-content.editor-content .lf-code pre {
  margin: 0;
  padding: 18px 20px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #e7e6ec;
  font-family: var(--lf-mono);
  font-size: 13.5px;
  line-height: 1.65;
  overflow-x: auto;
  white-space: pre;
}

.lf-guide .editor-content.editor-content .lf-code code {
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

.lf-code:has(.lf-code__copy:not([hidden])) pre {
  padding-top: 56px !important;
}

/* Nadpisy obsahu: magenta jen jako akcent */
.lf-guide .editor-content.editor-content h2,
.lf-guide .editor-content.editor-content h3,
.lf-guide .editor-content.editor-content h4 {
  color: var(--lf-ink);
}

.lf-guide .editor-content.editor-content h3 {
  font-size: 20px;
  font-weight: 600;
}

/* Časté otázky */
.lf-faq {
  border-bottom: 1px solid var(--lf-line);
}

.lf-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 10px 0;
  list-style: none;
  cursor: pointer;
}

.lf-faq summary::-webkit-details-marker {
  display: none;
}

.lf-faq summary::after {
  content: "+";
  flex: none;
  color: var(--lf-accent);
  font-size: 26px;
  line-height: 1;
  transition: transform .15s;
}

.lf-faq[open] summary::after {
  transform: rotate(45deg);
}

.lf-guide .editor-content.editor-content .lf-faq summary h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 600;
}

.lf-faq__answer {
  padding: 0 36px 18px 0;
}

/* Závěr */
.lf-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 32px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  padding: 28px 30px;
  border-radius: 18px;
  background: var(--lf-tint);
}

.lf-cta > div {
  flex: 1 1 300px;
}

.lf-cta h2 {
  margin: 0 0 4px;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--lf-ink);
}

.lf-cta p {
  margin: 0;
  font-size: 15px;
  color: var(--lf-text);
}

.lf-sources {
  font-size: 14px;
  color: var(--lf-muted);
}

.lf-sources h2 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: #45434d;
}

.lf-sources ul {
  margin: 0;
  padding-left: 18px;
  list-style: disc;
}

.lf-sources li {
  font-size: 14px;
  color: var(--lf-muted);
}

.lf-sources a {
  color: var(--lf-accent);
  overflow-wrap: anywhere;
}

@media (max-width: 575.98px) {
  .lf-step {
    gap: 12px;
  }

  .lf-step__number,
  .lf-step__check {
    width: 34px;
    height: 34px;
  }

  .lf-section > h2,
  .lf-step__head h2 {
    font-size: 23px;
  }

  .lf-takeaways,
  .lf-cta {
    padding: 20px;
  }
}
