/* =========================
   Books Page Styles
   ========================= */

/* Layout overrides for this page */
body.books #main{ max-width:none; margin:0; padding:0; }
.books-main{
  max-width:none;
  margin:0;
  padding-left:0;
  padding-right:0;
}

/* 1) Hero */
.books-hero{ 
  position:relative; 
  width:100vw; 
  left:50%; 
  margin-left:-50vw; 
  right:50%; 
  margin-right:-50vw; 
  min-height:85vh; 
  background:#000 center/cover no-repeat; 
  margin-bottom:0; 
  overflow:hidden;
}
/* REPLACE: hero background image URL */
.books-hero{ background-image:url('/public/images/books/hero.jpg'); }
.books-hero .hero-overlay{ 
  position:absolute; 
  inset:0; 
  background: linear-gradient(135deg, rgba(0,0,0,.4) 0%, rgba(0,0,0,.3) 50%, rgba(0,0,0,.5) 100%);
}
.books-hero .hero-inner{ 
  position:relative; 
  z-index:1; 
  max-width: var(--container-max, 1200px); 
  margin:0 auto; 
  padding:80px var(--container-pad,24px); 
  min-height:85vh; 
  display:flex; 
  align-items:center;
  justify-content:center;
}
.books-hero .hero-copy{ 
  max-width: 60ch; 
  color:#fff; 
  position:relative;
  text-align:center;
}
.books-hero h1{ 
  margin:0 0 20px; 
  font-size: clamp(32px, 5.5vw, 56px); 
  line-height:1.1; 
  font-weight:800;
  letter-spacing:-0.02em;
  background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 4px 20px rgba(0,0,0,.3);
}
.books-hero .lead{ 
  margin:24px 0 32px; 
  font-size: clamp(18px, 2.2vw, 22px); 
  line-height:1.5; 
  color:#f8f8f8; 
  font-weight:400;
  text-shadow: 0 2px 10px rgba(0,0,0,.2);
}
.books-hero .cta-row{
  display:flex;
  justify-content:center;
  gap:16px;
  flex-wrap:wrap;
}
.books-hero .btn-primary{ 
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:16px 32px; 
  border-radius:50px; 
  background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
  color:#fff; 
  text-decoration:none; 
  font-weight:600; 
  font-size:16px;
  transition:all .3s ease; 
  min-width:200px; 
  text-align:center;
  box-shadow: 0 8px 32px rgba(108,43,217,.3);
  border: 2px solid transparent;
  position:relative;
  overflow:hidden;
}
.books-hero .btn-primary::before{
  content:'';
  position:absolute;
  inset:0;
  background: linear-gradient(135deg, rgba(255,255,255,.2) 0%, rgba(255,255,255,0) 100%);
  opacity:0;
  transition:opacity .3s ease;
}
.books-hero .btn-primary:hover{ 
  transform:translateY(-2px); 
  box-shadow: 0 12px 40px rgba(108,43,217,.4);
}
.books-hero .btn-primary:hover::before{
  opacity:1;
}

/* 2) Video panel */
.books-video{ 
  padding:80px 0; 
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  position: relative;
  overflow: hidden;
}
.books-video::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(108,43,217,.08) 0%, transparent 70%);
  pointer-events: none;
}
.books-video .wrap{ 
  max-width: var(--container-max, 1200px); 
  margin:0 auto; 
  padding:0 var(--container-pad,24px);
  position: relative;
  z-index: 1;
}
.books-video h2{ 
  text-align:center; 
  margin:0 0 40px; 
  font-size: clamp(28px, 4vw, 40px); 
  font-weight: 700;
  background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.video-panel{ 
  position:relative; 
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.3);
  border-radius:24px; 
  padding:32px; 
  overflow:hidden; 
  display:grid; 
  place-items:center;
  box-shadow: 0 20px 40px rgba(0,0,0,.08);
  transition: transform .3s ease;
}
.video-panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(0,0,0,.12);
}
.panel-video{ 
  width:100%; 
  max-width:960px; 
  aspect-ratio:16/9; 
  background:#e5e5e5; 
  border-radius:16px; 
  display:block;
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
  transition: transform .3s ease;
}
.video-panel:hover .panel-video {
  transform: scale(1.02);
}
.play-placeholder{ 
  position:absolute; 
  width:120px; 
  height:120px; 
  border-radius:50%; 
  background:rgba(0,0,0,.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display:grid; 
  place-items:center;
  border: 2px solid rgba(255,255,255,.2);
  transition: all .3s ease;
  cursor: pointer;
}
.play-placeholder:hover {
  background: rgba(0,0,0,.8);
  transform: scale(1.1);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.play-placeholder .triangle{ 
  width:0; 
  height:0; 
  border-left:26px solid #fff; 
  border-top:16px solid transparent; 
  border-bottom:16px solid transparent; 
  margin-left:6px;
  transition: transform .3s ease;
}
.play-placeholder:hover .triangle {
  transform: scale(1.1);
}

/* 3) Book listings */
.book-list{ 
  padding:80px 0; 
  background: #fff;
  position: relative;
  overflow: hidden;
}
.book-list::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(108,43,217,.05) 0%, transparent 70%);
  pointer-events: none;
}
.book-list .wrap{ 
  max-width: var(--container-max, 1200px); 
  margin:0 auto; 
  padding:0 var(--container-pad,24px); 
  display:grid; 
  gap:64px;
  position: relative;
  z-index: 1;
}
.book-row{ 
  display:grid; 
  grid-template-columns:1fr 1.2fr; 
  gap:48px; 
  align-items:center;
  background: rgba(255,255,255,.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.3);
  border-radius:24px;
  padding:40px;
  box-shadow: 0 20px 40px rgba(0,0,0,.08);
  transition: all .3s ease;
  position: relative;
  overflow: hidden;
}
.book-row::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(108,43,217,.03) 0%, rgba(108,43,217,.01) 100%);
  opacity: 0;
  transition: opacity .3s ease;
  z-index: 1;
}
.book-row:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 48px rgba(0,0,0,.12);
}
.book-row:hover::before {
  opacity: 1;
}
.book-media{ 
  margin:0; 
  width:100%; 
  max-width: 360px; 
  border-radius:16px; 
  overflow:hidden;
  position: relative;
  z-index: 2;
  transition: transform .3s ease;
}
.book-row:hover .book-media {
  transform: scale(1.02);
}
.book-media img{ 
  width:100%; 
  height:auto; 
  display:block;
  transition: transform .3s ease;
}
.book-row:hover .book-media img {
  transform: scale(1.05);
}
.shadow{ 
  box-shadow:0 20px 40px rgba(0,0,0,.15);
}
.book-copy{ 
  position: relative;
  z-index: 2;
}
.book-copy h3{ 
  margin:0 0 20px; 
  font-size: clamp(24px, 3.2vw, 32px);
  font-weight: 700;
  background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.book-copy p{ 
  margin:0 0 28px; 
  color:var(--muted);
  font-size: clamp(16px, 2vw, 18px);
  line-height: 1.6;
}
.book-copy .btn-cta{ 
  margin-top:0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: all .3s ease;
  border: 2px solid var(--primary);
  background: transparent;
  color: var(--primary);
  min-width: 180px;
}
.btn-cta:hover{ 
  background: var(--primary); 
  color: #fff; 
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(108,43,217,.3);
}

/* Motion safety */
@media (prefers-reduced-motion: reduce) {
  .book-row:hover, .video-panel:hover, .book-media:hover, .play-placeholder:hover { transform: none; }
  .book-row:hover .book-media, .video-panel:hover .panel-video, .book-row:hover .book-media img { transform: none; }
}

/* ---------- Responsive Design ---------- */
@media (max-width: 980px){
  .books-hero { min-height: 80vh; }
  .books-hero .hero-inner { min-height: 80vh; padding: 60px var(--container-pad, 24px); }
  .books-video { padding: 60px 0; }
  .book-list { padding: 60px 0; }
}

@media (max-width: 900px){
  .book-row{ 
    grid-template-columns:1fr; 
    gap: 32px;
    padding: 32px;
  }
  .book-copy{ 
    grid-column:1; 
    grid-row:1; 
    text-align:center; 
  }
  .book-media{ 
    grid-column:1; 
    grid-row:2; 
    justify-self:center; 
  }
  .book-copy .btn-cta{ 
    margin-left:auto; 
    margin-right:auto; 
  }
  .books-hero, .books-hero .hero-inner{ 
    min-height:70vh; 
  }
  .books-hero .hero-copy {
    text-align: center;
    max-width: 100%;
  }
  .books-hero .cta-row {
    justify-content: center;
  }
}

@media (max-width: 760px) {
  .books-hero h1 {
    font-size: clamp(28px, 8vw, 48px);
  }
  .books-hero .lead {
    font-size: clamp(16px, 4vw, 20px);
  }
  .books-hero .cta-row {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }
  .books-hero .btn-primary {
    width: 100%;
    max-width: 280px;
  }
  .books-video h2 {
    font-size: clamp(24px, 6vw, 32px);
  }
  .book-copy h3 {
    font-size: clamp(20px, 5vw, 28px);
  }
  .book-copy p {
    font-size: clamp(15px, 4vw, 17px);
  }
}

@media (max-width: 600px){
  .play-placeholder{ 
    width:90px; 
    height:90px; 
  }
  .play-placeholder .triangle{ 
    border-left-width:22px; 
    border-top-width:14px; 
    border-bottom-width:14px; 
  }
  .book-row {
    padding: 24px;
    gap: 24px;
  }
  .book-list .wrap {
    gap: 48px;
  }
  .video-panel {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .books-hero .hero-inner {
    padding: 40px var(--container-pad, 16px);
  }
  .books-hero h1 {
    font-size: clamp(24px, 10vw, 36px);
  }
  .books-hero .lead {
    font-size: clamp(14px, 5vw, 16px);
  }
  .book-row {
    padding: 20px;
  }
  .book-copy .btn-cta {
    width: 100%;
    max-width: 240px;
  }
}

