/* ═══════════════════════════════════════════════════
   PROFLEX FINANCE — Shared Styles
   ═══════════════════════════════════════════════════
   This file contains all common styles shared across
   every page. Individual pages may add page-specific
   styles in their own <style> blocks.
   ═══════════════════════════════════════════════════ */

/* ── CSS Custom Properties (Theme Tokens) ── */
:root {
    --bh-black:  #141c25;
    --bh-dark:   #1e2833;
    --bh-gray:   #2a3642;
    --bh-beige:  #F5F5F0;
    --bh-text:   #e0e0e0;
    --bh-muted:  #a0a0a0;
    --bh-gold:   #C9A961;
    --bh-accent: #ffffff;
    --bh-text-gray: #4a4a4a;
}

/* ── Custom Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bh-black); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--bh-gold) 0%, #a07d4a 100%);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #d4b56f 0%, var(--bh-gold) 100%);
}

/* ── Scroll Progress Bar ── */
#scroll-progress {
    position: fixed; top: 0; left: 0; width: 0%; height: 3px;
    background: linear-gradient(90deg, var(--bh-gold) 0%, #ffffff 100%);
    z-index: 9999;
    box-shadow: 0 0 20px rgba(201,169,97,0.8);
    will-change: width;
}

/* ── Body Fade-In ── */
body { animation: fadeInBody 0.8s ease-out; }
@keyframes fadeInBody { from { opacity: 0; } to { opacity: 1; } }

/* ── Glass Navigation ── */
.glass-nav {
    background: rgba(20,28,37,0.96) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(201,169,97,0.2);
    box-shadow: 0 4px 24px 0 rgba(0,0,0,0.3);
}

#navbar {
    transition: background 0.4s ease, padding 0.4s ease,
                box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

/* ── Hover Underline Animation ── */
.hover-underline-animation { position: relative; }
.hover-underline-animation::after {
    content: ''; position: absolute; width: 100%; transform: scaleX(0);
    height: 2px; bottom: -2px; left: 0;
    background: linear-gradient(90deg, var(--bh-gold) 0%, #ffffff 100%);
    transform-origin: bottom right;
    transition: transform 0.4s cubic-bezier(0.25,0.46,0.45,0.94);
}
.hover-underline-animation:hover::after { transform: scaleX(1); transform-origin: bottom left; }
.hover-underline-animation.active::after { transform: scaleX(1); transform-origin: bottom left; }

/* ── Fade-In Sections (IntersectionObserver) ── */
.fade-in-section {
    opacity: 0; transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25,0.46,0.45,0.94),
                transform 0.8s cubic-bezier(0.25,0.46,0.45,0.94);
}
.fade-in-section.is-visible { opacity: 1; transform: translateY(0); }

/* ── Stagger Items ── */
.stagger-item {
    opacity: 0; transform: translateY(30px) scale(0.95);
    transition: opacity 0.6s cubic-bezier(0.25,0.46,0.45,0.94),
                transform 0.6s cubic-bezier(0.25,0.46,0.45,0.94);
}
.stagger-item.is-visible { opacity: 1; transform: translateY(0) scale(1); }
.stagger-item:nth-child(1) { transition-delay: 0.05s; }
.stagger-item:nth-child(2) { transition-delay: 0.1s; }
.stagger-item:nth-child(3) { transition-delay: 0.15s; }

/* ── Primary Button (Ripple Effect) ── */
.btn-primary {
    position: relative; overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.btn-primary::before {
    content: ''; position: absolute; top: 50%; left: 50%;
    width: 0; height: 0; border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%,-50%);
    transition: width 0.6s ease, height 0.6s ease;
}
.btn-primary:hover::before { width: 300px; height: 300px; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 15px 40px rgba(201,169,97,0.4); }

/* ── Hero Parallax Background ── */
.hero-image { animation: heroParallax 30s infinite ease-in-out; will-change: transform, opacity; }
@keyframes heroParallax {
    0%   { transform: scale(1.15); opacity: 0.25; }
    50%  { transform: scale(1);    opacity: 0.35; }
    100% { transform: scale(1.15); opacity: 0.25; }
}

/* ── Article Card (blog listing) ── */
.article-card {
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    transition: all 0.4s ease;
}
.article-card:hover {
    transform: translateY(-6px);
    border-color: rgba(201,169,97,0.4);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

/* ── Blog Post Body Typography ── */
.post-body {
    font-size: 1.05rem;
    line-height: 1.8;
    font-family: 'Inter', sans-serif;
}
.post-body h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(201,169,97,0.3);
}
.post-body h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: #e0e0e0;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}
.post-body p { margin-bottom: 1.2rem; color: #d0d0d0; }
.post-body a { color: var(--bh-gold); text-decoration: underline; text-underline-offset: 3px; }
.post-body a:hover { color: #d4b56f; }
.post-body blockquote {
    border-left: 3px solid var(--bh-gold);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    background: rgba(201,169,97,0.05);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #c0c0c0;
}
.post-body ul, .post-body ol { padding-left: 1.5rem; margin-bottom: 1.2rem; }
.post-body li { margin-bottom: 0.5rem; }
.post-body img { border-radius: 8px; margin: 1.5rem 0; }
.post-body table {
    width: 100%; border-collapse: collapse; margin: 1.5rem 0;
    font-size: 0.9rem;
}
.post-body table th, .post-body table td {
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255,255,255,0.1);
    text-align: left;
}
.post-body table th {
    background: rgba(201,169,97,0.1);
    color: var(--bh-gold);
    font-weight: 600;
}

/* ── Subscribe Popup Modal ── */
.subscribe-popup-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 10000;
    justify-content: center; align-items: center;
}
.subscribe-popup-overlay.active { display: flex; }
.subscribe-popup {
    background: var(--bh-dark);
    border: 1px solid rgba(201,169,97,0.3);
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 440px;
    width: 90%;
    position: relative;
}
