/* st_francis_prayer.css - Page Specific Styles */

.st-francis-page {
  --peace-green: #5c7f67;
  --peace-light: #a3b18a;
  --candle-glow: #fffbeb;
  --candle-flame: #f59e0b;
}

.st-francis-page .main-content {
  background: transparent;
  box-shadow: none;
}

.st-francis-page .page-title {
  color: var(--peace-green);
  font-size: 2rem;
  font-weight: bold;
  position: relative;
  display: inline-block;
  margin-bottom: 2rem;
  padding-bottom: 0.5rem;
}

.st-francis-page .page-title::after {
  content: "";
  display: block;
  width: 100%;
  height: 3px;
  background: var(--peace-light);
  position: absolute;
  bottom: 0;
  left: 0;
}

/* Prayer Card with Texture */
.st-francis-page .prayer-card {
  background-color: #fdfcf8;
  background-image:
    radial-gradient(#d4d4d4 1px, transparent 1px),
    linear-gradient(to bottom, #fdfcf8, #f4f7f5);
  background-size:
    20px 20px,
    100% 100%;
  border: 1px solid #daddd8;
  border-radius: 8px;
  padding: 4rem 2rem;
  margin: 3rem 0;
  box-shadow: 0 4px 20px rgba(92, 127, 103, 0.08);
  position: relative;
  overflow: hidden;
}

.st-francis-page .prayer-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

.st-francis-page .prayer-text {
  position: relative;
  z-index: 1;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  line-height: 2.8;
  color: #2f3e33;
  font-size: 1.15rem;
  text-align: center;
}

.st-francis-page .highlight-prayer {
  color: var(--peace-green);
  font-weight: bold;
}

.st-francis-page .font-large {
  font-size: 1.3rem;
}

.st-francis-page .prayer-card-decor-top,
.st-francis-page .prayer-card-decor-bottom {
  display: block;
  text-align: center;
  font-size: 1.5rem;
  color: var(--peace-green);
  opacity: 0.6;
  margin: 1rem 0;
  position: relative;
  z-index: 1;
}

/* Staggered Text Animation */
.st-francis-page .prayer-line {
  display: block;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 1.5s ease,
    transform 1.5s ease-out;
}

.st-francis-page .prayer-line.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Main Content Overrides */
.st-francis-page .main-article h3 {
  color: var(--peace-green);
  border-bottom: 2px solid var(--peace-light);
  padding-bottom: 0.5rem;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
}

.st-francis-page .prayer-author-note {
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* Candle Interaction */
.st-francis-page .candle-container {
  text-align: center;
  margin: 4rem 0;
  padding: 2rem;
  background: rgba(92, 127, 103, 0.05); /* peace-green with transparency */
  border-radius: 12px;
  transition: background 1s ease;
}

.st-francis-page .candle-container p {
    margin-bottom: 1.5rem;
    color: var(--peace-green);
}

.st-francis-page .candle-wrapper {
  position: relative;
  width: 60px;
  height: 120px;
  margin: 0 auto 2rem;
  cursor: pointer;
}

.st-francis-page .candle-body {
  position: absolute;
  bottom: 0;
  left: 10px;
  width: 40px;
  height: 100px;
  background: linear-gradient(to right, #e2e8f0, #f8fafc, #cbd5e1);
  border-radius: 4px;
  box-shadow: inset 0 -10px 10px rgba(0, 0, 0, 0.05);
  z-index: 2;
}

.st-francis-page .candle-wick {
  position: absolute;
  bottom: 100px;
  left: 28px;
  width: 4px;
  height: 10px;
  background: #475569;
  z-index: 2;
}

.st-francis-page .flame {
  position: absolute;
  bottom: 110px;
  left: 20px;
  width: 20px;
  height: 35px;
  background: radial-gradient(ellipse at bottom, #fde68a, #f59e0b 80%);
  border-radius: 50% 50% 20% 20%;
  transform-origin: center bottom;
  opacity: 0;
  transition: opacity 0.5s ease;
  filter: blur(1px);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
  z-index: 3;
}

.st-francis-page .flame.lit {
  opacity: 1;
  animation: flicker 1s infinite alternate;
}

/* Candle Shadow */
.st-francis-page .candle-shadow {
  position: absolute;
  bottom: -5px;
  left: 5px;
  width: 50px;
  height: 10px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  filter: blur(2px);
  transform-origin: center center;
  transition: all 0.5s ease;
  z-index: 1;
}

.st-francis-page .candle-shadow.flickering {
  background: rgba(245, 158, 11, 0.2);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
  animation: shadow-flicker 1.5s infinite alternate;
}

@keyframes flicker {
  0% { transform: scale(1) rotate(-2deg); opacity: 0.9; }
  20% { transform: scale(1.05) rotate(2deg); opacity: 1; }
  40% { transform: scale(0.95) rotate(-1deg); opacity: 0.8; }
  60% { transform: scale(1.02) rotate(1deg); opacity: 0.95; }
  80% { transform: scale(0.98) rotate(-2deg); opacity: 0.85; }
  100% { transform: scale(1) rotate(0deg); opacity: 0.9; }
}

@keyframes shadow-flicker {
  0% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.7; }
  100% { transform: scale(0.95); opacity: 0.6; }
}

.st-francis-page .lighting-text {
  font-size: 0.9rem;
  color: var(--peace-green);
  font-weight: bold;
  margin-top: 1rem;
  transition: opacity 0.5s;
}

/* Warm Filter Overlay */
.st-francis-page .warm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 166, 0, 0.05), rgba(255, 166, 0, 0.15));
  pointer-events: none;
  opacity: 0;
  transition: opacity 2s ease;
  z-index: 999;
}
.st-francis-page .warm-overlay.active {
  opacity: 1;
}

/* Sidebar Advice Specifics */
.st-francis-page .sidebar-advice {
  background: #fff;
  border: 1px solid var(--peace-light);
  border-radius: 8px;
  padding: 1.5rem;
}

.st-francis-page .sidebar-advice .header {
  color: var(--peace-green);
  border-bottom: 2px solid var(--peace-light);
  margin-bottom: 0.8rem;
  padding-bottom: 0.4rem;
  font-weight: bold;
}

.st-francis-page .sidebar-advice p {
    color: #2f3e33;
    font-size: 0.9rem;
    line-height: 1.6;
}

.st-francis-page .sidebar-advice .highlight-peace {
    color: var(--peace-green);
    font-weight: bold;
}

/* Sidebar Links Override */
.st-francis-page .recommendations-list li a.active {
    background-color: #f4f7f5;
    color: var(--peace-green);
    border-left-color: var(--peace-green);
    padding-left: calc(1rem - 4px);
}

.st-francis-page .footer-nav-wrap {
    margin-top: 2rem;
    text-align: center;
}

.st-francis-page .highlight-text {
    border-bottom: 2px solid var(--peace-light);
    font-weight: bold;
}
