/* ==========================================================================
   onepage.css (ONEPAGE LAYOUT – Astra-safe)
   Scope: body.template-onepage
   ========================================================================== */

:root{
  --hero-max: 1960px;
  --hero-gutter: 1.25rem;
  --hero-vpad: 2rem;

  /* Content width (IMPORTANT for centering) */
  --onepage-max: 1200px;
  --onepage-pad: 1.25rem;

  --header-align: 0px;
}

span.content-symbol{
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2rem auto;
}

/* Astra wrappers sometimes add padding that breaks full-bleed math */
.template-onepage #content.site-content{
  padding: 0;
}

/* Ensure the main area itself isn't restricting width unexpectedly */
.template-onepage .onepage-main{
  width: 100%;
  max-width: none;
}

/* =========================
   HERO (FULL BLEED)
   ========================= */

.template-onepage .onepage-hero{
  /* full-bleed (padding-proof) */
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  width: 100vw;
  padding: 0;

  /* stable left edge of the title container */
  --hero-left: max(
    var(--hero-gutter),
    calc((100vw - min(100vw, var(--hero-max))) / 2 + var(--hero-gutter))
  );
}

.template-onepage .onepage-hero__titlebar{
  border-bottom: 1px solid #1c1f2a;
  background: #fff;
}

.template-onepage .onepage-hero__titleinner{
  max-width: var(--hero-max);
  margin: 0 auto;
  padding: 2rem var(--hero-gutter);
}

.template-onepage .onepage-title{
  margin: 0;
  text-align: left;
}

/* GRID stays FULL WIDTH so image can expand */
.template-onepage .onepage-hero__grid{
  display: grid;
  grid-template-columns: clamp(520px, 50vw, 820px) 1fr;
  min-height: 68vh;
  align-items: stretch;
}

/* LEFT COLUMN aligned to the title's left edge */
.template-onepage .onepage-hero__content{
  padding-top: var(--header-align);
  padding-left: var(--hero-left);
  padding-right: var(--hero-gutter);
  padding-bottom: 3rem;
  background: #fff;
  border-right: 1px solid #1c1f2a;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.template-onepage .onepage-hero__middle{
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

.template-onepage .onepage-hero__bottom{
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: baseline;
}

/* RIGHT IMAGE */
.template-onepage .onepage-hero__media{
  position: relative;
  overflow: hidden;
  min-height: 0;
}

.template-onepage .onepage-hero__image{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* HERO MOBILE */
@media (max-width: 921px){
  :root{
    --hero-gutter: 1.5rem;
    --header-align: 0px;
  }

  .template-onepage .onepage-hero__grid{
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .template-onepage .onepage-hero__media{
    order: 1;
    height: 50vh;
  }

  .template-onepage .onepage-hero__content{
    order: 2;
    border-right: none;
    border-bottom: 1px solid #1c1f2a;
    padding: 2rem var(--hero-gutter);
  }
}

/* =========================
   CONTENT (CENTERED + ASTRA/GUTENBERG SAFE)
   ========================= */

.template-onepage .onepage-content{
  width: 100%;
}

/* IMPORTANT: mark as "entry-content" in your PHP too (recommended) */
.template-onepage .onepage-content__inner{
  max-width: var(--onepage-max, 1200px);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--onepage-pad, 1.25rem);
  padding-right: var(--onepage-pad, 1.25rem);
}

/* Astra sometimes applies default margins to entry-content children */
.template-onepage .onepage-content__inner > *{
  margin-left: auto;
  margin-right: auto;
}

/* Full-bleed blocks inside centered content */
.template-onepage .onepage-content__inner > .alignfull,
.template-onepage .onepage-content__inner > .full-bleed{
  width: 100vw;
  max-width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin-left: 0;
  margin-right: 0;
}

/* Make sure full-bleed media behaves */
.template-onepage .onepage-content__inner > .alignfull img,
.template-onepage .onepage-content__inner > .full-bleed img{
  display: block;
  width: 100%;
  height: auto;
}
