/*
 * Hero / child-header height fixes (Option 1).
 *
 * Problem: vendor plebians stylesheet forces .child-header to 70vh and
 * .hero to 100vh, plus 15vw padding and manual video#hero-video right
 * offsets. Headers grow with the viewport instead of a sensible banner.
 *
 * This file is enqueued after rebuild.css so it wins over the captured
 * vendor styles without editing the hashed vendor copies. Bump the
 * enqueue version in functions.php when deploying so caches refresh.
 */

/* -------------------------------------------------------------------------
 * Inner page headers (/about/, /management/, /properties/, etc.)
 * ------------------------------------------------------------------------- */
.child-header {
  position: relative; /* so .overlay height:100% tracks this band */
  /* Cap the banner so it never fills most of the screen. */
  height: clamp(240px, 35vh, 380px) !important;
  min-height: 0 !important;
  /* Clear the fixed site nav (~logo/menu) so the title isn't tucked under it,
     then keep the title centered in the remaining flex area. */
  padding: 5.5rem 5vw 1.75rem !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box;
}

.child-header .overlay {
  /* Overlay must track the header, not a hard-coded 70vh. */
  position: absolute;
  inset: 0;
  height: 100% !important;
  width: 100%;
}

/* Slightly smaller title on narrow viewports so it doesn't crowd the band. */
@media only screen and (max-width: 768px) {
  .child-header {
    padding: 4.25rem 5vw 1.25rem !important;
  }
  .child-header h1.title {
    font-size: clamp(1.75rem, 6vw, 3rem);
  }
}

/* -------------------------------------------------------------------------
 * Inner-page skyline header focal point
 *
 * About (page-id-5), Management (page-id-12), and Properties (page-id-8)
 * all use the same rebuild skyline JPG
 * (23ba8cbc86ce-34580190_m-e1605716646705.jpg). Defaults to 50% 20% from
 * plebians. Compared 0/10/25/30/35/40% (and earlier 50%): 50% showed mostly
 * river and clipped the tall towers; 35–40% bring in too much riverbank.
 * 30% shows the most building mass with full Batman/AT&T spires and little
 * water. The ~315px band cannot literally fit tip-to-street of the tallest
 * towers.
 * ------------------------------------------------------------------------- */
body.page-id-5 .child-header,
body.page-id-12 .child-header,
body.page-id-8 .child-header {
  background-position: 50% 30% !important;
}

/* -------------------------------------------------------------------------
 * Homepage video hero
 * ------------------------------------------------------------------------- */
.hero,
.page-template-front-page .hero {
  position: relative;
  height: clamp(420px, 70vh, 720px) !important;
  min-height: 0 !important;
  /* Drop the base styles.min 15vw vertical padding that inflated the
     section beyond the explicit height. */
  padding: 0 !important;
  box-sizing: border-box;
  overflow: hidden;
}

/* Ultra-wide screens previously dropped to 75vh; keep the same clamp. */
@media only screen and (min-width: 1550px) {
  .hero,
  .page-template-front-page .hero {
    height: clamp(420px, 70vh, 720px) !important;
  }
}

/* Homepage already zeros margin-top; keep front page pinned under the nav. */
.page-template-front-page .hero {
  margin-top: 0 !important;
}

/* Fill the hero frame properly instead of corner-pin + sideways offsets. */
video#hero-video {
  position: absolute !important;
  inset: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  object-fit: cover !important;
  object-position: center center !important;
}

/* Cancel every manual sideways offset from the plebians stylesheet. */
@media only screen and (max-width: 1440px) {
  video#hero-video { right: 0 !important; }
}
@media only screen and (max-width: 1024px) {
  video#hero-video { right: 0 !important; }
}
@media only screen and (max-width: 768px) {
  video#hero-video { right: 0 !important; }
}
@media only screen and (max-width: 425px) {
  video#hero-video { right: 0 !important; }
}

/* Hero overlay should cover the clamped hero, not a full viewport. */
.hero .overlay,
.page-template-front-page .hero .overlay {
  position: absolute;
  inset: 0;
  height: 100% !important;
  width: 100%;
}
