/* Light, additive polish — scroll reveals, count-up numbers, the new visitor
   stats widget. Deliberately does not touch existing hover/transition rules
   in style.css / refinements.css so nothing already animated is disturbed. */

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-stagger.is-visible .reveal-child {
    transition-delay: calc(var(--reveal-index, 0) * 70ms);
}

@media (prefers-reduced-motion: reduce) {
    .reveal, .reveal-child {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* Images fade in once loaded instead of popping in */
img.img-fade {
    opacity: 0;
    transition: opacity 0.5s ease;
}
img.img-fade.is-loaded {
    opacity: 1;
}

/* --- Visitor Insights widget --- */
.visitor-insights {
    padding: var(--section-padding);
    background: var(--accent);
}

.visitor-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 30px;
}

.visitor-stat-card {
    background: var(--white);
    border-radius: 16px;
    padding: 28px 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(27, 77, 62, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.25);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.visitor-stat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(27, 77, 62, 0.14);
}

.visitor-stat-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--secondary), var(--secondary-light));
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.visitor-stat-number {
    font-family: var(--heading-font, 'Playfair Display', serif);
    font-size: 2.1rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.visitor-stat-label {
    margin-top: 4px;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-dark);
    opacity: 0.7;
}

@media (max-width: 768px) {
    .visitor-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Consent-gated embed placeholder (Maps / prayer widget) --- */
.consent-embed {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--accent);
    border: 1px dashed rgba(27, 77, 62, 0.3);
}

.consent-embed iframe {
    display: block;
}

.consent-embed-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 30px;
    border: 1px solid var(--primary);
    background: var(--white);
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.consent-embed-btn:hover {
    background: var(--primary);
    color: var(--white);
}
