/* =============================================================
   Crete United — Custom Homepage Template (slug: new-homepage)

   Hero uses the original full-hero SVG (viewBox 2000 × 902.86) as
   the whole-hero asset on desktop, with content overlaid. On mobile
   (≤767px) it switches to a stacked layout because the 2.215:1
   aspect doesn't fit a portrait viewport.

   Designer rules (numbered 1–7):
   1. SVG aspect ratio NEVER changes; only dimensions scale
   2. Hero height = content (driven by SVG aspect on desktop)
   3. ≤767px → stacked
   4. 768–1440px → SVG fills hero, motif/cutout on right ~50%
   5. 768–1025px → text stays in left half (SVG enforces this)
   6. At 1440px → text left edge = 85px in CSS (= 4.25% of 2000-wide SVG)
   7. >1440px → max content 1440, red full-bleed on either side
   ============================================================= */

.cu-homepage {
  /* `overflow-x: hidden` would implicitly set overflow-y to auto,
     spawning a second vertical scrollbar on laptops. `clip` prevents
     horizontal overflow without establishing a scroll container. */
  overflow-x: clip;
}

/* ===== Hero wrapper (full-bleed red so >1440 viewports bleed) ===== */
.cu-hero {
  position: relative;
  width: 100%;
  background-color: #bf2c3e;
  overflow-x: clip;
  color: #ffffff;
}

/* ===== DESKTOP / TABLET LAYOUT (≥768px) ===== */

.cu-hero__desktop {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  overflow: hidden;
  /* Matches Figma's 1440 x 632 hero frame. With viewBox 2000 x 902.86
     at slice scale 0.72, the bottom ~25 viewBox units (~18px) crop —
     the c-curve doesn't close within view, exactly as designed. */
  aspect-ratio: 1440 / 632;
}

/* Video position matches Figma 132:1037 (Frame 62): x=750, width=690 in the
   1440 master = 52.08% / 47.92% of the hero. The SVG's evenodd fill carves
   out the c-opening; video sits behind the SVG and shows only through that
   opening. */
.cu-hero__desktop .cu-hero__video {
  position: absolute;
  left: 49%;
  right: auto;
  top: 0;
  bottom: 0;
  width: 51%;
  max-width: 735px;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  display: block;
}

/* SVG viewBox is 0 0 2400 902.86 (curve closes at vbu 2000; vbu 2000–2400 is
   solid red breathing room). Sizing the SVG at 120% of container width keeps
   scale at container_w / 2000, so vbu 2000 always lands at the container's
   right edge — the curve closes there at every viewport. The extra 400-vbu
   strip overflows 20% past container right and is clipped at ≤1440 by the
   container's overflow:hidden; at >1440 the strip reveals into the gutter
   along with the outline's top-right closure notch at vbu 2028. */
.cu-hero__bg {
  position: absolute;
  inset: auto;
  left: 0;
  top: 0;
  width: 120%;
  aspect-ratio: 2400 / 902.86;
  height: auto;
  z-index: 2;
  pointer-events: none;
  display: block;
  overflow: hidden;
}

/* Text overlay on the left red area. Matches Figma (node 132:1031):
   100px left padding at 1440 = 100/1440 = 6.94% of hero width.
   Text column width 627px at 1440 = 43.54% of hero width.
   50px gap between heading / body / CTA. Vertically centered. */
.cu-hero__desktop .cu-hero__text {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 6.94%;
  width: 43.54%;
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3.47vw, 50px);
  z-index: 3;
}

/* ===== >1440 viewports — strip reveals past container right ===== */

/* Container caps at 1440 centered (red bleed via .cu-hero handles outer area).
   At >1440 we allow the SVG's right-side red strip to extend past container
   right into the outer bleed — clip-path keeps vertical overflow clipped so
   the SVG's intentional 18px bottom crop doesn't bleed into the next section. */
@media (min-width: 1441px) {
  .cu-hero__desktop {
    overflow: visible;
    clip-path: inset(0 -100vw);
  }
}

/* Mobile-only block hidden by default */
.cu-hero__mobile {
  display: none;
}

/* ===== MOBILE LAYOUT (≤767px) ===== */

@media (max-width: 767px) {
  .cu-hero__desktop {
    display: none;
  }

  /* Mobile wrapper has NO horizontal padding — the media breaks out to
     the full viewport width per Figma. Padding is applied to the text
     block only. */
  .cu-hero__mobile {
    display: block;
    padding: 0;
  }

  .cu-hero__mobile .cu-hero__text {
    display: flex;
    flex-direction: column;
    gap: 35px;
    padding: 50px clamp(16px, 7vw, 32px) 0;
    margin-bottom: 35px;
  }

  .cu-hero__mobile .cu-hero__media {
    position: relative;
    width: 100%;
    aspect-ratio: 985.23 / 902.86;
    overflow: visible;
  }

  .cu-hero__mobile .cu-hero__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    display: block;
  }

  .cu-hero__mobile .cu-hero__motif {
    position: absolute;
    top: 0;
    left: 0;
    width: calc(100% * 1015.23 / 985.23);
    height: 100%;
    z-index: 2;
    pointer-events: none;
    overflow: visible;
  }
}

/* ===== Hero typography — three pinned breakpoints =====
   Mobile-first; sizes lock at each tier (no fluid scaling between):
     ≤767px      → Figma "New Mobile H2/Body": title 32 / body 14 / cta 14
     768–1349px  → Figma "New Web H2": title 48 / body 17 / cta 17
     ≥1350px     → Hero title node 132:1033: title 75/85 / body 17 / cta 17
============================================================ */

/* Base = mobile (≤767px) */
a.cu-hero__cta,
.cu-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  padding: 10px 25px;
  border: 2px solid #ffffff;
  border-radius: 5px;
  background: transparent;
  color: #ffffff;
  font-family: "Stratos", sans-serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 1; /* Figma CTA: 100% */
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  align-self: flex-start;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

h1.cu-hero__title,
.cu-hero__title {
  margin: 0;
  font-family: "Stratos", sans-serif;
  font-weight: 700;
  font-size: 32px;
  line-height: 1.2; /* Figma: Auto */
  letter-spacing: 0;
  text-transform: uppercase;
  color: #ffffff;
}

.cu-hero__copy {
  margin: 0;
  font-family: "Stratos", sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.2; /* Figma: Auto */
  letter-spacing: 0.05em;
  color: #ffffff;
}

.cu-hero__cta:hover,
.cu-hero__cta:focus-visible {
  background: #ffffff;
  color: #bf2c3e;
}

.cu-hero__cta-arrow {
  width: 23px;
  height: auto;
  flex: 0 0 23px;
  display: block;
}

/* Tablet (768–1349px) — Figma "New Web" sizes */
@media (min-width: 768px) and (max-width: 1349px) {
  h1.cu-hero__title,
  .cu-hero__title {
    font-size: 48px;
  }
  .cu-hero__copy {
    font-size: 17px;
  }
  a.cu-hero__cta,
  .cu-hero__cta {
    font-size: 17px;
    padding: 10px 50px;
  }
}

/* Desktop (≥1350px) — Figma hero node 132:1033 */
@media (min-width: 1350px) {
  h1.cu-hero__title,
  .cu-hero__title {
    font-size: 75px;
    line-height: 1.1333; /* Figma: 85px / 75px */
  }
  .cu-hero__copy {
    font-size: 17px;
  }
  a.cu-hero__cta,
  .cu-hero__cta {
    font-size: 17px;
    padding: 10px 50px;
  }
}

/* =============================================================
   ELEMENTOR HERO — Figma "Header block (c motif mask)" overrides
   -------------------------------------------------------------
   The live page renders via Elementor (page id 11321), not the
   PHP template above. These rules pin the rendered hero to the
   Figma node design: 1440-wide hero, 50/50 split, text left
   (85px/15px padding, 50px gap), media right with C-motif mask.
   ============================================================= */

/* Outer hero container — full-bleed red, content centered at 1440.
   Aspect-ratio lives on the INNER (1440-capped) container so the hero
   doesn't stretch taller than Figma intended on viewports >1440. The
   outer just provides the red full-bleed background. */
.page-id-11321 .elementor-element.elementor-element-e66af14 {
  position: relative !important;
  background-color: #bf2c3e !important;
  overflow: hidden !important;
  padding: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  width: 100% !important;
}

.page-id-11321 .elementor-element.elementor-element-e66af14 > .e-con-inner {
  position: relative;
  max-width: 1440px;
  width: 100%;
  /* Hero frame aspect locked to Figma (2030 × 902.86 ≈ 2.249:1).
     At 1440 wide → 640px tall; scales down with viewport below 1440. */
  aspect-ratio: 2030 / 902.86;
  height: auto;
  margin: 0 auto;
  padding: 0;
  display: block; /* children absolutely positioned on top */
}

/* ---- Text column (left half) ---- */
.page-id-11321 .elementor-element.elementor-element-215ad9f {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: auto !important;
  bottom: 0 !important;
  width: 50% !important;
  max-width: 720px !important;
  height: 100% !important;

  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: flex-start !important;
  /* Figma: 50px gap at 1440, scaling fluidly down */
  gap: clamp(20px, 3.47vw, 50px) !important;

  /* Figma: 85px left / 15px right at 1440 */
  padding-left: clamp(20px, 5.9vw, 85px) !important;
  padding-right: clamp(8px, 1.05vw, 15px) !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;

  z-index: 3;
}

/* Heading — Stratos Bold, 75px / 85px line-height, uppercase, white.
   Elementor's per-post stylesheet applies a `clamp(48px, 4vw, 75px) !important`
   to `.elementor-element-bf426f9 h2` which caps the fluid size too low
   below 1440 — we bump specificity (4 classes + tag) to override. */
.page-id-11321
  .elementor-element.elementor-element-bf426f9
  .elementor-widget-container,
.page-id-11321
  .elementor-element.elementor-element-bf426f9
  h2.elementor-heading-title {
  margin: 0 !important;
}
.page-id-11321
  .elementor-element.elementor-element-bf426f9
  h2.elementor-heading-title {
  font-family: "Stratos", sans-serif !important;
  font-weight: 700 !important;
  /* Below 1440, scale at 5vw so "NATIONAL NETWORK." never wraps within
     the 50%-column minus 85/15 padding. At >=1440 lock to Figma's 75px. */
  font-size: clamp(2.5rem, 5vw, 4.6875rem) !important;
  line-height: 1.1333 !important; /* 85/75 */
  letter-spacing: 0 !important;
  text-transform: uppercase !important;
  color: #ffffff !important;
  /* Prevent intra-phrase wrap; the literal <br> tags handle line breaks. */
  text-wrap: balance;
}
@media (min-width: 1440px) {
  .page-id-11321
    .elementor-element.elementor-element-bf426f9
    h2.elementor-heading-title {
    font-size: 75px !important;
    line-height: 85px !important;
  }
}

/* Body copy — Stratos Regular, 17px, letter-spacing 0.85px, white */
.page-id-11321 .elementor-element-de2f3c0 .elementor-widget-container {
  margin: 0 !important;
}
.page-id-11321 .elementor-element-de2f3c0 p {
  margin: 0 !important;
  font-family: "Stratos", sans-serif !important;
  font-weight: 400 !important;
  font-size: clamp(0.875rem, 1.18vw, 1.0625rem) !important; /* 14 → 17 */
  line-height: 1.5 !important;
  letter-spacing: 0.05em !important; /* 0.85/17 ≈ 0.05em */
  color: #ffffff !important;
}

/* CTA button — 2px white border, 5px radius, padding 10px 50px,
   Stratos SemiBold 17px, uppercase, 0.85px tracking, 13px gap to arrow */
.page-id-11321 .elementor-element-36283da .elementor-widget-container {
  margin: 0 !important;
}
.page-id-11321 .elementor-element-36283da .elementor-button-wrapper {
  display: inline-block;
}
.page-id-11321 .elementor-element-36283da .elementor-button {
  display: inline-flex !important;
  align-items: center !important;
  gap: 13px !important;
  padding: 10px clamp(25px, 3.47vw, 50px) !important;
  border: 2px solid #ffffff !important;
  border-radius: 5px !important;
  background: transparent !important;
  background-color: transparent !important;
  color: #ffffff !important;
  font-family: "Stratos", sans-serif !important;
  font-weight: 600 !important;
  font-size: clamp(0.875rem, 1.18vw, 1.0625rem) !important;
  line-height: 1 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  fill: #ffffff;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    fill 0.2s ease;
}
.page-id-11321 .elementor-element-36283da .elementor-button-content-wrapper {
  display: inline-flex !important;
  align-items: center !important;
  gap: 13px !important;
  /* Source markup has icon BEFORE label; Figma has label first then arrow */
  flex-direction: row-reverse !important;
}
.page-id-11321 .elementor-element-36283da .elementor-button-text {
  font: inherit !important;
  color: inherit !important;
  letter-spacing: inherit !important;
  text-transform: inherit !important;
}
.page-id-11321 .elementor-element-36283da .elementor-button-icon {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.page-id-11321 .elementor-element-36283da .elementor-button-icon svg {
  width: 23px !important;
  height: auto !important;
  display: block;
}
.page-id-11321 .elementor-element-36283da .elementor-button-icon svg path {
  fill: currentColor;
}
.page-id-11321 .elementor-element-36283da .elementor-button:hover,
.page-id-11321 .elementor-element-36283da .elementor-button:focus-visible {
  background-color: #ffffff !important;
  color: #bf2c3e !important;
}

/* ---- Media column (right half).
   Shifted left by 5% of hero to pull the C-motif closer to the text and
   reduce the visible red gap on the left side of the curve. The motif's
   right-edge bleed (3.05%) now ends ~1.5% before the inner's right edge,
   leaving a small red strip past the photo — acceptable trade for the
   tighter curve-to-text spacing. */
.page-id-11321 .elementor-element.elementor-element-ce5256a {
  position: absolute !important;
  top: 0 !important;
  right: 5% !important;
  left: auto !important;
  bottom: 0 !important;
  width: 50% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 2;
}
.page-id-11321
  .elementor-element.elementor-element-ce5256a
  > .elementor-widget-container {
  width: 100%;
  height: 100%;
  padding: 0;
}
.page-id-11321 .elementor-element.elementor-element-ce5256a .cu-hero-media {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: auto !important;
  overflow: visible !important;
}
.page-id-11321
  .elementor-element.elementor-element-ce5256a
  .cu-hero-media__video {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  z-index: 1 !important;
  display: block !important;
}
/* Motif overlay sized to the media box. The viewBox includes a 30-unit
   bleed strip on the right (985.23 main + 30 bleed = 1015.23 total).
   width: 103.05% extends the bleed past the right edge of the media. */
.page-id-11321
  .elementor-element.elementor-element-ce5256a
  .cu-hero-media__motif {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: calc(100% * 1015.23 / 985.23) !important;
  height: 100% !important;
  z-index: 2 !important;
  pointer-events: none !important;
  overflow: visible !important;
  display: block !important;
}
/* Force the motif red to match Figma's hex (#BF2C3E) so the curve
   seam stays invisible against the background. */
.page-id-11321 .cu-hero-media__motif .cu-cmotif-red {
  fill: #bf2c3e !important;
}

/* ---- Mobile (≤767px) — stacked layout ---- */
@media (max-width: 767px) {
  .page-id-11321 .elementor-element.elementor-element-e66af14 > .e-con-inner {
    aspect-ratio: auto;
    height: auto;
  }
  .page-id-11321 .elementor-element.elementor-element-215ad9f {
    position: relative !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    padding: 50px clamp(16px, 7vw, 32px) 0 !important;
    gap: 35px !important;
    inset: auto !important;
  }
  .page-id-11321 .elementor-element.elementor-element-ce5256a {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 985.23 / 902.86;
    margin-top: 35px !important;
    inset: auto !important;
  }
  .page-id-11321 .elementor-element-bf426f9 .elementor-heading-title {
    font-size: 40px !important;
    line-height: 1.06 !important;
  }
  .page-id-11321 .elementor-element-de2f3c0 p {
    font-size: 14px !important;
  }
  .page-id-11321 .elementor-element-36283da .elementor-button {
    font-size: 14px !important;
    padding: 10px 25px !important;
  }
}
