/* Dark front theme */
:root { 
  --bs-primary: #6366f1;
  --bs-body-bg: #0f172a;
  --bs-body-color: #e2e8f0;
  --bs-link-color: #818cf8;
  --bs-link-hover-color: #a5b4fc;
  --bs-border-color: #334155;
}

body {
  background-color: #0f172a;
  color: #e2e8f0;
}

.navbar-brand { letter-spacing: -.02em; }
.text-primary { color: #818cf8 !important; }

.btn-primary {
  --bs-btn-bg: #4f46e5;
  --bs-btn-border-color: #4f46e5;
  --bs-btn-hover-bg: #4338ca;
  --bs-btn-hover-border-color: #4338ca;
}

a { 
  color: #6366f1; 
  text-decoration-color: #4f46e5;
}

a:hover { 
  color: #818cf8; 
}

main img { max-width: 100%; height: auto; }

/* Dark card backgrounds */
.card, .card-header {
  background-color: #1e293b;
  border-color: #334155;
}

/* Dark inputs */
.form-control, .form-select {
  background-color: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}


/* ------------------------------------------------------------------ *
 * Homepage hero (portal.hero-slider CMS block)
 *
 * The slide editor supplies a desktop and an optional mobile background
 * plus an overlay colour/opacity, all as custom properties set inline by
 * the template and updated by home-slider.js on slide change.
 * ------------------------------------------------------------------ */
.hero-compact {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  background: var(--hero-fallback, linear-gradient(130deg, #0b1f33, #123a5c 60%, #0f766e));
  padding: clamp(3rem, 7vw, 5.5rem) max(5vw, calc((100% - 1180px) / 2));
}
.hero-compact::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(90deg, rgba(11, 31, 51, .96), rgba(11, 31, 51, .78) 48%, rgba(11, 31, 51, .2));
  pointer-events: none;
}
/* An uploaded background brings its own overlay, so drop the default scrim. */
.hero-compact.has-background-image::after { background: none; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero-background {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--hero-desktop-image, none);
  background-position: center;
  background-size: cover;
  opacity: 0;
  transition: opacity .6s ease;
}
.hero-background.has-image { opacity: 1; }
.hero-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-overlay-color, #0b1f33);
  opacity: var(--hero-overlay-opacity, .72);
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
  justify-content: space-between;
}
.hero-inner > div:first-child { flex: 1 1 32rem; min-width: 0; }
.hero-compact .eyebrow {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .78rem;
  font-weight: 700;
  opacity: .82;
  margin: 0 0 .6rem;
}
.hero-compact h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.08; margin: 0 0 1rem; }
.hero-compact > .hero-inner p { max-width: 46rem; opacity: .9; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.hero-actions .btn-outline {
  border: 1px solid rgba(255, 255, 255, .6);
  color: #fff;
  padding: .5rem 1.1rem;
  border-radius: .5rem;
  text-decoration: none;
}
.stats-row { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 2.25rem; }
.stat-box strong { display: block; font-size: clamp(1.5rem, 3vw, 2.25rem); line-height: 1.1; }
.stat-box span { font-size: .82rem; opacity: .8; }
.hero-card { flex: 0 1 18rem; }
.slide-controls { display: flex; flex-direction: column; gap: .5rem; }
.slide-controls button {
  text-align: left;
  border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  border-radius: .5rem;
  padding: .55rem .85rem;
  font-size: .85rem;
  cursor: pointer;
}
.slide-controls button.active { background: rgba(255, 255, 255, .22); border-color: rgba(255, 255, 255, .55); }

@media (max-width: 760px) {
  .hero-background { background-image: var(--hero-mobile-image, var(--hero-desktop-image, none)); }
  .hero-inner { flex-direction: column; }
}
