/* =========================
   Theme Variables
   ========================= */
:root {
  --bg-color: #fafafa;
  --text-color: #222;
  --accent-color: #2c3e50;
  --accent-hover: #357f89;
  --hero-bg: #f0f4f8;
  --divider-bg: #fafafa;
  --footer-bg: #2c3e50;
  --footer-text: #fff;
}

body.dark-mode {
  --bg-color: #1e1e1e;
  --text-color: #e0e0e0;
  --accent-color: #4ca1af;
  --accent-hover: #76c7c0;
  --hero-bg: #2a2a2a;
  --divider-bg: #1e1e1e;
  --footer-bg: #111;
  --footer-text: #ccc;
}

/* =========================
   Base Styling
   ========================= */
body {
  font-family: 'Merriweather', serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  font-size: clamp(1rem, 1.2vw, 1.25rem);
  line-height: 1.2;
  opacity: 0;
  transition: opacity 1.5s ease-in, background-color 0.5s, color 0.5s;
}
body.fade-in {
  opacity: 1;
}

/* Headings */
h1, h2, h3 { font-weight: 600; margin-top: 0; }
h1 { font-size: 2.5rem; margin-bottom: 0.5em; }
h2 { font-size: 1.8rem; margin: 2rem 0 1rem; }

/* =========================
   Header & Navigation
   ========================= */
.site-header {
  position: fixed;   /* keeps header at top */
  top: 100px;            /* adjust to banner height */
  left: 0;
  width: 100%;       /* full width */
  z-index: 2000;     /* ensures it stays above banners/content */
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--accent-color);
  padding: 1rem 2rem;
  box-sizing: border-box; /* include padding in width */
  overflow-x: hidden; 
}

/* Add spacing so content doesn’t hide behind fixed header */
main {
  padding-top: 10px; /* adjust based on header height + banner height */
}

.site-header a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 1rem; /* space between nav and toggle */
}
.site-nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}
.site-nav a.active {
  border-bottom: 2px solid var(--accent-hover);
}

/* Theme Toggle Button */
.theme-toggle {
  background: none;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  transition: background 0.3s;
}
.theme-toggle:hover {
  background: var(--accent-hover);
}

/* Hamburger button (hidden on desktop) */
.menu-toggle {
  display: none; /* hidden on desktop */
  font-size: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  margin-right: 1rem; /* space between toggle and logo */
}

/* Mobile styles */
@media (max-width: 768px) {
  .site-header {
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: block; /* show hamburger */
    order: 1;       /* ensure it stays left */
  }

  .logo {
    order: 2;       /* logo after hamburger */
    flex: 1;
    text-align: center;
  }
  
  .header-right {
    order: 3;
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    background: var(--accent-color);
    padding: 1rem;
    animation: slide-down 0.3s ease-out;
  }

  .header-right.active {
    display: flex;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }

  .theme-toggle {
    align-self: flex-end;
    margin-top: 1rem;
  }
}

/* Slide-down animation */
@keyframes slide-down {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================
   Hero Section
   ========================= */
.hero {
  margin-top: 150px; /* pushes hero down below banner+header */
  text-align: center;
  padding: 3rem 1rem;
  background: var(--hero-bg);
}
.hero .tagline {
  font-style: italic;
  color: #555;
}

/* =========================
   Content Blocks
   ========================= */
.content-block {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* =========================
   Buttons & Links
   ========================= */
.buy-button, .back-button, .download-link {
  display: inline-block;
  padding: 0.6rem 1rem;
  background: var(--accent-color);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s ease;
  margin-top: 1rem;
}
.buy-button:hover, .back-button:hover, .download-link:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.buy-button {
  display: inline-block;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  color: #fff;
}

.buy-button.email { background-color: #0072c6; }   /* Email blue */
.buy-button.contact { background-color: #4CAF50; } /* Contact green */
.buy-button.whatsapp { background-color: #25D366; } /* WhatsApp green */
.buy-button.payhip { background-color: #3197D6; } /* PayHip Curious Blue */
.buy-button.google { background-color: #EA4335; } /* Google Play Red */
.buy-button.amazon { background-color: #FF9900; } /* Amazon Orange  */

/* =========================
   Scroll Divider
   ========================= */
.scroll-divider {
  border: none;
  border-top: 1px solid #ccc;
  margin: 3rem auto;
  width: 60%;
  position: relative;
}

.scroll-divider::after {
  content: "✦"; /* You can swap this with attr(data-symbol) for dynamic symbols */
  position: absolute;
  top: -0.7rem; /* Slightly refined for vertical alignment */
  left: 50%;
  transform: translateX(-50%);
  background: var(--divider-bg);
  padding: 0 0.5rem;
  font-size: clamp(1rem, 1.2vw, 1.4rem); /* Responsive scaling */
  color: #666;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.15); /* Gentle glow */
  animation: slow-spin 20s linear infinite;
  transition: background 0.3s ease, color 0.3s ease;
}

@keyframes slow-spin {
  from { transform: translateX(-50%) rotate(0deg); }
  to { transform: translateX(-50%) rotate(360deg); }
}

/* =========================
   Footer
   ========================= */
.site-footer {
  text-align: center;
  padding: 0.5rem;
  background: var(--footer-bg);
  color: var(--footer-text);
  margin-top: 1.0rem;
  font-size: 0.9rem;   /* smaller text */
  line-height: 1.4;    /* tighter spacing */
}
.site-footer a {
  color: #ddd;
  margin: 0 0.3rem;
  text-decoration: none;
  font-size: inherit;   /* keeps same smaller size */
}

/* =========================
   Banner Styling (Unified)
   ========================= */

/* Banner container */
.site-banner {
  position: fixed;
  top: 0;
  left: 0; 
  width: 100%;
  z-index: 500; /* sits above content but below header if needed */ 
  text-align: center;
  margin: 0;
  overflow: visible;       /* never crop */
  margin-bottom: 2em;      /* space below banner so text doesn't overlap */
}

/* Banner image */
.site-banner img {
  width: 100%;         /* Ensure full width of container */
  height: auto;            /* keep proportions */
  object-fit: cover;     /* cover-stretches to fill container. contain-always show full image, no crop/zoom */
  display: block;
  margin: 0 auto;
  max-height: 150px; /* Optional: cap height for large screens */ 
}

/* Tablet adjustments */
@media (max-width: 1024px) {
  .site-banner {
    margin-bottom: 1.5em;  /* slightly less spacing */
  }
  .site-banner img {
    max-height: 150px;     /* optional: cap banner height */
  }
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .site-banner {
    margin-bottom: 1.5em;
  }
  .site-banner img {
    max-height: 150px;     /* keep banner slim on phones */
  }
}
.book-details p {
  line-height: 1.6;
}

/* 📚 Book Section */
.book-section {
  display: flex;
  justify-content: center;
  padding: 20px;
}

.book-card {
  display: flex;
  flex-direction: row;   /* row stack side by side. column-stack cover and details vertically */
  align-items: center;      /* center everything horizontally */
  gap: 2rem;
  max-width: 1000px;         /* keeps layout readable 600-1000 */
  margin: 0 auto;
}

/* Book cover images */
.book-cover img {
  width: 100%;              /* scales with container */
  height: auto;             /* keeps aspect ratio */
  max-width: 300px;         /* optional: limit max size */
  margin-bottom: 20px;      /* space below image */
  box-shadow: 0 2px 6px rgba(0,0,0,0.2); /* subtle shadow */
  border-radius: 4px;       /* soft corners */
}

/* Book details */
.book-details {
  text-align: center;       /* center text under image */
}

/* Book metadata with scroll-style divider */
.book-meta {
  margin: 20px 0;
  font-size: 0.95rem;
  line-height: 1.4;
  position: relative;
  padding-top: 1rem;
}

.book-meta::before {
  content: "✦";             /* scroll-style motif */
  display: block;
  text-align: center;
  margin-bottom: 0.5rem;
  color: #666;
  font-size: 1.2rem;
  animation: slow-spin 20s linear infinite; /* matches your divider spin */
}
/* Responsive layout for smaller screens */
@media (max-width: 768px) {
  .book-card {
    flex-direction: column;
    text-align: center;
  }

  .book-details {
    text-align: center;
  }
}
/* Fade-in effect */
body.fade-in {
  animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Menu transition */
#headerRight {
  transition: opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

#headerRight.active {
  opacity: 1;
  pointer-events: auto;
}

#headerRight.fade-out {
  opacity: 0;
  pointer-events: none;
}
/* Mobile: hide nav unless toggled */
#headerRight {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}


#headerRight.active {
  display: block;
}

@media (max-width: 768px) {
  #headerRight {
    display: none;
    opacity: 0;
    pointer-events: none;
  }

  #headerRight.active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
    flex-direction: column;
  }
}
@media (max-width: 768px) {
  #headerRight.fade-out {
    opacity: 0;
    pointer-events: none;
  }
}


