/* ==========================================================================
   PAYASTI (পয়স্তি) - MODERN DESIGN SYSTEM & STYLESHEET
   Handcrafted, Semantic, Zero Oxygen Builder Legacy
   ========================================================================== */

/* 1. Typography & Webfonts */
@font-face {
  font-family: 'payasti_uni';
  src: url('/fonts/8029Payasti_uni.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'payasti_uni';
  src: url('/fonts/8029Payasti_uni.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'payasti_uni';
  src: url('/fonts/8029Payasti_uni.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'payasti_uni';
  src: url('/fonts/8029Payasti_uni.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'payasti_uni';
  src: url('/fonts/8029Payasti_uni.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'payasti_uni';
  src: url('/fonts/8029Payasti_uni.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* 2. Global CSS Design Tokens & Theming */
:root {
  /* Brand Identity */
  --brand-primary: #068200;
  --brand-primary-hover: #056800;
  --brand-dark: #075603;
  --brand-light: #f0ffef;
  --brand-light-border: #d4f5d8;

  /* Typography */
  --font-base: 'payasti_uni', 'Hind Siliguri', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-weight-body: 500;
  --font-weight-medium: 600;
  --font-weight-bold: 700;
  --font-weight-heavy: 800;
  
  /* Light Mode (Default) */
  --bg-body: #f5f5f5;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-featured: #f0ffef;
  --bg-header: #ffffff;
  --bg-footer: #ffffff;
  --bg-input: #ffffff;
  --bg-muted: #f8fafc;
  
  --text-main: #2b2316;
  --text-heading: #111827;
  --text-muted: #475569;
  --text-light: #64748b;
  --text-link-hover: #068200;
  
  --border-color: #e2e8f0;
  --border-card: #e2e8f0;
  --border-featured: #d5eed7;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-card: 0px 15px 35px rgba(125, 125, 125, 0.08);
  --shadow-hover: 0px 20px 45px rgba(125, 125, 125, 0.16);
  --shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
  
  --container-max-width: 1440px;
}

/* Sepia Mode */
html.theme-sepia {
  --bg-body: #f7efe1;
  --bg-surface: #fcf6ee;
  --bg-card: #fcf6ee;
  --bg-card-featured: #f5ebd9;
  --bg-header: #ede2d1;
  --bg-footer: #ede2d1;
  --bg-input: #fbf3e6;
  --bg-muted: #ede2d1;
  
  --text-main: #342414;
  --text-heading: #1e1105;
  --text-muted: #4e3c2b;
  --text-light: #6e5842;
  --text-link-hover: #075603;
  
  --border-color: #dfd0bc;
  --border-card: #dfd0bc;
  --border-featured: #d6be9f;
  
  --shadow-card: 0 4px 15px rgba(61, 47, 31, 0.05);
  --shadow-hover: 0 8px 25px rgba(61, 47, 31, 0.1);
}

/* Dark Mode (Night Mode) */
html.theme-dark {
  --bg-body: #0d1117;
  --bg-surface: #161b22;
  --bg-card: #161b22;
  --bg-card-featured: #1c2430;
  --bg-header: #161b22;
  --bg-footer: #161b22;
  --bg-input: #0d1117;
  --bg-muted: #21262d;
  
  --text-main: #dbe4ee;
  --text-heading: #ffffff;
  --text-muted: #9ba7b4;
  --text-light: #9ba7b4;
  --text-link-hover: #38bdf8;
  
  --border-color: #30363d;
  --border-card: #30363d;
  --border-featured: #38495c;
  
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.6);
}

/* 3. Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-synthesis: weight;
  -webkit-font-synthesis: weight;
}

/* Clean, Beautiful Selection on Brand Green (Zero black border) */
::selection {
  background-color: var(--brand-primary, #068200) !important;
  color: #ffffff !important;
  text-shadow: none !important;
}

::-moz-selection {
  background-color: var(--brand-primary, #068200) !important;
  color: #ffffff !important;
  text-shadow: none !important;
}

html, body {
  font-family: var(--font-base) !important;
  font-weight: 500;
  font-feature-settings: "ss01" 1;
  -webkit-font-feature-settings: "ss01" 1;
  font-synthesis: weight;
  -webkit-font-synthesis: weight;
  background-color: var(--bg-body);
  color: var(--text-main);
  font-size: 23px;
  line-height: 1.7;
  -webkit-font-smoothing: subpixel-antialiased;
  -moz-osx-font-smoothing: auto;
  text-rendering: optimizeLegibility;
  text-shadow: 0 0 0.35px currentColor;
  transition: background-color 0.25s ease, color 0.25s ease;
}

h1, h2, h3, h4, h5, h6, b, strong, th {
  font-family: var(--font-base) !important;
  color: var(--text-heading);
  font-weight: 700;
  line-height: 1.3;
  text-shadow: 0 0 0.45px currentColor;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* 4. Global Container */
.site-container {
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
  width: 100%;
}

/* 5. Header & Navigation */
.site-header {
  background-color: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.header-nav-group {
  display: flex;
  align-items: center;
  gap: 30px;
}

.header-logo-link {
  display: flex;
  align-items: center;
}

.header-logo-img {
  height: 48px;
  width: auto;
}

/* Desktop Main Menu */
.main-nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-menu-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  font-size: 22px;
  font-weight: 600;
  color: var(--text-main);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.nav-menu-item:hover,
.nav-menu-item.current-menu-item {
  color: var(--brand-primary);
  background-color: rgba(6, 130, 0, 0.06);
}

/* Nav Dropdown */
.nav-item-dropdown {
  position: relative;
}

.dropdown-chevron {
  transition: transform 0.2s ease;
}

.nav-item-dropdown:hover .dropdown-chevron {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  min-width: 200px;
  padding: 8px 0;
  display: none;
  z-index: 1050;
  animation: dropdownFadeIn 0.15s ease-out;
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.nav-item-dropdown:hover .nav-dropdown-menu {
  display: block;
}

.dropdown-item {
  display: block;
  padding: 8px 18px;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-main);
  transition: all 0.15s ease;
}

.dropdown-item:hover,
.dropdown-item.active {
  background-color: rgba(6, 130, 0, 0.08);
  color: var(--brand-primary);
}

/* Author Panel Button */
.btn-author-panel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--brand-dark);
  color: #ffffff !important;
  padding: 7px 16px;
  font-size: 19.5px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  margin-left: 8px;
  transition: background-color 0.2s ease;
}

.btn-author-panel:hover {
  background-color: var(--brand-primary);
}

/* Header Action Group (Theme & Search) */
.header-action-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-theme-toggle-btn,
.header-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
}

.header-theme-toggle-btn:hover,
.header-search-btn:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  transform: scale(1.05);
}

.theme-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-icon-default svg { color: #eab308; }
.theme-icon-sepia svg { color: #92400e; }
.theme-icon-dark svg { color: #38bdf8; }

/* Mobile Menu Toggle Hamburger */
.mobile-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.mobile-nav-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: all 0.2s ease;
}

/* 6. Search Overlay Modal */
.search-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 16px;
}

.search-modal-overlay.active {
  display: flex;
}

.search-modal-content {
  background-color: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-modal);
  width: 100%;
  max-width: 680px;
  padding: 24px;
}

.search-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.search-modal-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-heading);
}

.search-modal-close {
  background: transparent;
  border: none;
  font-size: 28px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.search-input-group {
  display: flex;
  gap: 8px;
}

.search-input-field {
  flex: 1;
  padding: 12px 18px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 18px;
  outline: none;
}

.search-input-field:focus {
  border-color: var(--brand-primary);
}

.search-submit-btn {
  background-color: var(--brand-primary);
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
}

.search-results-dropdown {
  margin-top: 16px;
  max-height: 380px;
  overflow-y: auto;
}

.search-result-item {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.15s ease;
}

.search-result-item:hover {
  background-color: rgba(6, 130, 0, 0.06);
}

.search-res-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-heading);
}

.search-res-author {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* 7. Homepage Sections */
.site-section {
  padding: 25px 0;
  border-bottom: 1px solid var(--border-color);
}

.section-books {
  background-color: var(--bg-body);
}

.section-featured {
  background-color: var(--bg-body);
}

.section-latest {
  background-color: var(--bg-body);
  border-bottom: none;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  font-size: 33px;
  font-weight: 700;
  color: var(--text-heading);
}

.section-header-link {
  font-size: 19px;
  color: var(--brand-dark);
  font-weight: 700;
  transition: color 0.2s ease;
}

.section-header-link:hover {
  color: var(--brand-primary);
}

/* 8. Books Showcase Carousel */
.carousel-header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.carousel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
}

.carousel-btn:hover:not(:disabled) {
  background-color: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
}

.carousel-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.books-carousel-wrapper {
  position: relative;
  width: 100%;
}

.books-carousel-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 10px 4px 15px 4px;
}

.books-carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-book-card-item {
  flex: 0 0 calc((100% - (20px * 4)) / 5);
  min-width: 180px;
}

.carousel-float-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
}

.carousel-float-arrow.prev { left: -18px; }
.carousel-float-arrow.next { right: -18px; }

.carousel-float-arrow:hover:not(:disabled) {
  background-color: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
  transform: translateY(-50%) scale(1.08);
}

.carousel-float-arrow:disabled {
  opacity: 0;
  pointer-events: none;
}

/* Book Card Component */
.book-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-card);
  padding: 16px 14px 18px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.25s ease;
}

.book-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.book-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.book-cover-wrap {
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 12px;
  background-color: var(--bg-muted);
}

.book-cover-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.book-cover-placeholder {
  font-size: 48px;
  padding: 60px 0;
  color: var(--text-light);
}

.book-card-author {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.book-card-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 8px;
  line-height: 1.4;
}

.book-card-pricing {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
}

.book-price-regular {
  font-size: 17.5px;
  color: #94a3b8;
  text-decoration: line-through;
}

.book-price-final {
  font-size: 23px;
  font-weight: 800;
  color: var(--brand-dark);
}

/* 9. Posts Grid (4 Columns) */
.posts-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(200px, 1fr));
  gap: 20px;
  width: 100%;
}

/* Post Card Component */
.post-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: var(--radius-md);
  padding: 20px 20px 16px 20px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.25s ease;
}

.post-card--featured {
  background-color: var(--bg-card-featured);
  border-color: var(--border-featured);
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.post-card-body {
  display: flex;
  flex-direction: column;
}

.post-card-author-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.post-card-avatar-wrap {
  flex-shrink: 0;
}

.post-card-avatar-img,
.post-card-avatar-placeholder {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.post-card-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(6, 130, 0, 0.12);
  color: var(--brand-primary);
  font-size: 20px;
  font-weight: 700;
}

.post-card-titles-wrap {
  display: flex;
  flex-direction: column;
}

.post-card-author-name {
  font-size: 19px;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.2;
  margin-bottom: 4px;
}

.post-card-author-name:hover {
  color: var(--brand-primary);
}

.post-card-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.35;
  transition: color 0.2s ease;
}

.post-card-title:hover {
  color: var(--brand-primary);
}

.post-card-excerpt {
  font-size: 21px;
  font-weight: 500;
  line-height: 1.48;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  font-size: 18px;
}

.post-card-category-link {
  color: var(--brand-dark);
  font-weight: 700;
}

.post-card-category-link:hover {
  color: var(--brand-primary);
}

.post-card-date {
  color: var(--text-light);
}

/* 10. Single Post Reading Page */
.single-post-page {
  padding-top: 30px;
  padding-bottom: 50px;
}

.article-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
  align-items: start;
}

.article-main {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-sm);
}

.article-header {
  margin-bottom: 20px;
}

.article-meta-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.article-author-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--brand-primary);
}

.article-author-name:hover {
  color: var(--brand-primary-hover);
}

.header-meta-sep {
  color: var(--text-light);
}

.article-reading-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--brand-primary);
  background: var(--brand-light);
  border: 1px solid var(--brand-light-border);
  padding: 2px 10px;
  border-radius: var(--radius-full);
}

.article-meta-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 16px;
  font-weight: 600;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fde68a;
  padding: 2px 10px;
  border-radius: var(--radius-full);
}

.article-meta-rating strong {
  font-weight: 700;
  color: #92400e;
}

.top-rating-count {
  font-size: 15px;
  color: #b45309;
}

.article-title {
  font-size: 33px;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.35;
}

/* In-Article Reader Toolbar */
.reader-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-muted);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 16px;
  margin: 18px 0 26px 0;
}

.reader-toolbar-left,
.reader-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reader-toolbar-label {
  font-size: 16.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.reader-font-controls {
  display: inline-flex;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.reader-font-btn {
  background: transparent;
  border: none;
  min-width: 32px;
  height: 28px;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text-main);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.reader-font-btn:hover {
  background-color: var(--bg-muted);
  color: var(--brand-primary);
}

.article-featured-image-wrap {
  margin-bottom: 26px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.article-featured-img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

/* Article Body Content Typography & Headings Hierarchy */
.article-content-body,
.single-article-content-body {
  font-size: 21.5px;
  font-weight: 500;
  line-height: 1.62;
  color: var(--text-main);
  word-wrap: break-word;
}

/* Headings inside Article Body */
.article-content-body h1,
.single-article-content-body h1 {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-heading);
  margin-top: 32px;
  margin-bottom: 16px;
}

.article-content-body h2,
.single-article-content-body h2 {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-heading);
  margin-top: 28px;
  margin-bottom: 14px;
}

.article-content-body h3,
.single-article-content-body h3 {
  font-size: 23px;
  font-weight: 700;
  line-height: 1.38;
  color: var(--text-heading);
  margin-top: 24px;
  margin-bottom: 12px;
}

.article-content-body h4,
.single-article-content-body h4 {
  font-size: 20.5px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-heading);
  margin-top: 20px;
  margin-bottom: 10px;
}

.article-content-body h5,
.single-article-content-body h5 {
  font-size: 18.5px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text-heading);
  margin-top: 18px;
  margin-bottom: 8px;
}

.article-content-body h6,
.single-article-content-body h6 {
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text-muted);
  margin-top: 16px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.article-content-body h1:first-child,
.article-content-body h2:first-child,
.article-content-body h3:first-child,
.article-content-body h4:first-child,
.article-content-body h5:first-child,
.article-content-body h6:first-child,
.single-article-content-body h1:first-child,
.single-article-content-body h2:first-child,
.single-article-content-body h3:first-child,
.single-article-content-body h4:first-child,
.single-article-content-body h5:first-child,
.single-article-content-body h6:first-child {
  margin-top: 0;
}

.article-content-body p,
.single-article-content-body p {
  margin-bottom: 14px;
}

.article-content-body p:last-child,
.single-article-content-body p:last-child {
  margin-bottom: 0;
}

/* Maintain blank lines for poem stanzas and paragraphs */
.article-content-body p:empty,
.single-article-content-body p:empty,
.article-content-body p > br:only-child,
.single-article-content-body p > br:only-child {
  min-height: 1.5em;
  display: block;
}

/* Quill alignment support in published posts */
.article-content-body .ql-align-center,
.single-article-content-body .ql-align-center {
  text-align: center !important;
}

.article-content-body .ql-align-right,
.single-article-content-body .ql-align-right {
  text-align: right !important;
}

.article-content-body .ql-align-justify,
.single-article-content-body .ql-align-justify {
  text-align: justify !important;
  text-justify: inter-word !important;
}

.article-content-body .ql-align-left,
.single-article-content-body .ql-align-left {
  text-align: left !important;
}

.article-content-body a,
.single-article-content-body a {
  color: var(--brand-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

.article-content-body a:hover,
.single-article-content-body a:hover {
  color: var(--brand-primary-hover);
}

.article-content-body strong,
.article-content-body b,
.single-article-content-body strong,
.single-article-content-body b {
  font-weight: 700;
  color: var(--text-heading);
  -webkit-text-stroke: 0.35px currentColor;
  text-shadow: 0.5px 0 0.1px currentColor;
}

.article-content-body em,
.article-content-body i,
.single-article-content-body em,
.single-article-content-body i {
  font-style: italic;
  display: inline-block;
  transform: skewX(-9deg);
  transform-origin: bottom center;
}

.article-content-body u,
.single-article-content-body u {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.article-content-body blockquote,
.single-article-content-body blockquote {
  border-left: 4px solid var(--brand-primary);
  padding: 8px 22px;
  margin: 18px 0 0 0;
  background-color: var(--bg-muted);
  font-style: italic;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text-main);
  line-height: 1.62;
}

.article-content-body blockquote:last-child,
.single-article-content-body blockquote:last-child {
  margin-bottom: 18px;
}

/* Consecutive blockquotes merge into ONE continuous quote box for poems */
.article-content-body blockquote + blockquote,
.single-article-content-body blockquote + blockquote {
  margin-top: 0 !important;
  padding-top: 4px !important;
  padding-bottom: 6px !important;
  border-top-right-radius: 0 !important;
  border-top-left-radius: 0 !important;
}

.article-content-body blockquote:has(+ blockquote),
.single-article-content-body blockquote:has(+ blockquote) {
  margin-bottom: 0 !important;
  padding-bottom: 4px !important;
  border-bottom-right-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

.article-content-body blockquote p,
.single-article-content-body blockquote p {
  margin-bottom: 0;
}

.article-content-body ul,
.single-article-content-body ul {
  list-style-type: disc;
  padding-left: 28px;
  margin: 16px 0 20px;
}

.article-content-body ol,
.single-article-content-body ol {
  list-style-type: decimal;
  padding-left: 28px;
  margin: 16px 0 20px;
}

.article-content-body li,
.single-article-content-body li {
  margin-bottom: 8px;
  line-height: 1.55;
}

.article-content-body hr,
.single-article-content-body hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 32px 0;
}

.article-content-body img,
.single-article-content-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 20px auto;
  display: block;
}

.article-content-body figure,
.single-article-content-body figure {
  margin: 24px 0;
  text-align: center;
}

.article-content-body figcaption,
.single-article-content-body figcaption {
  font-size: 15.5px;
  color: var(--text-muted);
  margin-top: 8px;
  font-style: italic;
}

.article-content-body table,
.single-article-content-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 18px;
}

.article-content-body th,
.article-content-body td,
.single-article-content-body th,
.single-article-content-body td {
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  text-align: left;
}

.article-content-body th,
.single-article-content-body th {
  background-color: var(--bg-muted);
  font-weight: 700;
  color: var(--text-heading);
}

.article-content-body tr:nth-child(even),
.single-article-content-body tr:nth-child(even) {
  background-color: var(--bg-muted);
}

/* Article Reader Rating Widget */
.article-rating-section {
  margin: 36px 0 20px;
}

.article-rating-card {
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.35), rgba(255, 251, 235, 0.8));
  border: 1.5px solid #fde68a;
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.08);
  transition: all 0.25s ease;
}

.rating-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.rating-card-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

.rating-card-title {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-heading);
}

.rating-card-subtitle {
  margin: 0;
  font-size: 16.5px;
  color: var(--text-muted);
}

.rating-interactive-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 14px 20px;
  background: #ffffff;
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
}

.rating-stars-container {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rating-star-btn {
  background: transparent;
  border: none;
  font-size: 34px;
  line-height: 1;
  color: #cbd5e1;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 6px;
  transition: transform 0.15s ease, color 0.15s ease;
}

.rating-star-btn:hover {
  transform: scale(1.2);
}

.rating-star-btn.hovered,
.rating-star-btn.active {
  color: #f59e0b;
  text-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

.rating-stat-summary {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-weight: 700;
}

.rating-avg-score {
  font-size: 26px;
  color: #b45309;
}

.rating-scale-divider {
  font-size: 16px;
  color: var(--text-light);
  font-weight: 500;
}

.rating-total-votes {
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 500;
  margin-left: 4px;
}

.rating-feedback-msg {
  margin-top: 14px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  animation: ratingSlideDown 0.25s ease-out;
}

.rating-feedback-msg.success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.rating-feedback-msg.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

@keyframes ratingSlideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Comments Section */
.article-comments-area {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
}

.comments-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
}

.comments-stream {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 30px;
}

.comment-item-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.comment-item-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.comment-item-author {
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-dark);
}

.comment-item-date {
  font-size: 13px;
  color: var(--text-light);
}

.comment-item-body {
  font-size: 17px;
  color: var(--text-main);
  line-height: 1.6;
}

.comment-form-heading {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 14px;
}

.comment-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.comment-text-input,
.comment-textarea-input {
  width: 100%;
  padding: 10px 14px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  outline: none;
}

.comment-text-input:focus,
.comment-textarea-input:focus {
  border-color: var(--brand-primary);
}

.comment-btn-submit {
  margin-top: 14px;
  background-color: var(--brand-primary);
  color: #ffffff;
  border: none;
  padding: 11px 26px;
  border-radius: var(--radius-md);
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.comment-btn-submit:hover {
  background-color: var(--brand-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(185, 28, 28, 0.2);
}

/* Logged-in Commenter Profile Badge */
.comment-logged-in-user-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
}

.comment-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--brand-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

.comment-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comment-user-info {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 15px;
}

.comment-user-label {
  color: var(--text-light);
  font-size: 14px;
}

.comment-user-name {
  color: var(--brand-dark);
  font-weight: 700;
  font-size: 16px;
}

.comment-user-email {
  color: var(--text-light);
  font-size: 13.5px;
}

/* Login Required Box */
.comment-login-required-card {
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.9), rgba(241, 245, 249, 0.9));
  border: 1.5px dashed #cbd5e1;
  border-radius: 12px;
  padding: 28px 24px;
  text-align: center;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.comment-login-lock-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fee2e2;
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.comment-login-title {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.comment-login-desc {
  font-size: 16px;
  color: #475569;
  max-width: 440px;
  margin: 0 0 8px;
  line-height: 1.5;
}

.comment-login-btn-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.comment-login-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-primary);
  color: #ffffff !important;
  font-weight: 600;
  font-size: 16px;
  padding: 9px 20px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(185, 28, 28, 0.2);
}

.comment-login-btn-primary:hover {
  background: var(--brand-primary-hover);
  color: #ffffff !important;
  transform: translateY(-1px);
}

.comment-login-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  color: #334155 !important;
  font-weight: 600;
  font-size: 16px;
  padding: 9px 18px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  text-decoration: none;
  transition: all 0.15s ease;
}

.comment-login-btn-secondary:hover {
  background: #f8fafc;
  color: #0f172a !important;
  border-color: #94a3b8;
}

/* Sidebar Styling */
.sidebar-card-widget {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 100px;
}

.sidebar-author-profile {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-author-header {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.sidebar-author-avatar-wrap {
  width: 64px;
  height: 64px;
  min-width: 64px;
  max-width: 64px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: block;
  background: var(--bg-muted);
  border: 2.5px solid var(--brand-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-author-avatar-wrap:hover {
  transform: scale(1.04);
}

.sidebar-author-avatar-wrap img,
.sidebar-author-avatar-wrap .author-profile-avatar-img,
.sidebar-author-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.sidebar-author-avatar-wrap .author-profile-avatar-placeholder,
.sidebar-author-avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(6, 130, 0, 0.12);
  color: var(--brand-primary);
  font-size: 24px;
  font-weight: 700;
}

.sidebar-author-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.sidebar-author-name-link {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.3;
  text-decoration: none;
  transition: color 0.15s ease;
  word-break: break-word;
}

.sidebar-author-name-link:hover {
  color: var(--brand-primary);
}

.sidebar-author-badge-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.sidebar-author-role-pill {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-muted);
  padding: 2px 9px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  line-height: 1.4;
}

.sidebar-author-bio-text {
  font-size: 18.5px;
  font-weight: 500;
  color: var(--text-main);
  opacity: 0.92;
  line-height: 1.75;
  margin-top: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

.sidebar-author-view-profile {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--brand-primary);
  text-decoration: none;
  margin-top: 6px;
  transition: gap 0.2s ease, color 0.15s ease;
}

.sidebar-author-view-profile:hover {
  color: var(--brand-dark);
  gap: 9px;
}

.sidebar-author-view-profile svg {
  transition: transform 0.2s ease;
}

.sidebar-author-view-profile:hover svg {
  transform: translateX(3px);
}

.sidebar-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 18px 0;
}

.sidebar-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  margin-bottom: 12px;
}

.sidebar-category-link {
  font-weight: 700;
  color: var(--brand-primary);
}

.sidebar-views-count {
  font-weight: 700;
  color: var(--brand-dark);
}

.sidebar-date-label,
.sidebar-share-label {
  font-weight: 600;
  color: var(--text-muted);
}

.social-share-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.social-share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  transition: all 0.2s ease;
}

.social-share-button:hover {
  background-color: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
}

.sidebar-quick-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-link-pill {
  font-size: 16px;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.sidebar-link-pill:hover {
  color: var(--brand-primary);
}

.sidebar-ad-banner {
  border-radius: var(--radius-md);
  width: 100%;
}

/* Related Posts */
.related-posts-section {
  margin-top: 40px;
}

/* 11. Floating Quote Selection Toolbar */
.quote-selection-toolbar {
  position: absolute;
  z-index: 9999;
  background: #1e293b;
  border-radius: var(--radius-md);
  padding: 4px;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.35);
  display: flex;
  gap: 4px;
  transform: translate(-50%, -100%);
  margin-top: -10px;
  animation: quoteFadeIn 0.15s ease-out;
}

.quote-selection-toolbar::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px 6px 0;
  border-style: solid;
  border-color: #1e293b transparent transparent;
}

@keyframes quoteFadeIn {
  from { opacity: 0; transform: translate(-50%, -90%); }
  to { opacity: 1; transform: translate(-50%, -100%); }
}

.quote-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #334155;
  color: #f8fafc;
  border: none;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.quote-tool-btn:hover {
  background: #475569;
}

.quote-tool-btn.primary {
  background: var(--brand-primary);
  color: #ffffff;
}

.quote-tool-btn.primary:hover {
  background: var(--brand-primary-hover);
}

/* Quote Card Modal */
.quote-card-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.quote-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
}

.quote-modal-content {
  position: relative;
  z-index: 2;
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 540px;
  width: 100%;
  padding: 24px;
  box-shadow: var(--shadow-modal);
}

.quote-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.quote-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.quote-modal-close {
  background: transparent;
  border: none;
  font-size: 24px;
  color: #94a3b8;
  cursor: pointer;
}

.quote-card-preview-box {
  position: relative;
  background: linear-gradient(135deg, #074718 0%, #068200 100%);
  color: #ffffff;
  border-radius: 18px;
  padding: 36px 32px 28px;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 460px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  box-sizing: border-box;
}

.quote-card-watermark {
  position: absolute;
  right: -10px;
  bottom: -20px;
  font-size: 140px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.05);
  pointer-events: none;
  user-select: none;
  font-family: 'payasti_uni', 'Hind Siliguri', sans-serif;
}

.quote-card-quote-mark {
  font-size: 76px;
  line-height: 0.8;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.45);
  font-family: Georgia, 'Times New Roman', serif;
  user-select: none;
}

.quote-card-text {
  font-family: 'payasti_uni', 'Hind Siliguri', sans-serif !important;
  font-feature-settings: "ss01" 1 !important;
  -webkit-font-feature-settings: "ss01" 1 !important;
  font-size: 22px;
  line-height: 1.7;
  color: #ffffff;
  font-weight: 600;
  margin: auto 0;
  padding: 12px 0;
  white-space: pre-line;
  max-height: 320px;
  overflow-y: auto;
  letter-spacing: 0.15px;
}

.quote-card-footer {
  border-top: 1.5px solid rgba(255, 255, 255, 0.22);
  padding-top: 16px;
}

.quote-card-author {
  font-family: 'payasti_uni', 'Hind Siliguri', sans-serif;
  font-size: 18.5px;
  font-weight: 700;
  color: #fffae6;
  letter-spacing: 0.1px;
}

.quote-card-source {
  font-family: 'payasti_uni', 'Hind Siliguri', sans-serif;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 2px;
}

.quote-modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.quote-btn-action {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

.quote-btn-action.btn-download {
  background-color: var(--brand-primary);
  color: #ffffff;
}

.quote-btn-action.btn-copy {
  background-color: #f1f5f9;
  color: #334155;
}

/* 12. Category Tabs & Subcategories */
.category-main-title {
  font-size: 38px;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 16px;
}

.subcategory-tabs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.subcat-tab-link {
  display: inline-block;
  padding: 7px 16px;
  font-size: 19px;
  font-weight: 600;
  color: var(--text-muted);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
}

.subcat-tab-link:hover,
.subcat-tab-link.active {
  background-color: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
}

/* 13. Pagination Component */
.pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 40px;
  margin-bottom: 20px;
}

.page-link-item,
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 16px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.page-link-item:hover,
.page-link-item.active,
.page-btn:hover,
.page-btn.active {
  background-color: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
}

.page-btn.disabled {
  opacity: 0.5;
  cursor: default;
}

/* 14. Footer Component */
.site-footer {
  background-color: var(--bg-footer);
  border-top: 1px solid var(--border-color);
  padding-top: 45px;
  margin-top: 40px;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo-img {
  max-width: 200px;
  margin-bottom: 18px;
  filter: brightness(0);
  transition: filter 0.25s ease;
}

.theme-dark .footer-logo-img {
  filter: none;
}

.footer-about-text {
  font-size: 19px;
  font-weight: 500;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.footer-terms-btn {
  display: inline-block;
  padding: 6px 14px;
  background-color: var(--brand-primary);
  color: #ffffff;
  border-radius: var(--radius-sm);
  font-size: 17.5px;
  font-weight: 600;
}

.footer-heading-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 14px;
}

.footer-editorial-text {
  font-size: 19px;
  font-weight: 500;
  line-height: 1.85;
  color: var(--text-muted);
}

.footer-social-desc {
  font-size: 19px;
  font-weight: 500;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.footer-fb-link {
  display: inline-block;
  padding: 8px 16px;
  background-color: var(--brand-dark);
  color: #ffffff;
  border-radius: var(--radius-sm);
  font-size: 18.5px;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.footer-fb-link:hover {
  background-color: var(--brand-primary);
}

.footer-copyright-bar {
  border-top: 1px solid var(--border-color);
  padding: 16px 0;
  font-size: 16.5px;
  font-weight: 500;
  color: var(--text-light);
  background-color: var(--bg-muted);
}

.copyright-inner {
  display: flex;
  align-items: center;
  justify-content: center;
}

.copyright-link {
  color: var(--brand-dark);
  font-weight: 600;
}

/* 15. Author Directory & Author Profile Pages */
.authors-hero-section {
  padding: 36px 0 20px 0;
}

.authors-intro-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 32px;
  box-shadow: var(--shadow-sm);
}

.authors-page-title {
  margin: 0 0 12px 0;
  font-size: 34px;
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1.3;
}

.authors-intro-desc {
  font-size: 21.5px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.8;
  margin: 0;
}

.authors-list-section {
  padding: 24px 0 60px 0;
}

.author-search-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}

.author-search-form {
  display: flex;
  gap: 10px;
  flex: 1;
  max-width: 520px;
}

.author-search-input {
  flex: 1;
  padding: 10px 18px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 19.5px;
  background: var(--bg-surface);
  color: var(--text-heading);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.author-search-input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(6, 130, 0, 0.12);
}

.author-search-btn {
  padding: 10px 24px;
  background: var(--brand-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 19.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.author-search-btn:hover {
  background: var(--brand-primary-hover);
}

.author-count-badge {
  font-size: 18.5px;
  color: var(--brand-primary);
  font-weight: 700;
  background: rgba(6, 130, 0, 0.08);
  border: 1px solid rgba(6, 130, 0, 0.2);
  padding: 8px 20px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.authors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.author-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 18px;
  align-items: flex-start;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.author-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.author-card-avatar-wrap {
  width: 68px;
  height: 68px;
  min-width: 68px;
  max-width: 68px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: block;
  background: var(--bg-muted);
  border: 2.5px solid var(--brand-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.author-card-avatar-wrap img,
.author-card-avatar-wrap .author-profile-avatar-img,
.author-card-avatar-img {
  width: 100% !important;
  height: 100% !important;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.author-card-avatar-wrap .author-profile-avatar-placeholder,
.author-card-avatar-placeholder {
  width: 100% !important;
  height: 100% !important;
  border-radius: 50%;
  background: var(--bg-muted);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-muted);
}

.author-meta {
  flex: 1;
  min-width: 0;
}

.author-card-name {
  margin: 0 0 6px 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
}

.author-card-name a {
  color: var(--text-heading);
  text-decoration: none;
  transition: color 0.2s ease;
}

.author-card-name a:hover {
  color: var(--brand-primary);
}

.author-recent-posts {
  margin: 8px 0 0 0;
  padding-left: 18px;
  font-size: 18.5px;
  color: var(--text-muted);
  line-height: 1.65;
}

.author-recent-posts li {
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.author-recent-posts a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.author-recent-posts a:hover {
  color: var(--brand-primary);
}

.author-no-posts {
  margin: 6px 0 0 0;
  font-size: 17.5px;
  color: var(--text-light);
}

.no-authors-found {
  text-align: center;
  padding: 60px 0;
  color: var(--text-muted);
}

.no-authors-found p {
  font-size: 22px;
  font-weight: 500;
  margin: 0;
}

/* Author Profile Specific */
.author-profile-hero {
  display: flex;
  gap: 24px;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 36px;
}

.author-profile-avatar-wrap {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-muted);
  border: 3px solid var(--brand-primary);
}

.author-profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.author-profile-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  font-weight: 700;
  color: var(--text-muted);
}

.author-profile-name {
  margin: 0 0 8px 0;
  font-size: 32px;
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1.3;
}

.author-profile-bio {
  font-size: 20px;
  color: var(--text-muted);
  line-height: 1.75;
  margin: 0;
}

.author-profile-count {
  font-size: 18px;
  color: var(--brand-primary);
  font-weight: 700;
}

.author-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  vertical-align: middle;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.author-badge-tag.badge-viral {
  background: #ffffff;
  color: #b45309;
  border: 1px solid #fde68a;
  box-shadow: 0 1px 4px rgba(180, 83, 9, 0.12);
}

.author-badge-tag.badge-popular {
  background: #ffffff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
  box-shadow: 0 1px 4px rgba(109, 40, 217, 0.12);
}

.author-badge-tag.badge-master {
  background: #ffffff;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.author-badge-tag.badge-rising {
  background: #ffffff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

[data-theme="dark"] .author-badge-tag {
  background: #1e293b;
  border-color: #334155;
  box-shadow: none;
}

[data-theme="dark"] .author-badge-tag.badge-viral {
  background: #1e293b;
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.35);
}

[data-theme="dark"] .author-badge-tag.badge-popular {
  background: #1e293b;
  color: #c084fc;
  border-color: rgba(192, 132, 252, 0.35);
}

[data-theme="dark"] .author-badge-tag.badge-master {
  background: #1e293b;
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.35);
}

[data-theme="dark"] .author-badge-tag.badge-rising {
  background: #1e293b;
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.35);
}

[data-theme="sepia"] .author-badge-tag {
  background: #fbf7ee;
  border-color: #e4d8c5;
}

[data-theme="sepia"] .author-badge-tag.badge-viral {
  background: #fbf7ee;
  color: #92400e;
  border-color: #fcd34d;
}

[data-theme="sepia"] .author-badge-tag.badge-popular {
  background: #fbf7ee;
  color: #5b21b6;
  border-color: #c4b5fd;
}

/* ==========================================================================
   UNIQUE AUTHOR AVATAR FLOATING BADGES (WHITE BACKGROUND)
   ========================================================================== */
.avatar-badge-wrap {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}

.avatar-floating-badge {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  z-index: 5;
  line-height: 1;
  user-select: none;
  cursor: default;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.avatar-floating-badge:hover {
  transform: scale(1.2);
}

.avatar-floating-badge.badge-viral,
.avatar-floating-badge.badge-popular,
.avatar-floating-badge.badge-master {
  background: #ffffff;
}

/* Size Variants */
.badge-size-lg {
  width: 32px;
  height: 32px;
  font-size: 17px;
  bottom: -4px;
  right: -4px;
}

.badge-size-md {
  width: 26px;
  height: 26px;
  font-size: 13px;
  bottom: -4px;
  right: -4px;
}

.badge-size-sm {
  width: 20px;
  height: 20px;
  font-size: 11px;
  bottom: -3px;
  right: -3px;
}

[data-theme="dark"] .avatar-floating-badge {
  background: #1e293b;
  border-color: #475569;
}

[data-theme="sepia"] .avatar-floating-badge {
  background: #fbf7ee;
  border-color: #d6c7b2;
}

/* 16. Responsive Media Queries */
@media (max-width: 1200px) {
  .posts-grid-4 {
    grid-template-columns: repeat(3, minmax(200px, 1fr));
  }
  .carousel-book-card-item {
    flex: 0 0 calc((100% - (20px * 3)) / 4);
  }
}

@media (max-width: 991px) {
  .header-inner {
    height: 70px;
  }
  
  .main-nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(100vh - 70px);
    height: calc(100dvh - 70px);
    max-height: calc(100dvh - 70px);
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    align-items: stretch;
    padding: 16px 20px 48px;
    gap: 6px;
    display: none;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    z-index: 1050;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
  }
  
  .main-nav-menu.active,
  .main-nav-menu.mobile-open {
    display: flex !important;
  }

  .nav-item-dropdown {
    width: 100%;
    position: static;
  }

  .nav-item-dropdown .dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    cursor: pointer;
  }

  .nav-item-dropdown .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: 1px solid var(--border-color);
    background-color: var(--bg-muted);
    border-radius: var(--radius-md);
    margin-top: 4px;
    margin-bottom: 8px;
    padding: 6px 0;
    width: 100%;
    display: none;
    animation: none;
  }

  .nav-item-dropdown.open .nav-dropdown-menu {
    display: block;
  }

  .nav-item-dropdown.open .dropdown-chevron {
    transform: rotate(180deg);
  }

  .nav-menu-item {
    width: 100%;
    padding: 11px 14px;
    font-size: 21px;
    border-radius: var(--radius-md);
  }

  .dropdown-item {
    padding: 9px 18px;
    font-size: 19.5px;
  }

  .btn-author-panel {
    width: 100%;
    margin: 12px 0 10px 0;
    justify-content: center;
    padding: 12px 16px;
    font-size: 19.5px;
    border-radius: var(--radius-md);
  }
  
  .mobile-nav-toggle {
    display: flex;
    position: relative;
    z-index: 1060;
  }

  .mobile-nav-toggle.active span:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
  }
  .mobile-nav-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }
  .mobile-nav-toggle.active span:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
  }

  body.mobile-nav-locked {
    overflow: hidden !important;
    touch-action: none;
  }
  
  .article-layout-grid {
    grid-template-columns: 1fr;
  }
  
  .sidebar-card-widget {
    position: static;
  }
  
  .posts-grid-4 {
    grid-template-columns: repeat(2, minmax(200px, 1fr));
  }
  
  .carousel-book-card-item {
    flex: 0 0 calc((100% - (20px * 2)) / 3);
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 640px) {
  html, body {
    font-size: 21px;
  }
  
  .posts-grid-4 {
    grid-template-columns: 1fr;
  }
  
  .carousel-book-card-item {
    flex: 0 0 75%;
  }
  
  .carousel-float-arrow {
    display: none;
  }
  
  .article-title {
    font-size: 27px;
  }
  
  .article-main {
    padding: 20px 16px;
  }
  
  .comment-fields-grid {
    grid-template-columns: 1fr;
  }

  .authors-page-title {
    font-size: 28px;
  }
  
  .authors-intro-desc {
    font-size: 19.5px;
  }

  .authors-grid {
    grid-template-columns: 1fr;
  }

  .author-search-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .author-search-form {
    max-width: 100%;
  }

  .author-profile-hero {
    flex-direction: column;
    text-align: center;
  }
}

/* ==========================================================================
   POETRY FOUNDATION FEATURES: POEM OF THE DAY, THEME EXPLORER, SURPRISE ME
   ========================================================================== */

/* 1. Header Surprise Me Button */
.header-random-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: rgba(6, 130, 0, 0.08);
  border: 1px solid rgba(6, 130, 0, 0.2);
  border-radius: 20px;
  color: var(--brand-primary);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  line-height: 1;
}
.header-random-btn:hover {
  background: var(--brand-primary);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(6, 130, 0, 0.2);
}
.header-random-icon {
  font-size: 16px;
}

/* 2. POEM OF THE DAY FRONT PAGE SHOWCASE */
.section-daily-poem {
  background-color: var(--bg-body);
}

.daily-poem-showcase-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 22px 28px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.25s ease;
}

.daily-poem-showcase-card:hover {
  box-shadow: var(--shadow-hover);
}

.daily-poem-showcase-main {
  flex: 1;
  min-width: 0;
}

.daily-poem-top-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border-color);
}

.daily-poem-pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background-color: rgba(6, 130, 0, 0.09);
  color: var(--brand-primary);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
}

.daily-poem-author-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.daily-poem-header-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.daily-poem-author-name-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.daily-poem-author-name {
  font-size: 18.5px;
  font-weight: 700;
  color: var(--text-heading);
  text-decoration: none;
  transition: color 0.2s;
}

.daily-poem-author-name:hover {
  color: var(--brand-primary);
}

.daily-poem-meta-bullet {
  color: var(--text-muted);
  font-size: 13px;
}

.daily-poem-category-badge {
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-dark);
}

.daily-poem-date-tag {
  font-size: 14.5px;
  color: var(--text-muted);
}

.daily-poem-showcase-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 8px;
  line-height: 1.4;
}

.daily-poem-showcase-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.daily-poem-showcase-title a:hover {
  color: var(--brand-primary);
}

.daily-poem-showcase-stanza {
  font-size: 20px;
  line-height: 1.8;
  color: var(--text-main);
  font-style: italic;
  padding-left: 14px;
  border-left: 3px solid var(--brand-primary);
  margin-top: 6px;
}

.daily-poem-showcase-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  flex-shrink: 0;
  min-width: 170px;
}

.daily-poem-primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  background-color: var(--brand-primary);
  color: #ffffff;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.daily-poem-primary-btn:hover {
  background-color: var(--brand-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(6, 130, 0, 0.25);
}

.daily-poem-secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.daily-poem-secondary-btn:hover {
  background-color: var(--border-color);
  color: var(--text-heading);
}

@media (max-width: 768px) {
  .daily-poem-showcase-card {
    flex-direction: column;
    align-items: stretch;
    padding: 18px 16px;
  }
  .daily-poem-showcase-actions {
    flex-direction: row;
    margin-top: 14px;
  }
  .daily-poem-primary-btn {
    flex: 1;
  }
}

/* 3. OPTION 1: 4-COLUMN GRID INTEGRATED DAILY POEM CARD */
.post-card--daily-poem {
  border: 1.5px solid rgba(6, 130, 0, 0.35) !important;
  background: #ffffff !important;
  position: relative;
  display: flex;
  flex-direction: column;
}
.daily-poem-card-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: rgba(6, 130, 0, 0.07);
  border-bottom: 1px solid rgba(6, 130, 0, 0.15);
}
.daily-poem-topbar-pill {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--brand-primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.daily-poem-topbar-date {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}
.daily-poem-grid-stanza {
  font-style: italic;
  line-height: 1.7;
  color: #334155;
  border-left: 2px solid rgba(6, 130, 0, 0.3);
  padding-left: 8px;
  margin-top: 6px;
}
.daily-poem-grid-link {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--brand-primary);
  text-decoration: none;
}
.daily-poem-grid-link:hover {
  text-decoration: underline;
}

/* Sepia & Dark Theme Adaptations for Option 1 & 2 */
[data-theme="sepia"] .daily-poem-strip,
.theme-sepia .daily-poem-strip,
[data-theme="sepia"] .post-card--daily-poem,
.theme-sepia .post-card--daily-poem {
  background: #fbf7ee !important;
  border-color: #e5dec9 !important;
}
[data-theme="sepia"] .daily-poem-strip-title,
.theme-sepia .daily-poem-strip-title {
  color: #433422;
}
[data-theme="sepia"] .daily-poem-card-topbar,
.theme-sepia .daily-poem-card-topbar {
  background: rgba(180, 130, 60, 0.1);
  border-color: #e5dec9;
}

[data-theme="dark"] .daily-poem-strip,
.theme-dark .daily-poem-strip,
[data-theme="dark"] .post-card--daily-poem,
.theme-dark .post-card--daily-poem {
  background: #1e293b !important;
  border-color: #334155 !important;
}
[data-theme="dark"] .daily-poem-strip-title,
.theme-dark .daily-poem-strip-title {
  color: #f8fafc;
}
[data-theme="dark"] .daily-poem-strip-author,
.theme-dark .daily-poem-strip-author {
  color: #cbd5e1;
}
[data-theme="dark"] .daily-poem-card-topbar,
.theme-dark .daily-poem-card-topbar {
  background: rgba(6, 130, 0, 0.15);
  border-color: #334155;
}
[data-theme="dark"] .daily-poem-grid-stanza,
.theme-dark .daily-poem-grid-stanza {
  color: #cbd5e1;
}
  font-weight: 700;
  color: #0f172a;
  text-decoration: none;
}
.daily-poem-author-name:hover {
  color: var(--brand-primary);
}
.daily-poem-cat-tag {
  font-size: 13px;
  color: #64748b;
}
.daily-poem-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 18px;
  border-top: 1px solid #f1f5f9;
}
.daily-poem-read-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  background: var(--brand-primary);
  color: #ffffff;
  border-radius: 24px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}
.daily-poem-read-btn:hover {
  background: #046300;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(6, 130, 0, 0.25);
}
.daily-poem-random-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #475569;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}
.daily-poem-random-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* 3. Theme Explorer Pills & Bar */
.theme-explorer-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 22px 26px;
  margin: 10px 0 20px 0;
}
.theme-explorer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.theme-explorer-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.theme-explorer-icon {
  font-size: 20px;
}
.theme-explorer-title {
  font-size: 22px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}
.theme-explorer-all-link {
  font-size: 15px;
  font-weight: 600;
  color: var(--brand-primary);
  text-decoration: none;
}
.theme-explorer-all-link:hover {
  text-decoration: underline;
}
.theme-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.theme-pill-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: var(--pill-bg, rgba(6, 130, 0, 0.08));
  border: 1.5px solid var(--pill-border, rgba(6, 130, 0, 0.25));
  border-radius: 24px;
  color: #1e293b;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.theme-pill-item:hover {
  transform: translateY(-2px);
  background: var(--pill-color, var(--brand-primary));
  color: #ffffff;
  border-color: var(--pill-color, var(--brand-primary));
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.theme-pill-item.is-active {
  background: var(--pill-color, var(--brand-primary));
  color: #ffffff;
  border-color: var(--pill-color, var(--brand-primary));
}
.theme-pill-icon {
  font-size: 16px;
}

/* 4. Themes Directory Page Layout */
.themes-directory-hero {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 40px auto;
}
.themes-hero-badge {
  display: inline-block;
  background: rgba(6, 130, 0, 0.1);
  color: var(--brand-primary);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
}
.themes-hero-title {
  font-size: 34px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 12px;
}
.themes-hero-desc {
  font-size: 20px;
  color: #475569;
  line-height: 1.7;
}
.themes-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.theme-featured-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1.5px solid var(--theme-border, #e2e8f0);
  border-radius: 12px;
  padding: 26px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}
.theme-featured-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  border-color: var(--theme-accent, var(--brand-primary));
}
.theme-card-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--theme-bg, rgba(6, 130, 0, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 16px;
}
.theme-card-title {
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}
.theme-card-tagline {
  font-size: 16px;
  font-weight: 600;
  color: var(--theme-accent, var(--brand-primary));
  margin-bottom: 10px;
}
.theme-card-desc {
  font-size: 16.5px;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 18px;
  flex: 1;
}
.theme-card-arrow {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--theme-accent, var(--brand-primary));
}

/* 5. Theme Archive Page Banner */
.theme-page-banner {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--theme-bg, #ffffff);
  border: 1.5px solid var(--theme-border, #e2e8f0);
  border-radius: 14px;
  padding: 30px 36px;
  margin-bottom: 30px;
}
.theme-banner-icon-wrap {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.theme-banner-category-tag {
  font-size: 14px;
  font-weight: 700;
  color: var(--theme-accent, var(--brand-primary));
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.theme-banner-title {
  font-size: 32px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
}
.theme-banner-desc {
  font-size: 19px;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 12px;
}
.theme-banner-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  color: #64748b;
}
.theme-banner-back-link {
  color: var(--theme-accent, var(--brand-primary));
  font-weight: 600;
  text-decoration: none;
}
.theme-banner-back-link:hover {
  text-decoration: underline;
}

/* 6. Sepia & Dark Theme Adaptations */
[data-theme="sepia"] .daily-poem-card,
.theme-sepia .daily-poem-card,
[data-theme="sepia"] .theme-explorer-section,
.theme-sepia .theme-explorer-section,
[data-theme="sepia"] .theme-featured-card,
.theme-sepia .theme-featured-card {
  background: #fbf7ee;
  border-color: #e5dec9;
}
[data-theme="sepia"] .daily-poem-title a,
.theme-sepia .daily-poem-title a,
[data-theme="sepia"] .theme-explorer-title,
.theme-sepia .theme-explorer-title,
[data-theme="sepia"] .theme-card-title,
.theme-sepia .theme-card-title,
[data-theme="sepia"] .theme-banner-title,
.theme-sepia .theme-banner-title {
  color: #433422;
}
[data-theme="sepia"] .daily-poem-stanza,
.theme-sepia .daily-poem-stanza {
  color: #5c4730;
}
[data-theme="sepia"] .theme-pill-item,
.theme-sepia .theme-pill-item {
  color: #433422;
}

[data-theme="dark"] .daily-poem-card,
.theme-dark .daily-poem-card,
[data-theme="dark"] .theme-explorer-section,
.theme-dark .theme-explorer-section,
[data-theme="dark"] .theme-featured-card,
.theme-dark .theme-featured-card {
  background: #1e293b;
  border-color: #334155;
}
[data-theme="dark"] .daily-poem-title a,
.theme-dark .daily-poem-title a,
[data-theme="dark"] .theme-explorer-title,
.theme-dark .theme-explorer-title,
[data-theme="dark"] .theme-card-title,
.theme-dark .theme-card-title,
[data-theme="dark"] .theme-banner-title,
.theme-dark .theme-banner-title {
  color: #f8fafc;
}
[data-theme="dark"] .daily-poem-stanza,
.theme-dark .daily-poem-stanza {
  color: #cbd5e1;
}
[data-theme="dark"] .theme-pill-item,
.theme-dark .theme-pill-item {
  color: #f1f5f9;
}
[data-theme="dark"] .daily-poem-header,
.theme-dark .daily-poem-header {
  border-color: #334155;
}
[data-theme="dark"] .daily-poem-footer,
.theme-dark .daily-poem-footer {
  border-color: #334155;
}
[data-theme="dark"] .daily-poem-random-btn,
.theme-dark .daily-poem-random-btn {
  background: #334155;
  border-color: #475569;
  color: #e2e8f0;
}
[data-theme="dark"] .theme-banner-icon-wrap,
.theme-dark .theme-banner-icon-wrap {
  background: #1e293b;
}

/* Responsive queries */
@media (max-width: 992px) {
  .themes-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .daily-poem-card {
    padding: 20px 18px;
  }
  .daily-poem-title {
    font-size: 22px;
  }
  .daily-poem-stanza {
    font-size: 18px;
  }
  .themes-cards-grid {
    grid-template-columns: 1fr;
  }
  .theme-page-banner {
    flex-direction: column;
    text-align: center;
    padding: 24px 18px;
  }
  .theme-banner-meta {
    justify-content: center;
  }
  .header-random-text {
    display: none;
  }
}

