/* BUHALTERIJA.COM — SEO/UI V1.1
   Compact content blocks + animated FAQ
*/

/* Prevent empty CMS paragraphs from creating artificial vertical gaps. */
.editorial-body > p:empty,
.editorial-body > p:has(> br:only-child),
.editorial-body li > p:empty {
  display: none;
}

/* Lists should be informative, not oversized full-width cards. */
.editorial-body > ul,
.editorial-body > ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 26px 0 38px;
}

.editorial-body > ul > li,
.editorial-body > ol > li {
  min-height: 0;
  margin: 0;
  padding: 18px 20px 18px 48px;
  background: rgba(255, 253, 249, .72);
  border: 1px solid var(--line);
  border-radius: 16px;
  line-height: 1.55;
}

.editorial-body > ul > li::before {
  top: 17px;
}

.editorial-body > ol > li::before {
  top: 20px;
}

/* Ordered process cards: denser and visually balanced. */
.editorial-body > ol > li {
  padding: 24px 24px 24px 66px;
}

.editorial-body > ol > li::before {
  left: 22px;
  top: 25px;
}

/* Keep paragraphs inside list items compact if CKEditor wraps them. */
.editorial-body li > p {
  margin: 0;
}

/* FAQ: accessible native details with animated answer reveal. */
.faq-stack details {
  overflow: clip;
}

.faq-stack summary {
  transition:
    color .2s ease,
    padding-left .2s ease,
    background-color .2s ease;
}

.faq-stack summary:hover {
  padding-left: 10px;
  background: rgba(104, 21, 54, .025);
}

.faq-stack summary i {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(104, 21, 54, .18);
  border-radius: 50%;
  line-height: 1;
  transition:
    transform .28s cubic-bezier(.2,.8,.2,1),
    background-color .2s ease,
    color .2s ease;
}

.faq-stack details[open] summary i {
  transform: rotate(45deg);
  background: var(--wine);
  color: #fff;
}

.faq-content {
  display: grid;
  grid-template-rows: 0fr;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  transform: translateY(-6px);
  transition:
    grid-template-rows .34s cubic-bezier(.2,.8,.2,1),
    opacity .24s ease,
    transform .34s cubic-bezier(.2,.8,.2,1),
    padding-bottom .34s ease;
}

.faq-content > * {
  min-height: 0;
  overflow: hidden;
}

.faq-stack details[open] .faq-content {
  grid-template-rows: 1fr;
  padding-bottom: 24px;
  opacity: 1;
  transform: translateY(0);
}

/* Better focus state for keyboard users. */
.faq-stack summary:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 4px;
  border-radius: 8px;
}

@media (max-width: 720px) {
  .editorial-body > ul,
  .editorial-body > ol {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .editorial-body > ul > li,
  .editorial-body > ol > li {
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .faq-stack summary:hover {
    padding-left: 2px;
    background: transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  .faq-stack summary,
  .faq-stack summary i,
  .faq-content {
    transition: none;
  }
}
