/**
 * Affiliate referral grid (auto-injected at the end of single posts and
 * called via the [my_referrals] shortcode).
 *
 * Extracted from `display_referral_links_shortcode()` in functions.php
 * (~245 lines of inline CSS that previously rendered once per shortcode
 * invocation — duplicated when the shortcode appeared in both a post body
 * and the auto-append filter).
 *
 * Contains: dark-mode card defaults (terminal aesthetic), plus light-mode
 * overrides for tool, FHA, blog, and about pages.
 */

.bv-referral-container {
    font-family: var(--bv-font-display);
    max-width: 1200px;
    margin: 6rem auto;
    padding: 0 20px;
}

.bv-referral-header {
    text-align: center;
    margin-bottom: 5rem;
}

.bv-terminal-tag {
    font-family: var(--bv-font-mono);
    font-size: 0.7rem;
    color: var(--bv-neon-cyan);
    letter-spacing: 0.2em;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.bv-referral-header h2 {
    font-size: 3rem;
    font-weight: 900;
    color: white;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

.bv-referral-header p {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.5);
    max-width: 600px;
    margin: 0 auto;
}

.bv-referral-category {
    margin-bottom: 6rem;
}

.bv-category-header-terminal {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--bv-terminal-border);
}

.bv-cat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    box-shadow: 0 0 10px currentColor;
}

.bv-referral-category-title {
    font-family: var(--bv-font-mono);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: white;
    margin: 0;
}

.bv-referral-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.bv-referral-card-v2 {
    background: var(--bv-terminal-surface);
    border: 1px solid var(--bv-terminal-border);
    border-radius: 12px;
    padding: 30px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 240px;
    transition: all 0.4s var(--bv-ease-spring);
    position: relative;
    overflow: hidden;
}

.bv-referral-card-v2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--bv-neon-cyan), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.bv-referral-card-v2:hover {
    transform: translateY(-10px) scale(1.02);
    background: var(--bv-terminal-elevated);
    border-color: rgba(255,255,255,0.2);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.bv-referral-card-v2:hover::before {
    transform: translateX(100%);
}

.bv-ref-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.bv-ref-desc {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.bv-ref-cta {
    font-family: var(--bv-font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bv-ref-cta svg {
    transition: transform 0.3s ease;
}

.bv-referral-card-v2:hover .bv-ref-cta svg {
    transform: translateX(5px);
}

/* Light mode overrides for tool pages and blog pages */
.bv-fha-page .bv-referral-container,
.bv-tool-page .bv-referral-container,
.bv-blog-page .bv-referral-container,
.bv-about-referrals .bv-referral-container,
.bv-about-page .bv-referral-container {
    background: #f8fafc;
    padding: 4rem 20px;
    border-radius: 20px;
    margin: 4rem auto;
}

.bv-fha-page .bv-referral-header h2,
.bv-tool-page .bv-referral-header h2,
.bv-blog-page .bv-referral-header h2,
.bv-about-referrals .bv-referral-header h2,
.bv-about-page .bv-referral-header h2 {
    color: #111827;
}

.bv-fha-page .bv-referral-header p,
.bv-tool-page .bv-referral-header p,
.bv-blog-page .bv-referral-header p,
.bv-about-referrals .bv-referral-header p,
.bv-about-page .bv-referral-header p {
    color: #6b7280;
}

.bv-fha-page .bv-terminal-tag,
.bv-tool-page .bv-terminal-tag,
.bv-blog-page .bv-terminal-tag,
.bv-about-referrals .bv-terminal-tag,
.bv-about-page .bv-terminal-tag {
    color: #0891b2;
}

.bv-fha-page .bv-category-header-terminal,
.bv-tool-page .bv-category-header-terminal,
.bv-blog-page .bv-category-header-terminal,
.bv-about-referrals .bv-category-header-terminal,
.bv-about-page .bv-category-header-terminal {
    border-bottom-color: #e5e7eb;
}

.bv-fha-page .bv-referral-category-title,
.bv-tool-page .bv-referral-category-title,
.bv-blog-page .bv-referral-category-title,
.bv-about-referrals .bv-referral-category-title,
.bv-about-page .bv-referral-category-title {
    color: #374151;
}

.bv-fha-page .bv-referral-card-v2,
.bv-tool-page .bv-referral-card-v2,
.bv-blog-page .bv-referral-card-v2 {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.bv-fha-page .bv-referral-card-v2:hover,
.bv-tool-page .bv-referral-card-v2:hover,
.bv-blog-page .bv-referral-card-v2:hover,
.bv-about-referrals .bv-referral-card-v2:hover,
.bv-about-page .bv-referral-card-v2:hover {
    background: #ffffff;
    border-color: #0891b2;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.bv-fha-page .bv-referral-card-v2::before,
.bv-tool-page .bv-referral-card-v2::before,
.bv-blog-page .bv-referral-card-v2::before,
.bv-about-referrals .bv-referral-card-v2::before,
.bv-about-page .bv-referral-card-v2::before {
    background: linear-gradient(90deg, transparent, #0891b2, transparent);
}

.bv-fha-page .bv-ref-name,
.bv-tool-page .bv-ref-name,
.bv-blog-page .bv-ref-name,
.bv-about-referrals .bv-ref-name,
.bv-about-page .bv-ref-name {
    color: #111827;
}

.bv-fha-page .bv-ref-desc,
.bv-tool-page .bv-ref-desc,
.bv-blog-page .bv-ref-desc,
.bv-about-referrals .bv-ref-desc,
.bv-about-page .bv-ref-desc {
    color: #6b7280;
}

.bv-fha-page .bv-ref-cta,
.bv-tool-page .bv-ref-cta,
.bv-blog-page .bv-ref-cta,
.bv-about-referrals .bv-ref-cta,
.bv-about-page .bv-ref-cta {
    color: #0891b2;
}
