/* Home page layout (MILMINUTE-31). Colors, fonts and buttons come from
   css/theme.css, which loads after this file. */
.home-section { padding: 80px 0; }
.home-section h2, .home-section h3 { color: var(--navy); }
.home-section .home-tile h3 { color: #fff; }
.home-paper { background: var(--paper); }
.home-center { text-align: center; }
.home-center .lead { max-width: 60ch; margin: 0 auto; }

/* Hero */
.home-hero {
  color: #fff;
  text-align: center;
  padding: 64px 0 96px;
  background: linear-gradient(rgba(11, 32, 39, .55), rgba(11, 32, 39, .82)), url("../../images/Tank.jpeg") center 40% / cover;
}
.home-hero-logo { width: min(360px, 80%); margin: 0 auto 28px; filter: invert(1) brightness(1.5); }
.home-hero h1 { color: #fff; font-size: clamp(2.4rem, 5.5vw, 4rem); max-width: 16ch; margin: 0 auto 14px; }
.home-hero p { font-size: 1.2rem; max-width: 52ch; margin: 0 auto 30px; color: #e8ecec; }
.home-hero .btn-row { justify-content: center; }

/* Episodes and Events tiles */
.home-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.home-tile {
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 260px; padding: 28px; border-radius: 6px; overflow: hidden;
  color: #fff; text-decoration: none; background-size: cover; background-position: center;
}
.home-tile h3 { color: #fff; font-size: 2.4rem; margin: 0 0 4px; text-align: left; padding: 0; }
.home-tile p { margin: 0; color: #e8ecec; }
.home-tile-more { margin-top: 14px; font-weight: 700; font-size: .95rem; }
.home-tile:hover .home-tile-more, .home-tile:focus-visible .home-tile-more { text-decoration: underline; }
.home-tile-episodes { background-image: linear-gradient(rgba(11, 32, 39, .15) 10%, rgba(11, 32, 39, .92)), url("../../images/Helmets.jpeg"); }
.home-tile-events { background-image: linear-gradient(rgba(11, 32, 39, .15) 10%, rgba(11, 32, 39, .92)), url("../../images/Planes.jpeg"); }

/* Upcoming events (filled by js/scripts.js) */
.home-events { margin-top: 56px; }
.home-events h2 { margin-bottom: 20px; }
.home-events .events-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; padding: 0; margin: 0; }
.home-events .event-card { width: auto; margin: 0; cursor: pointer; text-align: left; background: #fff; }
.home-events .event-card img { width: 100%; height: 170px; object-fit: cover; }
.home-events .event-content { padding: 16px 18px 20px; }

/* Preservation text beside a photo */
.home-split { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; align-items: center; }
.home-split .lead { margin: 0 0 24px; }
.home-split-image { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }

/* Donation band */
.home-band { background: var(--navy); color: #fff; padding: 64px 0; }
.home-band-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.home-band h2 { color: #fff; margin: 0 0 8px; }
.home-band p { color: #cfd6d8; margin: 0; max-width: 58ch; }
.home-band .btn { white-space: nowrap; }

/* Photo gallery: two even rows of five */
.home-gallery { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 32px; }
.home-gallery .galleryItem {
  position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 4px;
  margin: 0; padding: 0; max-width: none; max-height: none;
}
.home-gallery .galleryItem:hover { border: 0; }
.home-gallery .galleryItem img {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  object-fit: cover;
}

/* Newsletter: one row */
.home-newsletter { padding: 64px 0; }
.home-newsletter .lead { margin: 0 0 20px; }
.home-newsletter form {
  display: grid; grid-template-columns: 1fr 1fr 1.4fr auto; gap: 10px; align-items: stretch;
  max-width: none; padding: 0; margin: 0; background: none;
}
.home-newsletter input[type=text], .home-newsletter input[type=email] { margin: 0; width: 100%; }
.home-newsletter input[type=submit] { margin: 0; }

@media (max-width: 900px) {
  .home-section { padding: 56px 0; }
  .home-tiles, .home-split { grid-template-columns: 1fr; }
  .home-split { gap: 32px; }
  .home-band-inner { flex-direction: column; align-items: flex-start; }
  .home-gallery { grid-template-columns: repeat(2, 1fr); }
  .home-newsletter form { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .home-gallery { grid-template-columns: repeat(2, 1fr); }
  .home-tile { min-height: 200px; }
}
