/* ============================================================
   HTG HOMEPAGE, Deploy 2 (D2.1 refinements)
   Additive overrides, loaded AFTER htg-home.css and htg-core.css.
   Fixes from field report:
     - Slider content wrapping past its rounded corner on mobile
     - Scroll jank / stutter from too many perma-running animations
     - Ibadan, Oyo State green strip still visible at top of home
   ============================================================ */


/* ============================================================
   0. NUKE THE GREEN "IBADAN · OYO STATE · NIGERIA" TOP STRIP
   It lives in base.html above the nav. We target broad signatures.
   ============================================================ */
.htg-topbar, .htg-top-strip, .htg-top-bar, .htg-topstrip,
.top-contact-bar, .top-bar, .topbar, .site-topbar,
.location-strip, .location-bar,
.announcement-bar, .announcement-strip,
.contact-bar, .location-topbar,
#htg-topbar, #top-bar, #topbar, #locationBar,
[data-htg-topbar] {
  display: none !important;
}

/* Any element whose class contains "location" at body level,
   excluding nav drawers and the main nav itself */
body > div[class*="location"]:not(.nav__drawer):not(#mainNav),
body > div[class*="topbar"]:not(.nav__drawer):not(#mainNav),
body > div[class*="strip"]:not(.nav__drawer):not(#mainNav) {
  display: none !important;
}

/* Header-wrapped topbar sitting above nav */
body > header > div:first-child:not(#mainNav):not(nav):not(.nav__drawer) {
  display: none !important;
}


/* ============================================================
   1. HERO SLIDER WIDTH + WRAP FIX
   ============================================================ */
.hero-slider {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1rem, 4vw, 2.5rem);
  padding-right: clamp(1rem, 4vw, 2.5rem);
  margin-top: clamp(1rem, 3vw, 2rem);
  width: 100%;
  box-sizing: border-box;
}

.hero-slider__viewport {
  border-radius: clamp(14px, 3.2vw, 22px);
  overflow: hidden;
  position: relative;
  box-shadow:
    0 30px 70px -30px rgba(7, 17, 11, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  isolation: isolate;
  transform: translateZ(0);
}
:root[data-theme="light"] .hero-slider__viewport,
:root:not([data-theme]) .hero-slider__viewport {
  box-shadow:
    0 30px 70px -30px rgba(34, 85, 41, 0.25),
    inset 0 0 0 1px rgba(34, 85, 41, 0.12);
}
.hero-slider__controls { padding: 0 1.25rem 1rem; }


/* ============================================================
   2. SLIDER IMAGE SHARPNESS + GLASSY OVERLAY
   Fix: Ken Burns scale and parallax only on desktop hover devices.
   On mobile the image stays still so there's no cropping issue.
   ============================================================ */
.hero-slide__bg {
  image-rendering: high-quality;
  image-rendering: -webkit-optimize-contrast;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  transform: none;
  transition: none;
}

@media (min-width: 1024px) and (hover: hover) {
  .hero-slide__bg {
    transform: scale(1.02);
    transition: transform 12s ease-out;
    /* HTG_KILL: will-change removed */
  }
  .hero-slide.is-active .hero-slide__bg { transform: scale(1.06); }
}

.hero-slide__bg-overlay {
  background: linear-gradient(135deg,
    rgba(7, 17, 11, 0.42) 0%,
    rgba(34, 85, 41, 0.28) 55%,
    rgba(7, 17, 11, 0.48) 100%) !important;
}
:root[data-theme="light"] .hero-slide__bg-overlay {
  background: linear-gradient(135deg,
    rgba(242, 249, 240, 0.55) 0%,
    rgba(221, 240, 216, 0.4) 55%,
    rgba(242, 249, 240, 0.55) 100%) !important;
}

.hero-slide--has-bg::before {
  content: '';
  position: absolute; inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.14) 0%,
      rgba(255, 255, 255, 0.04) 30%,
      transparent 55%,
      transparent 100%);
  mix-blend-mode: screen;
}

.hero-slide--has-bg::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0; height: 35%;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to top,
    rgba(0, 0, 0, 0.30) 0%,
    rgba(0, 0, 0, 0.12) 35%,
    transparent 100%);
}
:root[data-theme="light"] .hero-slide--has-bg::after {
  background: linear-gradient(to top,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0.12) 35%,
    transparent 100%);
}

.hero-slide__grid,
.hero-slide__content,
.hero-slide__visual { z-index: 3 !important; }

.hero-slide--has-bg .hero-slide__atmosphere { opacity: 0.18 !important; }


/* ============================================================
   3. MOBILE DRAWER TRANSPARENT
   ============================================================ */
.nav__drawer {
  background: rgba(11, 28, 17, 0.08) !important;
  /* HTG_KILL: backdrop-filter removed */
  /* HTG_KILL: backdrop-filter removed */
  border-left: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: -24px 0 60px -20px rgba(0, 0, 0, 0.55) !important;
  color: #EDF7E8 !important;
}
:root[data-theme="light"] .nav__drawer {
  background: rgba(11, 28, 17, 0.08) !important;
  border-left: 1px solid rgba(34, 85, 41, 0.15) !important;
  box-shadow: -24px 0 60px -20px rgba(34, 85, 41, 0.3) !important;
  color: #0E2A14 !important;
}

.nav__drawer-overlay {
  background: rgba(7, 17, 11, 0.35) !important;
}

.nav__drawer-link,
.nav__drawer-link--parent,
.nav__drawer-sublink { color: inherit; }
.nav__drawer-contact-link { color: inherit !important; opacity: 0.9; }

.nav__drawer-panel {
  background: rgba(255, 255, 255, 0.05) !important;
  border-radius: 14px;
  margin-top: 0.35rem;
}
:root[data-theme="light"] .nav__drawer-panel {
  background: rgba(34, 85, 41, 0.06) !important;
}


/* ============================================================
   4. TRUST BAR, 3D CONTINUOUS MARQUEE, PERFORMANT
   - No perspective on whole track
   - Backdrop-filter only on desktop
   - Float only on desktop, 1 axis, cheap
   - Pause when offscreen (via JS + .is-paused class)
   ============================================================ */
.trust-bar {
  overflow: hidden;
  position: relative;
  padding: clamp(1.4rem, 3vw, 2rem) 0 !important;
  contain: layout paint;
}
.trust-bar::before,
.trust-bar::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.trust-bar::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-primary, #0B1C11), transparent);
}
.trust-bar::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-primary, #0B1C11), transparent);
}
:root[data-theme="light"] .trust-bar::before,
:root:not([data-theme]) .trust-bar::before {
  background: linear-gradient(to right, var(--bg-primary, #F4FBF6), transparent);
}
:root[data-theme="light"] .trust-bar::after,
:root:not([data-theme]) .trust-bar::after {
  background: linear-gradient(to left, var(--bg-primary, #F4FBF6), transparent);
}

.trust-bar > .container {
  max-width: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.trust-bar__grid {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  width: max-content;
  /* HTG_KILL: infinite animation removed */ animation: none;
  /* HTG_KILL: will-change removed */
}
.trust-bar.is-paused .trust-bar__grid,
.trust-bar:hover .trust-bar__grid { animation-play-state: paused; }

/* HTG_KILL: @keyframes trustMarquee removed */

.trust-item {
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  background: rgba(11, 28, 17, 0.08) !important;
}
:root[data-theme="light"] .trust-item,
:root:not([data-theme]) .trust-item {
  border-color: rgba(34, 85, 41, 0.18);
}

@media (hover: hover) and (min-width: 768px) {
  .trust-item {
    /* HTG_KILL: backdrop-filter removed */
    /* HTG_KILL: backdrop-filter removed */
    /* HTG_KILL: infinite animation removed */ animation: none;
  }
  .trust-item:nth-child(3n+2) { animation-delay: -2s; }
  .trust-item:nth-child(3n+3) { animation-delay: -4s; }
  /* HTG_KILL: @keyframes trustFloat removed */
}

.trust-item__stat {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.4rem, 3.2vw, 1.9rem);
  line-height: 1;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #FFD302 0%, #EF9623 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.trust-item__label {
  font-size: clamp(0.75rem, 1.5vw, 0.88rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary, #B6D5B2);
  white-space: nowrap;
}
:root[data-theme="light"] .trust-item__label,
:root:not([data-theme]) .trust-item__label {
  color: #3E5A44;
}

@media (prefers-reduced-motion: reduce) {
  .trust-bar__grid {
    animation: none;
    justify-content: center;
    flex-wrap: wrap;
  }
  .trust-item { animation: none; }
}

@media (max-width: 560px) {
  .trust-bar__grid { gap: 1.25rem; }
  .trust-item { padding: 0.45rem 0.85rem; gap: 0.55rem; }
}


/* ============================================================
   5. SCROLL PERFORMANCE, pause decorative animations while scrolling
   ============================================================ */
html[data-scrolling="1"] .trust-bar__grid,
html[data-scrolling="1"] .trust-item,
html[data-scrolling="1"] .hero-slide__mesh-1,
html[data-scrolling="1"] .hero-slide__mesh-2,
html[data-scrolling="1"] .hero-slide__mesh-3,
html[data-scrolling="1"] .htg-portals-orb,
html[data-scrolling="1"] .hero-slide__bg {
  animation-play-state: paused !important;
}

/* ============================================
   FIX: Remove padding/max-width from hero slider
   ============================================ */
.hero-slider {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-top: clamp(1rem, 3vw, 2rem) !important; /* keep top margin if desired */
  width: 100% !important;
}

/* Ensure the viewport has no extra spacing */
.hero-slider__viewport {
  border-radius: clamp(14px, 3.2vw, 22px); /* keep the rounded corners */
  overflow: hidden;
}

/* If the slider is inside a .container, make it break out fully */
.container .hero-slider {
  margin-left: calc(-1 * clamp(1rem, 4vw, 2.5rem)) !important;
  margin-right: calc(-1 * clamp(1rem, 4vw, 2.5rem)) !important;
  width: calc(100% + 2 * clamp(1rem, 4vw, 2.5rem)) !important;
}
