@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@600;700&family=Lora:wght@400;500;600&family=Space+Mono:wght@400;700&display=swap');

/* =========================================================
   UNISELF — ARTISTIC THEME
   "For poets, readers, and keepers of books"
   
   Palette: aged parchment, ink, gold leaf, rust, verdigris
   Animations: infinitely turning book pages, scroll reveals,
   hand-drawn inspired elements
   
   Theme: Classical, poetic, artist-focused — not modern
   ========================================================= */

:root {
  /* Artistic warm palette for poetry & books */
  --parchment: #F5EFE0;
  --parchment-2: #ECE5D2;
  --parchment-3: #E4DAC4;
  --ink: #2A1F18;
  --ink-soft: #4A3F38;
  --gold: #C4A24B;
  --gold-light: #D4B06E;
  --rust: #7D4F3F;
  --rust-dark: #6B3F2F;
  --teal: #4A6B5F;
  --verdigris: #3F5F5F;
  --coral: #A85C4F;
  --charcoal: #2A1F18;
  --line: rgba(42, 31, 24, 0.15);
  --white: #FFFFFF;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;

  /* Shadows for depth */
  --shadow-card: 0 2px 8px rgba(42, 31, 24, 0.12);
  --shadow-lift: 0 12px 24px rgba(42, 31, 24, 0.2);
  --shadow-deep: 0 20px 40px rgba(42, 31, 24, 0.25);

  /* Fonts mapped for compatibility with base components */
  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'Lora', serif;
  --font-sans: 'Lora', serif;
  --font-mono: 'Space Mono', monospace;

  /* Color mapping adjustments for base components */
  --paper: var(--parchment);
  --paper-dim: var(--parchment-2);
  --emerald: var(--teal);
  --gold-deep: #A68037;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0 !important;
  padding-top: 0 !important;
  /* Prevent any horizontal scroll but keep sticky working */
  max-width: 100vw;
  overflow-x: clip;
}

html {
  scroll-behavior: smooth;
}

/* 2. Text and Typography (Prevent Overflow) */
p, h1, h2, h3, h4, h5, h6, a, span, div, li {
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  /* Use responsive typography clamp for basic text scaling */
  /* This ensures text never causes overflow */
}

/* 4. Images and Media */
img, video, canvas, svg {
  max-width: 100%;
  height: auto;
}

/* 6. Forms and Inputs */
input, select, textarea, button {
  max-width: 100%;
}

body {
  margin: 0;
  padding-left: 210px;
  /* offset for fixed left sidebar */
  background: var(--parchment);
  color: var(--ink);
  font-family: 'Lora', serif;
  line-height: 1.65;
  background-image:
    repeating-linear-gradient(90deg,
      transparent,
      transparent 1px,
      rgba(42, 31, 24, 0.03) 1px,
      rgba(42, 31, 24, 0.03) 2px),
    repeating-linear-gradient(0deg,
      transparent,
      transparent 1px,
      rgba(42, 31, 24, 0.03) 1px,
      rgba(42, 31, 24, 0.03) 2px),
    url('../../images/alpona_book_pattern.jpg');
  background-size: 8px 8px, 8px 8px, 600px 600px;
  background-repeat: repeat, repeat, repeat;
  background-blend-mode: multiply;
  -webkit-font-smoothing: antialiased;
}

body.no-sidebar {
  padding-left: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.3px;
}

p {
  margin: 0;
  font-size: 15.5px;
}

a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--gold);
}

/* ========== ORNAMENTAL DIVIDERS & DECORATIVE ELEMENTS ========== */
.ornament {
  height: 8px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 20px 0;
  opacity: 0.4;
  position: relative;
}

.ornament::before,
.ornament::after {
  content: '✦';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-size: 18px;
  font-weight: 300;
}

.ornament::before {
  left: 10%;
}

.ornament::after {
  right: 10%;
}

/* Hand-drawn line effect */
.hand-drawn {
  position: relative;
  display: inline-block;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  text-decoration-skip-ink: none;
}

/* ========== SKIP LINK ========== */
.skip-link {
  display: block;
  position: absolute;
  top: -9999px;
  left: 0;
  background: var(--ink);
  color: var(--parchment);
  padding: 8px;
  text-decoration: none;
  z-index: 10000;
  font-size: 14px;
}

.skip-link:focus {
  top: 0;
}

/* ========== UTILITY BAR ========== */
.utility-bar {
  background: var(--ink);
  border-bottom: 2px solid var(--gold);
  padding: 8px 0;
  margin: 0 !important;
}

@media (max-width: 1080px) {
  .utility-bar {
    display: none !important;
  }
}

.utility-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1440px;
}

.utility-bar a {
  color: var(--parchment);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.25s ease;
}

.utility-bar a:hover {
  color: var(--gold);
}

.utility-links {
  display: flex;
  gap: 24px;
  font-size: 12px;
}

/* ========== CONTAINER ========== */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }
}

/* ========== NAVIGATION ========== */
.main-nav {
  margin: 0 !important;
  margin-top: -25px !important;
  background-image: url('../../images/alpona_book_pattern.jpg');
  
  background-size: cover;
  background-position: center;
  background-color: rgba(245, 239, 224, 0.94);
  background-blend-mode: multiply;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 99;
  /* above sidebar z-index: 98 */
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 6px rgba(42, 31, 24, 0.08);
}

.main-nav .container {
  display: flex;
  align-items: center;
  max-width: 1440px;
}

.logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 1px;
  white-space: nowrap;
  display: flex;
  align-items: baseline;
  gap: 0;
  margin-right: 20px;
}

.logo .dot {
  color: var(--gold);
}

.header-nav-links {
  display: flex;
  gap: 36px;
  font-family: 'Lora', serif;
  font-size: 15px;
  font-weight: 500;
}

.header-nav-links a {
  position: relative;
  padding-bottom: 3px;
  color: var(--ink);
  transition: color 0.3s ease;
}

.header-nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.header-nav-links a:hover::after,
.header-nav-links a.active::after {
  transform: scaleX(1);
}

.header-nav-links a.active {
  color: var(--gold);
}

.search-form {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: none;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0;
  gap: 0;
  overflow: hidden;
}

.search-form select {
  padding: 10px 12px;
  border: none;
  background: transparent;
  font-family: 'Lora', serif;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  border-right: 1px solid var(--line);
}

.search-form input {
  flex: 1;
  padding: 10px 14px;
  border: none;
  background: transparent;
  font-family: 'Lora', serif;
  font-size: 14px;
  outline: none;
  color: var(--ink);
}

.search-form input::placeholder {
  color: var(--ink-soft);
}

.search-form button {
  padding: 10px 16px;
  background: var(--ink);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.search-form button:hover {
  background: var(--rust);
}

.search-form svg {
  width: 16px;
  height: 16px;
  color: var(--white);
}

.nav-actions {
  display: flex;
  gap: 18px;
  margin-left: auto;
}

.nav-action {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.3s ease;
  position: relative;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.nav-action:hover {
  background: var(--parchment-2);
  color: var(--gold);
}

.icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 22px;
  height: 22px;
}

.icon-wrap svg {
  width: 100%;
  height: 100%;
  stroke-width: 1.8;
}

.badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--coral);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

@media (max-width: 1024px) {

  .header-nav-links,
  .search-form {
    display: none;
  }

  .main-nav .container {
    gap: 16px;
  }
}

/* Menu button */
.menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--ink);
}

.menu-btn svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.8;
}

@media (max-width: 1024px) {
  .menu-btn {
    display: block;
  }
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 12px 32px;
  border-top: 1px solid var(--line);
  background: var(--parchment-2);
  font-size: 14px;
}

.mobile-menu a {
  padding: 8px 0;
  font-weight: 500;
}

.mobile-menu.open {
  display: flex;
}

/* ========== HERO SECTION WITH INFINITE BOOK ANIMATION ========== */
.hero {
  padding: 0 !important;
  position: relative;
  overflow: hidden;
  margin-bottom: 10px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 80% 20%, rgba(196, 162, 75, 0.05), transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(122, 79, 63, 0.03), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: start;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 56px;
  line-height: 1.1;
  margin: 16px 0 0;
  color: var(--ink);
}

.hero h1 em {
  font-style: italic;
  color: var(--rust);
}

.hero .lead {
  font-size: 16.5px;
  color: var(--ink-soft);
  max-width: 480px;
  margin-top: 18px;
  line-height: 1.7;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: 'Lora', serif;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--rust);
  margin-top: 0 !important;
}

.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--gold);
}

.hero-cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 40px;
  font-size: 13px;
  color: var(--ink-soft);
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-stat b {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--gold);
  display: block;
}

.stat-div {
  width: 1px;
  background: var(--line);
  height: 40px;
}

/* ========== INFINITE BOOK OPENING ANIMATION ========== */
.shelf-scene {
  perspective: 1200px;
  position: relative;
  height: 360px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.shelf-row {
  position: absolute;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  width: 100%;
}

.shelf-plank {
  position: absolute;
  width: 100%;
  height: 8px;
  background: linear-gradient(90deg, transparent, var(--rust-dark) 10%, var(--rust-dark) 90%, transparent);
  box-shadow: 0 3px 8px -4px rgba(0, 0, 0, 0.3);
  bottom: 0;
}

/* BOOK COVER ELEMENTS */
.cover {
  position: relative;
  height: 160px;
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 10px 8px;
  position: relative;
  background-size: cover;
  background-position: center;
}

.cover.short {
  flex: 0 0 60px;
  height: 140px;
}

.cover.tall {
  flex: 0 0 80px;
  height: 180px;
}

.cover:not(.short):not(.tall) {
  flex: 0 0 70px;
  height: 160px;
}

.cover:hover {
  transform: translateY(-8px) rotateX(4deg);
  box-shadow: var(--shadow-lift);
}

/* Infinite book page turning animation */
.cover.c1 {
  animation: book-turn-1 8s infinite ease-in-out;
}

.cover.c2 {
  animation: book-turn-2 8s infinite ease-in-out;
  animation-delay: 0.3s;
}

.cover.c3 {
  animation: book-turn-3 8s infinite ease-in-out;
  animation-delay: 0.6s;
}

.cover.c4 {
  animation: book-turn-4 8s infinite ease-in-out;
  animation-delay: 0.9s;
}

.cover.c5 {
  animation: book-turn-5 8s infinite ease-in-out;
  animation-delay: 1.2s;
}

.cover.c6 {
  animation: book-turn-6 8s infinite ease-in-out;
  animation-delay: 1.5s;
}

@keyframes book-turn-1 {

  0%,
  100% {
    transform: rotateY(0deg) translateY(0);
  }

  50% {
    transform: rotateY(-25deg) translateY(-4px);
  }
}

@keyframes book-turn-2 {

  0%,
  100% {
    transform: rotateY(0deg) translateY(0);
  }

  50% {
    transform: rotateY(25deg) translateY(-6px);
  }
}

@keyframes book-turn-3 {

  0%,
  100% {
    transform: rotateY(0deg) translateY(0);
  }

  50% {
    transform: rotateY(-20deg) translateY(-3px);
  }
}

@keyframes book-turn-4 {

  0%,
  100% {
    transform: rotateY(0deg) translateY(0);
  }

  50% {
    transform: rotateY(20deg) translateY(-5px);
  }
}

@keyframes book-turn-5 {

  0%,
  100% {
    transform: rotateY(0deg) translateY(0);
  }

  50% {
    transform: rotateY(-15deg) translateY(-4px);
  }
}

@keyframes book-turn-6 {

  0%,
  100% {
    transform: rotateY(0deg) translateY(0);
  }

  50% {
    transform: rotateY(15deg) translateY(-5px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cover {
    animation: none !important;
  }
}

.cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(0, 0, 0, 0.3));
  mix-blend-mode: overlay;
}

.spine-edge {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: rgba(0, 0, 0, 0.25);
}

.genre-tag {
  position: relative;
  z-index: 2;
  display: inline-block;
  font-family: 'Lora', serif;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.4);
  padding: 3px 8px;
  border-radius: 2px;
  backdrop-filter: blur(4px);
  margin-bottom: 4px;
}

.cover-title-rule {
  position: relative;
  z-index: 2;
  width: 20px;
  height: 1px;
  background: var(--gold);
  margin-bottom: 6px;
}

.cover-title {
  position: relative;
  z-index: 2;
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.cover-author {
  position: relative;
  z-index: 2;
  font-family: 'Lora', serif;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 2px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ========== SCROLL REVEAL ANIMATIONS ========== */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.34, 1.56, 0.64, 1),
    transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reveal-on-scroll.in-view {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-on-scroll {
  opacity: 0;
  transition: opacity 0.9s ease;
}

.fade-in-on-scroll.in-view {
  opacity: 1;
}

/* Staggered reveal for grid items */
.grid-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.grid-item.visible {
  opacity: 1;
  transform: translateY(0);
}

@for $i from 1 through 12 {
  .grid-item:nth-child(#{$i}).visible {
    transition-delay: #{$i * 0.08}s;
  }
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Lora', serif;
  font-size: 15px;
  font-weight: 600;
  padding: 14px 30px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: var(--rust);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--rust-dark);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(122, 79, 63, 0.3);
}

.btn-outline {
  border: 2px solid var(--ink);
  color: var(--ink);
  background: transparent;
}

.btn-outline:hover {
  background: var(--ink);
  color: var(--white);
  transform: translateY(-3px);
}

.btn-ghost-light {
  border: 2px solid var(--white);
  color: var(--white);
  background: transparent;
}

.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-3px);
}

/* ========== CARDS & SECTIONS ========== */
.card {
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.card::after {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(196, 162, 75, 0.2);
  border-radius: calc(var(--radius-md) - 4px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-4px);
  border-color: var(--gold);
}

.card:hover::after {
  opacity: 1;
}


/* ========== SECTION STRUCTURE ========== */
section {
  padding: 40px 0;
  position: relative;
}

section:nth-child(even) {
  background: var(--parchment-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-alt {
  background: var(--parchment-2);
}

.view-all {

  font-weight: 700;
  font-size: 13.5px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 10px;
  transition: all 0.2s ease;
  text-decoration: none;
  margin-left: auto;
}

.view-all:hover {
  color: var(--gold-deep);
  border-color: var(--gold-deep);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 0;
}

.section-head h2 {
  font-size: 32px;
  margin-top: 0;
  margin-bottom: 4px;
}
.section-head .eyebrow {
  margin-bottom: 4px;
}

/* Grid layouts */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.author-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.pub-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

.mag-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* ========== SPINE-STYLE TILES ========== */
.cat-tile {
  background-image:
    linear-gradient(135deg, rgba(250, 246, 239, 0.93) 0%, rgba(245, 238, 220, 0.90) 100%),
    url('../../images/alpona_book_pattern.jpg');
  background-size: cover, 280px 280px;
  background-position: center, center;
  background-repeat: no-repeat, repeat;
  border: 1.5px solid rgba(187, 163, 116, 0.45);
  border-radius: var(--radius-md);
  padding: 0;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  display: flex;
  flex-direction: row;
  box-shadow: 0 2px 12px rgba(187, 163, 116, 0.12);
  min-height: 140px;
}

/* Gold left spine bar */
.cat-tile::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, #c4a24b, #a85c4f);
  transition: width 0.3s ease;
  border-radius: 4px 0 0 4px;
}

/* Subtle alpona art corner watermark */
.cat-tile::after {
  content: '';
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 110px;
  height: 110px;
  background-image: url('../../images/alpona_book_pattern.jpg');
  background-size: 200px 200px;
  background-position: -60px -60px;
  opacity: 0.12;
  border-radius: 50%;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cat-tile:hover {
  box-shadow: 0 10px 32px rgba(187, 163, 116, 0.28), 0 2px 8px rgba(0, 0, 0, 0.06);
  transform: translateY(-5px);
  border-color: #c4a24b;
}

.cat-tile:hover::before {
  width: 8px;
}

.cat-tile:hover::after {
  opacity: 0.22;
}

/* LEFT: text content area */
.cat-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 16px 16px 22px;
  position: relative;
  z-index: 2;
}

/* RIGHT: SVG art panel — feather + book on right edge */
.cat-art-panel {
  width: 88px;
  min-width: 88px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 8px;
  position: relative;
  border-left: 1px solid rgba(187, 163, 116, 0.22);
  background: linear-gradient(180deg,
      rgba(250, 246, 239, 0.60) 0%,
      rgba(245, 238, 220, 0.85) 50%,
      rgba(250, 246, 239, 0.60) 100%);
  overflow: hidden;
  transition: background 0.4s ease, border-color 0.4s ease;
}

/* Alpona pattern faint watermark behind SVGs */
.cat-art-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../../images/alpona_book_pattern.jpg');
  background-size: 160px 160px;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
}

.cat-tile:hover .cat-art-panel {
  background: linear-gradient(180deg,
      rgba(250, 246, 239, 0.75) 0%,
      rgba(245, 235, 210, 0.95) 50%,
      rgba(250, 246, 239, 0.75) 100%);
  border-left-color: rgba(196, 162, 75, 0.5);
}

/* Feather quill SVG */
.art-feather {
  width: 36px;
  height: 72px;
  position: relative;
  z-index: 1;
  opacity: 0.72;
  transition: opacity 0.35s ease, transform 0.35s ease;
  filter: drop-shadow(0 1px 3px rgba(184, 146, 74, 0.2));
}

.cat-tile:hover .art-feather {
  opacity: 1;
  transform: translateY(-3px) rotate(-3deg);
  filter: drop-shadow(0 3px 8px rgba(184, 146, 74, 0.35));
}

/* Book SVG */
.art-book {
  width: 56px;
  height: 44px;
  position: relative;
  z-index: 1;
  opacity: 0.70;
  transition: opacity 0.35s ease, transform 0.35s ease;
  filter: drop-shadow(0 1px 3px rgba(184, 146, 74, 0.18));
}

.cat-tile:hover .art-book {
  opacity: 1;
  transform: translateY(2px) scale(1.05);
  filter: drop-shadow(0 3px 8px rgba(184, 146, 74, 0.32));
}

/* Gold accent dot column */
.art-dots {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  z-index: 1;
  margin-top: 2px;
}

.art-dots span {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: radial-gradient(circle, #d4a84b, #a8763c);
  opacity: 0.5;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.cat-tile:hover .art-dots span {
  opacity: 1;
}

.cat-tile:hover .art-dots span:nth-child(1) {
  transform: scale(1.3);
  transition-delay: 0ms;
}

.cat-tile:hover .art-dots span:nth-child(2) {
  transform: scale(1.5);
  transition-delay: 60ms;
}

.cat-tile:hover .art-dots span:nth-child(3) {
  transform: scale(1.3);
  transition-delay: 120ms;
}


/* Spine dot — gold mandala style */
.spine-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, #d4a84b 40%, #c4a24b 100%);
  box-shadow: 0 0 6px rgba(196, 162, 75, 0.5);
  margin-bottom: 6px;
}

/* Header row — icon + count */
.cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cat-icon {
  width: 36px;
  height: 36px;
  background: rgba(196, 162, 75, 0.12);
  border: 1.5px solid rgba(196, 162, 75, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8B5E3C;
  transition: background 0.3s, border-color 0.3s;
}

.cat-tile:hover .cat-icon {
  background: rgba(196, 162, 75, 0.22);
  border-color: #c4a24b;
}

.cat-icon svg {
  width: 18px;
  height: 18px;
}

.cat-count {
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  font-weight: 700;
  color: #8B5E3C;
  letter-spacing: 0.3px;
  opacity: 0.8;
}

/* Content */
.cat-content {
  flex: 1;
}

.cat-name {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  font-weight: 700;
  color: #2A1A10;
  margin-bottom: 5px;
  line-height: 1.25;
}

.cat-subs {
  display: block;
  font-family: 'Lora', serif;
  font-size: 11.5px;
  color: rgba(42, 26, 16, 0.55);
  font-style: italic;
  line-height: 1.4;
}

/* Footer action */
.cat-footer {
  padding-top: 10px;
  border-top: 1px solid rgba(187, 163, 116, 0.2);
}

.cat-action {
  font-family: 'Lora', serif;
  font-size: 12px;
  font-weight: 600;
  color: #8B5E3C;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  transition: color 0.2s, letter-spacing 0.2s;
}

.cat-tile:hover .cat-action {
  color: #c4a24b;
  letter-spacing: 1px;
}



/* ========== BOOK CARDS ========== */
.book-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  height: 100%;
}

.book-card:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-8px) rotateX(2deg);
}

.book-cover {
  position: relative;
  height: 220px;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  overflow: hidden;
}

.book-cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(0, 0, 0, 0.35));
  mix-blend-mode: overlay;
}

.book-cover::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 8px;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.wishlist-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.4);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
  z-index: 2;
}

.wishlist-btn:hover {
  background: rgba(0, 0, 0, 0.6);
  transform: scale(1.15);
}

.wishlist-btn.active {
  background: rgba(0, 0, 0, 0.45);
  transform: scale(1.1);
}

.wishlist-btn svg {
  width: 18px;
  height: 18px;
  stroke: var(--white);
  stroke-width: 2.2;
  fill: none;
  transition: all 0.3s ease;
}

.wishlist-btn.active svg {
  fill: var(--coral) !important;
  stroke: var(--coral) !important;
  filter: drop-shadow(0 2px 6px rgba(168, 92, 79, 0.6));
}

.wishlist-btn svg path {
  stroke: inherit;
  fill: inherit;
}

.genre-tag {
  position: relative;
  z-index: 2;
  display: inline-block;
  font-family: 'Lora', serif;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.45);
  padding: 4px 10px;
  border-radius: 3px;
  margin-bottom: 6px;
  backdrop-filter: blur(4px);
}

.cover-title-rule {
  position: relative;
  z-index: 2;
  width: 24px;
  height: 1.5px;
  background: var(--gold);
  margin-bottom: 8px;
  transition: width 0.3s ease;
}

.cover-title {
  position: relative;
  z-index: 2;
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--white);
  line-height: 1.2;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.cover-author {
  position: relative;
  z-index: 2;
  font-family: 'Lora', serif;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 3px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Card body */
.card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Book meta info block under the cover - matched to category page */
.book-meta {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: space-between;
}

.book-meta .title {
  font-family: var(--font-sans), sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #1F2937;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.book-meta .title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.book-meta .title a:hover {
  color: var(--gold, #C4A24B);
}

.book-meta .author {
  font-family: var(--font-sans), sans-serif;
  font-size: 12px;
  color: #6B7280;
  margin: 0 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.book-meta .rating {
  display: none; /* Hidden to match category page */
}

.book-meta .price-row {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  padding-top: 6px;
  border-top: 1px dashed #F3F4F6;
  flex-wrap: wrap;
}

.book-meta .price-row .now.price {
  font-family: var(--font-sans), sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #000000;
}

.book-meta .price-row .old.price {
  font-family: var(--font-sans), sans-serif;
  font-size: 12px;
  color: #6B7280;
  text-decoration: line-through;
}

.book-meta .price-row .discount-text {
  font-family: var(--font-sans), sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: #10B981;
}

.book-meta .variants-container {
  display: flex;
  gap: 0.3rem;
  margin-top: 0.4rem;
  flex-wrap: wrap;
}

.book-meta .variant-tag {
  font-size: 0.65rem;
  background: var(--parchment-2, #ECE5D2);
  color: var(--ink-soft, #4A3F38);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-weight: 600;
  border: 1px solid rgba(42, 31, 24, 0.1);
}

/* ========== PUBLISHER & AUTHOR CARDS ========== */
.pub-card {
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pub-card:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-4px);
  border-color: var(--gold);
}

.pub-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  margin: 0 auto 12px;
}

.pub-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.pub-count {
  font-family: 'Lora', serif;
  font-size: 12px;
  color: var(--ink-soft);
}

.author-card {
  background: #fbf8f3;
  border: 1px solid rgba(196, 162, 75, 0.22);
  border-radius: var(--radius-md);
  padding: 20px 18px;
  display: flex;
  gap: 16px;
  align-items: center;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(42, 31, 24, 0.04);
}

.author-card::after {
  content: '';
  position: absolute;
  bottom: -15px;
  right: -15px;
  width: 50px;
  height: 50px;
  background-image: url('../../images/alpona_book_pattern.jpg');
  background-size: 80px 80px;
  background-repeat: no-repeat;
  background-position: bottom right;
  opacity: 0.04;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.4s ease;
}

.author-card:hover {
  background: var(--white);
  border-color: var(--gold);
  transform: translateY(-5px);
  box-shadow: 0 10px 24px rgba(196, 162, 75, 0.15);
}

.author-card:hover::after {
  opacity: 0.1;
  transform: scale(1.1) translate(-2px, -2px);
}

.author-avatar {
  width: 58px;
  height: 58px;
  min-width: 58px;
  border-radius: 50%;
  border: 2px solid rgba(196, 162, 75, 0.3);
  box-shadow: 0 2px 8px rgba(42, 31, 24, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  transition: border-color 0.3s, transform 0.3s;
}

.author-card:hover .author-avatar {
  border-color: var(--gold);
  transform: scale(1.05);
}

.author-info {
  flex: 1;
}

.name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  display: block;
  margin-bottom: 2px;
  letter-spacing: 0.3px;
}

.role {
  font-family: 'Lora', serif;
  font-size: 12.5px;
  font-style: italic;
  color: var(--rust);
  display: block;
  margin-bottom: 3px;
}

.count {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: var(--ink-soft);
  display: block;
  opacity: 0.8;
}

/* ========== MAGAZINE CARDS ========== */
.mag-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-card);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}

.mag-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.4));
  mix-blend-mode: overlay;
}

.mag-card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: var(--shadow-deep);
}

.mag-card .issue {
  position: relative;
  z-index: 2;
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.15);
  color: var(--parchment) !important;
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 4px 10px;
  border-radius: var(--radius-sm, 4px);
  transition: all 0.2s ease;
}

.mag-card:hover .issue {
  background: var(--gold);
  color: var(--ink) !important;
  border-color: var(--gold);
}

.mag-card .mag-title {
  position: relative;
  z-index: 2;
  font-family: 'Cormorant Garamond', serif;
  font-size: 23px;
  font-weight: 700;
  color: var(--white) !important;
  text-shadow: 0 2px 8px rgba(42, 31, 24, 0.6);
  margin: 0;
  line-height: 1.25;
  letter-spacing: 0.3px;
}

.mag-card .mag-sub {
  position: relative;
  z-index: 2;
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.8) !important;
  margin-top: 6px;
}

/* ========== TWO COLUMN LAYOUT ========== */
.two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

@media (max-width: 1024px) {
  .two-col {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .cat-grid,
  .author-row,
  .pub-grid,
  .mag-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {

  .cat-grid,
  .author-row,
  .pub-grid,
  .mag-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .shelf-scene {
    display: none;
  }

  section {
    padding: 60px 0;
  }

  .hero h1 {
    font-size: 36px;
  }

  .section-head h2 {
    font-size: 28px;
  }
}

/* ========== BANNER & NEWSLETTER ========== */
.banner {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: var(--radius-lg);
  padding: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.banner h3 {
  font-size: 24px;
  color: var(--ink);
  margin: 0 0 8px;
}

.banner p {
  color: var(--ink-soft);
  max-width: 400px;
  margin: 0;
}

.newsletter {
  background: var(--teal);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 50px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.newsletter::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1), transparent),
    radial-gradient(circle at 80% 80%, rgba(196, 162, 75, 0.1), transparent);
  pointer-events: none;
}

.newsletter h2 {
  font-size: 32px;
  margin-top: 12px;
  color: var(--white);
  position: relative;
  z-index: 2;
}

.newsletter p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 520px;
  margin: 12px auto 0;
  position: relative;
  z-index: 2;
}

.newsletter form {
  display: flex;
  gap: 10px;
  max-width: 450px;
  margin: 28px auto 0;
  position: relative;
  z-index: 2;
  flex-wrap: wrap;
  justify-content: center;
}

.newsletter input {
  flex: 1;
  min-width: 220px;
  padding: 13px 18px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Lora', serif;
  font-size: 14px;
  outline: none;
}

/* ========== FOOTER ========== */
footer {
  background-color: var(--ink);
  background-image: url('../../images/footer_bg_pattern.jpg');
  background-size: 400px 400px;
  background-repeat: repeat;
  color: rgba(245, 239, 224, 0.75);
  padding: 60px 0 20px;
  border-top: 3px solid var(--gold);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 3fr 1.2fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 1px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 30px;
}

.footer-tag {
  font-size: 13.5px;
  margin-top: 12px;
  max-width: 300px;
  line-height: 1.7;
  color: rgba(245, 239, 224, 0.65);
}

footer h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

footer a {
  font-size: 13.5px;
  color: rgba(245, 239, 224, 0.7);
  transition: color 0.3s ease;
}

footer a:hover {
  color: var(--gold);
}

.portal-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.portal-chip {
  display: inline-block;
  background: rgba(196, 162, 75, 0.2);
  color: var(--gold);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  transition: all 0.3s ease;
  border: 1px solid rgba(196, 162, 75, 0.4);
}

.portal-chip:hover {
  background: rgba(196, 162, 75, 0.35);
  border-color: var(--gold);
}

.bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid rgba(245, 239, 224, 0.1);
  font-size: 12px;
  color: rgba(245, 239, 224, 0.6);
  flex-wrap: wrap;
  gap: 12px;
}

.legal-links {
  display: flex;
  gap: 24px;
}

/* ========== FORM ELEMENTS ========== */
.floating-group {
  position: relative;
  margin-bottom: 20px;
}

.form-control {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: 'Lora', serif;
  font-size: 15px;
  background: var(--white);
  color: var(--ink);
  transition: border-color 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(196, 162, 75, 0.02);
}

.floating-label {
  position: absolute;
  top: 14px;
  left: 16px;
  font-size: 15px;
  color: var(--ink-soft);
  transition: all 0.3s ease;
  pointer-events: none;
}

.form-control:focus~.floating-label,
.form-control:not(:placeholder-shown)~.floating-label {
  top: -8px;
  left: 8px;
  font-size: 12px;
  background: var(--parchment);
  padding: 0 8px;
  color: var(--gold);
}

.error-message {
  display: block;
  margin-top: 6px;
  font-family: 'Lora', serif;
  font-size: 12px;
  color: var(--coral);
}

/* ========== UTILITIES ========== */
.breadcrumb {
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.breadcrumb a {
  color: var(--ink);
  text-decoration: underline;
}

.page-hero {
  position: relative;
  background: linear-gradient(135deg, rgba(196, 162, 75, 0.04), rgba(122, 79, 63, 0.04));
  border-bottom: 1px solid var(--line);
  padding: 60px 0;
}

.page-hero h1 {
  font-size: 42px;
  line-height: 1.15;
  margin: 16px 0;
  max-width: 680px;
}

.page-hero .lead {
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 600px;
  margin-top: 16px;
}

.stat-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-block b {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--gold);
  display: block;
}

.stat-block span {
  font-size: 12px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 6px;
}

/* ========== ANIMATIONS & TRANSITIONS ========== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Toast notification */
.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--white);
  border-left: 4px solid var(--gold);
  padding: 14px 16px;
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(42, 31, 24, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--ink);
  z-index: 1000;
  transform: translateX(400px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: 'Lora', serif;
}

.toast-notification.show {
  transform: translateX(0);
}

.toast-notification svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
  flex-shrink: 0;
}


/* === APPENDED STYLES FOR SCROLLING TICKER, REVIEWS, AND MAGAZINE EXPLORER === */


/* =========================================================
   CUSTOMER REVIEWS (TESTIMONIALS) SECTION
   ========================================================= */
.reviews-section {
  background-color: #FAF6EF;
  background-image: url('../../images/reviews_bg_pattern.jpg');
  background-size: 500px 500px;
  background-repeat: repeat;
  /* Matches body warm paper color */
  position: relative;
  overflow: hidden;
  padding: 90px 0 20px 0;
  border-top: 1px solid rgba(22, 33, 61, 0.06);
}

.newsletter-section {
  padding-top: 20px !important;
}

.reviews-slider-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 10px 0 30px 0;
}

.reviews-track-wrapper {
  overflow: hidden;
  width: 100%;
}

.reviews-track {
  display: flex;
  gap: 30px;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  width: 100%;
}

.review-card {
  position: relative;
  background-color: #FAF5EA !important;
  background-image:
    linear-gradient(rgba(250, 245, 234, 0.88), rgba(250, 245, 234, 0.88)),
    url('../../images/alpona_bg_pattern_2.jpg') !important;
  background-blend-mode: multiply !important;
  background-size: 420px 420px !important;
  background-repeat: repeat !important;
  border: 1px solid rgba(196, 162, 75, 0.28) !important;
  border-radius: 16px !important;
  padding: 30px !important;
  min-width: calc((100% - 60px) / 3);
  /* 3 cards on desktop */
  box-sizing: border-box;
  box-shadow:
    0 12px 28px rgba(42, 31, 24, 0.04),
    inset 0 0 40px rgba(166, 128, 55, 0.03) !important;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
}

/* Elegant inset border frame inside each card */
.review-card::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(196, 162, 75, 0.16);
  border-radius: 10px;
  pointer-events: none;
  z-index: 1;
}

/* Responsive review card columns */
@media (max-width: 1024px) {
  .review-card {
    min-width: calc((100% - 30px) / 2) !important;
    /* 2 cards on tablet */
  }
}

@media (max-width: 768px) {
  .review-card {
    min-width: 100% !important;
    /* 1 card on mobile */
  }
}

.review-card:hover {
  transform: translateY(-8px) scale(1.01) !important;
  box-shadow:
    0 20px 40px rgba(42, 31, 24, 0.08),
    inset 0 0 50px rgba(166, 128, 55, 0.06) !important;
  border-color: rgba(196, 162, 75, 0.45) !important;
}

.review-user-row {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 2;
}

.review-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(196, 162, 75, 0.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.review-user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  z-index: 2;
}

.review-user-name {
  font-family: 'Cormorant Garamond', serif !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  color: var(--ink) !important;
}

.review-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--emerald);
  font-weight: 600;
  position: relative;
  z-index: 2;
}

.review-verified-badge svg {
  width: 11px;
  height: 11px;
  stroke-width: 3;
}

.review-stars {
  display: flex;
  gap: 3px;
  color: #c68a35;
  /* Ochre Gold stars */
  position: relative;
  z-index: 2;
}

.review-stars svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.review-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 2;
}

.review-title {
  font-family: 'Cormorant Garamond', serif !important;
  font-size: 19px !important;
  font-weight: 700 !important;
  color: var(--ink) !important;
  letter-spacing: -0.2px;
}

.review-text {
  font-family: 'Lora', serif !important;
  font-size: 13.5px !important;
  line-height: 1.6 !important;
  color: var(--charcoal) !important;
  font-style: italic;
}

.review-book-tag {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--gold-deep) !important;
  background: rgba(196, 162, 75, 0.08) !important;
  border: 1px solid rgba(196, 162, 75, 0.15) !important;
  padding: 4px 12px;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.25s ease;
  margin-top: auto;
  position: relative;
  z-index: 2;
}

.review-book-tag:hover {
  background: var(--gold) !important;
  color: var(--white) !important;
  border-color: var(--gold) !important;
  transform: translateY(-1px);
}

.review-book-tag svg {
  width: 11px;
  height: 11px;
  stroke: currentColor;
}

/* Review Carousel Controls */
.reviews-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
}

.reviews-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.reviews-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(22, 33, 61, 0.15);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

.reviews-dot.active {
  background: #c68a35;
  /* Ochre Gold dot indicator */
  transform: scale(1.25);
}

.reviews-arrows {
  display: flex;
  gap: 12px;
}

.reviews-arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid rgba(22, 33, 61, 0.08);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(22, 33, 61, 0.03);
  padding: 0;
}

.reviews-arrow:hover:not(:disabled) {
  background: #c68a35;
  border-color: #c68a35;
  color: var(--white);
  transform: scale(1.05);
  box-shadow: 0 6px 15px rgba(198, 138, 53, 0.25);
}

.reviews-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.reviews-arrow svg {
  width: 18px;
  height: 18px;
}

/* =========================================================
   INTERACTIVE MAGAZINE newsstand EXPLORER
   ========================================================= */

.mag-filters-container {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 8px 4px 20px 4px;
  margin-bottom: 30px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.mag-filters-container::-webkit-scrollbar {
  display: none;
}

.mag-filter-btn {
  flex-shrink: 0;
  background: rgba(42, 31, 24, 0.05);
  border: 1px solid rgba(42, 31, 24, 0.15);
  color: var(--ink-soft);
  padding: 8px 20px;
  border-radius: 30px;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.mag-filter-btn:hover {
  background: rgba(42, 31, 24, 0.1);
  color: var(--ink);
  border-color: rgba(42, 31, 24, 0.3);
  transform: translateY(-2px);
}

.mag-filter-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--parchment);
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(42, 31, 24, 0.2);
}

.mag-card {
  border: 1px solid rgba(196, 162, 75, 0.15);
  box-shadow: 0 4px 20px rgba(42, 31, 24, 0.06);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.mag-card.fade-out {
  opacity: 0;
  transform: scale(0.92) translateY(15px);
}

.mag-card.fade-in {
  opacity: 0;
  transform: scale(0.92) translateY(-15px);
}

.mag-card.hidden {
  display: none !important;
}

.preview-pill {
  position: relative;
  z-index: 2;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: .08em;
  background: rgba(255, 255, 255, 0.16) !important;
  color: var(--white) !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-block;
  margin-bottom: 8px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.preview-pill:hover {
  background: var(--white) !important;
  color: var(--ink) !important;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

/* =========================================================
   MAGAZINE PREVIEW MODAL & READER SYSTEM
   ========================================================= */

.mag-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.mag-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.mag-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 18, 33, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.mag-modal-container {
  position: relative;
  width: 100%;
  max-width: 1080px;
  height: 90vh;
  max-height: 720px;
  background: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
  z-index: 1;
  transform: scale(0.96) translateY(20px);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.mag-modal.open .mag-modal-container {
  transform: scale(1) translateY(0);
}

.mag-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--white);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.25s ease;
}

.mag-modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: rotate(90deg);
}

.mag-modal-content {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  height: 100%;
}

@media (max-width: 900px) {
  .mag-modal-content {
    grid-template-columns: 1fr;
    grid-template-rows: 1.1fr 0.9fr;
    overflow-y: auto;
  }

  .mag-modal-container {
    height: 95vh;
    max-height: none;
  }
}

/* Modal Reader Pane */
.mag-modal-reader {
  background: #0b0f19;
  /* dark slate canvas */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 30px;
  position: relative;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 900px) {
  .mag-modal-reader {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px;
    min-height: 360px;
  }
}

.mag-page-spread {
  display: flex;
  width: 100%;
  max-width: 540px;
  aspect-ratio: 1.414/1;
  /* standard landscape booklet ratio */
  background: #FAF6EF;
  /* var(--paper) */
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.mag-page {
  flex: 1;
  padding: 24px;
  color: var(--charcoal);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.mag-page-left {
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: inset -10px 0 15px rgba(0, 0, 0, 0.03);
}

.mag-page-right {
  box-shadow: inset 10px 0 15px rgba(0, 0, 0, 0.03);
}

.mag-page-num {
  font-family: var(--font-mono);
  font-size: 9px;
  color: rgba(35, 33, 29, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.mag-page-left .mag-page-num {
  text-align: left;
}

.mag-page-right .mag-page-num {
  text-align: right;
}

.mag-page-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  margin: 12px 0;
  opacity: 1;
  transition: opacity 0.22s ease;
}

.mag-page-inner.page-fade {
  opacity: 0.02;
}

/* Page spread visual typography & components */
.mag-spread-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  margin-top: 5px;
  margin-bottom: 8px;
}

.mag-spread-subtitle {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--gold-deep);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.mag-spread-text {
  font-family: var(--font-body);
  font-size: 10px;
  line-height: 1.5;
  color: var(--charcoal);
  margin-bottom: 8px;
}

.mag-spread-text.columns {
  column-count: 2;
  column-gap: 12px;
}

.mag-spread-photo {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  background-size: cover;
  background-position: center;
  position: relative;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.15);
}

.mag-spread-photo-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(22, 33, 61, 0.9), transparent);
  color: var(--white);
  padding: 20px 10px 8px 10px;
  font-size: 9px;
  font-family: var(--font-body);
  line-height: 1.3;
}

.mag-spread-quote {
  font-family: var(--font-display);
  font-size: 14px;
  font-style: italic;
  color: var(--ink-soft);
  border-left: 2px solid var(--gold);
  padding-left: 12px;
  margin: 12px 0;
  line-height: 1.35;
}

.mag-spread-feature-box {
  background: var(--paper-dim);
  padding: 10px;
  border-radius: 4px;
  border-left: 3px solid var(--emerald);
  margin-bottom: 8px;
}

.mag-spread-feature-title {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--emerald);
  margin-bottom: 4px;
  text-transform: uppercase;
}

/* Reader navigation controls */
.mag-reader-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

.mag-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.mag-nav-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

.mag-nav-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.mag-nav-btn svg {
  width: 14px;
  height: 14px;
}

.mag-page-indicator {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
}

/* Modal Sidebar Details Pane */
.mag-modal-sidebar {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  background: var(--ink);
}

@media (max-width: 900px) {
  .mag-modal-sidebar {
    padding: 30px;
    overflow-y: visible;
  }
}

.mag-sidebar-category {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.mag-modal-sidebar h3 {
  font-size: 28px;
  font-weight: 600;
  color: var(--white);
  margin-top: 8px;
  margin-bottom: 4px;
  line-height: 1.1;
}

.mag-sidebar-issue {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.mag-sidebar-desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 24px;
}

.mag-sidebar-features {
  margin-bottom: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 20px;
}

.mag-sidebar-features h4 {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 12px;
}

.mag-features-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mag-features-list li {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 8px;
  position: relative;
  padding-left: 16px;
}

.mag-features-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: bold;
}

.mag-sidebar-pricing {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.price-row:last-child {
  margin-bottom: 0;
}

.price-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
}

.price-value {
  font-size: 16px;
  color: var(--white);
  font-weight: 700;
}

.price-save {
  font-size: 9px;
  font-family: var(--font-mono);
  background: var(--coral);
  color: var(--white);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
  text-transform: uppercase;
  font-weight: bold;
}

.mag-sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mag-sidebar-actions .btn {
  justify-content: center;
  text-align: center;
  font-size: 13.5px;
  padding: 12px;
  width: 100%;
}

/* =========================================================
   FIGMA IMPORTER OPTIMIZATIONS
   ========================================================= */

.cover-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(22, 33, 61, 0.3) 0%, rgba(22, 33, 61, 0.75) 100%);
  z-index: 0;
}

.mag-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* === CATEGORY NAVIGATION & MULTI-LEVEL DROPDOWN MENUS === */
@media (min-width: 1081px) {
  body:has(.spine-nav),
  body.has-spine-nav {
    padding-left: 210px !important;
  }
  body:not(:has(.spine-nav)),
  body.no-spine-nav,
  body.customer-portal {
    padding-left: 0 !important;
  }
}

.spine-nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 210px;
  z-index: 98;
  overflow-y: auto;
  overflow-x: visible;
  /* MUST be visible — overflow:hidden clips the flyout dropdowns */
  padding-top: 70px;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
  scrollbar-width: none;
  background-image:
    linear-gradient(180deg,
      rgba(10, 26, 52, 0.88) 0%,
      rgba(20, 40, 72, 0.82) 40%,
      rgba(30, 18, 8, 0.88) 100%),
    url('../../images/footer_bg_pattern.jpg');
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  border-right: 1px solid rgba(187, 163, 116, 0.25);
}

.spine-nav::-webkit-scrollbar {
  display: none;
}

.spine-nav .container {
  display: block;
  padding: 0;
  max-width: none;
}

.spine-nav-header {
  padding: 18px 18px 12px;
  border-bottom: 1px solid rgba(187, 163, 116, 0.2);
  margin-bottom: 4px;
}

.spine-nav-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 11px;
  font-weight: 700;
  color: #d4a84b;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  display: block;
  margin-bottom: 10px;
  text-shadow: 0 0 12px rgba(212, 168, 75, 0.6);
}

.spine-nav-divider {
  height: 1.5px;
  background: linear-gradient(90deg, #d4a84b 0%, rgba(212, 168, 75, 0.3) 60%, transparent 100%);
  border-radius: 2px;
}

.spine-nav>.container>ul {
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: visible;
  /* critical — lets flyout menus escape the container */
  list-style: none;
  margin: 0;
  padding: 0;
}

.spine-nav>.container>ul::-webkit-scrollbar {
  display: none;
}

.spine-nav>.container>ul>li {
  position: relative;
  width: 100%;
  overflow: visible;
  /* allow flyouts to escape */
}

.spine-nav>.container>ul>li>a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px 13px 20px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.80);
  border-left: 3px solid transparent;
  white-space: nowrap;
  transition: all .2s;
  border-bottom: 1px solid rgba(187, 163, 116, 0.08);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.spine-nav .spine-nav-text {
  flex: 1;
  min-width: 0;
  padding-right: 8px;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
  word-break: break-word;
}

.spine-nav>.container>ul>li>a::after {
  content: '›';
  font-size: 18px;
  opacity: 0.35;
  transition: opacity 0.2s, transform 0.2s;
}

.spine-nav>.container>ul>li:hover>a::after {
  opacity: 1;
  color: #d4a84b;
  transform: translateX(4px);
}

.spine-nav>.container>ul>li>a:hover,
.spine-nav>.container>ul>li>a.active {
  color: #d4a84b;
  background: rgba(212, 168, 75, 0.08);
  border-left-color: #d4a84b !important;
}

/* each spine gets a distinct accent color, like colored book spines on a shelf */
.spine-nav>.container>ul>li:nth-child(1)>a {
  border-left-color: var(--gold);
}

.spine-nav>.container>ul>li:nth-child(2)>a {
  border-left-color: var(--emerald);
}

.spine-nav>.container>ul>li:nth-child(3)>a {
  border-left-color: var(--coral);
}

.spine-nav>.container>ul>li:nth-child(4)>a {
  border-left-color: #7C9FD9;
}

.spine-nav>.container>ul>li:nth-child(5)>a {
  border-left-color: #B98CD9;
}

.spine-nav>.container>ul>li:nth-child(6)>a {
  border-left-color: var(--gold);
}

.spine-nav>.container>ul>li:nth-child(7)>a {
  border-left-color: var(--emerald);
}

.spine-nav>.container>ul>li:nth-child(8)>a {
  border-left-color: var(--coral);
}

/* =========================================================
   DROPDOWN MENUS — Flyout from sidebar
   Triggered via .is-open class set by JavaScript
   ========================================================= */

/* Level 2 Dropdown */
.spine-nav .dropdown-menu {
  position: fixed;
  /* fixed so it escapes ALL overflow clipping */
  top: 0;
  /* positioned dynamically by JS */
  left: 210px;
  /* right edge of the sidebar */
  min-width: 230px;
  max-height: 70vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 168, 75, 0.4) transparent;

  /* Rich glassmorphism dark panel */
  background: linear-gradient(135deg,
      rgba(12, 22, 48, 0.97) 0%,
      rgba(20, 32, 62, 0.97) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    6px 0 40px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(212, 168, 75, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  border-radius: 0 12px 12px 0;
  border-left: 2px solid #d4a84b;

  /* Hidden by default */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-8px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  z-index: 9999;
  padding: 10px 0;
  list-style: none;
}

/* Show when .is-open is on the parent <li> */
.spine-nav>.container>ul>li.is-open>.dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

/* Keep open on hover too (desktop UX) */
.spine-nav>.container>ul>li:hover>.dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

/* Dropdown header label */
.spine-nav .dropdown-menu::before {
  content: attr(data-label);
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #d4a84b;
  padding: 4px 18px 10px;
  border-bottom: 1px solid rgba(212, 168, 75, 0.18);
  margin-bottom: 4px;
  opacity: 0.85;
}

/* Level 2 Item */
.spine-nav .dropdown-menu li {
  position: relative;
  width: 100%;
  overflow: visible;
  list-style: none;
}

/* Level 2 Link */
.spine-nav .dropdown-menu a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 20px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(240, 235, 220, 0.82);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, padding-left 0.15s;
  border-left: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  text-decoration: none;
}

.spine-nav .dropdown-menu a:hover {
  background: rgba(212, 168, 75, 0.1);
  color: #d4a84b;
  padding-left: 24px;
}

.spine-nav .dropdown-menu a span {
  font-size: 14px;
  opacity: 0.45;
  margin-left: 10px;
  transition: opacity 0.15s, transform 0.15s;
  flex-shrink: 0;
}

.spine-nav .dropdown-menu a:hover span {
  opacity: 1;
  color: #d4a84b;
  transform: translateX(3px);
}

/* Divider between submenu groups */
.spine-nav .dropdown-menu li.has-submenu>a {
  color: rgba(255, 255, 255, 0.9);
}

.spine-nav .dropdown-menu li.has-submenu>a::after {
  content: '›';
  font-size: 18px;
  margin-left: auto;
  opacity: 0.45;
  transition: opacity 0.15s, transform 0.15s;
}

.spine-nav .dropdown-menu li.has-submenu:hover>a::after,
.spine-nav .dropdown-menu li.has-submenu.is-open>a::after {
  opacity: 1;
  color: #d4a84b;
  transform: translateX(3px);
}

/* =========================================================
   LEVEL 3 — Sub-submenu (Flyout from Level 2)
   ========================================================= */
.spine-nav .dropdown-submenu {
  position: fixed;
  /* fixed to escape any overflow */
  top: 0;
  /* set by JS */
  left: 440px;
  /* sidebar(210) + dropdown(230) */
  min-width: 210px;
  max-height: 60vh;
  overflow-y: auto;

  background: linear-gradient(135deg,
      rgba(18, 30, 58, 0.98) 0%,
      rgba(28, 40, 72, 0.98) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    6px 0 36px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(212, 168, 75, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  border-radius: 0 10px 10px 0;
  border-left: 2px solid rgba(212, 168, 75, 0.5);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 10000;
  padding: 8px 0;
  list-style: none;
}

/* Show submenu on hover AND .is-open */
.spine-nav .dropdown-menu li:hover>.dropdown-submenu,
.spine-nav .dropdown-menu li.is-open>.dropdown-submenu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

/* Level 3 Links */
.spine-nav .dropdown-submenu a {
  display: block;
  padding: 9px 18px;
  font-size: 12.5px;
  font-weight: 400;
  color: rgba(220, 210, 190, 0.78);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, padding-left 0.15s;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  text-decoration: none;
  list-style: none;
}

.spine-nav .dropdown-submenu a:hover {
  color: #e8c87a;
  background: rgba(212, 168, 75, 0.09);
  padding-left: 24px;
}



/* === BOOK GRID & SHELF SCROLL RESPONSIVENESS === */
/* ---- Book grid / shelf-tilt cards ---- */
.shelf-scroll {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding-bottom: 14px;
  scroll-snap-type: x mandatory;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}

@media (max-width: 1080px) {
  .book-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .book-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}



/* === FAQ, CONTACT US PAGE, SIDEBAR CARDS & CUSTOM MAP === */

.faq-item.emerald:hover .faq-title {
  color: var(--emerald);
}

.faq-item.coral:hover .faq-title {
  color: var(--coral);
}

.faq-item.blue:hover .faq-title {
  color: #4E6FA8;
}

.faq-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--paper-dim);
  color: var(--ink);
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
    background-color 0.25s ease,
    color 0.25s ease;
}

.faq-icon svg {
  width: 16px;
  height: 16px;
}

.faq-item:hover .faq-icon {
  background: var(--line);
}

.faq-item[open] .faq-icon {
  transform: rotate(180deg);
  background: var(--ink);
  color: var(--white);
}

.faq-answer {
  padding: 0 28px 24px;
  color: var(--charcoal);
  font-size: 14.5px;
  line-height: 1.6;
}

/* Accordion Animation Scale Up */
.faq-item[open] .faq-answer {
  animation: faqScaleIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes faqScaleIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.99);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ---- Modern Contact Page Additions (Form, Cards, Sidebar & Map) ---- */

/* Page Hero Glow Overlay */
.page-hero::after {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(232, 163, 61, 0.09) 0%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: flex-start;
}

@media (max-width: 991px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.contact-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 36px;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 0.3s ease;
}

.contact-card:hover {
  box-shadow: var(--shadow-lift);
  border-color: rgba(22, 33, 61, 0.12);
}

.form-group {
  margin-bottom: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--charcoal);
  font-size: 14.5px;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  outline: none;
}

.form-control:focus {
  border-color: var(--gold-deep);
  background: var(--white);
  box-shadow: 0 4px 14px rgba(232, 163, 61, 0.12);
}

/* Custom select styling */
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2316213D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4 6 8 10 12 6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 14px;
  padding-right: 40px;
  cursor: pointer;
}

textarea.form-control {
  resize: vertical;
  min-height: 128px;
  line-height: 1.5;
}

/* ---- Sidebar Contact Cards ---- */
.contact-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.support-deflection-card {
  background: linear-gradient(135deg, rgba(232, 163, 61, 0.04) 0%, rgba(232, 163, 61, 0.08) 100%);
  border: 1px dashed var(--gold);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.deflection-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.deflection-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--white);
}

.deflection-text h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
  margin-top: 0;
}

.deflection-text p {
  font-size: 13px;
  color: #6b6558;
  line-height: 1.5;
  margin-bottom: 14px;
}

.direct-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.direct-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--badge-color, var(--gold));
  transition: width 0.25s ease;
}

.direct-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  border-color: rgba(22, 33, 61, 0.12);
}

.direct-card:hover::before {
  width: 4px;
}

.direct-card.gold {
  --badge-color: var(--gold-deep);
}

.direct-card.emerald {
  --badge-color: var(--emerald);
}

.direct-card.coral {
  --badge-color: var(--coral);
}

.direct-card.blue {
  --badge-color: #4E6FA8;
}

.contact-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--icon-bg, var(--paper-dim));
  color: var(--icon-color, var(--ink));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.direct-card:hover .contact-icon-wrapper {
  transform: scale(1.1);
}

.direct-card.gold .contact-icon-wrapper {
  --icon-bg: rgba(199, 127, 31, 0.1);
  --icon-color: var(--gold-deep);
}

.direct-card.emerald .contact-icon-wrapper {
  --icon-bg: rgba(47, 107, 79, 0.1);
  --icon-color: var(--emerald);
}

.direct-card.coral .contact-icon-wrapper {
  --icon-bg: rgba(226, 80, 63, 0.1);
  --icon-color: var(--coral);
}

.direct-card.blue .contact-icon-wrapper {
  --icon-bg: rgba(78, 111, 168, 0.1);
  --icon-color: #4E6FA8;
}

.direct-title {
  font-weight: 700;
  color: var(--ink);
  font-size: 15px;
}

.direct-value {
  font-size: 13.5px;
  color: #6b6558;
  margin-top: 4px;
  line-height: 1.4;
}

/* ---- Modern Map Container ---- */
.map-card-wrapper {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  position: relative;
}

.map-placeholder-bg {
  height: 200px;
  background: radial-gradient(circle at 80% 30%, rgba(232, 163, 61, 0.08) 0%, transparent 60%),
    linear-gradient(135deg, var(--paper-dim) 25%, transparent 25%) -10px 0/20px 20px,
    linear-gradient(225deg, var(--paper-dim) 25%, transparent 25%) -10px 0/20px 20px,
    linear-gradient(315deg, var(--paper-dim) 25%, transparent 25%) 0 0/20px 20px,
    linear-gradient(45deg, var(--paper-dim) 25%, var(--white) 25%) 0 0/20px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Glass panel overlay on Map */
.map-glass-panel {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 8px 32px rgba(22, 33, 61, 0.08);
}

.map-location-info {
  display: flex;
  flex-direction: column;
}

.map-location-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
}

.map-location-sub {
  font-size: 11px;
  color: #6b6558;
  margin-top: 2px;
}

.map-directions-btn {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gold-deep);
  border-bottom: 1.5px solid var(--gold);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
  text-decoration: none;
}

.map-directions-btn:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* ---- FAQ Search Bar & No Results ---- */
.faq-search-wrapper {
  position: relative;
  margin-bottom: 24px;
  width: 100%;
}

.faq-search-wrapper input {
  width: 100%;
  padding: 14px 16px 14px 46px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--charcoal);
  font-size: 14.5px;
  outline: none;
  transition: all 0.25s ease;
}

.faq-search-wrapper input:focus {
  border-color: var(--gold-deep);
  box-shadow: 0 4px 14px rgba(232, 163, 61, 0.08);
}

.faq-search-wrapper .faq-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #8e8778;
  pointer-events: none;
}

.faq-search-wrapper .faq-search-clear {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  font-size: 20px;
  color: #8e8778;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.faq-search-wrapper .faq-search-clear:hover {
  color: var(--ink);
}

.faq-no-results-card {
  text-align: center;
  padding: 48px 24px;
  background: var(--white);
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  color: var(--charcoal);
  box-shadow: var(--shadow-card);
}

.faq-no-results-card svg {
  width: 44px;
  height: 44px;
  stroke: #8e8778;
  margin-bottom: 16px;
}

.faq-no-results-card h4 {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 6px;
  margin-top: 0;
}

.faq-no-results-card p {
  font-size: 13.5px;
  color: #6b6558;
  max-width: 340px;
  margin: 0 auto 16px;
  line-height: 1.5;
}



/* === CAREERS PAGE CULTURE CARDS & JOB FILTERINGS === */
/* ---- Modern Careers Page Additions ---- */

/* Culture Cards */
.culture-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 1024px) {
  .culture-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .culture-grid {
    grid-template-columns: 1fr;
  }
}

.culture-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  box-shadow: var(--shadow-card);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.culture-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gold);
  transition: height 0.25s ease;
}

.culture-card.gold::after {
  background: var(--gold);
}

.culture-card.emerald::after {
  background: var(--emerald);
}

.culture-card.coral::after {
  background: var(--coral);
}

.culture-card.blue::after {
  background: #7C9FD9;
}

.culture-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
  border-color: rgba(22, 33, 61, 0.12);
}

.culture-card:hover::after {
  height: 8px;
}

.culture-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--paper-dim);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.culture-card-icon svg {
  width: 24px;
  height: 24px;
}

.culture-card.gold .culture-card-icon {
  background: rgba(232, 163, 61, 0.08);
  color: var(--gold);
}

.culture-card.emerald .culture-card-icon {
  background: rgba(47, 107, 79, 0.08);
  color: var(--emerald);
}

.culture-card.coral .culture-card-icon {
  background: rgba(226, 80, 63, 0.08);
  color: var(--coral);
}

.culture-card.blue .culture-card-icon {
  background: rgba(124, 159, 217, 0.08);
  color: #7C9FD9;
}

.culture-card-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}

.culture-card-text {
  font-size: 13.5px;
  color: #6b6558;
  line-height: 1.55;
}

/* Stats Counter Row */
.stats-card-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 36px;
  box-shadow: var(--shadow-card);
}

@media (max-width: 768px) {
  .stats-card-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

.stat-block {
  text-align: center;
  border-right: 1px solid var(--line);
}

.stat-block:last-child {
  border-right: none;
}

@media (max-width: 768px) {
  .stat-block:nth-child(2) {
    border-right: none;
  }
}

.stat-block b {
  font-family: var(--font-display);
  font-size: 44px;
  color: var(--ink);
  display: block;
  line-height: 1.1;
  margin-bottom: 4px;
}

.stat-block span {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8e8778;
}

/* Job Openings Filtering & Cards */
.jobs-filter-bar {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 32px;
}

@media (max-width: 900px) {
  .jobs-filter-bar {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.jobs-search-wrapper {
  position: relative;
}

.jobs-search-wrapper input {
  width: 100%;
  padding: 13px 16px 13px 44px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--charcoal);
  font-size: 14.5px;
  outline: none;
  transition: all 0.25s ease;
}

.jobs-search-wrapper input:focus {
  border-color: var(--gold-deep);
  box-shadow: 0 4px 12px rgba(232, 163, 61, 0.06);
}

.jobs-search-wrapper svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #8e8778;
  pointer-events: none;
}

.jobs-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  justify-content: flex-end;
}

@media (max-width: 900px) {
  .jobs-tabs {
    justify-content: flex-start;
  }
}

.jobs-tabs::-webkit-scrollbar {
  display: none;
}

.jobs-tab-btn {
  padding: 10px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--charcoal);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.jobs-tab-btn:hover {
  background: var(--paper-dim);
  border-color: rgba(22, 33, 61, 0.12);
}

.jobs-tab-btn.active {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

.job-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.job-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  overflow: hidden;
}

@media (max-width: 768px) {
  .job-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 24px;
  }
}

.job-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--gold);
  transition: width 0.25s ease;
}

.job-card.gold::before {
  background: var(--gold-deep);
}

.job-card.emerald::before {
  background: var(--emerald);
}

.job-card.coral::before {
  background: var(--coral);
}

.job-card.blue::before {
  background: #4E6FA8;
}

.job-card.purple::before {
  background: #8A5FA8;
}

.job-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  border-color: rgba(22, 33, 61, 0.12);
}

.job-card:hover::before {
  width: 4px;
}

.job-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--paper-dim);
  color: var(--gold-deep);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.job-card.gold .job-avatar {
  background: rgba(199, 127, 31, 0.08);
  color: var(--gold-deep);
}

.job-card.emerald .job-avatar {
  background: rgba(47, 107, 79, 0.08);
  color: var(--emerald);
}

.job-card.coral .job-avatar {
  background: rgba(226, 80, 63, 0.08);
  color: var(--coral);
}

.job-card.blue .job-avatar {
  background: rgba(78, 111, 168, 0.08);
  color: #4E6FA8;
}

.job-card.purple .job-avatar {
  background: rgba(138, 95, 168, 0.08);
  color: #8A5FA8;
}

.job-meta-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  font-size: 17px;
  transition: color 0.25s ease;
}

.job-card.gold:hover .job-meta-title {
  color: var(--gold-deep);
}

.job-card.emerald:hover .job-meta-title {
  color: var(--emerald);
}

.job-card.coral:hover .job-meta-title {
  color: var(--coral);
}

.job-card.blue:hover .job-meta-title {
  color: #4E6FA8;
}

.job-card.purple:hover .job-meta-title {
  color: #8A5FA8;
}

.job-meta-details {
  font-size: 12.5px;
  color: #8e8778;
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.job-meta-details span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
}

.job-actions-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

@media (max-width: 768px) {
  .job-actions-row {
    width: 100%;
    justify-content: space-between;
  }
}

.job-card .btn-outline {
  transition: all 0.25s ease;
}

.job-card.gold:hover .btn-outline {
  background: var(--gold-deep);
  color: var(--white);
  border-color: var(--gold-deep);
}

.job-card.emerald:hover .btn-outline {
  background: var(--emerald);
  color: var(--white);
  border-color: var(--emerald);
}

.job-card.coral:hover .btn-outline {
  background: var(--coral);
  color: var(--white);
  border-color: var(--coral);
}

.job-card.blue:hover .btn-outline {
  background: #4E6FA8;
  color: var(--white);
  border-color: #4E6FA8;
}

.job-card.purple:hover .btn-outline {
  background: #8A5FA8;
  color: var(--white);
  border-color: #8A5FA8;
}

.no-jobs-card {
  text-align: center;
  padding: 48px 24px;
  background: var(--white);
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  display: none;
}

.no-jobs-card svg {
  width: 44px;
  height: 44px;
  stroke: #8e8778;
  margin-bottom: 16px;
}

.no-jobs-card h4 {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 6px;
  margin-top: 0;
}

.no-jobs-card p {
  font-size: 13.5px;
  color: #6b6558;
  max-width: 340px;
  margin: 0 auto 16px;
}

/* ---- Category Tiles with Background Image ---- */
.cat-tile.has-image {
  background-size: cover;
  background-position: center;
  border-color: rgba(22, 33, 61, 0.08);
}

.cat-tile.has-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(22, 33, 61, 0.25) 0%, rgba(22, 33, 61, 0.8) 100%);
  z-index: 0;
  transition: opacity 0.3s ease;
}

.cat-tile.has-image:hover::before {
  background: linear-gradient(180deg, rgba(22, 33, 61, 0.15) 0%, rgba(22, 33, 61, 0.75) 100%);
}

.cat-tile.has-image .cat-header,
.cat-tile.has-image .cat-content,
.cat-tile.has-image .cat-footer {
  position: relative;
  z-index: 1;
}

.cat-tile.has-image .cat-name {
  color: var(--white);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  transition: color 0.25s ease;
}

.cat-tile.has-image .cat-subs {
  color: rgba(255, 255, 255, 0.72);
}

.cat-tile.has-image .cat-count {
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-mono);
  font-size: 11px;
}

.cat-tile.has-image .cat-icon {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.cat-tile.has-image:hover .cat-icon {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.06);
}

.cat-tile.has-image .cat-action {
  color: rgba(255, 255, 255, 0.95);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cat-tile.has-image:hover .cat-action {
  color: var(--gold);
}

/* ---- Header Page Navigation Links ---- */
.header-nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-right: 12px;
}

.header-nav-links a {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.25s ease;
  position: relative;
  padding: 6px 0;
}

.header-nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold-deep);
  transition: width 0.25s ease;
}

.header-nav-links a:hover {
  color: var(--gold-deep);
}

.header-nav-links a:hover::after {
  width: 100%;
}

.header-nav-links a.active {
  color: var(--gold-deep);
}


/* === AUTH CONTAINER PAGES (SIGN IN / SIGN UP) === */
.header-nav-links a.active::after {
  width: 100%;
}

@media (max-width: 1024px) {
  .header-nav-links {
    display: none;
  }
}

/* ---- Toast Notification ---- */
.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--ink);
  color: var(--white);
  padding: 14px 24px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(22, 33, 61, 0.2);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  border-left: 4px solid var(--gold);
  pointer-events: none;
}

.toast-notification.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-notification svg {
  width: 16px;
  height: 16px;
  stroke: var(--gold);
}

/* ---- Auth Pages (SignIn / SignUp) ---- */
.auth-page {
  min-height: 100vh;
  display: flex;
  background: var(--paper);
}

.auth-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

@media (max-width: 900px) {
  .auth-container {
    flex-direction: column;
  }

  .auth-sidebar {
    display: none;
  }
}

/* Left Sidebar - Visual branding & Carousel */
.auth-sidebar {
  width: 50%;
  flex-shrink: 0;
  background: var(--ink);
  color: var(--white);
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 10% 10%, rgba(232, 163, 61, 0.06) 0%, transparent 60%),
    radial-gradient(circle at 90% 90%, rgba(47, 107, 79, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.auth-logo {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
  z-index: 2;
}

.auth-logo .dot,
.auth-logo .logo-accent {
  color: var(--gold);
  width: auto !important;
  height: auto !important;
  border-radius: 0 !important;
  display: inline !important;
}

.auth-sidebar-content {
  z-index: 2;
  max-width: 440px;
  margin: auto 0;
}

.auth-quote {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.3;
  font-style: italic;
  font-weight: 300;
  color: var(--white);
  margin-bottom: 24px;
}

.auth-quote-author {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
}

.auth-sidebar-footer {
  z-index: 2;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}

.auth-content {
  width: 50%;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  background: var(--paper);
}

@media (max-width: 900px) {
  .auth-content {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .auth-content {
    padding: 40px 20px;
  }
}

.auth-form-card {
  width: 100%;
  max-width: 420px;
  animation: authFadeUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes authFadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-form-card h2 {
  font-size: clamp(26px, 3vw, 32px);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
  margin-top: 0;
}

.auth-form-card p.subtitle {
  color: #6b6558;
  font-size: 14.5px;
  margin-bottom: 32px;
  margin-top: 0;
}

/* Social Login buttons */
.social-login-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

.social-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 4px rgba(22, 33, 61, 0.02);
}

.social-login-btn:hover {
  background: var(--paper-dim);
  border-color: rgba(22, 33, 61, 0.12);
  transform: translateY(-2px);
}

.social-login-btn svg {
  width: 16px;
  height: 16px;
}

/* Divider line */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: #8e8778;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 28px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1.5px solid var(--line);
}

.auth-divider:not(:empty)::before {
  margin-right: 16px;
}

.auth-divider:not(:empty)::after {
  margin-left: 16px;
}

/* Password input positioning */
.password-input-wrapper {
  position: relative;
}

.password-input-wrapper input {
  padding-right: 48px;
}

.password-toggle-btn {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  color: #8e8778;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-toggle-btn:hover {
  color: var(--ink);
}

.password-toggle-btn svg {
  width: 18px;
  height: 18px;
}

/* Form footer controls */
.form-footer-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  margin-bottom: 24px;
}

.remember-me-group {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.remember-me-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--gold-deep);
  cursor: pointer;
}

.forgot-password-link {
  color: var(--gold-deep);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.forgot-password-link:hover {
  color: var(--ink);
}

.auth-footer-link {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  color: #6b6558;
}

.auth-footer-link a {
  color: var(--gold-deep);
  font-weight: 700;
  text-decoration: none;
}

.auth-footer-link a:hover {
  color: var(--ink);
}

/* ---- Floating labels optimization ---- */
.floating-group {
  position: relative;
  margin-bottom: 20px !important;
}

.floating-group .form-control {
  padding: 20px 16px 6px !important;
  height: 54px !important;
}

.floating-group .floating-label {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #8e8778;
  font-size: 14px;
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  margin: 0;
  line-height: 1;
}

.floating-group .form-control:focus~.floating-label,
.floating-group .form-control:not(:placeholder-shown)~.floating-label {
  top: 14px;
  font-size: 10px;
  color: var(--gold-deep);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Password eye positioning override for floating labels */
.floating-group .password-toggle-btn,
.floating-group .password-toggle-btn-confirm {
  top: 50% !important;
  transform: translateY(-50%) !important;
}

/* Password Strength Meter */
.password-strength-meter {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.password-strength-meter .meter-bar {
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}

.password-strength-meter .meter-fill {
  height: 100%;
  width: 0;
  background: transparent;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.password-strength-meter .meter-text {
  font-size: 10px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  color: #8e8778;
  letter-spacing: 0.06em;
  font-weight: 700;
  transition: color 0.3s ease;
}

/* Dynamic cross-fade quote animation styling */
.auth-quote-wrapper {
  position: relative;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-quote-item {
  opacity: 0;
  position: absolute;
  left: 0;
  right: 0;
  transition: opacity 0.6s ease-in-out;
  pointer-events: none;
}

.auth-quote-item.active {
  opacity: 1;
  position: relative;
  pointer-events: auto;
}



/* === APPENDED STYLES FOR CATEGORY SECTION ICONS === */
.cat-tile .cat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.cat-tile .cat-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper-dim);
  color: var(--ink);
  transition: all 0.3s ease;
}

/* Give each icon circle a soft matching background color of its spine dot on hover */
.cat-tile:nth-child(1):hover .cat-icon {
  background: rgba(232, 163, 61, 0.15);
  color: var(--gold-deep);
}

.cat-tile:nth-child(2):hover .cat-icon {
  background: rgba(47, 107, 79, 0.15);
  color: var(--emerald);
}

.cat-tile:nth-child(3):hover .cat-icon {
  background: rgba(226, 80, 63, 0.15);
  color: var(--coral);
}

.cat-tile:nth-child(4):hover .cat-icon {
  background: rgba(124, 159, 217, 0.15);
  color: #4E6FA8;
}

.cat-tile:nth-child(5):hover .cat-icon {
  background: rgba(185, 140, 217, 0.15);
  color: #8A5FA8;
}

.cat-tile:nth-child(6):hover .cat-icon {
  background: rgba(217, 194, 124, 0.15);
  color: var(--gold-deep);
}

.cat-tile:nth-child(7):hover .cat-icon {
  background: rgba(47, 107, 79, 0.15);
  color: var(--emerald);
}

.cat-tile:nth-child(8):hover .cat-icon {
  background: rgba(226, 80, 63, 0.15);
  color: var(--coral);
}

.cat-tile .cat-icon svg {
  width: 18px;
  height: 18px;
}

.cat-tile .cat-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #9b9384;
  font-weight: 600;
}

/* Content layout */


/* === APPENDED STYLES FOR PUBLISHERS SECTION === */
.pub-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

@media (max-width: 900px) {
  .pub-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

.pub-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px 16px;
  text-align: center;
  transition: transform .2s, box-shadow .2s;
}

.pub-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.pub-mark {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--white);
  font-size: 18px;
}

.pub-card .name {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--ink);
}

.pub-card .meta {
  font-size: 11px;
  color: #8a8375;
  margin-top: 2px;
}



/* === APPENDED STYLES FOR SOCIAL MEDIA ICONS IN FOOTER === */
.social-row {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.social-row a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-row a:hover {
  border-color: var(--gold);
  background: rgba(232, 163, 61, 0.1);
}

.social-row svg {
  width: 16px;
  height: 16px;
}



/* === APPENDED STYLES FOR MAGAZINES SECTION TEXT CONTRAST === */
.mag-section {
  background-color: var(--parchment-2) !important;
  background-image:
    linear-gradient(rgba(236, 229, 210, 0.93) 0%, rgba(245, 239, 224, 0.95) 100%),
    url('../../images/magazine_book.jpg') !important;
  background-size: 600px 600px !important;
  background-repeat: repeat !important;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.mag-section .eyebrow {
  color: var(--rust);
}

.mag-section .eyebrow::before {
  background: var(--rust);
}

.mag-section h2 {
  color: var(--ink);
}

.mag-section .view-all {
  color: var(--ink) !important;
  border-bottom: 2px solid var(--rust) !important;
}

.mag-section .view-all:hover {
  color: var(--rust) !important;
  border-color: var(--gold) !important;
}



/* =========================================================
   3D HERO BOOK SHOWCASE & INFINITE PAGE FLIP STYLES
   ========================================================= */

/* Hero 3D Book Container */
.hero-3d-book-container {
  perspective: 1500px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 420px;
  width: 100%;
}

.hero-3d-book {
  width: 260px;
  height: 380px;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateY(-15deg) rotateX(10deg);
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 20px 20px 30px rgba(0, 0, 0, 0.4);
}

.hero-3d-book:hover {
  transform: rotateY(-30deg) rotateX(5deg) scale(1.05);
}

.hero-3d-book-cover {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #3d2a20;
  /* Dark rich leather */
  background-image: url('../../images/art_of_f.png');
  background-size: 85% auto;
  background-repeat: no-repeat;
  background-position: center 90px;
  border-radius: 4px 12px 12px 4px;
  border: 6px solid #A68037;
  /* Gold foil border */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 30px 20px;
  color: var(--white);
  backface-visibility: hidden;
  z-index: 2;
  transform: translateZ(1px);
}

.hero-3d-book-cover h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 700;
  color: #A68037;
  /* Gold title */
  margin: 0;
  text-align: center;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1.5px solid rgba(166, 128, 55, 0.3);
  padding-bottom: 8px;
  width: 100%;
}

.hero-3d-book-cover p {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-3d-book-spine {
  position: absolute;
  width: 30px;
  height: 100%;
  background: linear-gradient(90deg, #2b1d16, #3d2a20 60%, #2b1d16);
  left: -15px;
  transform: rotateY(-90deg) translateZ(0);
  border-radius: 4px 0 0 4px;
}

.hero-3d-book-pages {
  position: absolute;
  width: calc(100% - 10px);
  height: calc(100% - 12px);
  background: #f4efdf;
  /* Aged paper color */
  right: 5px;
  top: 6px;
  transform: translateZ(-20px);
  border-radius: 0 8px 8px 0;
  box-shadow: 5px 0 10px rgba(0, 0, 0, 0.1) inset;
  border-right: 3px solid rgba(0, 0, 0, 0.15);
}

/* Infinite Flip Section */
.infinite-flip-section {
  background: var(--parchment-2);
  padding: 80px 0;
  border-top: 1px solid rgba(22, 33, 61, 0.05);
  border-bottom: 1px solid rgba(22, 33, 61, 0.05);
}

/* Book Spine — Left panel: shows the LEFT half of book_without alpona.jpg */
.book-spine {
  position: absolute;
  left: 0;
  top: 0;
  width: 50%;
  height: 100%;
  /* Seamlessly show left half of the full book image */
  background-image: url('../../images/book_without alpona.jpg');
  background-size: 200% 100%;
  background-position: left center;
  border-radius: 6px 0 0 6px;
  box-shadow:
    inset -10px 0 22px rgba(60, 30, 5, 0.45),
    inset 4px 0 10px rgba(255, 220, 140, 0.15);
  z-index: 0;
  pointer-events: none;
}

.flip-book-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px 0;
  perspective: 2000px;
  position: relative;
}

.flip-book {
  width: 230px;
  height: 330px;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(5deg) rotateY(-5deg) translateX(-20px);
  transition: transform 1.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 5px;
  cursor: pointer;
}

.flip-book.book-opened {
  transform: rotateX(5deg) rotateY(0deg) translateX(35px);
}

/* Right page stack underlay when book is open */
.flip-book::after {
  content: '';
  position: absolute;
  width: 100%;
  height: calc(100% - 6px);
  right: -5px;
  top: 3px;
  background: repeating-linear-gradient(90deg, #F5EECA, #F5EECA 2px, #d2c08c 3px, #FAF4D3 4px);
  border-radius: 0 3px 3px 0;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15);
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.flip-book.book-opened::after {
  opacity: 1;
  visibility: visible;
}

/* Left page stack underlay when book is open */
.flip-book::before {
  content: '';
  position: absolute;
  width: 100%;
  height: calc(100% - 6px);
  left: calc(-100% - 5px);
  top: 3px;
  background: repeating-linear-gradient(-90deg, #F5EECA, #F5EECA 2px, #d2c08c 3px, #FAF4D3 4px);
  border-radius: 3px 0 0 3px;
  box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.15);
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.flip-book.book-opened::before {
  opacity: 1;
  visibility: visible;
}

.flip-page {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  right: 0;
  transform-origin: left center;
  transform-style: preserve-3d;
  transition: transform 1.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 3px 0 15px rgba(0, 0, 0, 0.08);
  border-radius: 0 5px 5px 0;
}

.page-side,
.cover-side {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-sizing: border-box;
}

.page-side {
  background-color: #FAF4D3;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-left: 1px solid rgba(139, 30, 15, 0.12);
  color: #2A1A10;
  box-shadow: inset 4px 0 10px rgba(139, 30, 15, 0.05);
}

/* Double vermilion margin lines on left & right of page sides */
.page-side::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 6px;
  width: 2px;
  border-left: 1px solid rgba(139, 30, 15, 0.25);
  border-right: 1px solid rgba(139, 30, 15, 0.25);
  pointer-events: none;
}

.page-side::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  right: 6px;
  width: 2px;
  border-left: 1px solid rgba(139, 30, 15, 0.25);
  border-right: 1px solid rgba(139, 30, 15, 0.25);
  pointer-events: none;
}

.page-front {
  z-index: 2;
  transform: rotateY(0deg);
}

.page-back {
  transform: rotateY(180deg);
  background-color: #F5EECA;
  box-shadow: inset -4px 0 10px rgba(139, 30, 15, 0.05);
  border-radius: 5px 0 0 5px;
}

/* Covers */
.front-cover {
  width: 100%;
  height: 100%;
  transform-origin: left center;
  transform-style: preserve-3d;
  z-index: 10;
  border-radius: 0 5px 5px 0;
  transition: transform 1.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: transparent;
  box-shadow: none;
  border: none;
}

.flip-book.book-opened .front-cover {
  transform: rotateY(-180deg);
  z-index: 1;
}

/* Outside Front Cover Face */
.cover-front-side {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 2;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: rotateY(0deg);
  background: #62110b;
  color: #f5ebd2;
  border: 1px solid rgba(216, 194, 146, 0.45);
  border-left: 5px solid #360704;
  border-radius: 0 5px 5px 0;
  box-shadow:
    inset -6px 0 16px rgba(0, 0, 0, 0.4),
    8px 12px 28px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  box-sizing: border-box;
}

/* Inside Back Cover Face (Parchment Chapter Page on Back of Cover) */
.cover-back-side {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: rotateY(180deg);
  background-color: #FAF4D3;
  border-radius: 5px 0 0 5px;
  box-shadow: inset -4px 0 10px rgba(139, 30, 15, 0.05);
}

.back-cover {
  width: 100%;
  height: 100%;
  left: -100%;
  background-color: #360704;
  border: 1px solid rgba(216, 194, 146, 0.3);
  border-radius: 5px 0 0 5px;
  z-index: 1;
  box-shadow: -6px 8px 24px rgba(0, 0, 0, 0.35);
  transform: translateZ(-2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.flip-book.book-opened .back-cover {
  opacity: 1;
  visibility: visible;
}

.cover-design {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  height: 100%;
  border: 1.5px dashed #d8c292;
  background: transparent;
  padding: 24px 14px;
  box-sizing: border-box;
  border-radius: 2px;
}

.cover-logo-mark {
  width: 44px;
  height: 44px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin-bottom: 20px;
  opacity: 0.3;
}

.cover-design h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 700;
  color: #f5ebd2;
  margin: 0 0 6px 0;
  text-transform: uppercase;
  letter-spacing: 3px;
  line-height: 1.1;
}

.cover-design .sub {
  font-family: 'Lora', serif;
  font-size: 12px;
  font-style: italic;
  color: #d8c292;
  opacity: 0.95;
  letter-spacing: 0.5px;
  margin-bottom: 26px;
  display: block;
}

.cover-design .instruction {
  font-family: 'Cormorant Garamond', serif;
  font-size: 10px;
  font-weight: 700;
  color: #f5ebd2;
  letter-spacing: 2px;
  text-transform: uppercase;
  border: 1.5px solid #d8c292;
  padding: 6px 16px;
  border-radius: 3px;
  background: transparent;
  display: inline-block;
}

/* Page Content & Chapter UI */
.page-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.page-art {
  width: 100%;
  height: 38px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.25;
  margin-bottom: 4px;
  flex-shrink: 0;
}

.page-header {
  font-family: 'Cormorant Garamond', serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #8B1E0F;
  border-bottom: 1px solid rgba(139, 30, 15, 0.18);
  padding-bottom: 3px;
  letter-spacing: 1.2px;
  text-align: center;
  margin-bottom: 4px;
}

.page-text {
  font-family: 'Lora', serif;
  font-size: 9px;
  line-height: 1.55;
  color: #2A1A10;
  margin: 4px 6px;
  font-style: italic;
}

.page-text::first-letter {
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  font-weight: bold;
  color: #8B1E0F;
  float: left;
  margin-right: 3px;
  line-height: 1;
}

.page-footer {
  font-family: 'Space Mono', monospace;
  font-size: 7.5px;
  color: #8B1E0F;
  opacity: 0.85;
  text-align: center;
  border-top: 1px solid rgba(139, 30, 15, 0.12);
  padding-top: 3px;
}

.page-node.flipped {
  transform: rotateY(-180deg);
}

.page-node {
  opacity: 0;
  visibility: hidden;
  transition: transform 1.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.8s ease, visibility 0.8s ease;
}

.flip-book.book-opened .page-node {
  opacity: 1;
  visibility: visible;
}

#page-1 {
  z-index: 9;
}

#page-2 {
  z-index: 8;
}

#page-3 {
  z-index: 7;
}

#page-4 {
  z-index: 6;
}

#page-1.flipped {
  z-index: 2;
}

#page-2.flipped {
  z-index: 3;
}

#page-3.flipped {
  z-index: 4;
}

#page-4.flipped {
  z-index: 5;
}

/* === SECTION BACKGROUND CUSTOMIZATIONS === */
#bestsellers,
.about-page-main,
.about-page-main section,
.career-page-main,
.career-page-main section,
.contact-page-main,
.contact-page-main section {
  background-image: linear-gradient(rgba(245, 239, 224, 0.94), rgba(245, 239, 224, 0.94)), url('../../images/alpona_book_pattern.jpg') !important;
  background-blend-mode: multiply !important;
  background-size: 600px 600px !important;
  background-repeat: repeat !important;
}

/* === UNIFIED ABOUT, CAREER & CONTACT PAGE THEMING === */
.about-page-main h1,
.career-page-main h1,
.contact-page-main h1 {
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-size: 42px;
  font-weight: 700;
  color: var(--ink, #2A1F18);
  line-height: 1.15;
  margin: 16px 0;
}

.about-page-main h2,
.career-page-main h2,
.contact-page-main h2 {
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-size: 40px;
  font-weight: 700;
  color: var(--ink, #2A1F18);
  line-height: 1.15;
  margin-top: 12px;
  letter-spacing: 0.3px;
}

.about-page-main h3,
.career-page-main h3,
.contact-page-main h3,
.career-page-main .job-meta-title,
.career-page-main .culture-card-title {
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--ink, #2A1F18);
  line-height: 1.2;
}

.about-page-main .eyebrow,
.career-page-main .eyebrow,
.contact-page-main .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body, 'Lora', serif);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--rust, #7D4F3F);
}

.about-page-main .eyebrow::before,
.career-page-main .eyebrow::before,
.contact-page-main .eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--gold, #C4A24B);
}

.about-page-main p,
.about-page-main li,
.career-page-main p,
.career-page-main li,
.career-page-main .culture-card-text,
.career-page-main .job-meta-details span {
  color: var(--ink);
  font-family: var(--font-body);
}

.about-page-main .lead,
.about-page-main .breadcrumb,
.career-page-main .lead,
.career-page-main .breadcrumb {
  color: var(--ink-soft);
}

.jobs-filter-bar,
.faq-search-wrapper {
  background-image: linear-gradient(rgba(255, 252, 245, 0.94), rgba(245, 238, 220, 0.94)), url('../../images/alpona_book_pattern.jpg') !important;
  background-blend-mode: multiply !important;
  background-size: 500px 500px !important;
  border: 1px solid var(--line) !important;
  box-shadow: var(--shadow-card);
}

.faq-cat-btn {
  background: rgba(255, 252, 245, 0.85);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
  cursor: pointer;
}

.faq-cat-btn:hover,
.faq-cat-btn.active {
  background: var(--rust) !important;
  color: var(--white) !important;
  border-color: var(--rust) !important;
}

.faq-item {
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, border-color 0.3s ease;
  overflow: hidden;
}

.faq-item:hover {
  transform: translateY(-2px);
  border-color: var(--gold) !important;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 30px 0;
}

@media (max-width: 991px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  position: relative;
  background-image: linear-gradient(rgba(245, 239, 224, 0.94), rgba(245, 239, 224, 0.94)), url('../../images/alpona_book_pattern.jpg') !important;
  background-blend-mode: multiply !important;
  background-size: 600px 600px !important;
  background-repeat: repeat !important;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, border-color 0.3s ease;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
}

.stat-card .number {
  display: block;
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 700;
  color: var(--rust);
  line-height: 1.1;
  margin-bottom: 6px;
}

.stat-card .label {
  display: block;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* About Glass Card */
.about-glass-card {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-image: linear-gradient(rgba(245, 239, 224, 0.94), rgba(245, 239, 224, 0.94)), url('../../images/alpona_book_pattern.jpg') !important;
  background-blend-mode: multiply !important;
  background-size: 600px 600px !important;
  background-repeat: repeat !important;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
}

.about-glass-card h3 {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
}

.about-glass-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.about-glass-card li {
  display: flex;
  gap: 0.8rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.about-glass-card .num {
  color: var(--rust);
  font-weight: bold;
}

/* Philosophy Quote Card */
.philosophy-quote-section {
  padding: 4rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.philosophy-quote-card {
  background-image: linear-gradient(rgba(245, 239, 224, 0.94), rgba(245, 239, 224, 0.94)), url('../../images/alpona_book_pattern.jpg') !important;
  background-blend-mode: multiply !important;
  background-size: 600px 600px !important;
  background-repeat: repeat !important;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 3.5rem 2.5rem;
  box-shadow: var(--shadow-card);
  max-width: 850px;
  margin: 0 auto;
}

.philosophy-quote-card .quote-icon {
  font-size: 36px;
  color: var(--gold);
  opacity: 0.7;
  margin-bottom: 1rem;
  display: block;
}

.philosophy-quote-card h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  color: var(--rust);
  margin-bottom: 1.5rem;
  line-height: 1.35;
  font-style: italic;
  font-weight: 600;
}

.philosophy-quote-card .author {
  color: var(--ink-soft);
  font-size: 1.1rem;
  letter-spacing: 1px;
  font-weight: 600;
  text-transform: uppercase;
  margin: 0;
}

#new-arrivals {
  background-image: linear-gradient(rgba(245, 239, 224, 0.94), rgba(245, 239, 224, 0.94)), url('../../images/alpona_book_pattern.jpg') !important;
  background-blend-mode: multiply !important;
  background-size: 600px 600px !important;
  background-repeat: repeat !important;
}

#top-publishers {
  background-image: linear-gradient(rgba(245, 239, 224, 0.94), rgba(245, 239, 224, 0.94)), url('../../images/alpona_book_pattern.jpg') !important;
  background-blend-mode: multiply !important;
  background-size: 600px 600px !important;
  background-repeat: repeat !important;
}

/* =========================================================
   FAQ STYLES RESTORED FROM STYLE.CSS
   ========================================================= */
/* ---- Advanced Split FAQ Section ---- */
.faq-section-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 60px;
  align-items: flex-start;
}

@media (max-width: 991px) {
  .faq-section-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.faq-intro-sidebar {
  position: sticky;
  top: 40px;
}

@media (max-width: 991px) {
  .faq-intro-sidebar {
    position: static;
  }
}

.faq-intro-sidebar h2 {
  font-size: clamp(28px, 3.5vw, 42px);
  line-height: 1.15;
  margin: 12px 0 16px;
}

.faq-subtext {
  color: #6b6558;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 28px;
}

/* Category Filter Chips */
.faq-categories {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (max-width: 991px) {
  .faq-categories {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
}

.faq-cat-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  text-align: left;
  box-shadow: 0 2px 6px rgba(22, 33, 61, 0.02);
}

.faq-cat-btn::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line);
  transition: background-color 0.25s ease;
}

.faq-cat-btn:hover {
  background: var(--paper-dim);
  border-color: rgba(22, 33, 61, 0.12);
  transform: translateX(4px);
}

@media (max-width: 991px) {
  .faq-cat-btn:hover {
    transform: translateY(-2px);
  }
}

.faq-cat-btn.active {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

.faq-cat-btn.active::before {
  background: var(--gold);
}

.faq-cat-btn[data-category="orders"].active::before {
  background: var(--gold);
}

.faq-cat-btn[data-category="selling"].active::before {
  background: var(--emerald);
}

.faq-cat-btn[data-category="billing"].active::before {
  background: var(--coral);
}

/* Accordion Items Styling Update */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.faq-item.gold {
  border-left-color: var(--gold);
  --bg-hover: rgba(232, 163, 61, 0.02);
}

.faq-item.emerald {
  border-left-color: var(--emerald);
  --bg-hover: rgba(47, 107, 79, 0.02);
}

.faq-item.coral {
  border-left-color: var(--coral);
  --bg-hover: rgba(226, 80, 63, 0.02);
}

.faq-item.blue {
  border-left-color: #7C9FD9;
  --bg-hover: rgba(124, 159, 217, 0.02);
}

/* Category Tags inside FAQ */
.faq-item-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
  background: var(--paper-dim);
  color: #6b6558;
}

.faq-item.gold .faq-item-tag {
  background: rgba(232, 163, 61, 0.08);
  color: var(--gold-deep);
}

.faq-item.emerald .faq-item-tag {
  background: rgba(47, 107, 79, 0.08);
  color: var(--emerald);
}

.faq-item.coral .faq-item-tag {
  background: rgba(226, 80, 63, 0.08);
  color: var(--coral);
}

.faq-item.blue .faq-item-tag {
  background: rgba(124, 159, 217, 0.08);
  color: #4E6FA8;
}

.faq-item:hover {
  border-left-width: 8px;
  box-shadow: var(--shadow-lift);
  border-color: rgba(22, 33, 61, 0.12);
  background: var(--bg-hover);
}

.faq-item[open] {
  border-left-width: 8px;
  box-shadow: var(--shadow-lift);
  background: var(--white);
}

.faq-question {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 22px 28px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  /* Hide default summary arrow */
  position: relative;
}

/* Hide default marker in Safari and Chrome */
.faq-question::-webkit-details-marker {
  display: none;
}

.faq-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 16px;
}

.faq-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  transition: color 0.2s ease;
}

.faq-item.gold:hover .faq-title {
  color: var(--gold-deep);
}

.faq-item.emerald:hover .faq-title {
  color: var(--emerald);
}

.faq-item.coral:hover .faq-title {
  color: var(--coral);
}

.faq-item.blue:hover .faq-title {
  color: #4E6FA8;
}

.faq-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--paper-dim);
  color: var(--ink);
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
    background-color 0.25s ease,
    color 0.25s ease;
}

.faq-icon svg {
  width: 16px;
  height: 16px;
}

.faq-item:hover .faq-icon {
  background: var(--line);
}

.faq-item[open] .faq-icon {
  transform: rotate(180deg);
  background: var(--ink);
  color: var(--white);
}

.faq-answer {
  padding: 0 28px 24px;
  color: var(--charcoal);
  font-size: 14.5px;
  line-height: 1.6;
}

/* Accordion Animation Scale Up */
.faq-item[open] .faq-answer {
  animation: faqScaleIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes faqScaleIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.99);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}


/* =========================================================
   FAQ SEARCH STYLES RESTORED FROM STYLE.CSS
   ========================================================= */
/* ---- FAQ Search Bar & No Results ---- */
.faq-search-wrapper {
  position: relative;
  margin-bottom: 24px;
  width: 100%;
}

.faq-search-wrapper input {
  width: 100%;
  padding: 14px 16px 14px 46px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--charcoal);
  font-size: 14.5px;
  outline: none;
  transition: all 0.25s ease;
}

.faq-search-wrapper input:focus {
  border-color: var(--gold-deep);
  box-shadow: 0 4px 14px rgba(232, 163, 61, 0.08);
}

.faq-search-wrapper .faq-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #8e8778;
  pointer-events: none;
}

.faq-search-wrapper .faq-search-clear {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  font-size: 20px;
  color: #8e8778;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.faq-search-wrapper .faq-search-clear:hover {
  color: var(--ink);
}

.faq-no-results-card {
  text-align: center;
  padding: 48px 24px;
  background: var(--white);
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  color: var(--charcoal);
  box-shadow: var(--shadow-card);
}

.faq-no-results-card svg {
  width: 44px;
  height: 44px;
  stroke: #8e8778;
  margin-bottom: 16px;
}

.faq-no-results-card h4 {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 6px;
  margin-top: 0;
}

.faq-no-results-card p {
  font-size: 13.5px;

}/* =========================================================
   UNISELF RESPONSIVE STYLES
   ========================================================= */

/* -------- TABLET & BELOW (<= 1080px) -------- */
@media (max-width: 1080px) {
  body {
    padding-left: 0 !important;
  }

  /* SPINE NAV (SIDEBAR) MOBILE TOGGLE */
  .spine-nav {
    display: block !important;
    position: fixed;
    top: 0;
    left: -280px; /* Hide off-canvas */
    width: 250px;
    height: 100vh;
    z-index: 2000;
    box-shadow: var(--shadow-deep);
    transition: left 0.3s ease-in-out;
    overflow-y: auto;
  }

  .spine-nav.active {
    left: 0;
  }

  /* Show mobile toggle (unless disabled on page) */
  .mobile-menu-toggle {
    display: block !important;
    margin-right: 15px;
  }
  
  body.no-spine-nav .mobile-menu-toggle {
    display: none !important;
  }
  .mobile-menu-toggle svg {
    stroke: var(--ink);
  }

  /* HEADER NAV */
  .main-nav .container {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .header-nav-links {
    display: none; /* Hide top links, maybe move them to sidebar if necessary, or just rely on sidebar */
  }

  .search-form {
    order: 3;
    width: 100%;
    margin-top: 15px;
  }

  .nav-actions {
    gap: 15px;
  }
  /* Hide text, keep icons for nav actions */
  .nav-action {
    font-size: 0 !important;
  }
  .nav-action .badge {
    font-size: 10px !important;
  }
  .user-pill span {
    display: none !important;
  }
  .user-pill i {
    display: none !important;
  }
}

/* -------- LARGE MOBILE & TABLET (<= 768px) -------- */
@media (max-width: 768px) {
  /* HERO SECTION */
  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }
  .hero-content h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.1;
  }
  .hero-content p {
    font-size: 1rem;
  }
  

  /* HORIZONTAL SCROLLING GRIDS */
  .book-grid, .category-grid, .pub-row, .author-row {
    display: flex !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    gap: 12px !important;
    padding-bottom: 12px !important; /* space for scrollbar */
  }
  
  .book-grid::-webkit-scrollbar, .category-grid::-webkit-scrollbar, .pub-row::-webkit-scrollbar, .author-row::-webkit-scrollbar {
    display: none;
  }
  .book-grid, .category-grid, .pub-row, .author-row {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
  }

  .book-card, .category-card, .pub-card, .author-card {
    flex: 0 0 auto !important;
    scroll-snap-align: start;
  }
  
  .category-card { width: 130px !important; }
  .pub-card { width: 140px !important; }
  .author-card { width: 160px !important; }
  
    /* Bookswagon-inspired eCommerce Mobile Card */
  .book-card {
    width: 145px !important; /* Fixed width for horizontal scrolling and grid */
    height: auto !important;
    min-height: 220px !important;
    max-height: none !important;
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: var(--radius-md) !important;
    padding: 0 !important;
    overflow: hidden !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    transition: none !important;
  }

  .book-cover {
    width: 100% !important;
    height: 140px !important; /* Smaller cover to fit 2x2 */
    background-size: 100% 100% !important; /* Apply full visibility fix to mobile too */
    background-repeat: no-repeat !important;
    background-position: center !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin-bottom: 4px !important; /* Reduced margin */
    transform: none !important; /* disable hover lift */
    position: relative;
    flex-shrink: 0;
  }

  /* Remove artistic elements on mobile for clean eCommerce look */
  .book-cover .cover-overlay,
  .book-cover .shine,
  .book-cover .spine-edge,
  .book-cover .seal {
    display: none !important;
  }

  .wishlist-btn {
    top: 2px !important;
    right: 2px !important;
    background: rgba(255,255,255,0.9) !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1) !important;
    width: 24px !important;
    height: 24px !important;
    padding: 4px !important;
  }

  .wishlist-btn svg {
    stroke: #757575 !important;
  }  .book-meta {
    width: 100% !important;
    text-align: left !important;
    padding: 6px !important;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 2px !important;
    justify-content: flex-start !important;
  }

  .book-meta .title {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #212121 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    font-family: inherit !important;
  }

  .book-meta .author {
    font-size: 10px !important;
    color: #757575 !important;
    margin: 0 0 2px 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .book-meta .variants-container {
    margin-top: 0 !important;
    gap: 2px !important;
  }

  .book-meta .variant-tag {
    padding: 0px 3px !important;
    font-size: 9px !important;
  }

  .book-meta .price-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: baseline !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    margin-top: 2px !important; /* Push price up slightly */
    padding-top: 2px !important;
  }

  .book-meta .price-row .now.price {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #d32f2f !important; /* Prominent red price */
  }

  .book-meta .price-row .old.price {
    font-size: 11px !important;
    color: #878787 !important;
    text-decoration: line-through !important;
  }
  
  .book-meta .price-row .discount-text {
    display: block !important;
    font-size: 10px !important;
    color: #388e3c !important; /* Green */
    font-weight: 700 !important;
    width: 100%; /* Force to next line */
  }

  /* SECTIONS */
  .section-head h2 {
    font-size: 1.75rem;
  }
}

/* -------- MOBILE (<= 480px) -------- */
@media (max-width: 480px) {
  /* Removed grid-template-columns for horizontal scroll */

  /* FORMS & TABLES */
  input, select, textarea, button {
    max-width: 100%;
  }
  .search-form {
    flex-direction: row;
    align-items: center;
    border-radius: var(--radius-md);
  }
  .search-form select {
    margin-bottom: 0;
    width: auto;
  }
  .search-form input {
    margin-bottom: 0;
    min-width: 0; /* allows shrinking */
  }
  .search-form button {
    margin-bottom: 0;
    width: auto;
  }
  
  /* Tables */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    margin-bottom: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
  }
  table {
    width: 100%;
    min-width: 500px; /* Forces scroll instead of squishing */
  }

  /* Modals */
  .modal-content {
    width: 95%;
    margin: 20px auto;
    padding: 15px;
  }
}

/* -------- FIXING OVERFLOWS GLOBALLY -------- */
img, video {
  max-width: 100%;
  height: auto;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 15px;
  padding-right: 15px;
}

/* Fix text overflow in small containers */
* {
  min-width: 0; /* Prevents flex children from overflowing */
}

/* Hide mobile tab bar and mobile-only elements on desktop */
@media (min-width: 1025px) {
  .bottom-tab-bar,
  .book-meta .price-row .discount-text {
    display: none !important;
  }
}

/* -------- MOBILE TAB BAR (<= 1024px) -------- */
@media (max-width: 1024px) {
  body {
    padding-bottom: 70px !important; /* Space for bottom tab bar */
  }
  
  footer {
    margin-bottom: -70px !important;
    padding-bottom: 90px !important; /* 20px + 70px for bottom tab bar */
  }

  .hide-on-mobile {
    display: none !important;
  }

  .bottom-tab-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 9999;
    padding-bottom: env(safe-area-inset-bottom, 0px); /* iOS safe area */
  }

  .bottom-tab-bar .tab-items {
    display: flex;
    width: 100%;
    justify-content: space-around;
    align-items: center;
    height: 60px;
  }

  .bottom-tab-bar .tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #878787;
    flex: 1;
    height: 100%;
    gap: 4px;
    font-size: 10px;
    font-weight: 500;
  }

  .bottom-tab-bar .tab-item i,
  .bottom-tab-bar .tab-item svg {
    font-size: 20px;
    margin-bottom: 2px;
  }

  .bottom-tab-bar .tab-item.active {
    color: var(--coral);
  }
}
/* --- NEW HERO TICKER CSS --- */
.hero-ticker-section {
    width: 100%;
    padding: 0px 14px 24px !important;
    background:
        linear-gradient(
            135deg,
            var(--parchment) 0%,
            var(--parchment) 45%,
            var(--parchment-2) 100%
        );
    border-radius: 18px;
    overflow: hidden;
    box-sizing: border-box;
}


/* =========================================================
   HEADER
========================================================= */

.ticker-header {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 24px;
    padding: 0 12px 24px;
    box-sizing: border-box;
}

.ticker-title {
    margin-left: 10px;
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
    position: relative;
}
.ticker-title::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
}

.ticker-legend {
    margin-left: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ticker-header-type {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.5px;
    color: var(--ink-soft);
    padding: 6px 16px 6px 12px;
    border-radius: 40px;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid var(--line);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: default;
    box-shadow: 0 2px 10px rgba(42, 31, 24, 0.03);
}

.ticker-header-type:hover {
    background: var(--white);
    border-color: var(--gold-light);
    transform: translateY(-2px);
    color: var(--ink);
    box-shadow: 0 6px 15px rgba(196, 162, 75, 0.15);
}

.ticker-divider {
    display: none;
}

/* =========================================================
   DOTS
========================================================= */

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex: 0 0 auto;
    animation: dot-pulse 2.5s ease-in-out infinite;
}

@keyframes dot-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.7; }
}

.dot.coral {
    background: var(--coral);
    box-shadow: 0 0 8px var(--coral);
}

.dot.gold {
    background: var(--gold);
    box-shadow: 0 0 8px var(--gold);
    animation-delay: 0.3s;
}

.dot.emerald {
    background: var(--emerald);
    box-shadow: 0 0 8px var(--emerald);
    animation-delay: 0.6s;
}

.dot.light {
    background: var(--white);
    border: 1px solid var(--parchment-3);
    box-shadow: 0 0 8px rgba(255,255,255,0.8);
    animation-delay: 0.9s;
}

/* =========================================================
   TICKER OUTER CONTAINER
========================================================= */

.hero-ticker-container {
    position: relative;
    width: 100%;
    min-height: 360px;
    border-radius: 15px;
    background:
        linear-gradient(
            135deg,
            rgba(198, 138, 53, 0.05),
            rgba(198, 138, 53, 0.10)
        );
    border-top: 2px solid var(--gold); border-bottom: 2px solid var(--gold);
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}



/* =========================================================
   VIEWPORT
========================================================= */

.hero-ticker-track-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}


/* =========================================================
   TRACK
========================================================= */

.hero-ticker-track {
    display: flex;
    width: max-content;
    height: 100%;
    align-items: center;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}


/* =========================================================
   EACH SET
========================================================= */

.ticker-inner {
    display: flex;
    align-items: center;

    /*
     * IMPORTANT:
     * Never allow items to shrink.
     */
    flex-shrink: 0;

    gap: 26px;

    padding: 30px 35px 42px;

    width: max-content;

    box-sizing: border-box;
}


/* =========================================================
   BOOK LINK
========================================================= */

.ticker-book-link {
    display: block;
    width: 160px;
    flex: 0 0 160px;

    text-decoration: none;

    color: inherit;

    box-sizing: border-box;
}


/* =========================================================
   BOOK CARD
========================================================= */

.ticker-book-card {
    position: relative;
    width: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;

    box-sizing: border-box;
}


/* =========================================================
   COVER
========================================================= */

.ticker-book-cover {
    position: relative;

    width: 160px;
    height: 250px;

    border-radius: 8px;

    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;

    overflow: hidden;

    box-shadow:
        0 8px 18px rgba(40, 30, 20, 0.18),
        0 22px 32px rgba(40, 30, 20, 0.10);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}


/* =========================================================
   HOVER
========================================================= */

.ticker-book-link:hover .ticker-book-cover {

    transform:
        translateY(-7px)
        scale(1.025);

    box-shadow:
        0 14px 24px rgba(40, 30, 20, 0.23),
        0 26px 40px rgba(40, 30, 20, 0.14);
}


/* =========================================================
   COVER OVERLAY
========================================================= */

.cover-overlay {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            180deg,
            rgba(0, 0, 0, 0.02),
            rgba(0, 0, 0, 0.08)
        );

    pointer-events: none;
}


/* =========================================================
   SHINE
========================================================= */

.cover-shine {
    position: absolute;

    top: -20%;
    left: -60%;

    width: 55%;
    height: 150%;

    background:
        linear-gradient(
            90deg,
            rgba(255,255,255,0),
            rgba(255,255,255,0.16),
            rgba(255,255,255,0)
        );

    transform: rotate(15deg);

    transition: left 0.7s ease;

    pointer-events: none;
}

.ticker-book-link:hover .cover-shine {
    left: 120%;
}


/* =========================================================
   SPINE
========================================================= */

.cover-spine {
    position: absolute;

    top: 0;
    left: 0;

    width: 8px;
    height: 100%;

    background:
        linear-gradient(
            to right,
            rgba(0,0,0,0.25),
            rgba(0,0,0,0)
        );

    opacity: 0.55;
}


/* =========================================================
   CATEGORY BADGE
========================================================= */

.genre-tag {
    position: relative;

    margin-top: -15px;

    z-index: 5;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 84px;

    padding: 7px 13px;

    border-radius: 7px;

    font-size: 13px;
    line-height: 1;
    font-weight: 700;

    color: var(--white);

    box-shadow:
        0 4px 10px rgba(30, 25, 20, 0.18);

    white-space: nowrap;
}


/* CATEGORY COLORS */

.genre-fiction {
    background: var(--coral);
}

.genre-nonfiction {
    background: var(--gold);
}

.genre-academic {
    background: var(--verdigris);
}

.genre-children {
    background: var(--emerald);
}


/* =========================================================
   BOOK INFO
========================================================= */

.ticker-book-info {
    width: 100%;
    padding-top: 11px;
    text-align: center;
}


/* TITLE */

.cover-title {
    margin: 0;

    width: 100%;

    font-size: 14px;
    line-height: 1.3;

    font-weight: 700;

    color: var(--ink);

    overflow: hidden;

    white-space: nowrap;
    text-overflow: ellipsis;
}


/* AUTHOR */

.cover-author {
    margin: 5px 0 0;

    width: 100%;

    font-size: 12px;
    line-height: 1.3;

    color: var(--ink-soft);

    overflow: hidden;

    white-space: nowrap;
    text-overflow: ellipsis;
}


/* =========================================================
   ARROWS
========================================================= */

.ticker-arrow {
    position: absolute;

    top: 50%;

    width: 50px;
    height: 50px;

    transform: translateY(-50%);

    z-index: 30;

    border: none;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(21, 17, 10, 0.85);
    border: 1px solid rgba(198, 138, 53, 0.35);

    color: var(--white);

    cursor: pointer;

    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.18);

    transition:
        transform 0.25s ease,
        background 0.25s ease;
}


.ticker-arrow:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--ink);

    transform:
        translateY(-50%)
        scale(1.08);
}


.ticker-arrow svg {
    width: 23px;
    height: 23px;

    fill: none;

    stroke: currentColor;

    stroke-width: 2;

    stroke-linecap: round;

    stroke-linejoin: round;
}


.ticker-arrow.prev {
    left: 16px;
}

.ticker-arrow.next {
    right: 16px;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 900px) {

    .hero-ticker-section {
        padding: 16px 10px 20px;
    }

    .ticker-header {
        gap: 15px;
        align-items: flex-start;
        flex-direction: column;
    }

    .ticker-legend {
        gap: 16px;
        flex-wrap: nowrap;
        overflow-x: auto;
        width: 100%;
        padding-bottom: 8px; /* space for potential scrollbar */
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Hide scrollbar in Firefox */
    }
    
    .ticker-legend::-webkit-scrollbar {
        display: none; /* Hide scrollbar in Chrome/Safari */
    }

    .ticker-header-type {
        flex-shrink: 0;
        white-space: nowrap;
    }

    .ticker-divider {
        display: none;
    }

    .hero-ticker-container {
        min-height: 335px;
    }

    .ticker-book-link {
        width: 145px;
        flex-basis: 145px;
    }

    .ticker-book-cover {
        width: 145px;
        height: 225px;
    }

    .ticker-inner {
        gap: 18px;
        padding-left: 25px;
        padding-right: 25px;
    }

    .ticker-arrow {
        width: 44px;
        height: 44px;
    }

    .ticker-arrow.prev {
        left: 9px;
    }

    .ticker-arrow.next {
        right: 9px;
    }
}


@media (max-width: 600px) {

    .ticker-title {
        font-size: 18px;
    }
    }

    .hero-ticker-container {
        min-height: 305px;
    }

    .ticker-book-link {
        width: 125px;
        flex-basis: 125px;
    }

    .ticker-book-cover {
        width: 125px;
        height: 195px;
    }

    .ticker-inner {
        gap: 15px;
        padding-top: 28px;
        padding-bottom: 32px;
    }

    .genre-tag {
        font-size: 11px;
        min-width: 72px;
        padding: 6px 10px;
    }

    .cover-title {
        font-size: 12px;
    }

    .cover-author {
        font-size: 10px;
    }

    .ticker-arrow {
        width: 40px;
        height: 40px;
    }

    .ticker-arrow svg {
        width: 18px;
        height: 18px;
    }
}



















@media (max-width: 768px) {
  .section-head .view-all {
    margin-left: auto;
  }
}

/* -------- MOBILE CATEGORIES (200x250 MINI STYLE) -------- */
@media (max-width: 768px) {
  .cat-grid {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    gap: 12px !important;
    padding-bottom: 12px !important;
    margin-top: 12px !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .cat-grid::-webkit-scrollbar {
    display: none;
  }
  .cat-grid .cat-tile {
    flex-shrink: 0;
    scroll-snap-align: start;
    width: 140px !important;
    height: 180px !important;
    overflow: hidden !important;
  }
  .cat-grid .cat-body {
    padding: 12px 10px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    height: 100% !important;
  }
  .cat-grid .cat-header {
    margin-bottom: 8px !important;
  }
  .cat-grid .cat-icon {
    width: 24px !important;
    height: 24px !important;
    margin-bottom: 4px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
  }
  .cat-grid .cat-icon svg {
    width: 14px !important;
    height: 14px !important;
  }
  .cat-grid .cat-name {
    font-size: 13px !important;
    margin-bottom: 2px !important;
  }
  .cat-grid .cat-subs {
    font-size: 10px !important;
    line-height: 1.2 !important;
    max-width: 80px !important;
  }
  .cat-grid .cat-footer {
    padding-top: 6px !important;
    margin-top: auto !important;
  }
  .cat-grid .cat-action {
    font-size: 10px !important;
  }
  .cat-grid .cat-art-panel {
    gap: 2px !important;
    width: 60px !important;
    min-width: 60px !important;
  }
  .cat-grid .art-feather {
    height: 40px !important;
  }
  .cat-grid .art-book {
    height: 30px !important;
  }
}

@media (min-width: 769px) {
  #home-categories-section .cat-grid .cat-tile:nth-child(n+5) {
    display: none !important;
  }
}



@media (max-width: 768px) {
  .banner {
    flex-direction: column !important;
    text-align: center !important;
    padding: 24px 20px !important;
    gap: 16px !important;
  }
  .banner h3 {
    font-size: 20px !important;
  }
  .banner p {
    max-width: 100% !important;
  }
  .banner .btn {
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
  }
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 2fr;
    gap: 30px;
  }
  .footer-grid > div:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  /* Fix vertical stacking grid into nice horizontal scrollers */
  .author-row,
  .pub-grid,
  .mag-grid {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    gap: 16px !important;
    padding-bottom: 12px !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .author-row::-webkit-scrollbar,
  .pub-grid::-webkit-scrollbar,
  .mag-grid::-webkit-scrollbar {
    display: none;
  }
  
  .author-row > *,
  .pub-grid > *,
  .mag-grid > * {
    flex-shrink: 0;
    scroll-snap-align: start;
    width: 200px !important; /* Fixed width for cards so they swipe nicely */
  }

  .author-row > * {
    width: 140px !important;
  }
  .pub-grid > * {
    width: 120px !important;
  }

  /* Fix the Footer Grid Squishing */
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }

  /* Optimize padding to save space */
  section {
    padding: 32px 0 !important;
  }
  
  .newsletter {
    flex-direction: column !important;
    text-align: center !important;
    padding: 32px 20px !important;
    gap: 20px !important;
  }
  .newsletter-form {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 12px !important;
  }
  .newsletter-form input,
  .newsletter-form button {
    width: 100% !important;
  }
}


@media (max-width: 768px) {
  .author-card {
    flex-direction: column !important;
    text-align: center !important;
    padding: 24px 12px !important;
    gap: 12px !important;
    justify-content: center !important;
  }
  .author-avatar {
    width: 76px !important;
    height: 76px !important;
    min-width: 76px !important;
    margin: 0 auto !important;
  }
}


/* Force remove any extra gap between navbar and hero */
main#main {
  padding-top: 0 !important;
  margin-top: 0 !important;
}
.hero-grid > div:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
.hero .eyebrow {
  margin-top: 0 !important;
}


.hero {
  margin-top: -35px !important;
}

