/* =========================================
   YFHB POPUP LEAD CAPTURE CSS
   ========================================= */
#yfhb-popup-overlay {
    position: fixed;
    inset: 0;
    top: 0; /* JS will shift header down; overlay still covers full screen */
    background: rgba(13,31,51,.78);
    backdrop-filter: blur(5px);
    z-index: 99998; /* header gets 100001 when popup is open — sits above overlay */
    align-items: center;
    justify-content: center;
    padding: 1rem;
    padding-top: calc(80px + 60px + 1rem); /* header height + push-down + gap */
    opacity: 0;
    transition: opacity .35s ease;
    pointer-events: none;
}
#yfhb-popup-overlay.yfhb-visible {
    opacity: 1;
    pointer-events: all;
}
#yfhb-popup {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    max-width: 820px;
    width: 100%;
    position: relative;
    transform: translateY(28px) scale(.97);
    transition: transform .38s cubic-bezier(.34,1.4,.64,1);
    box-shadow: 0 30px 80px rgba(0,0,0,.32);
    max-height: calc(92vh - 140px);
    overflow-y: auto;
}
#yfhb-popup-overlay.yfhb-visible #yfhb-popup {
    transform: translateY(0) scale(1);
}
#yfhb-popup-inner {
    display: grid;
    grid-template-columns: 220px 1fr;
}
#yfhb-popup-left {
    background: linear-gradient(160deg,#1A3A5C 0%,#0D1F33 100%);
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    text-align: center;
}
.popup-home-icon svg { width: 80px; height: 80px; }
.popup-left-stat {
    font-family: 'Raleway', sans-serif;
    font-size: .75rem;
    color: rgba(255,255,255,.65);
    letter-spacing: .08em;
    text-transform: uppercase;
    line-height: 1.3;
}
.popup-left-stat span {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: #C8922A;
    line-height: 1.1;
    margin-bottom: .2rem;
}
#yfhb-popup-right {
    padding: 2.25rem 2rem;
}
.popup-badge {
    display: inline-block;
    background: #C8922A;
    color: #fff;
    font-family: 'Raleway', sans-serif;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .2em;
    padding: .3rem .9rem;
    border-radius: 100px;
    margin-bottom: .875rem;
}
#yfhb-popup-right h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: #1A3A5C;
    margin-bottom: .5rem;
    line-height: 1.25;
}
#yfhb-popup-right > p {
    font-size: .88rem;
    color: #718096;
    margin-bottom: 1.25rem;
    line-height: 1.6;
}
.popup-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
}
.popup-field { margin-bottom: .875rem; }
.popup-field label {
    display: block;
    font-family: 'Raleway', sans-serif;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #2D3748;
    margin-bottom: .3rem;
}
.popup-field input,
.popup-field select {
    width: 100%;
    padding: .72rem .9rem;
    border: 1.5px solid #E2E8F0;
    border-radius: 8px;
    font-size: .9rem;
    color: #2D3748;
    background: #fff;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    font-family: 'Source Sans 3', sans-serif;
    -webkit-appearance: none;
    appearance: none;
}
.popup-field input:focus,
.popup-field select:focus {
    border-color: #C8922A;
    box-shadow: 0 0 0 3px rgba(200,146,42,.15);
}
.popup-btn-submit {
    width: 100%;
    padding: .95rem 1.5rem;
    background: #C8922A;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: 'Raleway', sans-serif;
    font-size: .92rem;
    font-weight: 700;
    letter-spacing: .04em;
    cursor: pointer;
    transition: background .2s, transform .15s;
    margin-bottom: .875rem;
}
.popup-btn-submit:hover          { background: #a67520; transform: translateY(-1px); }
.popup-btn-submit:disabled       { opacity: .65; cursor: not-allowed; transform: none; }
.popup-trust {
    display: flex;
    gap: .75rem;
    justify-content: center;
    flex-wrap: wrap;
    font-size: .74rem;
    color: #718096;
    margin-bottom: .875rem;
}
.popup-or {
    text-align: center;
    font-size: .78rem;
    color: #A0AEC0;
    margin-bottom: .875rem;
    position: relative;
}
.popup-or::before, .popup-or::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 28%;
    height: 1px;
    background: #E2E8F0;
}
.popup-or::before { left: 0; }
.popup-or::after  { right: 0; }
.popup-btn-call {
    display: block;
    width: 100%;
    padding: .78rem;
    text-align: center;
    background: #1A3A5C;
    color: #fff !important;
    border-radius: 8px;
    font-family: 'Raleway', sans-serif;
    font-size: .92rem;
    font-weight: 700;
    transition: background .2s;
    text-decoration: none;
}
.popup-btn-call:hover { background: #0D1F33; }
#yfhb-popup-close {
    position: absolute;
    top: .875rem;
    right: .875rem;
    width: 32px; height: 32px;
    background: rgba(0,0,0,.12);
    border: none;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    color: #fff;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    line-height: 1;
}
#yfhb-popup-close:hover { background: rgba(0,0,0,.28); }
#popup-form-msg {
    padding: .75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: .88rem;
    font-weight: 600;
}
#popup-form-msg.yfhb-success { background:#f0fff4; color:#276749; border:1px solid #9ae6b4; }
#popup-form-msg.yfhb-error   { background:#fff5f5; color:#c53030; border:1px solid #feb2b2; }

/* Exit Intent Bar */
#yfhb-exit-bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: #C8922A;
    color: #fff;
    z-index: 9998;
    padding: .65rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-family: 'Raleway', sans-serif;
    font-size: .88rem;
    font-weight: 600;
    transform: translateY(-100%);
    transition: transform .4s ease;
    flex-wrap: wrap;
}
#yfhb-exit-bar.yfhb-bar-visible { transform: translateY(0); }
#exit-bar-cta {
    background: #fff;
    color: #C8922A !important;
    padding: .35rem 1.1rem;
    border-radius: 100px;
    font-weight: 700;
    font-size: .8rem;
    white-space: nowrap;
    text-decoration: none;
}
#exit-bar-cta:hover { background: #1A3A5C; color: #fff !important; }
#yfhb-exit-bar-close {
    background: none;
    border: none;
    color: rgba(255,255,255,.8);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 .25rem;
    margin-left: auto;
}

/* Mobile */
@media (max-width: 640px) {
    #yfhb-popup-inner { grid-template-columns: 1fr; }
    #yfhb-popup-left  { display: none; }
    #yfhb-popup-right { padding: 2rem 1.5rem; }
    .popup-row        { grid-template-columns: 1fr; }
    #yfhb-popup-close { background: rgba(0,0,0,.2); color: #333; }
    #yfhb-exit-bar    { font-size: .8rem; gap: .5rem; }
}
