/* Adapt the original homepage design to the wrappers added by core blocks. */
.ez-gutenberg-home :is(
  .ez-hero, .ez-fornace, .ez-editorial-intro, .ez-cats-grid, .ez-cat-card,
  .ez-piece-inner, .ez-piece-copy, .ez-export-story-inner, .ez-export-story-brief,
  .ez-export-story-field, .ez-parallax, .ez-contact-section, .ez-contact-info
) > .wp-block-group__inner-container { display: contents; }

.ez-gutenberg-home .ez-hero-bg,
.ez-gutenberg-home .ez-parallax-media,
.ez-gutenberg-home .ez-cat-thumb,
.ez-gutenberg-home .ez-contact-row-text {
  margin: 0;
}

.ez-gutenberg-home .ez-hero::before,
.ez-gutenberg-home .ez-parallax::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
}
.ez-gutenberg-home .ez-hero::before { background: rgba(0, 0, 0, .45); }
.ez-gutenberg-home .ez-parallax::before { background: rgba(20, 12, 6, .5); }
.ez-gutenberg-home .ez-parallax-media img { display: block; width: 100%; height: 100%; object-fit: cover; }

.ez-gutenberg-home :is(.ez-scroll-hint, .ez-story-link, .ez-parallax-link, .ez-cat-overlay) .wp-block-button__link {
  background: transparent;
  border-radius: 0;
  color: inherit;
  font: inherit;
  padding: 0;
}
.ez-gutenberg-home .ez-scroll-hint .wp-block-button__link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  min-height: 44px;
  color: #fff;
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.ez-gutenberg-home .ez-scroll-hint .wp-block-button__link::after { content: "↓" / ""; font-size: 14px; }
.ez-gutenberg-home .ez-story-link .wp-block-button__link { text-decoration: underline; text-underline-offset: 6px; }
.ez-gutenberg-home .ez-story-link .wp-block-button__link::after { content: "→" / ""; margin-left: 16px; }

.ez-gutenberg-home .ez-divider { border: 0; width: auto; }
.ez-gutenberg-home .ez-cat-thumb img { display: block; }
.ez-gutenberg-home .ez-cat-overlay { position: static; padding: 0; }
.ez-gutenberg-home .ez-cat-overlay .wp-block-button { width: 100%; }
.ez-gutenberg-home .ez-cat-overlay .wp-block-button__link {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 16px 18px;
  color: var(--color-text-primary);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .03em;
  text-align: left;
}
.ez-gutenberg-home .ez-cat-card.has-img .wp-block-button__link {
  color: #fff;
  background: linear-gradient(to top, rgba(26, 16, 8, .95), rgba(26, 16, 8, .52));
}
.ez-gutenberg-home .ez-cat-overlay .wp-block-button__link::before { content: ""; position: absolute; inset: 0; }
.ez-gutenberg-home .ez-cat-overlay .wp-block-button__link::after { content: "→" / ""; }
.ez-gutenberg-home .ez-cat-card:focus-within { outline: 2px solid var(--color-accent); outline-offset: 3px; }

.ez-gutenberg-home .ez-export-story-field {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 20px;
  padding: 16px 0;
  border-top: 1px solid var(--color-border-tertiary);
}
.ez-gutenberg-home .ez-export-story-term,
.ez-gutenberg-home .ez-export-story-description { font-size: 14px; line-height: 1.65; }
.ez-gutenberg-home .ez-export-story-term { font-weight: 600; color: var(--color-text-primary); }

.ez-gutenberg-home .ez-home-projects:has(.wp-block-query):not(:has(.wp-block-post)) { display: none; }
.ez-gutenberg-home .ez-proj-grid { list-style: none; padding: 0; }
.ez-gutenberg-home .ez-proj-grid > li { margin: 0; min-width: 0; }
.ez-gutenberg-home .ez-proj-name { margin: 14px 0 0; }
.ez-gutenberg-home .ez-proj-name a { color: inherit; text-decoration: none; }
.ez-gutenberg-home .ez-proj-thumb a { display: block; height: 100%; }
.ez-gutenberg-home .ez-proj-excerpt p { margin: 0; }

.ez-gutenberg-home .ez-contact-section .ez-section-sub { margin-bottom: 0; }
.ez-gutenberg-home .ez-contact-row-text { position: relative; padding-left: 28px; }
.ez-gutenberg-home .ez-contact-row-text::before {
  position: absolute;
  left: 0;
  top: 1px;
  color: var(--color-accent);
  font: 16px "tabler-icons";
}
.ez-gutenberg-home .ez-contact-address::before { content: "\eae8" / ""; }
.ez-gutenberg-home .ez-contact-phone::before { content: "\eb09" / ""; }
.ez-gutenberg-home .ez-contact-email::before { content: "\eae5" / ""; }

.ez-gutenberg-home .ez-video-toggle {
  position: absolute;
  z-index: 3;
  right: var(--layout-pad-x);
  top: 24px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #fff;
  border-radius: var(--border-radius-sm);
  background: rgba(26, 16, 8, .82);
  color: #fff;
  font: 12px var(--font-sans);
  cursor: pointer;
}

@media (max-width: 760px) {
  .ez-gutenberg-home .ez-export-story-field { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .ez-gutenberg-home .ez-piece-copy .ez-story-link { grid-row: 4; justify-self: start; margin: 0; }
  .ez-gutenberg-home .ez-export-story-term,
  .ez-gutenberg-home .ez-export-story-description { font-size: 16px; }
}
