/* ==========================================================================
   1. Brand Tokens & Dynamic Theme Engine
   ========================================================================== */
:root {
  --pl-bg: #f8f9fa;
  --pl-card-bg: #ffffff;
  --pl-main: #1d3e45;
  --pl-secondary: #ffea9b;
  --pl-dark-text: #2d3748;
  --pl-light-text: #64748b;
  --pl-border: rgba(29, 62, 69, 0.15);
  --pl-dropcap-bg: #1d3e45;
  --pl-dropcap-text: #ffea9b;
  --pl-hero-title: #1d3e45;
  --pl-hero-desc: #2d3748;
  --pl-hero-link: #1d3e45;
  --pl-card-title-color: #1d3e45;
  --pl-card-time-color: #64748b;
  --pl-cat-heading-color: #1d3e45;
  --text-dark: #2d3748;
}

[data-theme="dark"],
body.night-mode {
  --pl-bg: #12161a;
  --pl-card-bg: #1a202c;
  --pl-main: #2d3748;
  --pl-secondary: #ecc94b;
  --pl-dark-text: #e2e8f0;
  --pl-light-text: #94a3b8;
  --pl-border: rgba(255, 255, 255, 0.1);
  --pl-dropcap-bg: #2d3748;
  --pl-dropcap-text: #ecc94b;
  --pl-hero-title: #ecc94b;
  --pl-hero-desc: #e2e8f0;
  --pl-hero-link: #ecc94b;
  --pl-card-title-color: #f7fafc;
  --pl-card-time-color: #cbd5e0;
  --pl-cat-heading-color: #ecc94b;
  --text-dark: #e2e8f0;
}

/* ==========================================================================
   2. Dark Mode Background Overrides for Theme & Elementor Wrappers
   ========================================================================== */
html[data-theme="dark"],
html[data-theme="dark"] body,
body.night-mode,
body.night-mode #page,
body.night-mode #content,
body.night-mode .site-content,
body.night-mode .elementor-page,
body.night-mode .elementor-section,
body.night-mode .elementor-container,
body.night-mode .entry-content,
body.night-mode article,
body.night-mode main {
  background-color: var(--pl-bg, #12161a) !important;
  color: var(--pl-dark-text, #e2e8f0) !important;
}

/* ==========================================================================
   3. Responsive Header & Liquid Toggle Styling
   ========================================================================== */
.pl-site-header {
  background-color: var(--brand-main, var(--pl-main, #1d3e45));
  border-bottom: 1px solid var(--pl-border, rgba(255, 255, 255, 0.15));
  position: sticky;
  top: 0;
  z-index: 9999;
  transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.pl-header-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 110px;
}

.pl-header-left,
.pl-header-right {
  flex: 1;
  display: flex;
  align-items: center;
}
.pl-header-left {
  justify-content: flex-start;
}
.pl-header-right {
  justify-content: flex-end;
}
.pl-header-brand {
  display: flex;
  justify-content: center;
  align-items: center;
}

.pl-header-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

header.pl-site-header .pl-header-brand img.pl-header-logo,
.elementor .pl-header-brand img.pl-header-logo,
img.pl-header-logo {
  width: auto !important;
  height: 100px !important;
  min-height: 100px !important;
  max-width: 240px !important;
  max-height: 100px !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto !important;
  transition: transform 0.2s ease;
}

.pl-header-logo-link:hover img.pl-header-logo {
  transform: scale(1.03);
}

.pl-liquid-toggle {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  overflow: hidden;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.15),
    inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pl-liquid-toggle:hover {
  transform: scale(1.12);
}
.pl-liquid-toggle:active {
  transform: scale(0.92);
}

.liquid-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, #ecc94b 0%, rgba(217, 119, 6, 0) 70%);
  transform: translate(-50%, -50%) scale(0);
  border-radius: 50%;
  opacity: 0;
  transition:
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.4s ease;
  pointer-events: none;
}

.icon-wrapper {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.icon-moon,
.icon-sun {
  position: absolute;
  font-size: 1.15rem;
  transition:
    opacity 0.4s ease,
    transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.icon-moon {
  color: #ffea9b;
  opacity: 1;
  transform: rotate(0deg) scale(1);
}
.icon-sun {
  color: #ecc94b;
  opacity: 0;
  transform: rotate(-180deg) scale(0.2);
}

[data-theme="dark"] .pl-liquid-toggle,
body.night-mode .pl-liquid-toggle {
  background: rgba(255, 255, 255, 0.08);
  box-shadow:
    0 4px 15px rgba(236, 201, 75, 0.2),
    inset 0 0 0 1px rgba(236, 201, 75, 0.4);
}

[data-theme="dark"] .liquid-glow,
body.night-mode .liquid-glow {
  transform: translate(-50%, -50%) scale(2.2);
  opacity: 0.25;
}

[data-theme="dark"] .icon-wrapper,
body.night-mode .icon-wrapper {
  transform: rotate(360deg);
}

[data-theme="dark"] .icon-moon,
body.night-mode .icon-moon {
  opacity: 0;
  transform: rotate(180deg) scale(0.2);
}

[data-theme="dark"] .icon-sun,
body.night-mode .icon-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

@media (max-width: 600px) {
  .pl-header-container {
    padding: 6px 12px;
    min-height: 48px;
  }
  header.pl-site-header .pl-header-brand img.pl-header-logo,
  .elementor .pl-header-brand img.pl-header-logo,
  img.pl-header-logo {
    height: 80px !important;
    min-height: 80px !important;
    max-width: 180px !important;
    max-height: 80px !important;
  }
  .pl-liquid-toggle {
    width: 36px;
    height: 36px;
  }
}

/* ==========================================================================
   4. Base Body & Typography Rules
   ========================================================================== */
body {
  background-color: var(--pl-bg);
  color: var(--pl-dark-text);
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

.pl-story-container,
.pl-story-container button,
.pl-scene-text,
.pl-share-btn,
.pl-accordion-header,
.pl-card-text,
.pl-card-list {
  font-family: "Besley", Georgia, serif !important;
  color: var(--pl-dark-text);
}

.pl-story-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 16px;
}

.entry-title,
h1.entry-title {
  font-family: "Noto Serif", Georgia, serif !important;
  font-size: 2.4rem !important;
  font-weight: 800 !important;
  color: var(--pl-main) !important;
  text-align: center !important;
  margin: 24px 0 20px 0 !important;
  line-height: 1.3 !important;
}

.page-header > .entry-title {
  display: none;
}

.hp-hero-header {
  align-items: center;
  display: flex;
  flex-direction: column;
}

.hp-hero-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--pl-hero-title) !important;
  font-family: "Noto Serif", serif !important;
  margin: 0 0 10px 0;
  line-height: 1.25;
  transition: color 0.3s ease;
}

.hp-hero-desc {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--pl-hero-desc) !important;
  font-family: "Besley", Georgia, serif !important;
  margin: 0 0 20px 0;
  transition: color 0.3s ease;
}

.hp-hero-desc strong {
  color: var(--pl-dark-text, var(--text-dark)) !important;
  font-weight: 700;
  transition: color 0.3s ease;
}
.hp-hero-desc a {
  color: var(--pl-hero-link) !important;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.cat-explore-heading,
.hp-category-heading {
  color: var(--pl-cat-heading-color) !important;
  transition: color 0.3s ease;
}
.story-card-title {
  color: var(--pl-card-title-color) !important;
  transition: color 0.3s ease;
}
.story-card-time {
  color: var(--pl-card-time-color) !important;
  transition: color 0.3s ease;
}

/* ==========================================================================
   5. Illuminated Drop Cap & Story Scenes
   ========================================================================== */
.pl-dropcap::first-letter {
  font-family: "Cinzel Decorative", "Noto Serif", serif !important;
  font-size: 2.6rem;
  font-weight: 700;
  float: left;
  line-height: 1;
  margin-right: 14px;
  margin-top: 4px;
  padding: 8px 14px;
  background-color: var(--pl-dropcap-bg);
  color: var(--pl-dropcap-text) !important;
  border-radius: 10px;
  box-shadow:
    3px 3px 0px rgba(0, 0, 0, 0.15),
    inset 0 0 0 2px rgba(255, 234, 155, 0.3);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.pl-scene-block {
  margin-bottom: 40px;
}
.pl-scene-text {
  font-size: 1.15rem;
  line-height: 1.8;
  margin: 0;
  padding-top: 1em;
}

.pl-cover-wrapper {
  width: 100%;
  max-width: 600px;
  margin: 0 auto 24px;
  overflow: hidden;
  border-radius: 20px;
}

.pl-story-container img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12);
  display: block;
  object-fit: cover;
}

/* ==========================================================================
   6. Share Bar & Brand Dark Cards
   ========================================================================== */
.pl-share-bar {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 20px 0 36px;
}

.pl-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #ffffff !important;
  font-weight: 700;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.pl-share-btn i {
  font-size: 18px;
  color: #ffffff;
}
.pl-share-btn:hover {
  opacity: 0.88;
}
.pl-share-fb {
  background-color: #1877f2;
}
.pl-share-wa {
  background-color: #25d366;
}
.pl-share-tw {
  background-color: #000000;
}
.pl-share-copy {
  background-color: var(--pl-main) !important;
}

.pl-card-dark {
  background-color: var(--pl-main) !important;
  color: #ffffff !important;
  border-radius: 18px;
  padding: 24px 28px;
  margin-top: 32px;
  box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.25);
}

.pl-card-dark .pl-card-title,
.pl-card-title {
  font-family: "Noto Serif", Georgia, serif !important;
  color: var(--pl-secondary) !important;
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.35rem;
  font-weight: 700;
}

.pl-card-dark p,
.pl-card-dark li,
.pl-card-text,
.pl-card-list {
  font-family: "Besley", Georgia, serif !important;
  color: #ffffff !important;
  font-size: 1.05rem;
  line-height: 1.75;
}

.pl-card-list {
  margin: 0;
  padding-left: 20px;
}

/* ==========================================================================
   7. Accordions & Empty Paragraph Cleaning
   ========================================================================== */
.pl-accordion-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.pl-accordion-item {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.05);
}

.pl-accordion-header {
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 14px 18px !important;
  background: transparent !important;
  border: none !important;
  color: #ffffff !important;
  font-size: 1rem;
  font-weight: 600;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 12px !important; /* Prevents icon and text from touching */
  cursor: pointer;
  text-align: left !important;
  height: auto !important; /* Allows header height to expand as text wraps */
}

/* Ensure the text container inside button wraps clean multi-line text */
.pl-accordion-header > span:first-child {
  flex: 1 1 auto !important;
  white-space: normal !important; /* Allows long text to wrap onto new lines */
  word-break: break-word !important; /* Breaks extra long words gracefully */
  overflow-wrap: anywhere !important;
  line-height: 1.4 !important;
  display: inline-block !important;
}

/* Keep the dropdown chevron icon fixed and properly aligned */
.pl-accordion-header .pl-accordion-icon {
  flex: 0 0 auto !important; /* Keeps icon from shrinking when text grows */
  font-size: 0.8rem;
  color: var(--pl-secondary) !important;
  transition: transform 0.25s ease;
  margin-left: auto;
}

/* Ensure inline WordPress SVG emojis scale smoothly inline with text */
.pl-accordion-header img.emoji {
  display: inline-block !important;
  width: 1.1em !important;
  height: 1.1em !important;
  vertical-align: -0.15em !important;
  margin: 0 0.25em 0 0 !important;
}

.pl-accordion-icon {
  font-size: 0.8rem;
  color: var(--pl-secondary) !important;
  transition: transform 0.25s ease;
}
.pl-accordion-item.active .pl-accordion-icon {
  transform: rotate(180deg);
}

.pl-accordion-content,
.pl-accordion-content p,
.pl-accordion-text {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.65;
  color: #f1f5f9 !important;
}

.pl-accordion-item:not(.active) .pl-accordion-content {
  max-height: 0 !important;
  overflow: hidden !important;
}
.pl-accordion-item.active .pl-accordion-content {
  max-height: 500px !important;
  padding: 0 18px 16px !important;
}

.pl-accordion-item p:empty,
.pl-accordion-wrapper p:empty,
.pl-card-dark p:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
}

/* ==========================================================================
   8. Related Storybooks Grid
   ========================================================================== */
.pl-related-container {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--pl-border);
}

.pl-related-heading {
  font-family: "Noto Serif", Georgia, serif !important;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--pl-cat-heading-color) !important;
}

.pl-related-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 20px;
  transition: opacity 0.25s ease-in-out;
}

@media (max-width: 768px) {
  .pl-related-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 480px) {
  .pl-related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.pl-related-item {
  display: block;
  text-decoration: none;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.pl-related-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.pl-related-img {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: 792 / 1008 !important;
  object-fit: cover !important;
  border-radius: 10px !important;
  display: block !important;
}

.pl-related-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
}

.pl-related-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  min-width: 36px;
  height: 36px;
  border-radius: 6px;
  text-decoration: none;
  font-family: "Besley", Georgia, serif !important;
  font-size: 0.95rem;
  font-weight: 600;
  background-color: var(--pl-main);
  color: #ffffff !important;
  transition: opacity 0.2s ease;
}

.pl-related-pagination .page-numbers.current {
  background-color: var(--pl-secondary) !important;
  color: var(--pl-main) !important;
  font-weight: 700;
}

/* ==========================================================================
   FEATURE 9: INLINE ELEVATED FULL-WIDTH NILAM CARD
   ========================================================================== */
.pl-inline-nilam-card {
  width: 100%;
  box-sizing: border-box;
  background: var(--pl-card-bg, #ffffff);
  border: 2px solid var(--pl-secondary, #ffea9b);
  border-radius: 18px;
  margin: 36px 0;
  overflow: hidden;
  /* Enhanced depth and elevation shadow */
  box-shadow:
    0 12px 32px -4px rgba(0, 0, 0, 0.12),
    0 4px 12px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background-color 0.3s ease;
}

.pl-inline-nilam-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 16px 40px -4px rgba(0, 0, 0, 0.16),
    0 6px 16px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .pl-inline-nilam-card,
body.night-mode .pl-inline-nilam-card {
  background: #1a202c;
  border-color: #ecc94b;
  box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.45);
}

.pl-nilam-accordion-header {
  width: 100%;
  background: transparent;
  border: none;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
  outline: none;
}

.pl-nilam-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.pl-nilam-badge {
  background-color: var(--pl-secondary, #ffea9b);
  color: #1d3e45;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.pl-nilam-header-text {
  font-family: "Noto Serif", Georgia, serif !important;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--pl-main, #1d3e45);
}

[data-theme="dark"] .pl-nilam-header-text,
body.night-mode .pl-nilam-header-text {
  color: #ecc94b;
}

.pl-nilam-chevron {
  font-size: 1rem;
  color: var(--pl-main, #1d3e45);
  transition: transform 0.3s ease;
}

[data-theme="dark"] .pl-nilam-chevron,
body.night-mode .pl-nilam-chevron {
  color: #ecc94b;
}

.pl-nilam-accordion-body {
  padding: 0 22px 22px 22px;
  border-top: 1px dashed var(--pl-border, rgba(0, 0, 0, 0.1));
}

.pl-nilam-intro-text {
  font-size: 0.88rem;
  color: var(--pl-light-text, #64748b);
  margin: 14px 0;
}

.pl-nilam-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
  background: rgba(0, 0, 0, 0.03);
  padding: 16px;
  border-radius: 12px;
}

[data-theme="dark"] .pl-nilam-grid,
body.night-mode .pl-nilam-grid {
  background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 520px) {
  .pl-nilam-grid {
    grid-template-columns: 1fr;
  }
  .pl-nilam-header-text {
    font-size: 0.92rem;
  }
}

.pl-nilam-item {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
}

.pl-nilam-page-item {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.pl-nilam-label {
  font-size: 0.78rem;
  color: var(--pl-light-text, #718096);
}
.pl-nilam-value {
  font-weight: 700;
  color: var(--pl-dark-text, #2d3748);
}

[data-theme="dark"] .pl-nilam-value,
body.night-mode .pl-nilam-value {
  color: #f7fafc;
}

.pl-nilam-mini-pdf-btn {
  background: #d97706;
  color: #ffffff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.pl-nilam-mini-pdf-btn:hover {
  opacity: 0.9;
}

.pl-nilam-summary-box {
  background: rgba(217, 119, 6, 0.08);
  border-left: 3px solid #d97706;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.pl-nilam-summary-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #d97706;
  margin-bottom: 4px;
}
.pl-nilam-summary-text {
  font-size: 0.9rem;
  margin: 0 !important;
  line-height: 1.5;
  color: inherit !important;
}

.pl-nilam-copy-btn {
  width: 100%;
  background: var(--pl-main, #1d3e45);
  color: #ffffff;
  border: none;
  padding: 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.2s ease;
}

.pl-nilam-copy-btn:hover {
  opacity: 0.9;
}

/* ==========================================================================
   10. Floating PDF Button & Ad Modal Styles
   ========================================================================== */
@keyframes pdfPulseGlow {
  0% {
    box-shadow:
      0 0 0 0 rgba(217, 119, 6, 0.7),
      0 8px 20px rgba(0, 0, 0, 0.25);
  }
  70% {
    box-shadow:
      0 0 0 15px rgba(217, 119, 6, 0),
      0 12px 25px rgba(0, 0, 0, 0.35);
  }
  100% {
    box-shadow:
      0 0 0 0 rgba(217, 119, 6, 0),
      0 8px 20px rgba(0, 0, 0, 0.25);
  }
}

.pl-float-pdf-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99990;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
  color: #ffffff;
  border: 2px solid #fef08a;
  border-radius: 50px;
  padding: 12px 22px;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  animation: pdfPulseGlow 2s infinite;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.pl-float-pdf-btn:hover {
  transform: translateY(-4px) scale(1.05);
}

@media (max-width: 600px) {
  .pl-float-pdf-btn {
    bottom: 16px;
    right: 16px;
    padding: 10px 16px;
    font-size: 0.85rem;
  }
}

.pdf-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  backdrop-filter: blur(5px);
}

.pdf-modal-content {
  background: #ffffff;
  padding: 24px 20px;
  border-radius: 18px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.pdf-modal-title {
  margin: 0 0 6px 0;
  font-size: 1.3rem;
  color: #111827;
  font-weight: 800;
}
.pdf-modal-subtitle {
  font-size: 0.85rem;
  color: #4b5563;
  margin: 0 0 14px 0;
  line-height: 1.4;
}

.pdf-progress-bar {
  width: 100%;
  height: 8px;
  background: #f3f4f6;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 16px;
}
.pdf-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #d97706);
  transition: width 0.2s linear;
}

.pdf-ad-wrapper {
  min-height: 250px;
  width: 100%;
  background: #f9fafb;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 8px;
  box-sizing: border-box;
}
.pdf-ad-callout {
  font-size: 0.78rem;
  font-weight: 600;
  color: #d97706;
  margin-bottom: 6px;
}

/* ==========================================================================
   FEATURE 11: PDF PRINT EXPORT OVERRIDES (CONTRAST & LIGHT THEME LOCK)
   ========================================================================== */
.pl-pdf-brand-header,
.pl-pdf-brand-footer {
  display: none;
}

/* Force crisp light mode styles during PDF rendering regardless of Night Mode */
.pl-story-container.pdf-render-mode,
.pl-story-container.pdf-render-mode * {
  background-color: #ffffff !important;
  color: #1a202c !important;
  text-shadow: none !important;
  box-shadow: none !important;
}

.pl-story-container.pdf-render-mode .pl-card-dark {
  background-color: #1d3e45 !important;
  color: #ffffff !important;
}

.pl-story-container.pdf-render-mode .pl-card-dark * {
  color: #ffffff !important;
  background-color: transparent !important;
}

.pl-story-container.pdf-render-mode .pl-pdf-brand-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  border-bottom: 2px solid #d97706 !important;
  padding-bottom: 10px !important;
  margin-bottom: 20px !important;
}

.pl-story-container.pdf-render-mode .pl-pdf-brand-footer {
  display: block !important;
  margin-top: 30px !important;
  padding-top: 12px !important;
  border-top: 1px solid #e5e7eb !important;
  text-align: center !important;
  font-size: 0.75rem !important;
  color: #9ca3af !important;
}

/* ==========================================================================
   ELEMENTOR & RESET.CSS ACCORDION TEXT-WRAPPING OVERRIDE
   ========================================================================== */

/* 1. Reset Accordion Container & Item Constraints */
.pl-card-dark,
.pl-card-dark .pl-accordion-wrapper,
.pl-card-dark .pl-accordion-item {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

/* 2. Force Accordion Header Button to expand vertically */
.pl-card-dark button.pl-accordion-header,
button.pl-accordion-header {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: flex-start !important; /* Top-aligns arrow when text spans 2+ lines */
  gap: 12px !important;
  width: 100% !important;
  height: auto !important;
  min-height: auto !important;
  max-height: none !important;
  padding: 14px 16px !important;
  white-space: normal !important;
  word-wrap: break-word !important;
  overflow-wrap: anywhere !important;
  text-align: left !important;
  box-sizing: border-box !important;
}

/* 3. Strip Elementor inline flex properties from title span */
.pl-card-dark button.pl-accordion-header > span:first-child,
button.pl-accordion-header > span:first-child {
  display: block !important; /* Converts inline-flex to block so text wraps naturally */
  flex: 1 1 auto !important;
  width: 100% !important;
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
  line-height: 1.45 !important;
  font-size: 0.98rem !important;
}

/* 4. Fix WordPress SVG Emoji scaling inside header text */
.pl-card-dark button.pl-accordion-header img.emoji,
button.pl-accordion-header img.emoji {
  display: inline-block !important;
  float: none !important;
  width: 1.15em !important;
  height: 1.15em !important;
  min-width: 1.15em !important;
  min-height: 1.15em !important;
  margin: 0 6px 0 0 !important;
  padding: 0 !important;
  vertical-align: -0.18em !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* 5. Keep Chevron Icon Pinned on the Right */
.pl-card-dark button.pl-accordion-header .pl-accordion-icon,
button.pl-accordion-header .pl-accordion-icon {
  display: inline-block !important;
  flex: 0 0 auto !important;
  margin-top: 2px !important; /* Aligns chevron with first line of text */
  font-size: 0.8rem !important;
  color: var(--pl-secondary, #ffea9b) !important;
}
