/* ══════════════════════════════════════
   BERC Footer v2
   ══════════════════════════════════════ */

/* Reset */
#bercFooter, #bercFooter *:not(i):not(svg):not(path),
#bfPopup, #bfPopup *:not(i):not(svg):not(path),
#bfPopupOverlay {
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
}
#bercFooter a { text-decoration: none; }
#bercFooter a:visited { color: inherit; }
#bfPopup a { text-decoration: none; }
body.bf-locked { overflow: hidden !important; }
body .site-footer { display: none !important; }

.bf-wrap { max-width: 1500px; margin: 0 auto; padding: 0 clamp(1.25rem, 3vw, 2.5rem); }

/* ═══ PARTNERS CAROUSEL ═══ */
.bf-partners { padding: 3.5rem 0; background: #fff; border-top: 1px solid var(--bh-border, #e2e8f0); }
.bf-partners__title {
    text-align: center; font-size: 1rem; font-weight: 600;
    color: var(--bh-dark, #0f172a); margin: 0 0 2.5rem;
    letter-spacing: -.01em;
}
.bf-partners__carousel { overflow: hidden; position: relative; max-width: 1500px; margin: 0 auto; }
.bf-partners__carousel::before,
.bf-partners__carousel::after {
    content: ''; position: absolute; top: 0; bottom: 0; width: 60px;
    z-index: 2; pointer-events: none;
}
.bf-partners__carousel::before { left: 0; background: linear-gradient(to right, #fff, transparent); }
.bf-partners__carousel::after  { right: 0; background: linear-gradient(to left, #fff, transparent); }
.bf-partners__track {
    display: flex; align-items: center; gap: 3.5rem;
    animation: bfScroll 40s linear infinite;
    width: max-content; padding: 0 2rem;
}
.bf-partners__track:hover { animation-play-state: paused; }

.bf-partners__slide {
    flex-shrink: 0;
    min-width: 250px;
    display: flex; align-items: center; justify-content: center;
}
.bf-partners__slide img {
    display: block;
    height: 120px; width: auto;
    filter: grayscale(100%); opacity: .6;
    transition: all .3s ease;
}
.bf-partners__slide:hover img { filter: grayscale(0); opacity: 1; }

@keyframes bfScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ═══ MAIN FOOTER ═══ */
.bf-main {
    background: #fff;
    padding: 3rem 0;
    border-top: 1px solid var(--bh-border, #e2e8f0);
}
.bf-main .bf-wrap {
    display: flex; flex-direction: column; align-items: center;
    text-align: center;
}

/* Logo */
#bercFooter .bf-logo { display: inline-block; margin-bottom: 1.75rem; }
#bercFooter .bf-logo img {
    height: 36px; width: auto; display: block;
}

/* Horizontal nav */
#bercFooter .bf-nav {
    display: flex; flex-wrap: wrap; align-items: center;
    justify-content: center; gap: .25rem 1.5rem;
    margin-bottom: 2rem;
}
#bercFooter .bf-nav a,
#bercFooter .bf-nav a:visited {
    font-size: .8125rem; font-weight: 500;
    color: var(--bh-text, #334155);
    padding: .35rem 0;
    transition: color .2s ease;
    white-space: nowrap;
}
#bercFooter .bf-nav a:hover { color: var(--bh-blue, #0d47a1); }

/* Bottom row: social + CTA */
.bf-bottom {
    display: flex; flex-wrap: wrap; align-items: center;
    justify-content: center; gap: 1.5rem;
}

/* Social */
.bf-social { display: flex; gap: .5rem; }
#bercFooter .bf-social__item {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--bh-border, #e2e8f0); border-radius: 8px;
    color: var(--bh-text, #334155); font-size: .8125rem;
    transition: all .2s ease; background: transparent;
}
#bercFooter .bf-social__item:hover {
    background: var(--bh-blue-l, #e3f2fd);
    border-color: var(--bh-blue, #0d47a1);
    color: var(--bh-blue, #0d47a1);
}

/* Callback CTA */
#bercFooter .bf-callback-btn {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .6rem 1.25rem;
    background: var(--bh-blue, #0d47a1); color: #fff;
    border: none; border-radius: 8px;
    font-size: .8125rem; font-weight: 600; font-family: inherit;
    cursor: pointer; transition: all .2s ease;
}
#bercFooter .bf-callback-btn:hover { background: var(--bh-blue-h, #1565c0); }
#bercFooter .bf-callback-btn i { font-size: .75rem; }

/* ═══ COPYRIGHT ═══ */
.bf-copy {
    background: var(--bh-bg, #f8fafc);
    border-top: 1px solid var(--bh-border, #e2e8f0);
    padding: 1rem 0;
}
.bf-copy .bf-wrap { display: flex; align-items: center; justify-content: center; }
.bf-copy span { font-size: .75rem; color: var(--bh-muted, #94a3b8); }

/* ═══ CALLBACK POPUP ═══ */
.bf-popup-overlay {
    position: fixed; inset: 0; z-index: 999998;
    background: rgba(0,0,0,.5); backdrop-filter: blur(4px);
    opacity: 0; visibility: hidden; transition: all .25s ease;
}
.bf-popup-overlay--visible { opacity: 1; visibility: visible; }
.bf-popup {
    position: fixed; top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(.95);
    z-index: 999999; background: #fff; border-radius: 16px;
    padding: 2.5rem; width: 90%; max-width: 420px;
    box-shadow: 0 24px 64px rgba(0,0,0,.15);
    opacity: 0; visibility: hidden; transition: all .3s ease;
}
.bf-popup--open { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }

#bfPopup .bf-popup__close {
    position: absolute; top: 1rem; right: 1rem;
    width: 36px; height: 36px; border: none; background: #f8fafc;
    border-radius: 50%; cursor: pointer; font-size: .875rem;
    color: #64748b; display: flex; align-items: center; justify-content: center;
    transition: all .2s ease; outline: none;
}
#bfPopup .bf-popup__close:hover { background: #e2e8f0; color: #0f172a; }

.bf-popup__icon {
    width: 56px; height: 56px; margin: 0 auto 1rem;
    display: flex; align-items: center; justify-content: center;
    background: #e3f2fd; border-radius: 50%;
    color: #0d47a1; font-size: 1.25rem;
}
.bf-popup__title { text-align: center; font-size: 1.25rem; font-weight: 700; color: #0f172a; margin: 0 0 .4rem; }
.bf-popup__desc { text-align: center; font-size: .8125rem; color: #94a3b8; margin: 0 0 1.5rem; }

.bf-popup__field { margin-bottom: .75rem; }
#bfPopup .bf-popup__field input {
    width: 100%; padding: .75rem 1rem;
    border: 1px solid #e2e8f0; border-radius: 8px;
    font-size: .875rem; color: #0f172a; font-family: inherit;
    background: #fff; transition: border-color .2s ease; outline: none;
}
#bfPopup .bf-popup__field input:focus { border-color: #0d47a1; }
#bfPopup .bf-popup__field input::placeholder { color: #94a3b8; }

#bfPopup .bf-popup__submit {
    width: 100%; padding: .85rem;
    background: #0d47a1; color: #fff; border: none; border-radius: 8px;
    font-size: .875rem; font-weight: 600; font-family: inherit;
    cursor: pointer; transition: all .2s ease;
    display: flex; align-items: center; justify-content: center; gap: .5rem;
    margin-top: .25rem;
}
#bfPopup .bf-popup__submit:hover { background: #1565c0; }
#bfPopup .bf-popup__submit:disabled { opacity: .6; cursor: not-allowed; }

.bf-popup__success { text-align: center; padding: 1rem 0; }
.bf-popup__success i { font-size: 2.5rem; color: #22c55e; margin-bottom: .75rem; display: block; }
.bf-popup__success p { font-size: .875rem; color: #334155; line-height: 1.6; margin: 0; }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 640px) {
    .bf-partners { padding: 2rem 0; }
    .bf-partners__title { font-size: .875rem; margin-bottom: 1.25rem; }
    .bf-partners__slide { min-width: 180px; }
    .bf-partners__slide img { height: 50px; }
    .bf-partners__track { gap: 2.5rem; }
    .bf-main { padding: 2.25rem 0; }
    #bercFooter .bf-logo img { height: 30px; }
    #bercFooter .bf-nav { gap: .15rem 1rem; margin-bottom: 1.5rem; }
    #bercFooter .bf-nav a { font-size: .75rem; }
    .bf-bottom { gap: 1rem; flex-direction: column; }
    .bf-popup { padding: 2rem 1.5rem; }
}
