/* Layout polish for migrated WordPress / Spectra pages */

/* Prevent residual resets from affecting legacy markup */
#page,
#page * {
  box-sizing: border-box;
}

#page img,
#page video {
  max-width: 100%;
  height: auto;
}

/* Keep YouTube / embed iframes responsive */
.wp-block-embed.wp-has-aspect-ratio .wp-block-embed__wrapper {
  position: relative;
}

.wp-block-embed.wp-embed-aspect-16-9 .wp-block-embed__wrapper::before {
  content: "";
  display: block;
  padding-top: 56.25%;
}

.wp-embed-responsive .wp-has-aspect-ratio .wp-block-embed__wrapper iframe,
.wp-block-embed.wp-has-aspect-ratio .wp-block-embed__wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
}

/* Match Astra plain-container full-width behavior */
body.ast-plain-container.ast-no-sidebar #content.site-content > .ast-container {
  max-width: var(--ast-normal-container-width, 1200px);
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  display: block !important;
}

body.ast-plain-container.ast-no-sidebar .site-content > .ast-container {
  max-width: var(--ast-normal-container-width, 1200px);
  margin-left: auto;
  margin-right: auto;
}

body.ast-plain-container.ast-no-sidebar #content.site-content #primary,
body.ast-plain-container.ast-no-sidebar #content.site-content .entry-content {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
  flex: none !important;
}

body.ast-plain-container.ast-no-sidebar .entry-content > .alignfull,
body.ast-plain-container.ast-no-sidebar .entry-content > .wp-block-uagb-container.alignfull {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  max-width: 100vw;
  width: 100vw;
}

#page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: clip;
}

#content.site-content {
  flex: 1 0 auto;
  width: 100%;
}

/* Single posts use the same container structure */
body.ast-single-post.ast-no-sidebar #content.site-content > .ast-container,
body.ast-single-post.ast-no-sidebar #content.site-content #primary,
body.ast-single-post.ast-no-sidebar #content.site-content .entry-content {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  flex: none !important;
}

/* Spectra full-width root containers */
.wp-block-uagb-container.alignfull.uagb-is-root-container {
  width: 100%;
}

.wp-block-uagb-container.alignfull.uagb-is-root-container > .uagb-container-inner-blocks-wrap {
  width: 100%;
  max-width: var(--ast-normal-container-width, 1200px);
  margin-left: auto;
  margin-right: auto;
}

/* Gallery grid */
.wp-block-gallery.has-nested-images {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.wp-block-gallery.has-nested-images figure.wp-block-image {
  flex: 1 1 calc(25% - 1rem);
  min-width: 180px;
}

.wp-block-gallery.has-nested-images figure.wp-block-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Service / card grids */
.uagb-container-inner-blocks-wrap {
  align-items: stretch;
}

.wp-block-uagb-info-box .uagb-ifb-content {
  height: 100%;
}

/* Tally embed spacing */
iframe[data-tally-src] {
  display: block;
  width: 100%;
  min-height: 320px;
  border: 0;
}

/* Legacy Astra footer replaced by shadcn SiteFooter */
.site-footer,
#colophon.site-footer {
  display: none !important;
}

/* Unified full-width footer (matches Astra body background) */
footer[data-shadcn].site-footer-unified {
  width: 100%;
  max-width: none;
  margin: 0;
  background-color: #cceafd;
  border-top: 1px solid #d4e8f7;
}

/* Calendly inline embed */
.uagb-block-wywjrwuk,
.uagb-block-wywjrwuk .uagb-container-inner-blocks-wrap {
  overflow: visible !important;
}

.higeorge-calendly-heading {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.higeorge-calendly-embed,
.higeorge-calendly-embed .calendly-inline-widget,
.calendly-inline-widget {
  width: 100% !important;
  max-width: 920px;
  min-width: 320px;
  min-height: 700px;
  height: 700px;
  margin: 0 auto;
  overflow: visible !important;
}

.higeorge-calendly-embed iframe,
.calendly-inline-widget iframe {
  width: 100% !important;
  min-height: 700px !important;
  height: 100% !important;
}

@media (max-width: 921px) {
  .wp-block-gallery.has-nested-images figure.wp-block-image {
    flex: 1 1 calc(50% - 1rem);
  }
}

@media (max-width: 544px) {
  .wp-block-gallery.has-nested-images figure.wp-block-image {
    flex: 1 1 100%;
  }
}

/* ─── Homepage "Meet George" about + credentials section ─────────────────── */
.homepage-about {
  background-color: #ffffff;
  background-image: url(/wp-content/uploads/2024/01/dotted-canvas.svg);
  background-repeat: repeat;
  padding: 5.5rem 1.5rem 14rem;
  position: relative;
  z-index: 1;
  overflow: visible;
}

/* Full-bleed white band behind the contact section's rounded top-left corner only */
.homepage-about::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -4rem;
  width: 100vw;
  height: 8rem;
  background-color: #ffffff;
  background-image: url(/wp-content/uploads/2024/01/dotted-canvas.svg);
  background-repeat: repeat;
  pointer-events: none;
  z-index: 0;
}

.homepage-about__inner {
  max-width: var(--ast-normal-container-width, 1200px);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.homepage-about__intro {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 3.5rem;
}

.homepage-about__photo-wrap {
  position: relative;
}

.homepage-about__photo-wrap::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 30px;
  background: linear-gradient(135deg, #fff171 0%, #c4b5fd 100%);
  opacity: 0.45;
  transform: rotate(3deg);
}

.homepage-about__photo {
  display: block;
  width: 100%;
  border-radius: 24px;
  border: 5px solid #ffffff;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.12);
  position: relative;
}

.homepage-about__kicker {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #334155;
  margin: 0 0 0.75rem;
}

.homepage-about__title {
  margin: 0 0 1.5rem;
  color: #111111;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.2;
}

.homepage-about__title mark {
  background: rgba(170, 175, 255, 0.35) !important;
  color: #111111 !important;
  border-radius: 8px;
  padding: 0.1em 0.3em;
}

.homepage-about__bio p {
  color: #111111;
  line-height: 1.75;
  margin: 0 0 1rem;
  font-size: 1.0625rem;
}

.homepage-about__bio p:last-child {
  margin-bottom: 0;
}

.homepage-about__bio a {
  color: #046bd2;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}

.homepage-about__bio a:hover,
.homepage-about__bio a:focus {
  color: #045cb4;
}

/* ─── Credential cards ───────────────────────────────────────────────────── */
.homepage-credentials {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  position: relative;
  z-index: 2;
}

.homepage-credentials__item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: #ffffff;
  border: 2px solid #ffffff;
  border-radius: 18px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  margin: 0;
  transition: box-shadow 0.2s;
}

.homepage-credentials__item:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.homepage-credentials__emoji {
  flex: none;
  width: 46px;
  height: 46px;
  background: #fff171;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
}

.homepage-credentials__title {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  color: #111111;
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
}

.homepage-credentials__detail {
  margin: 0;
  color: #334155;
  font-size: 0.9rem;
}

/* Overlap only the empty white padding below credentials, not the cards */
#contact.wp-block-uagb-container.uagb-block-whjpyba3 {
  margin-top: -8rem !important;
  position: relative;
  z-index: 1;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 921px) {
  .homepage-about {
    padding-bottom: 10rem;
  }

  .homepage-about::after {
    bottom: -3rem;
    height: 6rem;
  }

  #contact.wp-block-uagb-container.uagb-block-whjpyba3 {
    margin-top: -5rem !important;
  }

  .homepage-about__intro {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
  }

  .homepage-about__photo-wrap {
    width: 240px;
    margin: 0 auto;
  }

  .homepage-credentials {
    grid-template-columns: 1fr;
  }
}
