/* layout-styles.css
   Cleaned version for global layout structure only
*/

/* Base Reset and Font */
* {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
  overflow-x: hidden;
  height: 100%;
}

body.flex-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.site-header {
  background-color: #f9c65e;
  /*padding: 20px 0; */
  padding: 0;
  width: 100%;
}
.header-content {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  gap: 1.5rem;
  min-height: 140px;
}
.logo {
  flex: 0 0 auto;
}
.logo img {
  max-width: 145px;
  height: auto;
}
.banner-block {
  flex: 1 1 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.banner-title {
  font-weight: bold;
  font-size: 1.25rem;
  margin-bottom: 10px;
}
.book-banner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.book-banner img {
  width: 60px;
  height: 85px;
  object-fit: cover;
  border-radius: 8px;
}
.main-nav {
  display: flex;
  gap: 20px;
  white-space: nowrap;
}
.main-nav a {
  text-decoration: none;
  color: #000;
  font-weight: bold;
  font-size: 1.1rem;
}
.main-nav a.active {
  color: #a84c0a;
  text-decoration: underline;
}

/* Footer */
.site-footer {
  background-color: #f9c65e;
  text-align: center;
  padding: 1rem 0;
  margin-top: 0rem;
  font-size: 0.95rem;
  font-weight: bold;
}
.site-footer a {
  color: #a84c0a;
  text-decoration: none;
}
.site-footer a:hover {
  text-decoration: underline;
}

/* Hero Banner */
.hero-banner {
  background-color: #C9EBD3;
  margin-top: 0;
  margin-bottom: 0;
  padding-bottom: 0.5rem;
}
.hero-banner.full-width {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
}
.hero-banner h2 {
  font-size: 2.2rem;
  color: #a84c0a;
  margin-bottom: 0.5rem;
}
.hero-banner h3 {
  font-size: 1.7rem;
  font-weight: bold;
  color: #000;
  margin: 0;
}
.hero-flex {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Existing image sizing */
.hero-flex img {
  border-radius: 12px;
  max-height: 220px;
  max-width: 100%;
  width: auto;
  height: auto;
}

/* Existing generic flex children */
.hero-flex > div {
  flex: 1 1 200px;
  text-align: center;
  max-width: 220px;
}

/* Text column */
.hero-text {
  flex: 2 1 300px;
  min-width: 240px;
  max-width: 360px;
  text-align: center;
}

/* Keep legacy video sizing consistent */
.hero-flex video {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 220px;
  border-radius: 12px;
}

/* Helpers so both the WEBM + cover image use identical sizing */
.hero-media {
  flex: 1 1 200px;
  text-align: center;
  max-width: 220px;
}
.hero-media-el {
  display: block;
  width: 100%;
  height: auto;
  max-height: 220px;
  border-radius: 12px;
  object-fit: contain;          /* ✅ keeps proportions on iOS */
}

/* Hide iOS/Safari controls if they try to appear */
.hero-media-el::-webkit-media-controls {
  display: none !important;
}

/* Centered Container */
.centered-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  padding: 0;
}

/* Responsive */
@media (max-width: 600px) {
  .header-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }

  .logo {
    margin-bottom: 0.5rem;
  }

  .banner-block {
    align-items: center;
    justify-content: center;
  }

  .banner-title {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
  }

  .book-banner {
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  .book-banner img {
    width: 50px;
    height: 70px;
  }

  .main-nav {
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 0.5rem;
    gap: 12px;
  }

  .main-nav a {
    font-size: 1rem;
  }

  /* ✅ keep hero media from overpowering the text on small screens */
  .hero-media {
    flex-basis: 160px;
    max-width: 180px;
  }
}