:root {
  --book-bg: #fdfaf4;
  --book-border: #d1bfa3;
  --page-shadow: rgba(0, 0, 0, 0.05);
  --text-color: #333;
  --accent: #8a6d3b; /* rich golden-brown */
  --gold: #c9a646;
}

/* Title */
.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 2rem;
  text-shadow: 1px 1px #e9decf;
}

/* Layout Container */
.book-layout {
  display: flex;
  flex-direction: column;
  gap: 50px;
}

/* Book */
.book {
  display: flex;
  justify-content: center;
  align-items: stretch;
  perspective: 1200px;
  position: relative;
  background: linear-gradient(to right, #f4f1ec, #f4f1ec);
  border-radius: 12px;
  box-shadow: 0 15px 30px rgba(0,0,0,0.08);
  overflow: hidden;
  position: relative;
  border: 1px solid #d5c7b2;
  background-image: url('/assets/images/leather-texture.jpg');
  background-size: cover;
}

.book::before {
  content: '';
  position: absolute;
  width: 6px;
  height: 100%;
  background: var(--gold);
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  z-index: 1;
}

/* Pages */
.page {
  width: 50%;
  padding: 40px 30px;
  font-family: 'Georgia', serif;
  font-size: 17px;
  line-height: 1.9;
  color: var(--text-color);
  background: #fff8ed;
  background: linear-gradient(to bottom, #fffefc, #f8f1e9);
  border: 1px solid #e4dacd;
  box-shadow: inset 0 0 5px rgba(0,0,0,0.04);
  transition: transform 0.4s ease;
  position: relative;
}

/* Page effects */
.page::after {
  content: '';
  position: absolute;
  top: 0;
  right: -5px;
  width: 5px;
  height: 100%;
  background: linear-gradient(to right, rgba(0,0,0,0.05), transparent);
}

/* Left Page (Title + Category centered vertically) */
.left-page {
  border-right: 1px solid var(--book-border);
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fffdf9;
  position: relative;
  text-align: center;
}

.left-page h4 {
  font-size: 1.8rem;
  color: var(--accent);
  margin-bottom: 10px;
}

.left-page .category-label {
  font-style: italic;
  font-size: 0.9rem;
  color: #888;
}

/* Right Page (Confession text) */
.right-page {
  border-left: 1px solid var(--book-border);
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
  background: #fefcf8;
  position: relative;
}

/* Page content styling */
.page p {
  margin: 0;
  white-space: pre-line;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Filter Tabs */
.filter-tabs {
  margin-bottom: 20px;
}

.filter-btn {
  padding: 10px 20px;
  margin: 0 6px;
  border: none;
  border-radius: 25px;
  background-color: #eaeaea;
  color: #333;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--accent);
  color: #fff;
}

/* Archive */
.prayer-archive-list {
  padding-left: 0;
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.prayer-archive-list li a {
  padding: 6px 12px;
  background: #f3f1ed;
  border-radius: 8px;
  text-decoration: none;
  color: var(--accent);
  transition: background 0.3s ease;
}

.prayer-archive-list li a:hover {
  background: var(--gold);
  color: #fff;
}

/* Swiper Navigation Buttons */
.swiper-button-prev, .swiper-button-next {
  color: var(--accent) !important;
  background: #f7f4f1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: background 0.3s ease;
}

.swiper-button-prev:hover, .swiper-button-next:hover {
  background: var(--accent);
  color: #fff !important;
}

.swiper-button-prev {
  left: -30px;
}

.swiper-button-next {
  right: -30px;
}

/* Responsive improvements */
@media (max-width: 768px) {
  .book {
    flex-direction: column;
  }
  .page {
    width: 100%;
    border-radius: 0 !important;
  }
  .swiper-button-prev, .swiper-button-next {
    top: auto;
    bottom: -30px;
  }
}


@media (max-width: 768px) {
  .book-layout {
    gap: 30px;
  }

  .book {
    flex-direction: column;
    border-radius: 12px;
    background-size: cover;
    padding: 0;
  }

  .book::before {
    display: none;
  }

  .page {
    width: 100%;
    padding: 25px 20px;
    border-radius: 0 !important;
    border: none;
    box-shadow: none;
  }

  .left-page, .right-page {
    border: none;
    border-radius: 0;
    text-align: center;
  }

  .left-page h4 {
    font-size: 1.5rem;
    margin-bottom: 5px;
  }

  .right-page p {
    font-size: 16px;
    line-height: 1.7;
  }

  .filter-btn {
    padding: 8px 16px;
    font-size: 14px;
    margin: 3px 5px;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .swiper-button-prev, .swiper-button-next {
    width: 32px;
    height: 32px;
    font-size: 14px;
    bottom: -25px;
    top: auto;
    background-color: #eee;
  }

  .swiper-button-prev {
    left: 10px;
  }

  .swiper-button-next {
    right: 10px;
  }
}
