/*******************************
  SALT & SKY — HERO SYSTEM (FINAL)
  Replace contents of: wp-content/themes/salt-and-sky-child/css/pages.css
*******************************/

/* --- Base hero layout --- */
.hero {
  position: relative;
  width: 100%;
  height: 100svh; /* modern safe viewport height */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

/* --- Teal overlay for readability --- */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(12, 63, 66, 0.55);
  z-index: 1;
  pointer-events: none;
}

/* --- Tagline (shared) --- */
h1.tagline,
.elementor h1.tagline,
.elementor-editor-active h1.tagline,
.elementor-edit-area-active h1.tagline {
  margin: 0 auto;
  max-width: 22ch;
  line-height: 1.25;
  font-weight: 600;
  color: #ffffff;
  font-family: 'Poppins', sans-serif;
  text-align: center;
  text-shadow: 2px 3px 8px rgba(0,0,0,0.6);
  font-size: clamp(22px, 3.8vw, 40px) !important;
}
@media (max-width: 480px) {
  h1.tagline,
  .elementor h1.tagline,
  .elementor-editor-active h1.tagline,
  .elementor-edit-area-active h1.tagline {
    max-width: 20ch;
    font-size: clamp(20px, 5vw, 28px) !important;
  }
}

/* --- Z-index sanity --- */
.hero { z-index: 0; }
.hero .tagline { position: relative; z-index: 5; }
.hero::after { z-index: 1; }

/* ============================
   SAFETY RESETS (site-wide)
   ============================ */

/* Kill any global hero background images coming from other CSS */
.hero { background-image: none !important; }
body:not(.home) .hero { background-image: none !important; }

/* If Elementor set a background on the first section/container, remove it by default */
.elementor > .e-con.e-parent:first-of-type,
.elementor-section-wrap > section:first-of-type {
  background: none !important;
  background-image: none !important;
}
.elementor > .e-con.e-parent:first-of-type::before,
.elementor > .e-con.e-parent:first-of-type::after,
.elementor-section-wrap > section:first-of-type::before,
.elementor-section-wrap > section:first-of-type::after {
  content: none !important;
  background: none !important;
}

/* If a section has an inline background (Elementor), allow it to show */
.e-con[style*="background-image"],
.elementor-section[style*="background-image"] {
  background-image: revert !important;
}

/* =================================
   PAGE-SPECIFIC HERO BACKGROUNDS
   ================================= */

/* HOME (front page) */
.home .hero {
  background-image: url("https://saltandsky.org/wp-content/uploads/2025/11/hero.optimized.home_.jpg?v=20251108f") !important;
  background-position: center !important;
  background-size: cover !important;
}

/* ABOUT — page-id 1478 */
body.page-id-1478 .hero,
body.page-id-1478 .elementor > .e-con.e-parent:first-of-type,
body.page-id-1478 .elementor-section-wrap > section:first-of-type {
  background-image: url("https://saltandsky.org/wp-content/uploads/2025/11/hero.about_.optimized.jpg?v=20251108f") !important;
  background-position: center !important;
  background-size: cover !important;
}

/* GET INVOLVED — page-id 1483 */
body.page-id-1483 .hero,
body.page-id-1483 .elementor > .e-con.e-parent:first-of-type,
body.page-id-1483 .elementor-section-wrap > section:first-of-type {
  background-image: url("https://saltandsky.org/wp-content/uploads/2025/11/hero.get_.involved.optimized.jpg?v=20251108f") !important;
  background-position: center !important;
  background-size: cover !important;
}

/* CONTACT — page-id 1488 */
body.page-id-1488 .hero,
body.page-id-1488 .elementor > .e-con.e-parent:first-of-type,
body.page-id-1488 .elementor-section-wrap > section:first-of-type {
  background-image: url("https://saltandsky.org/wp-content/uploads/2025/11/hero.contact.optimized.jpg?v=20251108f") !important;
  background-position: center !important;
  background-size: cover !important;
}

/************ HOME HERO (only page 1470) ************/
body.page-id-1470 .hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 90vh;
  background: url("https://saltandsky.org/wp-content/uploads/2025/11/hero.optimized.home_.jpg?v=4")
             center/cover no-repeat;
  overflow: hidden;
}

/* soft teal veil for readability */
body.page-id-1470 .hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(12, 63, 66, 0.45);
  z-index: 1;
  pointer-events: none;
}

/* stack the text nicely */
body.page-id-1470 .hero .tagline,
body.page-id-1470 .hero .mission {
  position: relative;
  z-index: 2;            /* above the overlay */
  color: #fff;
  text-shadow: 2px 3px 8px rgba(0,0,0,.55);
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
}

/* tagline size (fixes “huge H1”) */
body.page-id-1470 .hero .tagline,
body.page-id-1470 h1.tagline {
  max-width: 22ch;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  font-size: clamp(24px, 3.8vw, 40px) !important;
  margin-bottom: .65rem;
}

/* mission paragraph under the tagline */
body.page-id-1470 .hero .mission {
  max-width: 65ch;
  font-size: clamp(15px, 1.7vw, 19px);
  line-height: 1.45;
  opacity: .95;
}

/* make sure Elementor’s legacy bg can’t sit on top */
body.page-id-1470 .elementor > .e-con.e-parent:first-of-type,
body.page-id-1470 .elementor-section-wrap > section:first-of-type {
  background: none !important;
  background-image: none !important;
}
body.page-id-1470 .elementor > .e-con.e-parent:first-of-type::before,
body.page-id-1470 .elementor > .e-con.e-parent:first-of-type::after,
body.page-id-1470 .elementor-section-wrap > section:first-of-type::before,
body.page-id-1470 .elementor-section-wrap > section:first-of-type::after {
  content: none !important;
  background: none !important;
}

/* mobile tightening */
@media (max-width: 480px) {
  body.page-id-1470 .hero .tagline {
    max-width: 20ch;
    font-size: clamp(20px, 5vw, 28px) !important;
  }
  body.page-id-1470 .hero .mission {
    font-size: clamp(14px, 4.2vw, 17px);
  }
}
