@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+KR:wght@400;700&display=swap');

/*
 * Prayer Candle Wall Styles
 * 2025-09-24
 * Final Version with !important fix and flame resize
 */

.prayer-candle-wall-section {
    --paper-texture: url("data:image/svg+xml,%3Csvg width='150' height='150' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3C/defs%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    --stained-glass-pattern: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='p' width='100' height='100' patternUnits='userSpaceOnUse'%3E%3Cpath d='M0 50 L50 0 L100 50 L50 100 Z' stroke='%23FFFFFF' stroke-width='0.5' fill='none'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23p)'/%3E%3C/svg%3E");

    background-color: #0E1526;
    background-image: linear-gradient(180deg, #0E1526 0%, #1A2233 100%);
    position: relative;
    padding: 60px 20px;
    text-align: center;
    overflow: hidden;
}

.prayer-candle-wall-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: var(--stained-glass-pattern);
    opacity: 0.06;
    pointer-events: none;
}

.prayer-candle-wall-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}



.prayer-candle-wall {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px 25px;
    margin: 0 auto 50px auto;
    max-width: 800px;
    padding-top: 40px;
}

.prayer-candle {
    position: relative;
    width: 130px;
    cursor: pointer;
    transition: transform 120ms ease;
}

.prayer-candle::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 120%;
    height: 30px;
    background: radial-gradient(ellipse at center, rgba(255, 248, 225, 0.25) 0%, rgba(255, 248, 225, 0) 70%);
    border-radius: 50%;
    z-index: -1;
}

.prayer-candle:hover {
    transform: scale(1.05);
}

.prayer-candle-svg {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.3));
}

.prayer-candle .candle-flame-path {
    animation: flicker-svg-final 1.8s ease-in-out infinite alternate;
    transform-origin: 160px 86px;
}

/* Final flame size (approx 2/3 of previous) */
@keyframes flicker-svg-final {
    0%, 100% { transform: scale(1.4) translateY(-7px); opacity: 1; }
    50% { transform: scale(1.3, 1.5) translateY(-7px) skewX(1.5deg); opacity: 0.85; }
}

/* Force tooltip to be hidden by default */
.prayer-candle .prayer-tooltip {
    position: absolute;
    bottom: 105%;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background-color: rgba(255, 255, 255, 0.97);
    color: #333;
    padding: 15px;
    border-radius: 8px;
    width: 280px;
    text-align: left;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    z-index: 10;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    visibility: hidden !important; 
    opacity: 0 !important;
}

/* Force tooltip to be visible on hover */
.prayer-candle:hover .prayer-tooltip {
    visibility: visible !important;
    opacity: 1 !important;
}

.prayer-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -8px;
    border-width: 8px;
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.97) transparent transparent transparent;
}

.prayer-author {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.prayer-text {
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.prayer-wall-cta {
    text-align: center;
}

.pw-button {
    display: inline-block;
    background-color: #C9B678;
    color: #1A2233;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.5);
    min-width: 150px;
    min-height: 44px;
    transition: all 120ms ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.pw-button:hover, .pw-button:focus {
    background-color: #d4c38a;
    color: #0E1526;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    outline: 2px solid #C9B678;
    outline-offset: 2px;
}

/* SVG Candle Body Colors */
.prayer-candle.pw-candle--green .candle-body { fill: #a5d6a7; }
.prayer-candle.pw-candle--white .candle-body { fill: #e0e0e0; }
.prayer-candle.pw-candle--gold .candle-body { fill: #fff59d; }
.prayer-candle.pw-candle--blue .candle-body { fill: #90caf9; }
.prayer-candle.pw-candle--purple .candle-body { fill: #b39ddb; }
.prayer-candle.pw-candle--red .candle-body { fill: #ef9a9a; }
.prayer-candle.pw-candle--orange .candle-body { fill: #ffab91; }

.prayer-name {
    margin-top: 10px;
    font-size: 14px;
    color: #FFFFFF;
    text-align: center;
}

.prayer-candle-wall-section::after {
    content: '';
    position: absolute;
    right: -50px;
    bottom: -60px;
    width: 400px;
    height: 400px;
    background-image: url('https://franciscodiary.com/wp-content/uploads/2025/09/maria-pray.png');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.3;
    mask-image: radial-gradient(circle, black 40%, transparent 70%);
    pointer-events: none;
}
