/* =========================================================
   Global Font Enforcement
   ========================================================= */

:root {
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont,
               'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

:root {
  --ahva-blue:  #60a5fa;
  --ahva-green: #34d399;
  --ahva-orange:#f59e0b;
}


html,
body {
  font-family: var(--font-sans) !important;
  font-weight: 500;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* =========================================
   Global fixed background (shell-owned)
========================================= */
html, body {
  height: auto;
  /* overflow-y: auto; */
  overflow-x: hidden;
}


#page-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--hero-image, url("/assets/img/hero/hero-members.jpg"));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  

  /* optional polish */
  transform: scale(1.05); /* hides blur edges */
}

#app-shell {
  position: relative;
  z-index: 1;
}

/* =========================================
   Strip backgrounds from injected partials
========================================= */

#page-content,
#page-content section,
#page-content .section,
#page-content [class*="container"],
#page-content [class*="panel"],


#page-content {
  backdrop-filter: blur(2px);
  /* border-radius: 32px; */
  /* border: 1px solid gainsboro,; */
}

#page-content .edu-card,
#page-content .insight-card {
        backdrop-filter: blur(8px) saturate(120%);
      -webkit-backdrop-filter: blur(8px) saturate(120%);
  border-radius: 10px;--section-gap: 20px;border: 1px solid rgba(255,255,255,0.18);
}

/* --- SCROLL + LAYOUT SAFETY --- */
html, body {
  height: auto !important;
  min-height: 100% !important;
  /* overflow-y: auto !important; */
}

body {
  position: relative!important;
}

/* Your fixed background layer should NOT wrap the whole app.
   It should be a sibling layer behind it. */
#page-bg {
  /* position: fixed !important; */
  inset: 0 !important;
  z-index: 0 !important;
  pointer-events: none !important;

  /* whatever bg styling you use */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* The actual site content must be in flow */
#app-shell {
  position: relative !important;
  z-index: 0 !important;
  min-height: 100vh !important;
  display: grid;
  flex-direction: column;
  justify-content: center;
}

/* Ensure main can expand the page */
#page-content {
  /* flex: 1 0 auto; */
}

/* ===============================
   HERO: HARD DISABLE MODE
   =============================== */

body[data-hero="none"] #hero-main {
  display: none !important;
}

body[data-hero="static"] #hero-main {
  display: block;
}

body[data-hero="animated"] #hero-main {
  display: block;
}

/* ===============================
   PARTIAL TOP RESET
   =============================== */

.login-shell {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.login-shell > *:first-child {
  margin-top: 0 !important;
}

/* ===============================
   HERO-OFF CONTENT POSITIONING
   =============================== */

body[data-hero="none"] #page-root {
  padding-top: 250px;
}

body[data-hero="static"] #page-root,
body[data-hero="animated"] #page-root {
  padding-top: 0;
}

/* ===============================
   HERO & LOADER: HARD KILL
   =============================== */

body[data-hero="none"] #hero-main,
body[data-hero="none"] .hero-main,
body[data-hero="none"] .hero-loader,
body[data-hero="none"] .hero-shell,
body[data-hero="none"] .hero-wrapper {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ===============================
   PAGE ROOT: ZERO OFFSET
   =============================== */

body[data-hero="none"] #page-content {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* ===============================
   PARTIAL TOP RESET (HARD)
   =============================== */

.login-shell,
.login-shell > * {
  margin-top: 0 !important;
}

.login-shell {
  padding-top: 0 !important;
  border-top: 1px solid transparent; /* kills margin collapse */
}

/* ===============================
   LOADER PAGE CLEANUP
   =============================== */

body[data-hero="none"] .page-loader,
body[data-hero="none"] .loading-shell,
body[data-hero="none"] .preload-stage {
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

body[data-hero="none"] #page-content {
  padding-top: 100px !important;
}

.custom-hero .hero-text {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
}

.custom-hero .hero-subtext {
  margin-top: 0.5rem;
  font-size: 1rem;
  opacity: 0.75;
}

/* =========================================================
   HERO TEXT: CENTER + WHITE DEFAULT
   ========================================================= */

#hero-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#hero-inner .hero-title,
#hero-inner .custom-hero {
  color: #ffffff;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* Title text */
#hero-inner .hero-text,
#hero-inner .ahva-hero,
#hero-inner .ahva-hero-rest {
  color: #ffffff;
}

/* Subtitle */
#hero-inner .hero-subtext {
  margin-top: 0.5rem;
  color: rgba(255, 255, 255, 0.85);
}

/* Divider (if present) */
#hero-inner .hero-divider {
  margin: 0.6rem auto;
}

#hero-inner .hero-title {
  text-shadow:
    0 2px 20px rgba(0, 0, 0, 0.55);
}

/* =========================================================
   HERO INNER: FULL WIDTH + TRUE CENTER
   ========================================================= */

#hero-main {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* hero-inner must span the full hero */
#hero-inner {
  position: absolute !important;
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: left !important;
  text-align: left !important;

  /* kill any legacy offsets */
  left: 0 !important;
  right: 0 !important;
  transform: none !important;
  padding-top: 150px;
}

/* center the text block itself */
#hero-inner .hero-title,
#hero-inner .custom-hero {
  margin: 0 auto !important;
  text-align: center !important;
  color: #ffffff;
}

.hero-inner{
  align-self: baseline;
  padding-top: 6rem;
}

/* =========================================================
   Disable legacy animated hero when using settings
   ========================================================= */

body.hero-static .hero-letter-wrap,
body.hero-static .ahva-hero-letter,
body.hero-static .hero-letters,
body.hero-static .hero-flyin,
body.hero-static [class*="hero-letter"] {
  display: none !important;
}

.hero-cycle {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;

  font-weight: 800;
  letter-spacing: -0.015em;
  color: #ffffff;
}

.hero-word {
  white-space: nowrap;
}

.hero-initial {
  font-weight: 900;
}

.hero-divider {
  margin: 0.75rem auto 0.6rem;
  width: 72px;
  height: 3px;
  border-radius: 2px;

  background: linear-gradient(
    90deg,
    transparent,
    var(--ahva-blue),
    transparent
  );
}

.hero-subtext {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.85);
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

#page-content {
  /* padding-top: 9rem; */
  padding-bottom: 0px;
  /* padding-top: 125px !important; */
}

.hero-main {
  position: relative;
  min-height: calc(100svh - var(--header-h, 72px));
  display: grid;
  place-items: center;
  padding-inline: clamp(20px, 5vw, 64px);

  /* background image hook */
  background:
    linear-gradient(rgba(0,0,0,.35), rgba(0,0,0,.55)),
    var(--hero-image) center / cover no-repeat;
}
