/* Preventing Bladder Infections - static rebuild */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: #fff;
  color: #747474;
  font-family: "Lato", Arial, sans-serif;
  font-size: 16px;
  line-height: 26px;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

.container {
  width: 100%;
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: #5d8db4 url("../images/hero-bg.webp") 50% 50% / cover no-repeat;
}

/* Blue tabletop strip along the bottom */
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: clamp(34px, 6.7vw, 70px);
  background: url("../images/hero-strip.webp") 0 0 / auto 100% repeat-x;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  max-width: 1170px;
  margin: 0 auto;
  padding: 30px 20px 0;
  text-align: center;
}

.hero-text { color: #fff; }

.hero h1,
.hero-line {
  margin: 0;
  font-family: "Montserrat", Arial, sans-serif;
  font-weight: 700;
  text-shadow: 2px 2px 0 #003344;
}

.hero h1 {
  font-size: clamp(24px, 3.5vw, 42px);
  line-height: 1.3;
}

.hero-line-1 {
  margin-top: 0.5em;
  font-size: clamp(20px, 3vw, 34px);
  line-height: 1.3;
}

.hero-line-2 {
  margin-top: 0.4em;
  font-size: clamp(16px, 2.35vw, 27px);
  line-height: 1.3;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  background: rgba(255, 163, 26, 0.75);
  color: #fff;
  font-family: "Roboto", Arial, sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 21px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s;
}
.btn:hover, .btn:focus { background: rgb(255, 163, 26); }

.hero-book {
  width: clamp(190px, 50vw, 260px);
  height: auto;
  margin-bottom: 10px;
}

/* ---------- About ---------- */
.about { padding: 50px 0 60px; }

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  align-items: start;
}

.about h2 {
  margin: 0;
  padding: 10px 0;
  color: #333;
  font-family: "Roboto", Arial, sans-serif;
  font-size: clamp(26px, 3.7vw, 30px);
  font-weight: 700;
  line-height: 40px;
}

.about p {
  margin: 0 0 20px;
  padding: 10px 0 0;
}
.about p:last-child { margin-bottom: 0; }

/* Three-image crossfade, 5 seconds per slide, no JavaScript */
.slideshow {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  margin-top: 15px;
}
.slideshow img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: slide-fade 15s infinite both;
}
.slideshow img:nth-child(1) { animation-delay: -1s; }
.slideshow img:nth-child(2) { animation-delay: 4s; }
.slideshow img:nth-child(3) { animation-delay: 9s; }

@keyframes slide-fade {
  0%      { opacity: 0; }
  6.67%   { opacity: 1; }
  33.33%  { opacity: 1; }
  40%     { opacity: 0; }
  100%    { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .slideshow img { animation: none; }
  .slideshow img:nth-child(1) { opacity: 1; }
}

/* ---------- What You Will Learn ---------- */
.learn {
  padding: 35px 0 55px;
  background: #9abdd9;
  color: #fff;
}

.learn h2 {
  margin: 0 0 15px;
  padding: 10px 0;
  font-family: "Roboto", Arial, sans-serif;
  font-size: clamp(26px, 3.7vw, 30px);
  font-weight: 700;
  line-height: 40px;
  text-align: center;
}

/* Flex so a short last row sits centered */
.topics {
  --cols: 2;
  --gap: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px var(--gap);
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: center;
}
.topics li {
  flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
  padding: 10px 0;
}

/* ---------- Call to action ---------- */
.cta {
  padding: clamp(50px, 9vw, 90px) 0 clamp(60px, 14vw, 180px);
  background: #3a3433 url("../images/cta-bg.webp") 50% 0 / cover no-repeat;
  color: #fff;
  text-align: center;
}

.cta h2 {
  margin: 0 0 35px;
  padding: 10px 0;
  font-family: "Roboto", Arial, sans-serif;
  font-size: clamp(24px, 3.7vw, 30px);
  font-weight: 700;
  line-height: 1.3;
}

.badges {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 35px;
}
.badges a { display: block; transition: transform .2s; }
.badges a:hover, .badges a:focus { transform: scale(1.03); }
.badges img { width: min(355px, 80vw); height: auto; }
.badges a + a img { width: min(343px, 77vw); }

/* ---------- Tablet ---------- */
@media (min-width: 700px) {
  .hero-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    min-height: clamp(386px, 48vw, 600px);
    padding: 20px 30px 0;
    text-align: left;
  }
  .hero-text { flex: 1 1 auto; padding-bottom: 6vw; }
  .hero-buttons { justify-content: flex-start; }
  .hero-book {
    flex: 0 0 auto;
    align-self: flex-end;
    width: clamp(250px, 35vw, 370px);
    margin-bottom: 1vw;
  }

  .topics { --cols: 3; }
}

/* ---------- Desktop ---------- */
@media (min-width: 768px) {
  .about-grid { grid-template-columns: 1fr 1fr; gap: 30px 60px; }
  .slideshow { margin-top: 15px; }
}

@media (min-width: 992px) {
  .topics { --cols: 6; --gap: 30px; row-gap: 30px; }
}

/* Lighter background file for smaller screens */
@media (max-width: 1280px) {
  .cta { background-image: url("../images/cta-bg-1280.webp"); }
}
