/* ================================
   GLOBAL & RESET
   ================================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%; /* 1rem = 16px */
  scroll-behavior: smooth;
}

body {
  font-family: 'Source Sans Pro', sans-serif;
  color: #333;
  line-height: 1.5;
  background-color: #fafafa;
}

/* Utility classes */
.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

/* ================================
   LOGO IMAGE
   ================================ */

.logo img {
  display: block;
  max-height: 60px;   /* cap the height so the logo won’t push navigation down */
  width: auto;        /* maintain aspect ratio */
}

/* If your header is flex-based, ensure the logo aligns vertically */
.header-inner {
  display: flex;
  align-items: center; /* vertically center logo and nav links */
  justify-content: space-between;
  padding: 0.5rem 0;    /* ~8px top/bottom padding for breathing room */
}

/* On smaller screens, shrink the logo further */
@media (max-width: 767px) {
  .logo img {
    max-height: 50px;
  }
}


/* ================================
   HEADER & NAV
   ================================ */
header {
  background: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.main-nav {
  display: flex;
  gap: 1.5rem;
}

.main-nav a {
  color: #333;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.main-nav a:hover {
  color: #0077cc;
}

/* Mobile nav toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hidden mobile nav */
.mobile-nav {
  display: none;
  background: #ffffff;
  border-bottom: 1px solid #e0e0e0;
}

.mobile-nav a {
  display: block;
  padding: 0.75rem 1rem;
  border-top: 1px solid #e0e0e0;
  text-decoration: none;
  color: #333;
  font-weight: 600;
}

.mobile-nav a:hover {
  background: #f5f5f5;
}

/* Show mobile-nav when class “visible” */
.mobile-nav.visible {
  display: block;
}


/* ================================
   HERO SECTION
   ================================ */
.hero {
  position: relative;
  height: 60vh;
  min-height: 350px;
  background: url('../images/hero-bg.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  color: #fff;
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 100%;
}

.hero h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 1.2rem;
}

.hero .btn {
  background-color: #0077cc;
  color: #fff;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  border-radius: 4px;
  text-decoration: none;
}

.hero .btn:hover {
  background-color: #005fa3;
}


/* ================================
   FEATURED BOOK
   ================================ */
.featured-book {
  margin: 4rem 0 6rem;
}

.featured-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
}

.featured-left,
.featured-right {
  flex: 1 1 300px;
}

.featured-cover {
  width: 100%;
  max-width: 350px;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.featured-right h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.featured-right p {
  font-size: 1rem;
  margin-bottom: 1.5rem;
}


/* ================================
   WHY THESE BOOKS?
   ================================ */
.why-books {
  margin-bottom: 6rem;
}

.why-books h2 {
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 2rem;
  margin-bottom: 2rem;
}

.why-grid {
  display: grid;
  gap: 2rem;
}

.why-card {
  background: #fff;
  border-radius: 6px;
  padding: 1.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.why-icon {
  width: 60px;
  margin-bottom: 1rem;
}

.why-card h4 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.why-card p {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.link-inline {
  color: #0077cc;
  text-decoration: none;
  font-weight: 600;
}

.link-inline:hover {
  text-decoration: underline;
}


/* ================================
   BOOKS GRID
   ================================ */
.books-section {
  margin: 4rem 0;
}

.books-section h2 {
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

/* Filter buttons */
.filter-wrap {
  text-align: center;
  margin-bottom: 1.5rem;
}

.filter-btn {
  background: #f0f0f0;
  border: none;
  padding: 0.5rem 1rem;
  margin: 0 0.3rem 0.3rem;
  font-size: 0.9rem;
  border-radius: 4px;
  cursor: pointer;
}

.filter-btn.active,
.filter-btn:hover {
  background: #0077cc;
  color: #fff;
}

.books-grid {
  display: grid;
  gap: 1.5rem;
}

/* Default: 1 column */
@media (max-width: 767px) {
  .books-grid {
    grid-template-columns: 1fr;
  }
}

/* Tablets: 2 columns */
@media (min-width: 768px) and (max-width: 1023px) {
  .books-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktops: 3 or 4 columns */
@media (min-width: 1024px) {
  .books-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.book-card {
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.book-card img {
  width: 100%;
  height: auto;
}

.book-card h3 {
  margin: 0.75rem 0 0.25rem;
  font-size: 1.1rem;
}

.book-card .tagline {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 0.5rem;
}

.book-card .badge {
  display: inline-block;
  background: #eee;
  color: #333;
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  margin-bottom: 0.5rem;
}

.book-card .btn {
  display: inline-block;
  background: #0077cc;
  color: #fff;
  text-decoration: none;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.book-card .btn:hover {
  background: #005fa3;
}



   




/* ================================
   CONTACT
   ================================ */
.contact-section {
  margin: 4rem 0;
}

.contact-section h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 2rem;
  margin-bottom: 1rem;
  text-align: center;
}

.contact-section p {
  text-align: center;
  margin-bottom: 2rem;
}

.contact-form {
  max-width: 500px;
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}

.contact-form label {
  font-weight: 600;
  font-size: 0.95rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}

.contact-form .btn {
  width: 100%;
  text-align: center;
  margin-top: 0.5rem;
}


/* ================================
   FOOTER
   ================================ */
footer {
  background: #f8f8f8;
  padding: 2rem 1rem;
  font-size: 0.9rem;
  color: #444;
}

.footer-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
}

.footer-col {
  flex: 1 1 200px;
}

.footer-col h4 {
  margin-bottom: 0.5rem;
  font-family: 'Montserrat', sans-serif;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.4rem;
}

.footer-links a {
  color: #0077cc;
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-links a:hover {
  text-decoration: underline;
}

footer .copyright {
  text-align: center;
  margin-top: 2rem;
  color: #888;
}


/* ================================
   RESPONSIVE ADJUSTMENTS
   ================================ */
/* Show mobile nav toggle on small screens */
@media (max-width: 767px) {
  .main-nav {
    display: none;
  }
  .mobile-nav-toggle {
    display: block;
  }
}

/* Adjust hero text size on tablet */
@media (min-width: 768px) and (max-width: 1023px) {
  .hero h2 {
    font-size: 2.2rem;
  }
}

/* Adjust “Why These Books?” grid columns */
@media (max-width: 767px) {
  .why-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .why-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ================================
   “Also by Bright Pages Media” Thumbnails
   ================================ */

.other-books {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem; /* space between items */
  justify-content: start;
}

.other-books a {
  text-align: center;
  flex: 0 0 auto;       /* don’t stretch */
  width: 150px;         /* fixed thumbnail container width */
}

.other-books img {
  display: block;
  max-width: 100%;      /* stay within the 150px container */
  height: auto;
  margin: 0 auto 0.5rem; /* center and add a bit of spacing below */
  border-radius: 4px;   /* optional: rounded corners */
  box-shadow: 0 2px 6px rgba(0,0,0,0.05); /* optional: subtle shadow */
}

.other-books p {
  font-size: 0.9rem;
  margin: 0;            /* remove default paragraph spacing */
  color: #333;
}

/* Bonus Resources Page */
.bonus-resources {
  padding: 4rem 0;
  line-height: 1.6;
}

.bonus-resources h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-align: center;
}

.bonus-resources p {
  max-width: 700px;
  margin: 0.5rem auto 2rem;
  text-align: center;
  color: #555;
}

.bonus-resources code {
  background: #f4f4f4;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
}

.bonus-list {
  list-style: none;
  max-width: 700px;
  margin: 0 auto 2rem;
  padding: 0;
}

.bonus-list li {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.bonus-list li a {
  font-weight: 600;
  color: #0077cc;
  text-decoration: none;
}

.bonus-list li a:hover {
  text-decoration: underline;
}

.bonus-list li p {
  margin: 0.5rem 0 0;
  color: #333;
}

.bonus-resources .note {
  text-align: center;
  color: #777;
  font-size: 0.9rem;
}

/* ===== Bundles Page ===== */
.bundle-list {
  display: grid;
  gap: 2rem;
  margin-bottom: 4rem;
}

.bundle-item {
  background: #fff;
  padding: 1.5rem 1.5rem 2rem;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.04);
  display: grid;
  gap: 1.25rem;
}

.bundle-item-head {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
}

.bundle-item h2 {
  font-size: 1.6rem;
  margin-bottom: 0.25rem;
  font-family: 'Montserrat', sans-serif;
}

.bundle-item .price {
  margin: 0.25rem 0 0.75rem;
  font-weight: 600;
}

.bundle-item .old-price {
  text-decoration: line-through;
  color: #888;
  margin-right: 0.35rem;
}

.bundle-item .bundle-covers {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.bundle-item .bundle-covers img {
  width: 95px;
  height: auto;
  border-radius: 4px;
}

#bundle-complete .bundle-covers img {
  width: 75px;
}

.bundle-item ul {
  list-style: disc;
  margin-left: 1.25rem;
  color: #333;
  font-size: 0.9rem;
}

.bundle-item p {
  margin: 0;
}

.bundle-item p:last-of-type {
  font-size: 0.75rem;
  color: #777;
}

/* Page intro */
.bundles-intro {
  margin: 3rem auto 1rem;
}
.bundles-intro h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}
.bundles-intro p {
  max-width: 680px;
  color: #555;
}



/* ——— Author / About Section Base Styles ——— */
.author-bio {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin: 4rem auto;
  max-width: 900px;
  padding: 2rem;
  background: #1a1a1a;      /* dark card */
  border-radius: 8px;
}

/* ——— Avatar ——— */
.bio-headshot {
  flex: 0 0 auto;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center,
      rgba(78,161,255,0.2) 0%,
      rgba(26,26,26,0.2) 100%
    ),
    repeating-linear-gradient(
      45deg,
      transparent, transparent 10px,
      rgba(78,161,255,0.1) 10px, rgba(78,161,255,0.1) 20px
    );
  box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
  margin-bottom: 0;
}

/* ——— Text Column ——— */
.bio-text {
  flex: 1 1 300px;
  max-width: 600px;
  text-align: left;
  color: #ddd;
  line-height: 1.6;
}

/* ——— Mobile Overrides ——— */
@media (max-width: 600px) {
  .author-bio {
    flex-direction: column;
    align-items: center;
  }
  .bio-headshot {
    margin-bottom: 1.5rem;
  }
  .bio-text {
    text-align: center;
  }
}

@media (max-width: 400px) {
  /* Target that last paragraph in .bio-text */
  .bio-text p:last-of-type {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;    /* space between each link */
    margin-top: 1rem;
  }

  /* Make each anchor a block for easier tapping */
  .bio-text p:last-of-type a {
    display: block;
    font-size: 1rem;  /* keep a readable size */
  }
}

/* ——— Desktop: add separators between links ——— */
.connect-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.connect-links a {
  position: relative;
  padding: 0 0.5rem;
}
.connect-links a:not(:last-child)::after {
  content: "|";
  position: absolute;
  right: 0;
  color: #555;
}

/* ——— Mobile (stack links, hide separators) ——— */
@media (max-width: 400px) {
  .connect-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
  }  .connect-links a { padding: 0; }  /* 👇 match the desktop selector so it actually overrides */
  .connect-links a:not(:last-child)::after { content: none; }
}




  
/* Final override for the Contact/About two-column wrapper */
@media (max-width: 768px) {
  .grid-2 {
    display: grid !important;               /* keep grid on mobile */
    grid-template-columns: 1fr !important;  /* collapse to one column */
    gap: 28px;                              /* keep spacing */
  }
  .grid-2 > * { max-width: 100% !important; }
}
