/*
 * Landing page (Naslovna) sections the shop's sheets do not cover, built from
 * core blocks seeded by scripts/zimskacarolija/content.php: the two-by-two
 * cards, the gallery, the dates-and-location split with the main site's facts
 * list, and the FAQ accordion (core Details blocks styled as the main site's
 * faq-accordion). Hero, cards, steps and the CTA band reuse front.css, base.css
 * and bands.css. The package cards and the booking panel are the plugin's (.zc-*).
 */

/* --- Flow spacing -----------------------------------------------------------
 * WoodMart spaces every child of a flow layout (margin-block: 0
 * var(--wd-block-spacing)) with a one-class selector from a sheet that prints
 * after this one. The landing's components keep the design's rhythm, so their
 * margins are restated one step stronger here.
 */
.entry-content .tt-head,
.entry-content .tt-kicker,
.entry-content .tt-card,
.entry-content .tt-step,
.entry-content .tt-step h3,
.entry-content .tt-card .tt-card__title,
.entry-content .tt-faq__item,
.entry-content .tt-split > * {
  margin-block: 0;
}

.entry-content .tt-h2 {
  margin-block: 18px 0;
}

.entry-content .tt-lede {
  margin-block: 22px 0;
}

.entry-content .tt-head .tt-lede {
  margin-block: 0;
}

.entry-content .tt-grid-2,
.entry-content .tt-grid-3,
.entry-content .tt-steps,
.entry-content .tt-gallery,
.entry-content .tt-faq__list,
.entry-content .zc-packages-section .tt-head + * {
  margin-block: var(--tt-head-gap) 0;
}

.entry-content .tt-step__p,
.entry-content .tt-card--text p {
  margin-block: 10px 0;
}

.entry-content .tt-cta__btns {
  margin-block: 36px 0;
}

/* --- Anchors: the sticky header must not cover a section's top --------------
 * No scroll-behavior: smooth here: WoodMart's one-page menu animates scrollTop
 * itself, and the two together stop the scroll short of long jumps.
 */
.entry-content [id] {
  scroll-margin-top: var(--tt-anchor-offset);
}

/* --- Two-by-two cards (Šta dobijate) ------------------------------------------
 * base.css's info cards, two to a row on a desktop and one on a phone, so four
 * cards never leave an orphan.
 */
.tt-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--tt-card-min-wide)), 1fr));
  gap: var(--tt-gap-cards);
}

/* --- Gallery (core Gallery block with the tt-gallery class) -----------------
 * Core's own wrapping rows (every tile grows, so a short last row widens instead
 * of leaving an empty cell), with a fixed row height that keeps the tiles near
 * the main site's 4:5 category tiles and its zoom. Core sizes each figure with
 * a selector that carries :not(#individual-image), so this one does too.
 */
.entry-content .wp-block-gallery.has-nested-images.tt-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tt-gap-gallery);
}

.entry-content .wp-block-gallery.has-nested-images.tt-gallery figure.wp-block-image:not(#individual-image) {
  flex: 1 1 var(--tt-gallery-min);
  width: auto;
  height: var(--tt-gallery-row);
  margin: 0;
  overflow: hidden;
  background: var(--tt-cream-alt);
}

.entry-content .wp-block-gallery.has-nested-images.tt-gallery figure.wp-block-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--tt-motion-zoom) var(--tt-ease);
}

.entry-content .wp-block-gallery.has-nested-images.tt-gallery figure.wp-block-image:hover img {
  transform: scale(1.05);
}

/* --- Dates and location: copy left, facts right ------------------------------ */
.tt-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--tt-split-min)), 1fr));
  gap: var(--tt-gap-facts);
  align-items: start;
}

.tt-split__copy .tt-lede {
  max-width: var(--tt-measure);
}

/* The main site's facts list (SPEC.md §04 "Facts list") as a core Table: the
 * key a caption on the left, the value on the right, hairlines between rows. */
.entry-content .wp-block-table.tt-facts {
  margin: 0;
}

.entry-content .wp-block-table.tt-facts table {
  width: 100%;
  margin: 0;
  border: 0;
  border-collapse: collapse;
  border-top: var(--tt-hairline) solid var(--tt-rule);
}

.entry-content .wp-block-table.tt-facts td {
  padding: 20px 0;
  border: 0;
  border-bottom: var(--tt-hairline) solid var(--tt-rule);
  vertical-align: baseline;
  font-family: var(--tt-sans);
  font-size: var(--tt-size-value);
  font-weight: 300;
  line-height: var(--tt-lh-copy);
  color: var(--tt-ink);
  text-align: right;
}

.entry-content .wp-block-table.tt-facts td:first-child {
  padding-inline-end: var(--tt-gap-cards);
  font-size: var(--tt-size-caption);
  font-weight: 400;
  letter-spacing: var(--tt-tracking-caption);
  text-transform: uppercase;
  color: var(--tt-ink-3);
  text-align: left;
  white-space: nowrap;
}

/* --- FAQ (core Details blocks, the main site's faq-accordion) ---------------- */
/* The whole FAQ column is 900 wide, heading included (Services.dc.html), over
 * front.css's unbounded section children. */
.entry-content .tt-faq .tt-wrap > :is(.tt-head, .tt-faq__list) {
  max-width: var(--tt-container-faq);
  margin-inline: auto;
}

.tt-head--center {
  justify-content: center;
  text-align: center;
}

.tt-faq__item {
  border-bottom: var(--tt-hairline) solid var(--tt-rule);
}

.tt-faq__item summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--tt-gap-cards);
  padding: 22px 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--tt-display);
  font-weight: 400;
  font-size: var(--tt-size-faq);
  line-height: 1.2;
  color: var(--tt-ink);
}

/* Hide the native disclosure triangle in both engines. */
.tt-faq__item summary::-webkit-details-marker {
  display: none;
}

.tt-faq__item summary::after {
  content: "+";
  flex: none;
  font-size: var(--tt-size-quote);
  line-height: 1;
  color: var(--tt-royal);
  transition: transform var(--tt-motion-chip) var(--tt-ease);
}

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

.tt-faq__item summary:focus-visible {
  outline: var(--tt-focus-width) solid var(--tt-royal);
  outline-offset: var(--tt-focus-offset);
}

.entry-content .tt-faq__item p {
  max-width: var(--tt-measure-faq-answer);
  margin: 0;
  padding-bottom: 22px;
  font-family: var(--tt-sans);
  font-size: var(--tt-size-body-s);
  font-weight: 300;
  line-height: 1.8;
  color: var(--tt-ink-3);
}

.tt-faq__item p a {
  color: var(--tt-royal);
  border-bottom: var(--tt-hairline) solid var(--tt-btn-outline);
  text-decoration: none;
}

/* --- Motion ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .entry-content .wp-block-gallery.has-nested-images.tt-gallery figure.wp-block-image img,
  .tt-faq__item summary::after {
    transition: none;
  }

  .entry-content .wp-block-gallery.has-nested-images.tt-gallery figure.wp-block-image:hover img {
    transform: none;
  }
}
