/* ============================================================
   The Author — Site Stylesheet
   Playfair Display (serif headings) + Lato (body)
   Warm editorial palette: dark charcoal + gold accent
   ============================================================ */

/* --- Tokens ------------------------------------------------- */
:root {
  --gold:        #c9a84c;
  --gold-dark:   #9d7d30;
  --gold-light:  #f3e4b8;
  --dark:        #1a1a1a;
  --warm-bg:     #f8f3ec;
  --card-bg:     #ffffff;
  --text:        #2d2d2d;
  --text-muted:  #6c757d;
  --radius:      12px;
  --radius-sm:   6px;
  --shadow-sm:   0 2px 8px rgba(0,0,0,.08);
  --shadow-md:   0 6px 24px rgba(0,0,0,.12);
  --shadow-lg:   0 16px 48px rgba(0,0,0,.16);
  --transition:  0.22s ease;
}

/* --- Base --------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Lato', sans-serif;
  color: var(--text);
  background: #fff;
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* --- Typography -------------------------------------------- */
.heading-serif {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.01em;
}

.brand-name {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  letter-spacing: .03em;
  color: var(--gold);
}

.section-eyebrow {
  display: block;
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .5rem;
  font-weight: 700;
}

.letter-spacing { letter-spacing: .08em; }

.text-gold        { color: var(--gold) !important; }
.text-gold-dark   { color: var(--gold-dark) !important; }

/* Clamp to 3 lines */
.text-truncate-3 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;

}

/* --- Navbar ------------------------------------------------- */
.navbar-brand:hover .brand-name { color: #e2c06a; }

.nav-link {
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: .04em;
  color: rgba(255,255,255,.75) !important;
  transition: color var(--transition);
  padding: .5rem .9rem !important;
  border-radius: var(--radius-sm);
}
.nav-link:hover,
.nav-link.active {
  color: var(--gold) !important;
  background: rgba(201,168,76,.08);
}

/* Right-align nav items in the mobile hamburger dropdown */
@media (max-width: 991.98px) {
  .navbar-collapse .navbar-nav {
    align-items: flex-end;   /* push items to the right */
    padding: .5rem 0;
  }

  .navbar-collapse .nav-link {
    text-align: right;
  }
}

/* --- Buttons ------------------------------------------------ */
.btn-gold {
  background: var(--gold);
  color: #1a1a1a;
  border: 2px solid var(--gold);
  font-weight: 700;
  letter-spacing: .04em;
  border-radius: var(--radius-sm);
  transition: background var(--transition), transform var(--transition);
}
.btn-gold:hover {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  color: #fff;
  transform: translateY(-1px);
}

.bg-gold { background-color: var(--gold) !important; }

/* --- Hero Section ------------------------------------------ */
.hero-section {
  /* background: var(--dark); */
  background-color: var(--dark);
  background-size: cover;
  background-position: center;
  min-height: 85vh;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  /* background: radial-gradient(ellipse at 70% 50%, rgba(201,168,76,.08) 0%, transparent 60%); */
  background: rgba(0,0,0,0.55);
  z-index: 0;
  pointer-events: none;
}

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

.hero-portrait {
  max-height: 520px;
  width: 100%;
  object-fit: cover;
  border: 4px solid rgba(201,168,76,.3);
}

.lead-text {
  font-size: 1.15rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.872);
}

/* --- Section backgrounds ----------------------------------- */
.section-light { background: #fff; }
.section-warm  { background: var(--warm-bg); }

/* --- Section divider SVG ----------------------------------- */
.section-divider {
  overflow: hidden;
  line-height: 0;
  background: #fff;
}
.section-divider svg { display: block; width: 100%; height: 60px; }

/* --- Work (book) card -------------------------------------- */
.work-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition);
  position: relative;
}
.work-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.work-card-img-link { display: block; overflow: hidden; aspect-ratio: 5/7; }
.work-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.work-card:hover .work-card-img { transform: scale(1.04); }

.work-card-img-placeholder {
  width: 100%;
  aspect-ratio: 5/7;
  background: linear-gradient(135deg, #e9e1d4, #d5c9b8);
}

.work-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.work-card-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.3;
  margin-bottom: .4rem;
}
.work-card-title a { color: inherit; text-decoration: none; }
.work-card-title a:hover { color: var(--gold-dark); }
.work-card-synopsis { font-size: .9rem; color: var(--text-muted); flex: 1; }

/* --- Story card -------------------------------------------- */
.story-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  /* box-shadow: var(--shadow-sm); */
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition);
  position: relative;
}
.story-card:hover {
  /* box-shadow: var(--shadow-md); */
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.26);
  transform: translateY(-3px);
}
.story-card-img-link { display: block; overflow: hidden; }
.story-card-img {
  width: 100%;
  aspect-ratio: 2/1;
  object-fit: cover;
  transition: transform .4s ease;
}
.story-card:hover .story-card-img { transform: scale(1.04); }

.story-card-body { padding: 1.25rem; flex: 1; }
.story-card-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.3;
  margin-bottom: .4rem;
}
.story-card-title a { color: inherit; text-decoration: none; }
.story-card-title a:hover { color: var(--gold-dark); }

@media (max-width: 991.98px) {
  .story-card {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  }

  .story-card:hover {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.26);
  }
}

/* --- Page header band -------------------------------------- */
.page-header {
  background: var(--dark);
  border-bottom: 3px solid rgba(201,168,76,.2);
}
.breadcrumb-light .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.4); }
.breadcrumb-light .breadcrumb-item.active { color: rgba(255,255,255,.5); }

/* --- Book detail ------------------------------------------ */
.book-cover-img { max-width: 100%; border-radius: var(--radius); }
.book-cover-placeholder {
  width: 100%;
  aspect-ratio: 5/7;
  background: linear-gradient(135deg, #e9e1d4, #d5c9b8);
  border-radius: var(--radius);
}

.synopsis-box {
  background: var(--warm-bg);
  border-left: 4px solid var(--gold);
}

/* --- Story detail ----------------------------------------- */
.story-hero-img-wrap {
  position: relative;
  max-height: 520px;
  overflow: hidden;
}
.story-hero-img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  display: block;
}
.story-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 30%, rgba(0,0,0,.2) 80%);
}
.story-hero-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding-bottom: 2.5rem;
}

/* --- Prose content ---------------------------------------- */
.prose-content {
  font-size: 1.05rem;
  line-height: 1.85;
}
.prose-paragraph p { margin-bottom: 1.25rem; }
.prose-blockquote {
  border-color: var(--gold) !important;
  color: #555;
}

/* --- CTA band ---------------------------------------------- */
.cta-band {
  background: var(--dark);
  color: #fff;
}
.cta-band h2 { color: #fff; }

/* --- Footer ------------------------------------------------ */
.site-footer { border-top: 1px solid rgba(255,255,255,.08); }
.footer-link {
  color: rgba(255,255,255,.55);
  text-decoration: none;
  transition: color var(--transition);
}
.footer-link:hover { color: var(--gold); }

/* --- Empty state ------------------------------------------ */
.empty-state {
  padding: 4rem 0;
}

/* --- Utility ----------------------------------------------- */
.z-2 { z-index: 2; }

/* --- Responsive -------------------------------------------- */
@media (max-width: 767px) {
  .hero-section { min-height: auto; padding: 3rem 0 4rem; }
  .story-hero-img { height: 300px; }
}

/* ---- Audio player ----------------------------------------- */
.audio-player-wrap {
  background: var(--warm-bg);
  border-left: 4px solid var(--gold);
}

/* Style the native player consistently across browsers */
audio {
  accent-color: var(--gold);
  height: 48px;
}

/* ----- COOKIE CONSENT -------------------------------------- */

/* ===== Cookie Consent Banner ===== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  background: var(--dark);
  border-top: 2px solid rgba(201, 168, 76, 0.3);
  padding: 1rem 0;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
  display: block; /* always in DOM, hidden via transform */
}

.cookie-banner.visible {
  transform: translateY(0);
  opacity: 1;
}

.cookie-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cookie-banner-text {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  line-height: 1.6;
  flex: 1;
  min-width: 260px;
}

.cookie-banner-text strong {
  color: #fff;
}

.cookie-link {
  color: var(--gold);
  text-decoration: underline;
  white-space: nowrap;
}

.cookie-link:hover {
  color: #e2c06a;
}

.cookie-banner-actions {
  flex-shrink: 0;
}

@media (max-width: 575px) {
  .cookie-banner-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .cookie-banner-actions {
    width: 100%;
  }

  .cookie-banner-actions .btn {
    width: 100%;
  }
}


/* ----- Contact Us Form --------------------------------------------- */

.contact-form-wrap {
  background: var(--warm-bg);
  border-left: 4px solid var(--gold);
}

.contact-form-wrap .form-control {
  border-radius: var(--radius-sm);
  border: 1px solid #ddd;
  padding: .75rem 1rem;
  font-size: .95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.contact-form-wrap .form-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
  outline: none;
}

.contact-form-wrap .form-control.is-invalid {
  border-color: #dc3545;
}

.char-counter {
  min-height: 1.4rem;
}

.char-count-text {
  font-size: .8rem;
  transition: color .2s ease;
}

/* ----- Advanced Story Search --------------------------------------------- */
.filter-panel {
  background: var(--warm-bg);
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-left: 4px solid var(--gold);
}

.filter-panel .form-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}

/* ----- Captcha--------------------------------------------- */
/* Captcha image */
.captcha {
  border-radius: var(--radius-sm);
  border: 1px solid #ddd;
  display: block;
  margin-bottom: .5rem;
}

/* Refresh link */
.captcha ~ a {
  font-size: .85rem;
  color: var(--gold-dark);
}

/* Input box next to image */
#id_captcha_1 {
  max-width: 160px;
}

/* ----- Like Button --------------------------------------------- */
/* Like button */
.like-btn {
  border-radius: 999px;
  font-size: .85rem;
  transition: transform .15s ease, box-shadow .15s ease;
  position: relative;
  z-index: 1;           /* sit above stretched-link overlay on cards */
}

.like-btn:hover {
  transform: scale(1.08);
}

.like-btn .bi-heart-fill {
  color: #e05c5c;
}

/* Pulse animation on click */
@keyframes like-pulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}

.like-pulse {
  animation: like-pulse .3s ease;
}

/* END */