/* Avrem child theme: Astra header, optional menu treatments, and homepage hero. */
:root {
  --avrem-green: #5ddb5e;
  --avrem-green-bright: #7ce87d;
  --avrem-card: #2e3236;
  --avrem-header-top-h: 108px;
  --avrem-header-scrolled-h: 84px;
}

/* The canvas and stacking rules are intentionally presentation-only. Astra remains
   responsible for page backgrounds, typography, spacing, links, and controls. */
#avrem-starfield { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }
body.avrem-astra-child { overflow-x: hidden; }
/* Keep Astra's entire site—including native title regions that sit outside
   .site-content—in one layer above the decorative canvas. */
body.avrem-astra-child .site { position: relative; z-index: 1; }

/* Fixed liquid-glass header. Removing the header from normal document flow lets
   the first page block begin at the top of the viewport and paint behind it,
   including when Astra's optional page-title/banner area is disabled. Astra
   continues to own navigation layout and typography. */
body.avrem-astra-child .site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  background: transparent !important;
}
body.admin-bar.avrem-astra-child .site-header { top: 32px; }
body.avrem-astra-child .site-header .ast-main-header-wrap,
body.avrem-astra-child .site-header #ast-desktop-header,
body.avrem-astra-child .site-header .ast-mobile-header-wrap { background: transparent !important; }
body.avrem-astra-child .ast-primary-header-bar,
body.avrem-astra-child .main-header-bar {
  min-height: var(--avrem-header-top-h) !important;
  height: var(--avrem-header-top-h) !important;
  background: transparent !important;
  border-bottom: 1px solid transparent !important;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: height .35s cubic-bezier(.16,1,.3,1), min-height .35s cubic-bezier(.16,1,.3,1), background .35s ease, box-shadow .35s ease, border-color .35s ease;
}
body.avrem-astra-child.avrem-header-scrolled .ast-primary-header-bar,
body.avrem-astra-child.avrem-header-scrolled .main-header-bar {
  min-height: var(--avrem-header-scrolled-h) !important;
  height: var(--avrem-header-scrolled-h) !important;
  background: linear-gradient(180deg, rgba(42,46,50,.70), rgba(24,27,30,.58)) !important;
  border-bottom-color: rgba(93,219,94,.14) !important;
  box-shadow: 0 1px 42px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
}
body.avrem-astra-child .ast-above-header-bar,
body.avrem-astra-child .ast-below-header-bar {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
body.avrem-astra-child .site-header .ast-builder-grid-row,
body.avrem-astra-child .site-header .main-header-bar .ast-container { min-height: 100% !important; height: 100% !important; }
body.avrem-astra-child .site-header .custom-logo-link img,
body.avrem-astra-child .site-header .site-branding img,
body.avrem-astra-child .site-header img.custom-logo {
  width: auto !important;
  max-width: min(340px, 42vw) !important;
  max-height: 72px !important;
  object-fit: contain;
  transition: max-height .35s cubic-bezier(.16,1,.3,1);
}
body.avrem-astra-child.avrem-header-scrolled .site-header .custom-logo-link img,
body.avrem-astra-child.avrem-header-scrolled .site-header .site-branding img,
body.avrem-astra-child.avrem-header-scrolled .site-header img.custom-logo { max-height: 60px !important; }

/* Opt-in Spectra Info Box treatments used in Astra mega menus. They deliberately
   do not set spacing, allowing the editor and Customizer to remain authoritative. */
:is(.avrem-menu-info-box.uagb-infobox__content-wrap, .avrem-menu-info-box > .uagb-infobox__content-wrap),
:is(.avrem-menu-info-box-bordered.uagb-infobox__content-wrap, .avrem-menu-info-box-bordered > .uagb-infobox__content-wrap) {
  border-radius: 8px !important;
  transition: background-color .2s ease, border-color .2s ease !important;
}
.avrem-menu-info-box .uagb-ifb-desc,
.avrem-menu-info-box-bordered .uagb-ifb-desc { margin-bottom: 0 !important; }
:is(.avrem-menu-info-box.uagb-infobox__content-wrap, .avrem-menu-info-box > .uagb-infobox__content-wrap) {
  background: transparent !important;
  border: 0 !important;
}
:is(.avrem-menu-info-box.uagb-infobox__content-wrap, .avrem-menu-info-box > .uagb-infobox__content-wrap):is(:hover, :focus-within),
.avrem-menu-info-box:is(:hover, :focus-within) > .uagb-infobox__content-wrap { background: rgba(93,219,94,.06) !important; }
:is(.avrem-menu-info-box-bordered.uagb-infobox__content-wrap, .avrem-menu-info-box-bordered > .uagb-infobox__content-wrap) {
  background: rgba(255,255,255,.015) !important;
  border: 1px solid rgba(255,255,255,.04) !important;
}
:is(.avrem-menu-info-box-bordered.uagb-infobox__content-wrap, .avrem-menu-info-box-bordered > .uagb-infobox__content-wrap):is(:hover, :focus-within),
.avrem-menu-info-box-bordered:is(:hover, :focus-within) > .uagb-infobox__content-wrap {
  background: rgba(93,219,94,.06) !important;
  border-color: rgba(93,219,94,.12) !important;
}

/* Avrem Homepage Hero. Every rule is scoped to the pattern so ordinary Astra
   pages and blocks retain their configured styling. */
.avrem-wp-hero {
  min-height: calc(100vh - var(--avrem-header-top-h));
  display: flex;
  align-items: center;
  padding: clamp(80px, 10vh, 140px) clamp(24px, 5vw, 72px);
  background: transparent !important;
  color: #d0d0d0;
}
.avrem-wp-hero :is(h1, h2, h3, h4, h5, h6) { color: #f2f2f2; }
.avrem-wp-hero .avrem-hero-lead { color: rgba(232,232,232,.82); }
.avrem-wp-hero .avrem-hero-columns {
  display: grid !important;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr) !important;
  gap: clamp(44px, 5vw, 80px) !important;
  align-items: center !important;
  width: 100%;
}
.avrem-wp-hero .avrem-hero-columns > .wp-block-column { width: auto !important; flex-basis: auto !important; min-width: 0; }
.avrem-wp-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: auto;
  margin-bottom: 32px;
  padding: 8px 18px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(46,50,54,.92);
}
.avrem-wp-hero .eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--avrem-green);
  box-shadow: 0 0 10px var(--avrem-green);
  animation: avrem-blink 2s ease-in-out infinite;
}
.avrem-wp-hero .avrem-hero-title { max-width: 920px; text-wrap: balance; }
.avrem-wp-hero .avrem-hero-lead { max-width: 620px; }
.avrem-wp-hero .wp-block-button__link {
  box-shadow: 0 6px 30px rgba(93,219,94,.28);
  transition: transform .3s ease, box-shadow .3s ease;
}
.avrem-wp-hero .wp-block-button__link:hover,
.avrem-wp-hero .wp-block-button__link:focus-visible { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(93,219,94,.4); }
.avrem-hero-visual { position: relative; padding: 30px 10px; }
.avrem-status-card {
  position: relative;
  max-width: 520px;
  padding: clamp(28px, 4vw, 48px) !important;
  background: rgba(46,50,54,.94) !important;
  border: 1px solid rgba(93,219,94,.10) !important;
  border-radius: 24px !important;
  box-shadow: 0 40px 100px rgba(0,0,0,.25);
  overflow: hidden;
  color: #d0d0d0;
}
.avrem-status-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #3a7d44, var(--avrem-green-bright), var(--avrem-green), var(--avrem-green-bright), #3a7d44);
  background-size: 200% 100%;
  animation: avrem-shimmer 3s linear infinite;
}
.avrem-mini-stats { gap: 16px !important; margin-bottom: 28px !important; }
.avrem-mini-stats .wp-block-column { padding: 18px; background: rgba(255,255,255,.025); border: 1px solid rgba(255,255,255,.05); border-radius: 14px; }
.avrem-mini-stats h3,
.avrem-mini-stats p { margin: 0; }
.avrem-mini-stats h3 { color: #f2f2f2; }
.avrem-mini-stats p,
.avrem-check-list { color: rgba(232,232,232,.78); }
.avrem-mini-stats p { margin-top: 6px; }
.avrem-check-list { list-style: none; margin: 0; padding: 22px 0 0; border-top: 1px solid rgba(255,255,255,.06); }
.avrem-check-list li { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.avrem-check-list .check-mark,
.avrem-status-card .system-ok { color: var(--avrem-green-bright); }
.avrem-status-card .system-ok { display: flex; align-items: center; gap: 8px; margin: 18px 0 0; }
.system-ok-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--avrem-green-bright); box-shadow: 0 0 12px var(--avrem-green-bright); }
.avrem-wp-hero .floating-badge,
.avrem-wp-hero .floating-badge-2 {
  position: absolute;
  z-index: 3;
  background: var(--avrem-card);
  border: 1px solid rgba(93,219,94,.12);
  border-radius: 16px;
  padding: 14px 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,.3);
  color: #d0d0d0;
}
.avrem-wp-hero .floating-badge { top: 0; left: -12px; display: flex; align-items: center; gap: 12px; animation: avrem-float 4s ease-in-out infinite; }
.avrem-wp-hero .floating-badge-2 { right: 0; bottom: 4px; display: flex; align-items: center; gap: 10px; animation: avrem-float 5s ease-in-out infinite reverse; }
.avrem-wp-hero :is(.badge-icon, .badge-text, .badge-sub) { margin: 0; }
.avrem-wp-hero .badge-text { color: #f2f2f2; }
.avrem-wp-hero .badge-sub { color: rgba(232,232,232,.72); }
.avrem-wp-hero .badge-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, #c8a84e, #e8d48b); }
.avrem-wp-hero .mini-chart { display: flex; align-items: flex-end; gap: 3px; height: 30px; }
.avrem-wp-hero .mini-chart .bar { width: 6px; border-radius: 3px; background: var(--avrem-green); animation: avrem-bars 2s ease infinite; }
.avrem-wp-hero .mini-chart .bar:nth-child(1) { height: 40%; }
.avrem-wp-hero .mini-chart .bar:nth-child(2) { height: 65%; animation-delay: .15s; }
.avrem-wp-hero .mini-chart .bar:nth-child(3) { height: 45%; animation-delay: .3s; }
.avrem-wp-hero .mini-chart .bar:nth-child(4) { height: 80%; animation-delay: .45s; }
.avrem-wp-hero .mini-chart .bar:nth-child(5) { height: 100%; animation-delay: .6s; }

@keyframes avrem-blink { 50% { opacity: .3; } }
@keyframes avrem-shimmer { to { background-position: 200% 0; } }
@keyframes avrem-float { 50% { transform: translateY(-10px); } }
@keyframes avrem-bars { 50% { opacity: .45; } }

@media (max-width: 782px) {
  body.admin-bar.avrem-astra-child .site-header { top: 46px; }
}
@media (max-width: 600px) {
  body.admin-bar.avrem-astra-child.avrem-header-scrolled .site-header { top: 0; }
}
@media (max-width: 921px) {
  :root { --avrem-header-top-h: 82px; --avrem-header-scrolled-h: 72px; }
  body.avrem-astra-child .site-header .custom-logo-link img,
  body.avrem-astra-child .site-header .site-branding img,
  body.avrem-astra-child .site-header img.custom-logo { max-width: min(250px, 58vw) !important; max-height: 58px !important; }
  .avrem-wp-hero .avrem-hero-columns { grid-template-columns: 1fr !important; }
  .avrem-status-card { max-width: none; }
  .avrem-wp-hero .floating-badge,
  .avrem-wp-hero .floating-badge-2 { position: relative; inset: auto; margin-top: 16px; }
}
@media (max-width: 544px) {
  .avrem-wp-hero { padding-inline: 20px; }
  .avrem-mini-stats { display: grid !important; grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .avrem-wp-hero *,
  .avrem-wp-hero *::before,
  .avrem-wp-hero *::after { animation: none !important; transition-duration: .001ms !important; }
}
