.qcc-pillars {
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
}

.qcc-pillars__inner {
  position: relative;
  max-width: var(--container-max);
  margin-inline: auto;
  padding: var(--space-11) var(--page-gutter);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 34px;
  row-gap: 72px;
  align-items: center;
  box-sizing: border-box;
}

/* Centered Q-mark — grid column (matches localhost:3000 value band) */
.qcc-pillars__center-wrap {
  grid-column: 2;
  grid-row: 1 / -1;
  justify-self: center;
  align-self: center;
  position: relative;
  width: 400px;
  z-index: 1;
}

.qcc-pillars__center {
  width: 100%;
  height: auto;
  display: block;
  color: var(--svg-pattern-fill-accent);
  filter: blur(0);
  transition: opacity 0.35s ease, filter 0.35s ease;
}

.qcc-pillars__center-text {
  position: absolute;
  inset: 34% 2.75% 32%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-weight: var(--fw-regular);
  font-size: 24px;
  line-height: 1.375;
  letter-spacing: var(--ls-body);
  text-align: center;
  color: #ffffff;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.qcc-pillars__center-wrap:hover .qcc-pillars__center,
.qcc-pillars__center-wrap:focus-within .qcc-pillars__center {
  opacity: 0.14;
  filter: blur(6px);
}

.qcc-pillars__center-wrap:hover .qcc-pillars__center-text,
.qcc-pillars__center-wrap:focus-within .qcc-pillars__center-text {
  opacity: 1;
}

/* Editor — reveal text while editing the block */
.editor-styles-wrapper .wp-block-qcc-section-pillars.is-selected .qcc-pillars__center {
  opacity: 0.14;
  filter: blur(6px);
}

.editor-styles-wrapper .wp-block-qcc-section-pillars.is-selected .qcc-pillars__center-text {
  opacity: 1;
  pointer-events: auto;
}

/* Decorative Q-mark watermarks — top-right + bottom-left (matches hero) */
.qcc-pillars__pattern {
  position: absolute;
  pointer-events: none;
  width: 620px;
  height: auto;
  display: block;
  color: var(--svg-pattern-fill);
  z-index: 1;
}

.qcc-pillars__pattern--tr {
  top: 0;
  right: 0;
  opacity: 0.16;
  transform: translate(50%, -50%) rotate(-90deg);
}

.qcc-pillars__pattern--bl {
  bottom: 0;
  left: 0;
  width: 520px;
  opacity: 0.08;
  transform: translate(-50%, 50%) rotate(90deg);
}

/* Flat InnerBlocks list participates in the parent 3-column grid */
.qcc-pillars__grid {
  display: contents;
}

/* ── Native InnerBlocks styling (scoped; editors can override) ── */

.qcc-pillars__grid .qcc-pillars__item {
  position: relative;
  margin: 0;
  font-family: var(--font-sans);
  font-weight: var(--fw-regular);
  font-size: var(--fs-h4);
  line-height: 1.25;
  letter-spacing: var(--ls-body);
  color: #ffffff;
}

.qcc-pillars__grid .qcc-pillars__item strong {
  display: block;
  position: relative;
  z-index: 1;
  font-weight: var(--fw-semibold);
  line-height: 1.25;
  color: #ffffff;
  cursor: default;
  outline: none;
}

.qcc-pillars__grid .qcc-pillars__item .qcc-pillars__detail {
  position: absolute;
  display: block;
  font-weight: var(--fw-regular);
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: break-word;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.qcc-pillars__grid .qcc-pillars__item .qcc-pillars__detail--before {
  bottom: 100%;
}

.qcc-pillars__grid .qcc-pillars__item .qcc-pillars__detail--after {
  top: 100%;
}

.qcc-pillars__grid > :nth-child(odd) .qcc-pillars__detail {
  right: var(--space-4);
  left: 0;
  text-align: right;
}

.qcc-pillars__grid > :nth-child(even) .qcc-pillars__detail {
  left: var(--space-4);
  right: 0;
  text-align: left;
}

.qcc-pillars__grid .qcc-pillars__item:has(strong:hover) .qcc-pillars__detail,
.qcc-pillars__grid .qcc-pillars__item:has(strong:focus) .qcc-pillars__detail,
.qcc-pillars__grid .qcc-pillars__item.is-qcc-pillars-revealed .qcc-pillars__detail {
  opacity: 1;
}

.qcc-pillars__grid .qcc-pillars__item strong:focus-visible {
  outline: 2px solid var(--qcc-rust-light);
  outline-offset: 4px;
}

/* Editor — keep full copy visible while editing */
.editor-styles-wrapper .qcc-pillars__grid .qcc-pillars__item .qcc-pillars__detail {
  position: static;
  opacity: 1;
  pointer-events: auto;
  white-space: normal;
}

@media (prefers-reduced-motion: reduce) {
  .qcc-pillars__grid .qcc-pillars__item .qcc-pillars__detail {
    position: static;
    opacity: 1;
    pointer-events: auto;
    white-space: normal;
    transition: none;
  }
}

/* Row-major template: 1=TL, 2=TR, 3=BL, 4=BR */
.qcc-pillars__grid > :nth-child(1) { grid-column: 1; grid-row: 1; }
.qcc-pillars__grid > :nth-child(2) { grid-column: 3; grid-row: 1; align-self: start; }
.qcc-pillars__grid > :nth-child(3) { grid-column: 1; grid-row: 2; align-self: end; }
.qcc-pillars__grid > :nth-child(4) { grid-column: 3; grid-row: 2; }

/* Left column — right-aligned, accent line on the inner (right) edge */
.qcc-pillars__grid > :nth-child(odd) {
  justify-self: stretch;
  text-align: right;
  padding-right: var(--space-4);
}
.qcc-pillars__grid > :nth-child(odd)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 62px;
  background: var(--qcc-rust-light);
}

/* Right column — left-aligned, accent line on the inner (left) edge */
.qcc-pillars__grid > :nth-child(even) {
  justify-self: stretch;
  text-align: left;
  padding-left: var(--space-4);
}
.qcc-pillars__grid > :nth-child(even)::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 62px;
  background: var(--qcc-rust-light);
}

@media (max-width: 1024px) {
  .qcc-pillars__inner {
    padding-block: var(--space-10);
    column-gap: 40px;
    row-gap: 56px;
  }
  .qcc-pillars__center-wrap { width: 220px; }
  .qcc-pillars__center-text { font-size: 18px; }
}

@media (max-width: 767px) {
  /* Logo on top; pillars stack below with a staggered 2/3-width zigzag */
  .qcc-pillars__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: var(--space-7);
    padding-inline: 24px;
  }
  .qcc-pillars__center-wrap {
    width: 180px;
    flex-shrink: 0;
  }
  .qcc-pillars__pattern--tr { width: 360px; }
  .qcc-pillars__pattern--bl { width: 300px; }

  .qcc-pillars__grid {
    display: flex;
    flex-direction: column;
    row-gap: var(--space-7);
    width: 100%;
  }
  .qcc-pillars__grid > :nth-child(1),
  .qcc-pillars__grid > :nth-child(2),
  .qcc-pillars__grid > :nth-child(3),
  .qcc-pillars__grid > :nth-child(4) {
    grid-column: auto;
    grid-row: auto;
    box-sizing: border-box;
    width: 66.666%;
  }

  /* Odd — left 2/3, right-aligned into the accent */
  .qcc-pillars__grid > :nth-child(odd) {
    align-self: flex-start;
    justify-self: stretch;
    text-align: right;
    padding: 0 var(--space-4) 0 0;
  }

  /* Even — right 2/3, left-aligned into the accent */
  .qcc-pillars__grid > :nth-child(even) {
    align-self: flex-end;
    justify-self: stretch;
    text-align: left;
    padding: 0 0 0 var(--space-4);
  }

  /* Supporting copy in normal flow so stacked rows don't collide */
  .qcc-pillars__grid .qcc-pillars__item .qcc-pillars__detail {
    position: static;
    opacity: 1;
    pointer-events: auto;
  }
  .qcc-pillars__grid > :nth-child(odd) .qcc-pillars__detail,
  .qcc-pillars__grid > :nth-child(even) .qcc-pillars__detail {
    left: auto;
    right: auto;
    text-align: inherit;
  }
}
