/* ═══════════════════════════════════════
     Book, Media & Events — Page Styles
     ═══════════════════════════════════════ */

  /* ─── SECTION: THE BOOK ─── */
  .section-book {
    padding: clamp(4rem, 8vh, 6rem) 0;
    position: relative;
  }

  .section-book .section-overline { color: var(--amber); }
  .section-book .section-heading {
    color: var(--ink);
    max-width: 100%;
    text-align: center;
    margin: 0 auto 0.75rem;
    font-weight: 700;
  }

  .book-subtitle {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 1rem;
    color: var(--ink-light);
    text-align: center;
    margin-bottom: 2rem;
  }

  .book-retailers {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 4rem;
  }

  .retailer-logo {
    width: 20px;
    height: 20px;
    margin-right: 0.5rem;
    vertical-align: middle;
  }

  .retailer-pill {
    font-family: 'Barlow', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    padding: 0.6rem 1.5rem;
    border: 1px solid rgba(44,36,22,0.12);
    border-radius: var(--radius-sm);
    color: var(--ink-light);
    text-decoration: none;
    transition: all 0.3s var(--ease);
    display: inline-flex;
    align-items: center;
  }

  .retailer-pill:hover {
    border-color: var(--amber);
    background: rgba(196, 150, 26, 0.06);
    color: var(--ink);
    transform: scale(1.03);
  }

  .book-showcase {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    margin-bottom: 3rem;
  }

  .book-review { max-width: 240px; text-align: center; }

  .book-stars {
    color: var(--amber);
    font-size: 1.1rem;
    letter-spacing: 2px;
    margin-bottom: 0.75rem;
  }

  .book-quote {
    font-family: 'Lora', serif;
    font-size: 1rem;
    font-style: italic;
    color: var(--ink);
    line-height: 1.5;
    margin-bottom: 0.5rem;
  }

  .book-attribution {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    /* Use rgba color on the text only — parent opacity would also dim the
       avatar image, making Sanjay's face look ghosted. */
    color: rgba(90, 77, 58, 0.55);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
  }
  .book-attribution-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
  }

  .book-3d { perspective: 1500px; flex-shrink: 0; }

  .book-cover-real {
    width: 280px;
    height: auto;
    filter: drop-shadow(0 8px 24px rgba(44, 36, 22, 0.2));
  }

  .book-blurb {
    font-family: 'Lora', serif;
    font-size: 1rem;
    font-style: italic;
    color: var(--ink-light);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
  }

  /* ─── SECTION: MEDIA COVERAGE (teaser) ─── */
  .media-section {
    padding: clamp(4rem, 8vh, 6rem) 0;
  }

  .media-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 4rem;
    margin-bottom: 2rem;
  }

  /* Logo wall */
  .logo-wall {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1.75rem 2.5rem;
    padding: 2.5rem 2rem;
    max-width: 1200px;
    margin: 0 auto 2rem;
    border-top: none;
    border-bottom: none;
  }
  .logo-wall-item { transition: opacity 0.3s var(--ease); cursor: default; opacity: 0.85; }
  .logo-wall-item:hover { opacity: 1; }
  .logo-wall-item img { height: 18px; width: auto; display: block; object-fit: contain; }

  /* Carousel */
  .carousel-wrapper {
    position: relative;
    margin: 0 auto 2rem;
    max-width: 1200px;
    padding: 0 4rem;
  }
  .carousel-inner { overflow: hidden; }
  .carousel-wrapper::before,
  .carousel-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 2;
    pointer-events: none;
  }
  .carousel-wrapper::before { left: 4rem; background: linear-gradient(to right, var(--warm-white), rgba(253,251,246,0)); }
  .carousel-wrapper::after { right: 4rem; background: linear-gradient(to left, var(--warm-white), rgba(253,251,246,0)); }

  .carousel-btn-side {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(44,36,22,0.12);
    border-radius: 50%;
    background: white;
    color: var(--ink);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s var(--ease);
    box-shadow: 0 2px 8px rgba(44,36,22,0.1);
  }
  .carousel-btn-side:hover { border-color: var(--amber); box-shadow: 0 4px 12px rgba(44,36,22,0.15); }
  .carousel-btn-side.prev { left: 1rem; }
  .carousel-btn-side.next { right: 1rem; }

  .carousel-track-container { overflow: hidden; }
  .carousel-track { display: flex; gap: 1.5rem; padding: 0.5rem 0; }
  .carousel-card {
    flex-shrink: 0;
    width: 360px;
    background: white;
    border: 1px solid rgba(44,36,22,0.06);
    border-radius: var(--radius-md);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    transition: all 0.3s var(--ease);
  }
  .carousel-card { cursor: pointer; text-decoration: none; color: inherit; }
  .carousel-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }

  .carousel-outlet { margin-bottom: 1rem; height: 16px; }
  .carousel-outlet img { height: 14px; width: auto; object-fit: contain; display: block; }

  .carousel-title {
    font-family: 'Lora', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.35;
    margin-bottom: 0.75rem;
    flex: 1;
  }
  .carousel-title a { color: inherit; text-decoration: none; transition: color 0.3s; }
  .carousel-title a:hover { color: var(--sage); }

  .carousel-excerpt { font-size: 0.88rem; color: var(--ink-light); line-height: 1.6; margin-bottom: 1.25rem; }

  .carousel-footer { display: flex; justify-content: space-between; align-items: center; }
  .carousel-type {
    font-family: 'Barlow', sans-serif;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
  }
  .carousel-type[data-type="article"] { background: rgba(92,122,82,0.08); color: var(--sage); }
  .carousel-type[data-type="podcast"] { background: rgba(120,80,140,0.08); color: #78508C; }
  .carousel-type[data-type="video"] { background: rgba(181,100,80,0.08); color: #B56450; }

  .carousel-link {
    font-family: 'Barlow', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sage);
    text-decoration: none;
    transition: color 0.3s;
  }
  .carousel-link:hover { color: var(--ink); }

  /* View all CTA */
  .view-all-cta {
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 4rem 0;
  }
  .view-all-cta.left-aligned {
    text-align: left;
  }

  /* YouTube thumbnail in speaking section */
  .speaking-thumbnail {
    display: block;
    max-width: 600px;
    margin: 2rem auto 0;
  }
  .speaking-thumbnail img {
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: opacity 0.3s var(--ease);
  }
  .speaking-thumbnail:hover img {
    opacity: 0.85;
  }
  .view-all-link {
    font-family: 'Barlow', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink);
    text-decoration: none;
    background: white;
    border: 1px solid rgba(44,36,22,0.15);
    border-radius: var(--radius-sm);
    padding: 0.75rem 2rem;
    transition: all 0.3s var(--ease);
    display: inline-block;
  }
  .view-all-link:hover { background: var(--ink); color: var(--warm-white); border-color: var(--ink); }
  .view-all-count {
    font-family: 'Barlow', sans-serif;
    font-size: 0.75rem;
    color: var(--ink-light);
    opacity: 0.4;
    margin-top: 0.75rem;
    letter-spacing: 0.04em;
  }

  .media-count {
    font-family: 'Barlow', sans-serif;
    font-size: 0.75rem;
    color: var(--ink-light);
    opacity: 0.4;
    margin-top: 0.75rem;
    letter-spacing: 0.04em;
  }

  /* ─── SECTION: SPEAKING & EVENTS ─── */
  .speaking-section {
    padding: clamp(4rem, 8vh, 6rem) 0;
  }

  .speaking-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 4rem;
    margin-bottom: 3rem;
    text-align: center;
  }
  /* Center the heading block itself (it has a max-width) and the view-all CTA */
  .speaking-header .section-heading {
    margin-left: auto;
    margin-right: auto;
  }
  .speaking-section .view-all-cta.left-aligned {
    text-align: center;
  }

  /* Speaking experience pills */
  .experience-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    max-width: 1200px;
    margin: 0 auto 2rem;
    padding: 0 4rem;
  }

  .experience-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: white;
    border: 1px solid rgba(44,36,22,0.1);
    border-radius: var(--radius-sm);
    font-family: 'Barlow', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ink);
    transition: all 0.3s var(--ease);
  }

  .experience-pill:hover {
    border-color: var(--amber);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
  }

  .experience-logo {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: contain;
    flex-shrink: 0;
  }

  /* ─── SECTION: BOOK REVIEWS (auto-scroll marquee) ─── */
  .reviews-section {
    padding: clamp(3rem, 6vh, 5rem) 0;
    overflow: hidden;
  }

  .reviews-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 4rem;
    margin-bottom: 2rem;
  }

  .reviews-marquee {
    position: relative;
    overflow: hidden;
    padding: 1rem 0;
  }

  .reviews-marquee::before,
  .reviews-marquee::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 120px;
    z-index: 2;
    pointer-events: none;
  }

  .reviews-marquee::before { left: 0; background: linear-gradient(to right, var(--warm-white), rgba(253,251,246,0)); }
  .reviews-marquee::after { right: 0; background: linear-gradient(to left, var(--warm-white), rgba(253,251,246,0)); }

  .reviews-track {
    display: flex;
    gap: 1.5rem;
    animation: reviewsScroll 40s linear infinite;
    width: max-content;
  }

  .reviews-track:hover { animation-play-state: paused; }

  @keyframes reviewsScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
  }

  .review-card {
    flex-shrink: 0;
    width: 380px;
    background: white;
    border: 1px solid rgba(44,36,22,0.08);
    border-radius: var(--radius-md);
    cursor: pointer;
    padding: 2rem;
    display: flex;
    flex-direction: column;
  }

  .review-card-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }

  .review-card-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(44,36,22,0.06);
  }

  .review-card-meta {
    display: flex;
    flex-direction: column;
  }

  .review-card-name {
    font-family: 'Barlow', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.3;
  }

  .review-card-outlet {
    font-family: 'Barlow', sans-serif;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--ink-light);
    opacity: 0.6;
  }

  .review-card-text {
    font-family: 'Lora', serif;
    font-size: 0.92rem;
    font-style: italic;
    color: var(--ink);
    line-height: 1.7;
    flex: 1;
  }

  /* ─── RESPONSIVE ─── */
  @media (max-width: 900px) {
    .section-book { padding: 4rem 0; }
    .section-book .section-inner { padding-left: 1.5rem; padding-right: 1.5rem; }
    .section-book .section-heading { font-size: clamp(1.8rem, 7vw, 2.2rem); }
    .book-showcase { flex-direction: column; gap: 2.5rem; }
    .book-review { max-width: 300px; }
    .book-retailers { padding: 0 1rem; }

    /* Pill bottle book cover: scale down, no fixed width */
    .book-3d { width: 100%; max-width: 240px; flex-shrink: 1; margin: 0 auto; }
    .book-cover-real {
      width: 100%;
      max-width: 240px;
      height: auto;
      filter: drop-shadow(0 4px 14px rgba(44, 36, 22, 0.18));
    }

    .media-header { padding-left: 1.5rem; padding-right: 1.5rem; }
    .logo-wall { padding: 2rem 1rem; gap: 1rem 1.25rem; }
    .logo-wall-item { max-width: 100px; display: inline-flex; align-items: center; justify-content: center; }
    .logo-wall-item img { height: 14px; max-width: 100%; }
    .carousel-wrapper { padding: 0 1.5rem; }
    .carousel-wrapper::before { left: 1.5rem; width: 28px; }
    .carousel-wrapper::after { right: 1.5rem; width: 28px; }
    /* Hide side carousel arrows on mobile — touch-swipe is the input */
    .carousel-btn-side { display: none; }
    .carousel-card { width: 300px; }
    .view-all-cta { padding: 1.5rem 1.5rem 0; }

    .speaking-header { padding-left: 1.5rem; padding-right: 1.5rem; }
    .experience-pills { padding: 0 1.5rem; gap: 0.5rem; flex-wrap: wrap; }
    .experience-pill { font-size: 0.875rem; padding: 0.6rem 0.9rem; min-height: 44px; display: inline-flex; align-items: center; }

    .reviews-header { padding-left: 1.5rem; padding-right: 1.5rem; }
    .reviews-grid { padding: 0 1.5rem; grid-template-columns: 1fr; }

    /* Reduce reviews marquee edge fades on mobile (touch scroll doesn't need 120px masks) */
    .reviews-marquee::before,
    .reviews-marquee::after { width: 24px; }

    /* Section overlines need higher contrast on mobile */
    .section-overline { color: var(--ink-light) !important; opacity: 1 !important; }
    .section-book .section-overline,
    .speaking-section .section-overline,
    .media-section .section-overline,
    .reviews-section .section-overline { color: var(--amber) !important; opacity: 1 !important; }

    /* Featured In wrapper inline padding override */
    section.speaking-section > div[style*="max-width:900px"] {
      padding-left: 1.5rem !important;
      padding-right: 1.5rem !important;
    }
    /* YouTube wrapper inline padding override */
    section.speaking-section > div.reveal-up[style*="max-width:700px"] {
      padding-left: 1.5rem !important;
      padding-right: 1.5rem !important;
    }

    /* Footer social icons — 44x44 tap target while keeping 24px visual */
    footer .footer-col a[title] { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }

    /* Fix 1: Reviews carousel overflow — contain the marquee and enable touch scroll */
    .reviews-section { overflow: hidden; }
    .reviews-marquee { overflow: hidden; }
    .reviews-track {
      animation: none;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      scroll-snap-type: x mandatory;
      width: auto;
      padding: 0.5rem 1.5rem;
    }
    .review-card {
      scroll-snap-align: start;
      width: 280px;
    }

    /* Fix 2: Carousel links too small — meet 44px touch target */
    .carousel-link {
      min-height: 44px;
      display: inline-flex;
      align-items: center;
      font-size: 0.85rem;
    }

    /* Fix 3: Retailer pill text too small */
    .retailer-pill {
      font-size: 0.875rem;
      min-height: 44px;
      display: inline-flex;
      align-items: center;
    }

    /* Fix 4: Review card text too small */
    .review-card-name { font-size: 0.9rem; }
    .review-card-outlet { font-size: 0.875rem; }

    /* Fix 5: Book attribution too small */
    .book-attribution { font-size: 0.85rem; }

    /* Fix 6: Hide empty testimonial cards that render as blank blocks */
    .testimonial-card:empty { display: none; }

    /* Fix 7: Carousel type labels too small */
    .carousel-type { font-size: 0.75rem; }

    /* Fix 8: View all link and speaking CTA touch targets */
    .view-all-link { min-height: 44px; display: inline-flex; align-items: center; }
    .speaking-cta-email { min-height: 44px; display: inline-flex; align-items: center; }

    /* Fix 9: Inline outlet links in featured-in prose — expand hit area to 44x44
       via padding without disrupting text flow. */
    .speaking-section p.section-desc a {
      padding: 0.8rem 0.4rem;
      display: inline-block;
      line-height: 1.2;
      min-width: 44px;
      text-align: center;
    }
  }

  @media (max-width: 600px) {
    /* Book retailer pills — single column on phone (5 retailers, no orphan) */
    .book-retailers {
      display: grid;
      grid-template-columns: 1fr;
      gap: 0.5rem;
      padding: 0 1rem;
      max-width: 320px;
      margin-left: auto;
      margin-right: auto;
      margin-bottom: 3rem;
    }
    .retailer-pill {
      justify-content: center;
      padding: 0.85rem 0.75rem;
      font-size: 14px !important;
      min-height: 44px;
    }
    /* Book section heading scale */
    .section-book .section-heading { font-size: clamp(1.7rem, 8vw, 2rem); }
    /* Carousel card narrower on small phones */
    .carousel-card { width: 270px; padding: 1.5rem; }
    .review-card { width: 270px; padding: 1.5rem; }
  }

  /* ─── Mobile sticky Buy CTA bar ─── */
  .mobile-buy-bar { display: none; }
  @media (max-width: 900px) {
    .mobile-buy-bar {
      display: flex;
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      z-index: 90;
      background: rgba(253, 251, 246, 0.96);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border-top: 1px solid rgba(44, 36, 22, 0.1);
      padding: 0.75rem 1rem;
      box-shadow: 0 -4px 18px rgba(44, 36, 22, 0.08);
      gap: 0.5rem;
      align-items: center;
      justify-content: space-between;
    }
    .mobile-buy-bar__label {
      font-family: 'Lora', serif;
      font-size: 14px;
      font-weight: 600;
      color: var(--ink);
      line-height: 1.2;
    }
    .mobile-buy-bar__label small {
      display: block;
      font-family: 'Source Sans 3', sans-serif;
      font-size: 12px;
      font-weight: 400;
      color: var(--ink-light);
      opacity: 0.7;
      letter-spacing: 0;
      text-transform: none;
    }
    .mobile-buy-bar__btn {
      font-family: 'Barlow', sans-serif;
      font-size: 14px;
      font-weight: 600;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      background: var(--ink);
      color: var(--warm-white);
      border: none;
      border-radius: var(--radius-sm);
      padding: 0.75rem 1.25rem;
      text-decoration: none;
      min-height: 44px;
      display: inline-flex;
      align-items: center;
    }
    body { padding-bottom: 76px; }
  }
