/* ============================
   LOGO ABOVE HEADLINE (floating)
============================ */
.logo-strip {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 8px auto 24px;
  /* tight to header, small gap before headline */
  padding: 0 16px;
}

.logo-strip .hero-logo {
  width: 440px;
  /* large desktop logo */
  max-width: 90vw;
  height: auto;
  display: block;
  image-rendering: -webkit-optimize-contrast;
}

/* ============================
   BIG HEADLINE (no animation)
============================ */
.headline {
  text-align: center;
  margin: 0 auto 48px;
  /* clear gap before slider */
  padding: 0 16px;
  max-width: 1100px;
  color: var(--dark-blue);
  font-weight: 800;
  line-height: 1.2;
  font-size: clamp(1.4rem, 2.5vw + 1rem, 2.4rem);
}

.headline .muted {
  font-weight: 600;
  color: var(--text-color, #4b5563);
  /* fallback if token not defined */
}

/* ============================
   FADE SLIDER SECTION (fixed)
============================ */
.slider {
  position: relative;
  overflow: hidden;
  max-width: 1000px;
  width: calc(100% - 24px);
  /* ~12px side gutters on mobile */
  margin: 50px auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  background: var(--white);
  min-height: 250px;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  /* KEY FIX: ensure padding is included in width so it doesn't overflow */
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  text-align: center;
  padding: clamp(40px, 8vw, 60px) clamp(14px, 5vw, 20px);
  color: #fff;
  border-radius: var(--radius);
}

.slide.active {
  opacity: 1;
  position: relative;
  z-index: 2;
}

.slide h2 {
  margin-bottom: 10px;
  font-size: 1.8rem;
}

.slide p {
  margin-bottom: 20px;
  font-size: 1.05rem;
  line-height: 1.6;
}

.slide .cta-button {
  padding: 10px 20px;
  background: #fff;
  color: #3A5170;
  border: none;
  font-weight: 600;
  border-radius: 6px;
}

.slide .cta-button:hover {
  opacity: 0.9;
}

/* Alternating background colours */
.slide:nth-child(1) {
  background-color: #3A5170;
}

.slide:nth-child(2) {
  background-color: #549CAE;
}

.slide:nth-child(3) {
  background-color: #3A5170;
}

.slide:nth-child(4) {
  background-color: #549CAE;
}

/* Dots Navigation */
.dots {
  text-align: center;
  margin-top: 15px;
}

.dot {
  height: 12px;
  width: 12px;
  margin: 0 5px;
  background-color: #ffffff55;
  border-radius: 50%;
  display: inline-block;
  cursor: pointer;
  transition: background-color 0.3s;
}

.dot.active {
  background-color: #fff;
}

/* Tiny screens: tighten padding a touch more */
@media (max-width: 480px) {
  .slide {
    padding: 36px 14px;
  }

  .slide h2 {
    font-size: 1.4rem;
  }
}

/* ============================
   FEATURES SECTION
   (let .page-wrapper control width)
============================ */
.features {
  margin: 60px auto;
  text-align: center;
}

.features h2 {
  color: var(--dark-blue);
  margin-bottom: 15px;
}

.features p.subtext {
  margin-bottom: 40px;
  color: var(--text-muted, #6b7280);
  font-size: 1rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 25px;
  text-align: center;
}

.feature-card h3 {
  color: var(--dark-blue);
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-color, #4b5563);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ============================
   BOOKS SECTION
   (let .page-wrapper control width)
============================ */
.books {
  margin: 60px auto 80px;
}

.books .section-head {
  text-align: center;
  margin-bottom: 24px;
}

.books .section-head h2 {
  color: var(--dark-blue);
  margin-bottom: 8px;
}

.books .section-head p {
  color: var(--text-muted, #6b7280);
  font-size: 1rem;
}

.book-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.book-card {
  display: block;
  width: 25%;
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.book-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.book-image {
  width: 100%;
  height: auto;
  display: block;
  background: #f6f7f8;
}

.book-body {
  padding: 10px 12px 12px;
}

.book-title {
  color: var(--dark-blue);
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.book-text {
  color: var(--text-color, #4b5563);
  line-height: 1.45;
  font-size: 0.85rem;
}

.book-meta {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--text-muted, #6b7280);
}

/* ============================
   RESPONSIVE TWEAKS
============================ */
@media (max-width: 1024px) {
  .logo-strip .hero-logo {
    width: 360px;
  }
}

@media (max-width: 600px) {

  /* keep readable on phones */
  .slide h2 {
    font-size: 1.4rem;
  }
}
