/* WordPress-specific fixes */

.site {
  min-height: 100svh;
  isolation: isolate;
}

/* Admin bar offset when logged in */
.admin-bar .nav-pill {
  top: calc(1rem + 32px);
}

@media (max-width: 782px) {
  .admin-bar .nav-pill {
    top: calc(0.75rem + 46px);
  }
}

/* Entry content resets — seeded HTML owns spacing */
.agis-editor-content.entry-content {
  max-width: none;
  padding: 0;
  margin: 0;
}

.agis-editor-content.entry-content > :where(section, article) {
  margin: 0;
}

.agis-editor-content.entry-content > :where(p, h1, h2, h3, h4) {
  margin: 0;
}

.agis-editor-content > :first-child {
  margin-top: 0;
}

.agis-editor-content > :last-child {
  margin-bottom: 0;
}

.page {
  padding: 0;
}

.page .agis-editor-content {
  padding: 0;
}

/* Images / embeds */
.agis-editor-content img,
.entry-content img {
  max-width: 100%;
  height: auto;
}

.agis-editor-content iframe,
.entry-content iframe {
  max-width: 100%;
}

/* Reduce WP core preset bleed into layout */
body .is-layout-flex,
body .is-layout-grid {
  display: revert;
}

.wp-block-button__link {
  all: unset;
}

[hidden],
[data-form-success][hidden],
.nav-drawer__backdrop[hidden] {
  display: none !important;
}

.contact-page__form {
  margin-top: var(--space-2xl);
  max-width: 36rem;
}

.google-map__frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Reveal: visible without JS; JS adds is-in / is-visible */
[data-reveal],
.reveal {
  opacity: 1;
  transform: none;
}

html.js [data-reveal]:not(.is-visible):not(.is-in),
html.js .reveal:not(.is-in):not(.is-visible) {
  opacity: 0;
  transform: translateY(0.75rem);
}

html.js [data-reveal].is-visible,
html.js [data-reveal].is-in,
html.js .reveal.is-in,
html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
  transition:
    opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
