/*
 * Base stylesheet for the Referral Ranger training site.
 *
 * This CSS defines a consistent colour palette, typography and layout
 * settings across all pages. It also introduces a handful of utility
 * classes to position and transform the Referral Ranger hero artwork
 * differently on each page. The goal is to keep the feel light and
 * playful while ensuring the content remains easy to read on both
 * desktop and mobile devices.
 */

/* Colour palette */
:root {
  --primary: #2E4A7D;     /* deep blue used for headings and accents */
  --secondary: #5078A6;   /* lighter blue used for gradients */
  --bg-light: #F7F9FC;    /* off‑white background */
  --text-dark: #233044;   /* dark slate for body text */
  --link: #0055A4;        /* bright blue for hyperlinks */
  --card-bg: #ffffff;     /* white backgrounds for content cards */
  --card-shadow: rgba(0,0,0,0.05); /* subtle shadow for cards */
}

/* Global settings */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.6;
}

a {
  color: var(--link);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Layout helpers */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1rem;
  position: relative;
}

.card {
  background-color: var(--card-bg);
  border-radius: 6px;
  box-shadow: 0 2px 5px var(--card-shadow);
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
}

h1, h2, h3 {
  color: var(--primary);
  margin-top: 0;
}

/* Navigation bar */
nav {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  color: #fff;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
nav .site-title {
  font-size: 1.4rem;
  font-weight: bold;
}
nav ul {
  list-style: none;
  display: flex;
  padding: 0;
  margin: 0;
}
nav li {
  margin-left: 1.2rem;
}
nav a {
  color: #fff;
  font-weight: 500;
}
nav a:hover {
  text-decoration: underline;
}

/*
 * Banner
 *
 * Each page gets its own wide banner image (Referral Ranger in a different “job”).
 * Keep banners text-free so headings remain editable in HTML.
 */
.banner {
  position: relative;
  /*
   * Banners are 1920x600 (3.2:1). If the container is much wider than that
   * ratio (common on desktop), background-size: cover will crop top/bottom.
   * Use a ratio-based height and `contain` so the full banner stays visible.
   */
  height: min(31.25vw, 420px);
  min-height: 180px;
  background-color: #071a2f;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(5, 12, 24, 0.82) 0%,
    rgba(5, 12, 24, 0.38) 55%,
    rgba(5, 12, 24, 0.10) 100%
  );
}

.banner-inner {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  padding: clamp(1.6rem, 4vw, 3rem) 1rem;
  color: #fff;
}

.banner-inner h1 {
  color: #fff;
  font-size: 2.1rem;
  margin: 0 0 0.5rem 0;
  line-height: 1.15;
}

.banner-inner p {
  margin: 0;
  opacity: 0.95;
  max-width: 46rem;
}

.banner-home { background-image: url("banners/banner-home.png"); }
.banner-start { background-image: url("banners/banner-start.png"); }
.banner-ch1 { background-image: url("banners/banner-ch1-setup.png"); }
.banner-ch2 { background-image: url("banners/banner-ch2-models.png"); }
.banner-ch3 { background-image: url("banners/banner-ch3-context.png"); }
.banner-ch4 { background-image: url("banners/banner-ch4-outputs.png"); }
.banner-ch5 { background-image: url("banners/banner-ch5-missions.png"); }

/* Video embeds (responsive) */
.video {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  margin: 0.75rem 0 1.25rem 0;
}

.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-caption {
  margin-top: -0.6rem;
  margin-bottom: 1.2rem;
  font-size: 0.95rem;
  opacity: 0.9;
}

/* Hero positioning */
.hero {
  position: absolute;
  bottom: 0;
  right: 0;
  max-width: 40%;
  height: auto;
  z-index: 0;
  opacity: 0.95;
}

/* Variants to make the same image look different between pages */
.flip {
  transform: scaleX(-1);
}

.rotate {
  transform: rotate(-8deg);
}

.tilt {
  transform: rotate(8deg);
}

.scale-small {
  max-width: 30%;
}
.scale-large {
  max-width: 35%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .banner {
    height: min(45vw, 260px);
    min-height: 160px;
  }
  .banner-inner {
    padding: 1.6rem 1rem;
  }
  .banner-inner h1 {
    font-size: 1.6rem;
  }
  .hero {
    max-width: 60%;
    position: static;
    display: block;
    margin: 1rem auto 0 auto;
  }
  nav {
    flex-direction: column;
    align-items: flex-start;
  }
  nav ul {
    flex-wrap: wrap;
    margin-top: 0.5rem;
  }
  nav li {
    margin: 0.5rem 1rem 0 0;
  }
}