/* ==========================================================
   Faith in God — Global Stylesheet
   ========================================================== */

:root {
    /* Light theme (default) */
    --fig-primary: #7c3aed;
    --fig-primary-dark: #6d28d9;
    --fig-primary-light: #a855f7;
    --fig-accent: #f59e0b;
    --fig-accent-dark: #d97706;
    --fig-gold: #eab308;

    --fig-bg: #fafafa;
    --fig-bg-alt: #ffffff;
    --fig-bg-elevated: #ffffff;
    --fig-surface: #ffffff;
    --fig-border: #e5e7eb;
    --fig-border-strong: #d1d5db;

    --fig-text: #1f2937;
    --fig-text-soft: #4b5563;
    --fig-text-muted: #6b7280;
    --fig-text-inverse: #ffffff;

    --fig-success: #10b981;
    --fig-danger: #ef4444;
    --fig-warning: #f59e0b;
    --fig-info: #3b82f6;

    --fig-shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --fig-shadow: 0 6px 20px rgba(31,41,55,0.08);
    --fig-shadow-lg: 0 20px 50px rgba(31,41,55,0.12);
    --fig-shadow-primary: 0 14px 40px rgba(124,58,237,0.25);

    --fig-radius-sm: 6px;
    --fig-radius: 12px;
    --fig-radius-lg: 20px;
    --fig-radius-xl: 28px;

    --fig-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --fig-font-display: 'Playfair Display', Georgia, serif;

    --fig-container: 1200px;
    --fig-header-h: 80px;

    --fig-grad-primary: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #d946ef 100%);
    --fig-grad-dark: linear-gradient(135deg, rgba(15,13,35,0.92), rgba(60,20,90,0.85));

    /* Form field surfaces (light mode) — toned off-white so fields pop against white cards */
    --fig-input-bg: #f3f4f6;
    --fig-input-border: #d1d5db;
    --fig-input-bg-focus: #ffffff;
    --fig-input-autofill: #f3f4f6;
}

[data-theme="dark"] {
    --fig-bg: #0f0d23;
    --fig-bg-alt: #16132e;
    --fig-bg-elevated: #1c1938;
    --fig-surface: #1c1938;
    --fig-border: #2d2950;
    --fig-border-strong: #3d3860;
    --fig-text: #f3f4f6;
    --fig-text-soft: #d1d5db;
    --fig-text-muted: #9ca3af;
    --fig-shadow: 0 6px 20px rgba(0,0,0,0.5);
    --fig-shadow-lg: 0 20px 50px rgba(0,0,0,0.6);
    /* Clearly distinguishable input surface in dark mode — must come AFTER
       the :root block above so these values win (equal-specificity cascade). */
    --fig-input-bg: #2a2550;
    --fig-input-border: #4a4478;
    --fig-input-bg-focus: #322c5e;
    --fig-input-autofill: #2a2550;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--fig-font);
    background: var(--fig-bg);
    color: var(--fig-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}
img { max-width: 100%; display: block; height: auto; }
a { color: var(--fig-primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--fig-primary-dark); }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: 15px; }
h1, h2, h3, h4 { font-family: var(--fig-font-display); font-weight: 700; line-height: 1.25; color: var(--fig-text); }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
::selection { background: var(--fig-primary); color: #fff; }

/* ---------- Layout ---------- */
.fig-container { width: 100%; max-width: var(--fig-container); margin: 0 auto; padding: 0 20px; }
.fig-section { padding: 80px 0; }
.fig-section-sm { padding: 50px 0; }
.fig-grid { display: grid; gap: 28px; }

/* ---------- Header ---------- */
.fig-header {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--fig-header-h);
    background: rgba(255,255,255,0.85);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}
[data-theme="dark"] .fig-header { background: rgba(15,13,35,0.85); }
.fig-header.scrolled {
    box-shadow: var(--fig-shadow);
    border-bottom-color: var(--fig-border);
}
.fig-nav {
    max-width: var(--fig-container);
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.fig-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--fig-font-display);
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--fig-text);
    letter-spacing: 0.5px;
}
.fig-logo:hover { color: var(--fig-text); }
.fig-logo-mark {
    width: 42px; height: 42px;
    background: var(--fig-grad-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    box-shadow: var(--fig-shadow-primary);
    animation: fig-glow 3s ease-in-out infinite;
}
@keyframes fig-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(124,58,237,0.35); }
    50% { box-shadow: 0 0 35px rgba(124,58,237,0.6); }
}
.fig-nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}
.fig-nav-links a {
    color: var(--fig-text-soft);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 6px 0;
}
.fig-nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    height: 2px; width: 0;
    background: var(--fig-grad-primary);
    transition: all 0.25s ease;
    transform: translateX(-50%);
}
.fig-nav-links a:hover::after,
.fig-nav-links a.active::after { width: 100%; }
.fig-nav-right { display: flex; align-items: center; gap: 14px; }
.fig-theme-toggle, .fig-menu-toggle {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: var(--fig-bg-elevated);
    border: 1px solid var(--fig-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fig-text);
    transition: all 0.25s ease;
}
.fig-theme-toggle:hover { transform: rotate(20deg); background: var(--fig-primary); color: #fff; }
.fig-menu-toggle { display: none; }

/* ---------- Hero Slideshow ---------- */
.fig-hero {
    position: relative;
    height: 92vh;
    min-height: 560px;
    overflow: hidden;
    margin-top: var(--fig-header-h);
}
.fig-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.2s ease;
    display: flex;
    align-items: center;
    pointer-events: none;
}
.fig-slide.active { opacity: 1; pointer-events: auto; }
.fig-slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.08);
    transition: transform 8s ease;
}
.fig-slide.active .fig-slide-bg { transform: scale(1); }
.fig-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(15,13,35,0.82) 0%, rgba(60,20,90,0.65) 55%, rgba(124,58,237,0.45) 100%);
}
.fig-slide-content {
    position: relative;
    max-width: 820px;
    padding: 0 24px;
    margin: 0 auto;
    text-align: center;
    color: #fff;
    z-index: 2;
}
.fig-slide-subtitle {
    display: inline-block;
    padding: 8px 18px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 100px;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 24px;
    opacity: 0;
    transform: translateY(20px);
    animation: fig-slide-up 0.9s forwards 0.3s;
}
.fig-slide-title {
    font-size: clamp(2.2rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 0 4px 30px rgba(0,0,0,0.3);
    opacity: 0;
    transform: translateY(30px);
    animation: fig-slide-up 0.9s forwards 0.5s;
}
.fig-slide-desc {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    opacity: 0;
    transform: translateY(30px);
    margin: 0 auto 38px;
    max-width: 640px;
    color: rgba(255,255,255,0.92);
    animation: fig-slide-up 0.9s forwards 0.7s;
}
.fig-slide-ctas {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(30px);
    animation: fig-slide-up 0.9s forwards 0.9s;
}
@keyframes fig-slide-up {
    to { opacity: 1; transform: translateY(0); }
}
.fig-slide:not(.active) .fig-slide-subtitle,
.fig-slide:not(.active) .fig-slide-title,
.fig-slide:not(.active) .fig-slide-desc,
.fig-slide:not(.active) .fig-slide-ctas { animation: none; opacity: 0; }

.fig-slide-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 5;
}
.fig-slide-dot {
    width: 14px; height: 14px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    border: 2px solid rgba(255,255,255,0.7);
    cursor: pointer;
    transition: all 0.3s;
}
.fig-slide-dot.active { background: #fff; transform: scale(1.25); }
.fig-slide-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px; height: 52px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: all 0.25s;
}
.fig-slide-nav:hover { background: rgba(255,255,255,0.3); transform: translateY(-50%) scale(1.1); }
.fig-slide-nav.prev { left: 28px; }
.fig-slide-nav.next { right: 28px; }

/* Placeholder gradient backgrounds for slides */
.fig-ph-hero-1 {
    background: linear-gradient(135deg, #1e0b3d 0%, #4a1d87 40%, #7c3aed 80%, #d946ef 100%),
                radial-gradient(circle at 30% 20%, rgba(255,193,7,0.4), transparent 60%);
    background-blend-mode: overlay;
    position: relative;
}
.fig-ph-hero-2 {
    background: linear-gradient(135deg, #0a1530 0%, #1e3a8a 35%, #3b82f6 75%, #60a5fa 100%);
}
.fig-ph-hero-3 {
    background: linear-gradient(135deg, #2d0a1a 0%, #7f1d1d 40%, #b45309 80%, #f59e0b 100%);
}
.fig-ph-hero-1::after, .fig-ph-hero-2::after, .fig-ph-hero-3::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,0.06) 0%, transparent 50%);
    animation: fig-drift 20s ease-in-out infinite alternate;
}
@keyframes fig-drift {
    from { transform: translate(0,0) scale(1); }
    to { transform: translate(-20px, 20px) scale(1.1); }
}

/* ---------- Buttons ---------- */
.fig-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 30px;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    white-space: nowrap;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}
.fig-btn-primary {
    background: var(--fig-grad-primary);
    color: #fff;
    box-shadow: var(--fig-shadow-primary);
}
.fig-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 45px rgba(124,58,237,0.4);
    color: #fff;
}
.fig-btn-outline {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,0.6);
}
.fig-btn-outline:hover { background: #fff; color: var(--fig-primary); }
.fig-btn-accent {
    background: linear-gradient(135deg, var(--fig-accent) 0%, var(--fig-gold) 100%);
    color: #fff;
    box-shadow: 0 8px 25px rgba(245,158,11,0.35);
}
.fig-btn-accent:hover { transform: translateY(-3px); box-shadow: 0 14px 35px rgba(245,158,11,0.45); color: #fff; }
.fig-btn-ghost {
    background: transparent;
    color: var(--fig-text);
    border-color: var(--fig-border);
}
.fig-btn-ghost:hover { background: var(--fig-primary); color: #fff; border-color: var(--fig-primary); }
.fig-btn-sm { padding: 9px 20px; font-size: 0.85rem; }
.fig-btn-lg { padding: 17px 40px; font-size: 1.05rem; }

/* ---------- Section Heading ---------- */
.fig-section-head {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 50px;
}
.fig-section-eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--fig-primary);
    margin-bottom: 14px;
    padding: 5px 16px;
    background: rgba(124,58,237,0.1);
    border-radius: 100px;
}
.fig-section-title {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    margin-bottom: 14px;
}
.fig-section-sub {
    color: var(--fig-text-muted);
    font-size: 1.05rem;
}

/* ---------- Post Cards ---------- */
.fig-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}
.fig-post-card {
    background: var(--fig-bg-elevated);
    border-radius: var(--fig-radius-lg);
    overflow: hidden;
    box-shadow: var(--fig-shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--fig-border);
    position: relative;
}
.fig-post-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--fig-shadow-lg);
    border-color: var(--fig-primary-light);
}
.fig-post-img {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: var(--fig-grad-primary);
}
.fig-post-img img, .fig-post-img .fig-ph {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.fig-post-card:hover .fig-post-img img,
.fig-post-card:hover .fig-ph { transform: scale(1.08); }
.fig-post-category {
    position: absolute;
    top: 18px; left: 18px;
    padding: 6px 14px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 100px;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.fig-post-body { padding: 26px; flex: 1; display: flex; flex-direction: column; }
.fig-post-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    font-size: 0.82rem;
    color: var(--fig-text-muted);
    margin-bottom: 12px;
}
.fig-post-meta span { display: inline-flex; align-items: center; gap: 5px; }
.fig-post-title {
    font-size: 1.35rem;
    line-height: 1.3;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.fig-post-title a { color: var(--fig-text); }
.fig-post-title a:hover { color: var(--fig-primary); }
.fig-post-excerpt {
    color: var(--fig-text-muted);
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}
.fig-post-footer {
    padding: 18px 26px;
    border-top: 1px solid var(--fig-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
}
.fig-read-more {
    color: var(--fig-primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.25s;
}
.fig-read-more:hover { gap: 10px; }
.fig-stats { display: flex; gap: 14px; color: var(--fig-text-muted); }
.fig-stats span { display: inline-flex; align-items: center; gap: 4px; }

/* Placeholder banners for missing images */
.fig-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: rgba(255,255,255,0.9);
    font-family: var(--fig-font-display);
    font-weight: 700;
    font-size: 2rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}
.fig-ph::before {
    content: '✦';
    position: absolute;
    font-size: 8rem;
    opacity: 0.15;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}

/* ---------- Ad slots ---------- */
.fig-ad-slot {
    background: var(--fig-bg-alt);
    border: 2px dashed var(--fig-border-strong);
    border-radius: var(--fig-radius);
    padding: 30px 20px;
    text-align: center;
    color: var(--fig-text-muted);
    margin: 32px 0;
    font-size: 0.9rem;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.fig-ad-slot::before {
    content: 'Advertisement';
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--fig-text-muted);
    margin-bottom: 8px;
    opacity: 0.7;
}
.fig-ad-slot-leaderboard { min-height: 90px; }
.fig-ad-slot-banner { min-height: 250px; }
.fig-ad-slot-square { min-height: 280px; max-width: 300px; margin-left: auto; margin-right: auto; }

/* YouTube embed placeholder */
.fig-yt-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--fig-radius);
    background: #000;
    margin: 32px 0;
    box-shadow: var(--fig-shadow);
}
.fig-yt-embed iframe,
.fig-yt-embed .fig-yt-placeholder {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    border: none;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e0b3d, #4a1d87);
}
.fig-yt-placeholder i { font-size: 4rem; color: #ff0000; margin-bottom: 12px; }

/* ---------- AI Card (Daily Verse etc) ---------- */
.fig-ai-section {
    padding: 60px 0;
    background: linear-gradient(135deg, rgba(124,58,237,0.08), rgba(245,158,11,0.05));
    position: relative;
    overflow: hidden;
}
[data-theme="dark"] .fig-ai-section {
    background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(245,158,11,0.08));
}
.fig-ai-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}
.fig-ai-card {
    background: var(--fig-bg-elevated);
    border-radius: var(--fig-radius-lg);
    padding: 32px 28px;
    box-shadow: var(--fig-shadow);
    border: 1px solid var(--fig-border);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s;
}
.fig-ai-card:hover { transform: translateY(-5px); }
.fig-ai-card::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 140px; height: 140px;
    background: var(--fig-grad-primary);
    border-radius: 50%;
    opacity: 0.08;
}
.fig-ai-icon {
    width: 54px; height: 54px;
    border-radius: var(--fig-radius);
    background: var(--fig-grad-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 18px;
    box-shadow: var(--fig-shadow-primary);
}
.fig-ai-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--fig-text);
}
.fig-ai-body {
    min-height: 90px;
    color: var(--fig-text-soft);
    font-size: 0.95rem;
    line-height: 1.65;
    font-style: italic;
}
.fig-ai-body.loading {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--fig-text-muted);
    font-style: normal;
}
.fig-ai-dots {
    display: inline-flex;
    gap: 4px;
}
.fig-ai-dots span {
    width: 6px; height: 6px;
    background: var(--fig-primary);
    border-radius: 50%;
    animation: fig-pulse 1.4s infinite;
}
.fig-ai-dots span:nth-child(2) { animation-delay: 0.2s; }
.fig-ai-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes fig-pulse {
    0%, 60%, 100% { transform: scale(0.8); opacity: 0.5; }
    30% { transform: scale(1); opacity: 1; }
}
.fig-ai-refresh {
    position: absolute;
    top: 18px; right: 18px;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--fig-bg-alt);
    color: var(--fig-text-muted);
    border: 1px solid var(--fig-border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 2;
}
.fig-ai-refresh:hover { color: var(--fig-primary); transform: rotate(180deg); }

/* ---------- Newsletter ---------- */
.fig-newsletter {
    background: var(--fig-grad-primary);
    color: #fff;
    padding: 70px 0;
    position: relative;
    overflow: hidden;
}
.fig-newsletter::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.15) 0%, transparent 40%),
                      radial-gradient(circle at 80% 70%, rgba(255,255,255,0.1) 0%, transparent 40%);
}
.fig-newsletter-inner { position: relative; text-align: center; max-width: 600px; margin: 0 auto; padding: 0 24px; }
.fig-newsletter h2 { color: #fff; margin-bottom: 12px; }
.fig-newsletter p { opacity: 0.92; margin-bottom: 28px; }
.fig-newsletter-form {
    display: flex;
    gap: 10px;
    max-width: 480px;
    margin: 0 auto;
    flex-wrap: wrap;
}
.fig-newsletter-form input {
    flex: 1;
    min-width: 220px;
    padding: 15px 22px;
    border: none;
    border-radius: 100px;
    font-size: 0.95rem;
    outline: none;
    background: rgba(255,255,255,0.96);
    color: #2d2d2d;
}
.fig-newsletter-form input:focus { background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,0.3); }

/* ---------- Footer ---------- */
.fig-footer {
    background: #0f0d23;
    color: #d1d5db;
    padding: 70px 0 0;
    position: relative;
}
.fig-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}
.fig-footer-col h4 {
    color: #fff;
    font-size: 1.05rem;
    margin-bottom: 20px;
    font-family: var(--fig-font);
    letter-spacing: 0.5px;
}
.fig-footer-col ul { list-style: none; }
.fig-footer-col ul li { margin-bottom: 10px; }
.fig-footer-col ul li a {
    color: #9ca3af;
    font-size: 0.92rem;
    transition: color 0.2s, padding-left 0.2s;
}
.fig-footer-col ul li a:hover { color: #fff; padding-left: 5px; }
.fig-footer-brand p { color: #9ca3af; margin-top: 14px; font-size: 0.92rem; line-height: 1.7; }
.fig-footer-social { display: flex; gap: 12px; margin-top: 22px; }
.fig-footer-social a {
    width: 42px; height: 42px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.25s;
}
.fig-footer-social a:hover {
    background: var(--fig-primary);
    transform: translateY(-4px);
    color: #fff;
}
.fig-footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 24px 0;
    text-align: center;
    color: #6b7280;
    font-size: 0.88rem;
}

/* ---------- Forms ---------- */
.fig-form-group { margin-bottom: 20px; }
.fig-form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--fig-text);
}
.fig-form-control {
    width: 100%;
    padding: 13px 18px;
    border: 2px solid var(--fig-input-border);
    border-radius: var(--fig-radius);
    background: var(--fig-input-bg);
    color: var(--fig-text);
    font-size: 0.95rem;
    transition: all 0.2s;
    font-family: inherit;
}
.fig-form-control:focus {
    outline: none;
    border-color: var(--fig-primary);
    background: var(--fig-input-bg-focus);
    box-shadow: 0 0 0 4px rgba(124,58,237,0.18);
}
textarea.fig-form-control { resize: vertical; min-height: 140px; }
.fig-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
.fig-form-captcha {
    display: flex;
    align-items: center;
    gap: 14px;
}
.fig-form-captcha .math {
    background: var(--fig-primary);
    color: #fff;
    padding: 13px 22px;
    border-radius: var(--fig-radius);
    font-weight: 700;
    letter-spacing: 1px;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
}
.fig-password-wrap { position: relative; }
.fig-password-toggle {
    position: absolute;
    right: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--fig-text-muted);
    font-size: 1.1rem;
    z-index: 2;
}

/* ---------- Alerts & Toasts ---------- */
.fig-alert {
    padding: 14px 20px;
    border-radius: var(--fig-radius);
    font-size: 0.95rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.fig-alert-success { background: rgba(16,185,129,0.1); color: #059669; border: 1px solid rgba(16,185,129,0.3); }
.fig-alert-error { background: rgba(239,68,68,0.1); color: #dc2626; border: 1px solid rgba(239,68,68,0.3); }
.fig-alert-warn { background: rgba(245,158,11,0.1); color: #b45309; border: 1px solid rgba(245,158,11,0.3); }
.fig-alert-info { background: rgba(59,130,246,0.1); color: #2563eb; border: 1px solid rgba(59,130,246,0.3); }

.fig-toast-container {
    position: fixed;
    bottom: 24px; right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
}
.fig-toast {
    background: var(--fig-bg-elevated);
    color: var(--fig-text);
    padding: 16px 20px;
    border-radius: var(--fig-radius);
    box-shadow: var(--fig-shadow-lg);
    border-left: 4px solid var(--fig-primary);
    animation: fig-toast-in 0.4s ease forwards;
    font-size: 0.92rem;
    display: flex;
    gap: 10px;
    align-items: center;
}
.fig-toast.success { border-left-color: var(--fig-success); }
.fig-toast.error { border-left-color: var(--fig-danger); }
@keyframes fig-toast-in {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ---------- Animations on Scroll ---------- */
.fig-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.fig-reveal.visible { opacity: 1; transform: translateY(0); }
.fig-reveal-left { transform: translateX(-40px); }
.fig-reveal-left.visible { transform: translateX(0); }
.fig-reveal-right { transform: translateX(40px); }
.fig-reveal-right.visible { transform: translateX(0); }
.fig-reveal-scale { transform: scale(0.92); }
.fig-reveal-scale.visible { transform: scale(1); }

/* stagger */
.fig-reveal[data-delay="100"] { transition-delay: 0.1s; }
.fig-reveal[data-delay="200"] { transition-delay: 0.2s; }
.fig-reveal[data-delay="300"] { transition-delay: 0.3s; }
.fig-reveal[data-delay="400"] { transition-delay: 0.4s; }

/* ---------- Post Page ---------- */
.fig-post-hero {
    padding: 120px 0 50px;
    background: var(--fig-grad-primary);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.fig-post-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.2) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(0,0,0,0.2) 0%, transparent 50%);
}
.fig-post-hero-inner { max-width: 840px; margin: 0 auto; padding: 0 24px; position: relative; text-align: center; }
.fig-post-hero h1 {
    color: #fff;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    margin-bottom: 18px;
}
.fig-post-hero-meta {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    font-size: 0.92rem;
    opacity: 0.92;
}
.fig-post-hero-meta span { display: inline-flex; align-items: center; gap: 6px; }

.fig-post-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 50px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 24px;
}
.fig-post-content {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--fig-text);
}
.fig-post-content p { margin-bottom: 22px; }
.fig-post-content h2 { font-size: 1.7rem; margin: 40px 0 18px; color: var(--fig-text); }
.fig-post-content h3 { font-size: 1.35rem; margin: 30px 0 14px; }
.fig-post-content blockquote {
    border-left: 4px solid var(--fig-primary);
    padding: 16px 22px;
    background: rgba(124,58,237,0.05);
    font-style: italic;
    color: var(--fig-text-soft);
    margin: 28px 0;
    border-radius: 0 var(--fig-radius) var(--fig-radius) 0;
}
.fig-post-content img { border-radius: var(--fig-radius); margin: 28px 0; }
.fig-post-content a { text-decoration: underline; text-underline-offset: 3px; }

.fig-post-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 0;
    border-top: 1px solid var(--fig-border);
    border-bottom: 1px solid var(--fig-border);
    margin: 40px 0;
    flex-wrap: wrap;
}
.fig-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--fig-bg-elevated);
    border: 1px solid var(--fig-border);
    border-radius: 100px;
    color: var(--fig-text-soft);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
    cursor: pointer;
}
.fig-action-btn:hover { border-color: var(--fig-primary); color: var(--fig-primary); transform: translateY(-2px); }
.fig-action-btn.liked { background: #fef2f2; border-color: #ef4444; color: #dc2626; }
[data-theme="dark"] .fig-action-btn.liked { background: rgba(239,68,68,0.15); }
.fig-reactions { display: inline-flex; gap: 6px; background: var(--fig-bg-elevated); border: 1px solid var(--fig-border); border-radius: 100px; padding: 4px; }
.fig-reactions button {
    padding: 6px 10px;
    border-radius: 100px;
    font-size: 1.1rem;
    transition: all 0.2s;
}
.fig-reactions button:hover { transform: scale(1.2); background: var(--fig-bg); }
.fig-reactions button.selected { background: var(--fig-primary); }

.fig-share-bar {
    display: flex;
    gap: 8px;
    margin-left: auto;
}
.fig-share-bar a {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--fig-bg-elevated);
    border: 1px solid var(--fig-border);
    color: var(--fig-text-soft);
    transition: all 0.25s;
}
.fig-share-bar a:hover { background: var(--fig-primary); color: #fff; border-color: var(--fig-primary); transform: translateY(-2px); }

/* Sidebar */
.fig-sidebar { position: sticky; top: 100px; align-self: start; }
.fig-sidebar-card {
    background: var(--fig-bg-elevated);
    border: 1px solid var(--fig-border);
    border-radius: var(--fig-radius-lg);
    padding: 24px;
    margin-bottom: 22px;
}
.fig-sidebar-card h4 { font-size: 1.1rem; margin-bottom: 16px; }
.fig-recent-posts { list-style: none; }
.fig-recent-posts li { padding: 10px 0; border-bottom: 1px solid var(--fig-border); }
.fig-recent-posts li:last-child { border-bottom: none; }
.fig-recent-posts a { color: var(--fig-text); font-weight: 500; font-size: 0.92rem; line-height: 1.4; display: block; }
.fig-recent-posts a:hover { color: var(--fig-primary); }
.fig-recent-posts time { font-size: 0.75rem; color: var(--fig-text-muted); display: block; margin-top: 4px; }

/* Comments */
.fig-comments {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--fig-border);
}
.fig-comment {
    display: flex;
    gap: 14px;
    padding: 20px 0;
    border-bottom: 1px solid var(--fig-border);
}
.fig-avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--fig-grad-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}
.fig-comment-body { flex: 1; }
.fig-comment-name { font-weight: 700; margin-right: 8px; }
.fig-comment-time { font-size: 0.82rem; color: var(--fig-text-muted); }
.fig-comment-text { margin-top: 6px; color: var(--fig-text-soft); font-size: 0.95rem; }

/* ---------- Store ---------- */
.fig-store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
}
.fig-product-card {
    background: var(--fig-bg-elevated);
    border: 1px solid var(--fig-border);
    border-radius: var(--fig-radius-lg);
    overflow: hidden;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}
.fig-product-card:hover { transform: translateY(-6px); box-shadow: var(--fig-shadow-lg); }
.fig-product-img {
    height: 280px;
    position: relative;
    overflow: hidden;
    background: var(--fig-grad-primary);
}
.fig-product-img img, .fig-product-img .fig-ph { width: 100%; height: 100%; object-fit: cover; }
.fig-price-tag {
    position: absolute;
    top: 16px; right: 16px;
    background: #fff;
    color: var(--fig-primary);
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.85rem;
    box-shadow: var(--fig-shadow);
}
.fig-price-tag.free { background: #10b981; color: #fff; }
.fig-product-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.fig-product-body h3 { font-size: 1.2rem; margin-bottom: 10px; line-height: 1.35; }
.fig-product-body p { color: var(--fig-text-muted); font-size: 0.9rem; line-height: 1.6; flex: 1; margin-bottom: 16px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fig-product-body .fig-btn { align-self: flex-start; }

/* ---------- Cookie Banner ---------- */
.fig-cookie {
    position: fixed;
    bottom: 20px; left: 20px; right: 20px;
    max-width: 600px;
    margin: 0 auto;
    background: var(--fig-bg-elevated);
    color: var(--fig-text);
    padding: 22px 26px;
    border-radius: var(--fig-radius-lg);
    box-shadow: var(--fig-shadow-lg);
    border: 1px solid var(--fig-border);
    z-index: 1200;
    display: flex;
    gap: 18px;
    align-items: center;
    transform: translateY(150%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.fig-cookie.show { transform: translateY(0); }
.fig-cookie-text { flex: 1; font-size: 0.88rem; line-height: 1.55; }
.fig-cookie-text strong { display: block; margin-bottom: 4px; }
.fig-cookie button { white-space: nowrap; }

/* ---------- Preloader (admin) ---------- */
.fig-preloader {
    position: fixed; inset: 0;
    background: linear-gradient(135deg, #0f0d23, #4a1d87);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #fff;
    transition: opacity 0.6s, visibility 0.6s;
}
.fig-preloader.done { opacity: 0; visibility: hidden; }
.fig-pre-spinner {
    width: 70px; height: 70px;
    border: 4px solid rgba(255,255,255,0.15);
    border-top-color: var(--fig-accent);
    border-radius: 50%;
    animation: fig-spin 1s linear infinite;
    margin-bottom: 24px;
}
@keyframes fig-spin { to { transform: rotate(360deg); } }
.fig-pre-text { font-family: var(--fig-font-display); font-size: 1.3rem; letter-spacing: 2px; text-transform: uppercase; opacity: 0.8; }
.fig-pre-status { margin-top: 12px; font-size: 0.85rem; opacity: 0.65; letter-spacing: 1px; }

/* ---------- Notification permission prompt (admin-positioned) ---------- */
.fig-notif-prompt {
    position: fixed;
    max-width: 320px;
    background: var(--fig-bg-elevated);
    border-radius: var(--fig-radius);
    padding: 18px;
    box-shadow: var(--fig-shadow-lg);
    border: 1px solid var(--fig-border);
    z-index: 1100;
    display: none;
}
.fig-notif-prompt.fig-notif-bottom-left { bottom: 24px; left: 24px; }
.fig-notif-prompt.fig-notif-bottom-right { bottom: 24px; right: 24px; }
.fig-notif-prompt.fig-notif-top-left { top: 100px; left: 24px; }
.fig-notif-prompt.fig-notif-top-right { top: 100px; right: 24px; }
.fig-notif-prompt.show { display: block; animation: fig-toast-in 0.5s; }
.fig-notif-prompt h4 { font-size: 1rem; margin-bottom: 6px; }
.fig-notif-prompt p { font-size: 0.85rem; color: var(--fig-text-muted); margin-bottom: 12px; }
.fig-notif-actions { display: flex; gap: 8px; }

/* ---------- Post-title sizing (admin controlled) ---------- */
/* The .fig-post-title-size-* class is applied to <body> by header.php */
body.fig-post-title-size-small .fig-post-title { font-size: 1.1rem; }
body.fig-post-title-size-medium .fig-post-title { font-size: 1.35rem; }
body.fig-post-title-size-large .fig-post-title { font-size: 1.6rem; }
body.fig-post-title-size-xlarge .fig-post-title { font-size: 1.9rem; }
body.fig-post-title-size-small .fig-post-hero .fig-post-title { font-size: clamp(1.4rem, 3.5vw, 2.1rem); }
body.fig-post-title-size-medium .fig-post-hero .fig-post-title { font-size: clamp(1.8rem, 4.5vw, 3rem); }
body.fig-post-title-size-large .fig-post-hero .fig-post-title { font-size: clamp(2.2rem, 5.2vw, 3.6rem); }
body.fig-post-title-size-xlarge .fig-post-hero .fig-post-title { font-size: clamp(2.6rem, 6vw, 4.2rem); }

/* ---------- Gallery & Videos listing ---------- */
.fig-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
    margin-top: 30px;
}
.fig-gallery-item {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: var(--fig-radius);
    cursor: pointer;
    background: var(--fig-surface);
    border: 1px solid var(--fig-border);
    transition: transform 0.25s, box-shadow 0.25s;
}
.fig-gallery-item:hover { transform: translateY(-4px); box-shadow: var(--fig-shadow-lg); }
.fig-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fig-gallery-caption {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 14px;
    background: linear-gradient(180deg, transparent, rgba(0,0,0,0.75));
    color: #fff;
    font-size: 0.88rem;
    font-weight: 600;
}
.fig-gallery-lightbox {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.92);
    display: none;
    align-items: center; justify-content: center;
    z-index: 10000;
    padding: 20px;
}
.fig-gallery-lightbox.show { display: flex; }
.fig-gallery-lightbox img { max-width: 100%; max-height: 90vh; border-radius: 10px; }
.fig-gallery-lightbox-close {
    position: absolute; top: 20px; right: 24px;
    background: rgba(255,255,255,0.1); color: #fff; border: none;
    width: 44px; height: 44px; border-radius: 50%;
    font-size: 1.2rem; cursor: pointer;
}

.fig-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 22px;
    margin-top: 30px;
}
.fig-video-card {
    background: var(--fig-surface);
    border: 1px solid var(--fig-border);
    border-radius: var(--fig-radius);
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s;
}
.fig-video-card:hover { transform: translateY(-4px); box-shadow: var(--fig-shadow-lg); }
.fig-video-thumb {
    position: relative; aspect-ratio: 16/9;
    background: #000;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    overflow: hidden;
}
.fig-video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fig-video-play {
    position: absolute;
    width: 64px; height: 64px;
    background: rgba(220,38,38,0.9); color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 6px 22px rgba(0,0,0,0.4);
    pointer-events: none;
    transition: transform 0.25s;
}
.fig-video-card:hover .fig-video-play { transform: scale(1.12); background: #dc2626; }
.fig-video-body { padding: 16px 18px; }
.fig-video-title { font-family: var(--fig-font-display); font-size: 1.1rem; margin: 0 0 6px; color: var(--fig-text); line-height: 1.3; }
.fig-video-desc { color: var(--fig-text-muted); font-size: 0.88rem; line-height: 1.5; }
.fig-video-modal {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.92);
    display: none;
    align-items: center; justify-content: center;
    z-index: 10000;
    padding: 20px;
}
.fig-video-modal.show { display: flex; }
.fig-video-modal-frame {
    width: 100%; max-width: 900px; aspect-ratio: 16/9;
    background: #000; border-radius: 10px; overflow: hidden;
}
.fig-video-modal-frame iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Mobile Nav ---------- */
@media (max-width: 900px) {
    .fig-menu-toggle { display: flex; }
    .fig-nav-links {
        position: fixed;
        top: var(--fig-header-h);
        left: 0; right: 0;
        flex-direction: column;
        background: var(--fig-bg-elevated);
        padding: 20px;
        gap: 8px;
        border-bottom: 1px solid var(--fig-border);
        transform: translateY(-120%);
        transition: transform 0.35s ease;
        box-shadow: var(--fig-shadow);
    }
    .fig-nav-links.open { transform: translateY(0); }
    .fig-nav-links a { padding: 10px 14px; border-radius: 10px; width: 100%; }
    .fig-nav-links a:hover { background: var(--fig-bg); }
    .fig-post-layout { grid-template-columns: 1fr; }
    .fig-sidebar { position: static; }
    .fig-footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
    .fig-form-row { grid-template-columns: 1fr; }
    .fig-slide-nav { width: 42px; height: 42px; font-size: 1rem; }
    .fig-slide-nav.prev { left: 12px; } .fig-slide-nav.next { right: 12px; }
}
@media (max-width: 560px) {
    .fig-footer-grid { grid-template-columns: 1fr; }
    .fig-cookie { flex-direction: column; text-align: center; }
    .fig-section { padding: 60px 0; }
    .fig-hero { height: 85vh; min-height: 500px; }
}

/* Utilities */
.fig-mt-0 { margin-top: 0; } .fig-mb-0 { margin-bottom: 0; }
.fig-text-center { text-align: center; }
.fig-flex { display: flex; gap: 12px; flex-wrap: wrap; }

/* ============ PAGES ADDED: public sub-pages ============ */
.fig-page-hero {
    background: linear-gradient(135deg, rgba(124,58,237,0.95), rgba(217,70,239,0.9));
    color: #fff; padding: 70px 20px 60px; text-align: center;
}
.fig-page-hero h1 { font-family: 'Playfair Display', serif; font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 14px; font-weight: 800; }
.fig-page-hero p { font-size: 1.1rem; opacity: 0.95; max-width: 680px; margin: 0 auto; }
.fig-page-hero-icon {
    font-size: 2.5rem; width: 80px; height: 80px; background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.3); border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px;
}

.fig-section { padding: 60px 24px; }
.fig-muted { color: var(--fig-muted); }
.fig-empty { text-align: center; padding: 30px; color: var(--fig-muted); }
.fig-empty-state { text-align: center; padding: 80px 20px; }
.fig-empty-state h3 { margin: 20px 0 10px; font-size: 1.4rem; }
.fig-back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--fig-muted); text-decoration: none; margin-bottom: 12px; }
.fig-back-link:hover { color: var(--fig-primary); }

/* Form & notes */
.fig-form-note { font-size: 0.85rem; color: var(--fig-muted); margin-top: 12px; }
.fig-form-note i { color: var(--fig-primary); margin-right: 4px; }

/* Prayer / Contact grid */
.fig-prayer-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; max-width: 1100px; margin: 0 auto; }
.fig-prayer-form-box { background: var(--fig-surface); border: 1px solid var(--fig-border); border-radius: 20px; padding: 36px; box-shadow: 0 4px 24px rgba(0,0,0,0.04); }
.fig-prayer-form-box h2 { font-family: 'Playfair Display', serif; margin: 0 0 10px; }
.fig-prayer-side { display: flex; flex-direction: column; gap: 18px; }

/* Sidebar box — reusable */
.fig-sidebar-box { background: var(--fig-surface); border: 1px solid var(--fig-border); border-radius: 16px; padding: 22px; }
.fig-sidebar-box h3 { margin: 0 0 12px; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.fig-sidebar-box p { margin: 0 0 12px; color: var(--fig-muted); font-size: 0.9rem; }
.fig-sidebar-box ul { margin: 0; padding-left: 18px; }
.fig-sidebar-box ul li { margin-bottom: 6px; }
.fig-sidebar-cta { background: linear-gradient(135deg, rgba(124,58,237,0.08), rgba(245,158,11,0.08)); border-color: rgba(124,58,237,0.25); }

.fig-sidebar-post { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--fig-border); text-decoration: none; color: inherit; }
.fig-sidebar-post:last-child { border-bottom: none; }
.fig-sidebar-post-img { width: 64px; height: 64px; border-radius: 10px; flex-shrink: 0; }
.fig-sidebar-post h4 { margin: 0 0 4px; font-size: 0.92rem; line-height: 1.35; }
.fig-sidebar-post span { font-size: 0.78rem; color: var(--fig-muted); }

/* Products */
.fig-products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 26px; }
.fig-product-card { background: var(--fig-surface); border: 1px solid var(--fig-border); border-radius: 18px; overflow: hidden; text-decoration: none; color: inherit; transition: transform 0.3s, box-shadow 0.3s; display: flex; flex-direction: column; }
.fig-product-card:hover { transform: translateY(-4px); box-shadow: 0 12px 36px rgba(124,58,237,0.18); }
.fig-product-img { aspect-ratio: 4/3; position: relative; display: flex; align-items: flex-start; justify-content: flex-end; padding: 14px; }
.fig-product-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.fig-product-body h3 { margin: 0 0 8px; font-size: 1.1rem; line-height: 1.3; }
.fig-product-body p { color: var(--fig-muted); font-size: 0.9rem; margin: 0 0 16px; flex: 1; }
.fig-product-cta { margin-top: auto; }
.fig-badge { display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.5px; }
.fig-badge-free { background: #10b981; color: #fff; }
.fig-badge-paid { background: #fff; color: var(--fig-primary); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }

/* Product detail */
.fig-product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; max-width: 1100px; margin: 0 auto; }
.fig-product-detail-img { aspect-ratio: 1/1; border-radius: 24px; position: relative; display: flex; align-items: flex-start; justify-content: flex-end; padding: 20px; }
.fig-product-detail-info h1 { font-family: 'Playfair Display', serif; font-size: 2rem; margin: 10px 0 20px; }
.fig-product-desc { color: var(--fig-muted); line-height: 1.7; margin-bottom: 26px; }
.fig-product-price-box { background: var(--fig-surface); border: 1px solid var(--fig-border); border-radius: 16px; padding: 24px; }
.fig-price-display { font-size: 2rem; font-weight: 800; color: var(--fig-primary); margin-bottom: 8px; }

/* Placeholder product gradients */
.fig-ph-product-1 { background: linear-gradient(135deg, #6d28d9, #f59e0b); }
.fig-ph-product-2 { background: linear-gradient(135deg, #0f766e, #fbbf24); }
.fig-ph-product-3 { background: linear-gradient(135deg, #7e22ce, #ec4899); }
.fig-ph-product-1::after, .fig-ph-product-2::after, .fig-ph-product-3::after {
    content: "\f02d"; font-family: 'Font Awesome 6 Free'; font-weight: 900;
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.55); font-size: 4.5rem; pointer-events: none;
}

/* Post detail */
.fig-post-category { display: inline-block; padding: 5px 14px; background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.3); border-radius: 999px; font-size: 0.8rem; margin-bottom: 14px; letter-spacing: 1px; text-transform: uppercase; }
.fig-post-title { font-family: 'Playfair Display', serif; font-size: clamp(1.8rem, 4.5vw, 3rem); margin: 0 0 18px; }
.fig-post-meta { display: flex; flex-wrap: wrap; gap: 18px; font-size: 0.88rem; opacity: 0.9; justify-content: center; }
.fig-post-meta span { display: inline-flex; align-items: center; gap: 6px; }
.fig-post-hero-overlay { background: linear-gradient(to bottom, rgba(0,0,0,0.35), rgba(0,0,0,0.7)); min-height: 380px; display: flex; align-items: center; color: #fff; text-align: center; padding: 60px 20px; }
.fig-post-hero { min-height: 380px; background-color: #1e1b4b; position: relative; }

.fig-post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; max-width: 1200px; margin: 40px auto; padding: 0 24px; }
.fig-post-main { min-width: 0; }
.fig-post-content { line-height: 1.85; font-size: 1.08rem; color: var(--fig-text); }
.fig-post-content h2 { font-family: 'Playfair Display', serif; font-size: 1.6rem; margin: 32px 0 14px; color: var(--fig-primary); }
.fig-post-content h3 { font-size: 1.25rem; margin: 24px 0 10px; }
.fig-post-content p { margin: 0 0 18px; }
.fig-post-content blockquote { border-left: 4px solid var(--fig-primary); padding: 10px 20px; color: var(--fig-muted); font-style: italic; background: var(--fig-surface-2); margin: 20px 0; border-radius: 0 10px 10px 0; }
.fig-post-sidebar { display: flex; flex-direction: column; gap: 20px; }

.fig-post-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; padding: 22px; background: var(--fig-surface); border: 1px solid var(--fig-border); border-radius: 16px; margin: 30px 0; }
.fig-action-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; background: var(--fig-surface-2); border: 1px solid var(--fig-border); border-radius: 999px; cursor: pointer; font-weight: 600; transition: all 0.2s; color: var(--fig-text); }
.fig-action-btn:hover { background: var(--fig-primary); color: #fff; border-color: var(--fig-primary); }
.fig-action-btn.fig-liked { background: #ef4444; color: #fff; border-color: #ef4444; }
.fig-emoji-btn { background: transparent; border: none; padding: 6px 10px; cursor: pointer; border-radius: 999px; font-size: 1.05rem; display: inline-flex; align-items: center; gap: 4px; transition: transform 0.15s; }
.fig-emoji-btn:hover { transform: scale(1.15); background: var(--fig-surface-2); }
.fig-emoji-btn .fig-count { font-size: 0.8rem; color: var(--fig-muted); }

.fig-share { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; }
.fig-share span { color: var(--fig-muted); font-size: 0.9rem; }
.fig-share a, .fig-share button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--fig-border); display: inline-flex; align-items: center; justify-content: center; background: var(--fig-surface); color: var(--fig-text); cursor: pointer; text-decoration: none; transition: all 0.2s; }
.fig-share a:hover, .fig-share button:hover { background: var(--fig-primary); color: #fff; border-color: var(--fig-primary); }

.fig-post-tags { margin: 20px 0 30px; display: flex; flex-wrap: wrap; gap: 8px; }
.fig-tag { background: var(--fig-surface-2); padding: 5px 12px; border-radius: 999px; font-size: 0.8rem; color: var(--fig-muted); }

/* Comments */
.fig-comments { margin-top: 40px; }
.fig-comments h2 { font-family: 'Playfair Display', serif; margin: 0 0 20px; display: flex; align-items: center; gap: 10px; }
.fig-comment-form { background: var(--fig-surface); border: 1px solid var(--fig-border); border-radius: 16px; padding: 24px; margin-bottom: 30px; }
.fig-comments-list { display: flex; flex-direction: column; gap: 16px; }
.fig-comment { display: flex; gap: 14px; padding: 16px; background: var(--fig-surface); border: 1px solid var(--fig-border); border-radius: 12px; }
.fig-comment-avatar { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, var(--fig-primary), var(--fig-accent)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.fig-comment-body { flex: 1; }
.fig-comment-head { display: flex; gap: 10px; align-items: center; margin-bottom: 4px; }
.fig-comment-time { color: var(--fig-muted); font-size: 0.8rem; }
.fig-comment-body p { margin: 4px 0 0; color: var(--fig-text); line-height: 1.5; }

.fig-ad-slot { margin: 30px 0; }
.fig-ad-placeholder { background: var(--fig-surface-2); border: 2px dashed var(--fig-border); padding: 40px; text-align: center; color: var(--fig-muted); border-radius: 12px; }
.fig-ad-placeholder i { margin-right: 8px; }

.fig-youtube-embed { position: relative; padding-bottom: 56.25%; height: 0; margin: 30px 0; border-radius: 14px; overflow: hidden; }
.fig-youtube-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* About grid */
.fig-about-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; max-width: 1100px; margin: 0 auto; }
.fig-about-grid h2 { font-family: 'Playfair Display', serif; margin: 30px 0 14px; color: var(--fig-primary); }
.fig-about-grid h2:first-child { margin-top: 0; }
.fig-about-grid p { line-height: 1.7; color: var(--fig-text); }
.fig-about-grid ul { line-height: 1.9; }

/* Legal content */
.fig-legal-content { max-width: 820px; margin: 0 auto; line-height: 1.75; color: var(--fig-text); }
.fig-legal-content h2 { font-family: 'Playfair Display', serif; font-size: 1.5rem; margin: 32px 0 12px; color: var(--fig-primary); }
.fig-legal-content h3 { font-size: 1.15rem; margin: 20px 0 8px; }
.fig-legal-content p { margin: 0 0 16px; }
.fig-legal-content ul { margin: 0 0 16px; padding-left: 22px; }
.fig-legal-content ul li { margin-bottom: 6px; }
.fig-legal-content code { background: var(--fig-surface-2); padding: 2px 6px; border-radius: 4px; font-size: 0.9em; }

/* Error page */
.fig-error-page { padding: 80px 20px; text-align: center; }
.fig-error-code { font-family: 'Playfair Display', serif; font-size: clamp(5rem, 15vw, 9rem); font-weight: 900; background: linear-gradient(135deg, var(--fig-primary), var(--fig-accent)); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.fig-error-page h1 { font-family: 'Playfair Display', serif; font-size: 2rem; margin: 14px 0; }
.fig-error-page p { color: var(--fig-muted); max-width: 500px; margin: 0 auto 14px; }
.fig-error-page blockquote { max-width: 500px; margin: 20px auto; padding: 14px 20px; border-left: 4px solid var(--fig-primary); font-style: italic; color: var(--fig-muted); background: var(--fig-surface-2); border-radius: 0 10px 10px 0; }
.fig-error-actions { display: flex; gap: 12px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }

/* Copy link */
.fig-copy-link { border: none; }

/* Responsive */
@media (max-width: 900px) {
    .fig-post-layout { grid-template-columns: 1fr; }
    .fig-prayer-grid, .fig-about-grid, .fig-product-detail { grid-template-columns: 1fr; }
    .fig-share { margin-left: 0; flex-wrap: wrap; }
}

/* ============ PUBLIC FORM FIELDS (comment / prayer / contact / donate) ============ */
.fig-form, .fig-comment-form {
    display: block;
}
.fig-form-row, .fig-comment-form .fig-form-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 14px;
}
.fig-form-field { margin-bottom: 14px; }
.fig-form-field label, .fig-comment-form label {
    display: block; font-size: 0.9rem; margin-bottom: 6px; color: var(--fig-text); font-weight: 600;
}
.fig-form input[type=text],
.fig-form input[type=email],
.fig-form input[type=tel],
.fig-form input[type=number],
.fig-form input[type=url],
.fig-form input[type=password],
.fig-form textarea,
.fig-form select,
.fig-comment-form input[type=text],
.fig-comment-form input[type=email],
.fig-comment-form input[type=tel],
.fig-comment-form textarea,
.fig-comment-form select {
    width: 100%;
    padding: 12px 14px;
    background: var(--fig-input-bg);
    border: 1px solid var(--fig-input-border);
    border-radius: 10px;
    color: var(--fig-text);
    font-family: inherit;
    font-size: 0.95rem;
    box-sizing: border-box;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.fig-form input:focus,
.fig-form textarea:focus,
.fig-form select:focus,
.fig-comment-form input:focus,
.fig-comment-form textarea:focus,
.fig-comment-form select:focus {
    outline: none;
    border-color: var(--fig-primary);
    background: var(--fig-input-bg-focus);
    box-shadow: 0 0 0 3px rgba(124,58,237,0.22);
}
.fig-form input::placeholder, .fig-form textarea::placeholder,
.fig-comment-form input::placeholder, .fig-comment-form textarea::placeholder {
    color: var(--fig-muted); opacity: 0.75;
}
.fig-form textarea, .fig-comment-form textarea { min-height: 120px; resize: vertical; }

@media (max-width: 640px) {
    .fig-form-row, .fig-comment-form .fig-form-row { grid-template-columns: 1fr; }
}

/* Donation amount grid */
.fig-donate-amounts { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; margin-bottom: 16px; }
.fig-donate-amount { padding: 14px; text-align: center; border: 2px solid var(--fig-border); background: var(--fig-surface); border-radius: 12px; cursor: pointer; font-weight: 700; font-size: 1.05rem; transition: all 0.2s; color: var(--fig-text); }
.fig-donate-amount:hover { border-color: var(--fig-primary); }
.fig-donate-amount.selected { border-color: var(--fig-primary); background: linear-gradient(135deg, rgba(124,58,237,0.1), rgba(217,70,239,0.08)); color: var(--fig-primary); }

/* Donate popup (floating) */
/* Donation popup — supports header (top) or footer (bottom) position */
.fig-donate-popup {
    position: fixed; max-width: 360px; width: calc(100% - 40px);
    background: var(--fig-surface); border: 1px solid var(--fig-border);
    border-radius: 16px; padding: 22px 22px 20px; box-shadow: 0 16px 48px rgba(0,0,0,0.22);
    z-index: 500; opacity: 0; pointer-events: none;
    transition: transform 0.5s cubic-bezier(0.68,-0.55,0.265,1.55), opacity 0.4s;
}
.fig-donate-popup-footer { bottom: 20px; left: 20px; transform: translateY(200%); }
.fig-donate-popup-header { top: 20px; right: 20px; transform: translateY(-200%); }
.fig-donate-popup.show { transform: translateY(0); opacity: 1; pointer-events: auto; }
.fig-donate-popup h4 { margin: 0 0 8px; font-size: 1.05rem; color: var(--fig-primary); display: flex; align-items: center; gap: 8px; font-weight: 700; }
.fig-donate-popup p { margin: 0 0 14px; font-size: 0.88rem; color: var(--fig-muted); line-height: 1.5; }
.fig-donate-popup .fig-btn { width: 100%; justify-content: center; }
.fig-donate-popup-close {
    position: absolute; top: 8px; right: 12px; background: transparent;
    border: none; color: var(--fig-muted); cursor: pointer;
    font-size: 1.4rem; line-height: 1; width: 28px; height: 28px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
}
.fig-donate-popup-close:hover { color: var(--fig-primary); background: var(--fig-surface-2); }
@media (max-width: 500px) {
    .fig-donate-popup-header, .fig-donate-popup-footer { left: 20px; right: 20px; max-width: none; width: auto; }
}

/* Cause cards on donation page */
.fig-cause-card { background: var(--fig-surface); border: 1px solid var(--fig-border); border-radius: 16px; overflow: hidden; margin-bottom: 20px; }
.fig-cause-card .body { padding: 22px; }
.fig-cause-card h3 { margin: 0 0 10px; font-family: 'Playfair Display', serif; color: var(--fig-primary); }
.fig-cause-card p { color: var(--fig-muted); line-height: 1.6; margin: 0 0 14px; }
.fig-progress-bar { height: 10px; background: var(--fig-surface-2); border-radius: 999px; overflow: hidden; margin-bottom: 8px; }
.fig-progress-fill { height: 100%; background: linear-gradient(90deg, var(--fig-primary), var(--fig-accent)); transition: width 0.8s; border-radius: 999px; }
.fig-progress-label { font-size: 0.85rem; color: var(--fig-muted); display: flex; justify-content: space-between; margin-bottom: 10px; }

/* Hide empty fig-ai-refresh button placeholders if any */
.fig-ai-refresh { display: none !important; }

/* ==========================================================
   Form field polish — ensures dark-mode readability and
   prevents Chrome/Safari autofill from painting fields white.
   ========================================================== */

/* Kill the browser's yellow autofill background and keep text in theme colors */
.fig-form input:-webkit-autofill,
.fig-form input:-webkit-autofill:hover,
.fig-form input:-webkit-autofill:focus,
.fig-form input:-webkit-autofill:active,
.fig-form textarea:-webkit-autofill,
.fig-form select:-webkit-autofill,
.fig-comment-form input:-webkit-autofill,
.fig-comment-form textarea:-webkit-autofill,
.fig-form-control:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px var(--fig-input-autofill) inset !important;
    -webkit-text-fill-color: var(--fig-text) !important;
    caret-color: var(--fig-text);
    transition: background-color 5000s ease-in-out 0s;
}

/* Firefox autofill fallback */
.fig-form input:autofill,
.fig-form textarea:autofill,
.fig-form-control:autofill {
    background: var(--fig-input-autofill) !important;
    color: var(--fig-text) !important;
}

/* Ensure native selects stay themed (dropdown chevron gets hard to see otherwise) */
.fig-form select,
.fig-comment-form select,
.fig-form-control {
    color-scheme: light dark;
}

/* Stronger focus ring in dark mode so it doesn't blend with the purple surface */
[data-theme="dark"] .fig-form input:focus,
[data-theme="dark"] .fig-form textarea:focus,
[data-theme="dark"] .fig-form select:focus,
[data-theme="dark"] .fig-comment-form input:focus,
[data-theme="dark"] .fig-comment-form textarea:focus,
[data-theme="dark"] .fig-form-control:focus {
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.35);
}

/* Make readonly / disabled fields obviously non-editable without going white */
.fig-form input[readonly],
.fig-form textarea[readonly],
.fig-form-control[readonly],
.fig-form input:disabled,
.fig-form textarea:disabled,
.fig-form-control:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
