/* =========================
   Loading Box
========================= */

#loadingBox {
    position: fixed !important;
    inset: 0 !important;
    z-index: 999999 !important;
    display: none;
    background: rgba(6,29,63,.28) !important;
    backdrop-filter: blur(3px);
}

#loadingBox .ring-wrap {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 126px;
    height: 126px;
    transform: translate(-50%,-50%) !important;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 18px 45px rgba(0,0,0,.18);
}

#loadingBox .ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--dv-teal-500), var(--dv-blue-600), var(--dv-copper-500), var(--dv-teal-500));
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 13px), #000 0);
    mask: radial-gradient(farthest-side, transparent calc(100% - 13px), #000 0);
    animation: dvSpin .9s linear infinite;
}

#loadingBox .ring-text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
    color: var(--dv-navy-900) !important;
    font-size: 20px !important;
    font-weight: 900;
    white-space: nowrap;
}

@keyframes dvSpin {
    to { transform: rotate(360deg); }
}

/* =========================
   Common Footer CTA
========================= */

.footer-cta-section {
    position: relative;
    overflow: hidden;
    padding: 74px 0 78px;
    background: linear-gradient(135deg, var(--dv-navy-950), var(--dv-navy-800) 58%, #075b78);
}

.footer-cta-section::before {
    content: "";
    position: absolute;
    right: -110px;
    top: -160px;
    width: 410px;
    height: 410px;
    border-radius: 50%;
    background: rgba(36,184,196,.15);
}

.footer-cta-card {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.1fr auto;
    gap: 30px;
    align-items: center;
    padding: 34px 36px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 26px;
    background: rgba(255,255,255,.07);
    box-shadow: 0 20px 50px rgba(0,0,0,.18);
    backdrop-filter: blur(12px);
}

.footer-cta-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 12px;
    color: #69dbe3;
    font-size: .75rem;
    font-weight: 850;
    letter-spacing: .18em;
}

.footer-cta-kicker::before {
    content: "";
    width: 34px;
    height: 1px;
    background: currentColor;
}

.footer-cta-content h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.45rem, 2.8vw, 2.2rem);
    font-weight: 900;
    line-height: 1.3;
    letter-spacing: -.055em;
}

.footer-cta-content p {
    margin: 13px 0 0;
    color: rgba(255,255,255,.74);
    font-size: .96rem;
    line-height: 1.68;
}

.footer-cta-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.footer-cta-btn {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 20px;
    border-radius: 999px;
    font-size: .95rem;
    font-weight: 900;
    white-space: nowrap;
    transition: transform .2s ease;
}

.footer-cta-btn:hover {
    transform: translateY(-2px);
}

.footer-cta-btn--primary,
.footer-cta-btn--gold {
    color: var(--dv-navy-950) !important;
    background: linear-gradient(180deg, #7be1e6, #31b6c3);
    border: 1px solid rgba(255,255,255,.35);
    box-shadow: 0 14px 28px rgba(0,0,0,.2);
}

.footer-cta-btn--line {
    color: #fff !important;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.28);
}

/* =========================
   Footer
========================= */

footer.doubleview-footer,
footer.firstone-footer {
    padding: 50px 0 42px;
    text-align: center;
    background: var(--dv-navy-950) !important;
    border-top: 1px solid rgba(255,255,255,.08);
}

.footer-logo-link {
    display: inline-block;
    margin-bottom: 18px !important;
}

.footer-logo-img {
    width: 220px !important;
    height: auto !important;
    max-height: 68px;
    object-fit: contain;
}

.footer-partnership {
    margin-bottom: 18px;
}

.footer-partnership .btn,
#btnBudongsan {
    padding: .66rem 1.15rem !important;
    border: 1px solid rgba(255,255,255,.22) !important;
    border-radius: 999px !important;
    color: #fff !important;
    background: rgba(255,255,255,.08) !important;
    font-size: .9rem !important;
    font-weight: 850 !important;
}

.footer-title {
    margin: 0 0 10px;
    color: #fff;
    font-size: 1.02rem;
    font-weight: 850;
}

.footer-copy {
    max-width: 920px;
    margin: 9px auto 0;
    color: rgba(255,255,255,.54);
    font-size: .8rem;
    line-height: 1.65;
    letter-spacing: -.018em;
}

.footer-info {
    margin: 11px 0 0;
    color: rgba(255,255,255,.78);
    font-size: .89rem;
    line-height: 1.65;
}

.footer-info + .footer-info {
    margin-top: 2px;
}

.footer-direct-call {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: inherit;
    font-weight: 850;
    text-decoration: none;
}

.footer-direct-call:hover,
.footer-direct-call:focus-visible {
    color: #fff;
}

/* =========================
   Sticky Consultation Buttons
========================= */

nav.sticky-menu {
    position: fixed !important;
    right: 28px !important;
    bottom: 13px !important;
    z-index: 9999 !important;
}

nav.sticky-menu ul {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

nav.sticky-menu li {
    margin: 0 0 9px !important;
}

nav.sticky-menu li:last-child {
    margin-bottom: 0 !important;
}

nav.sticky-menu a.sticky-btn {
    width: 88px !important;
    height: 88px !important;
    min-width: 88px !important;
    min-height: 88px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 10px 6px !important;
    border: 2px solid rgba(255,255,255,.85) !important;
    border-radius: 50% !important;
    color: #fff !important;
    background: linear-gradient(180deg, var(--dv-teal-600), var(--dv-blue-700)) !important;
    box-shadow: 0 13px 27px rgba(6,29,63,.24);
    text-align: center !important;
}

nav.sticky-menu a.sticky-btn i {
    color: #fff !important;
    font-size: 21px !important;
}

nav.sticky-menu a.sticky-btn span {
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    line-height: 1.12 !important;
    letter-spacing: -.035em !important;
}

/* PC: 전화번호는 숨기고 '전화상담'만 표시 */
nav.sticky-menu .sticky-call-label {
    display: inline !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    line-height: 1.08 !important;
    letter-spacing: -.04em !important;
}

/* 스티키 전화 버튼: 세로선을 기준으로 좌우 반전 */
nav.sticky-menu a.sticky-call-btn > i.fa-phone {
    transform: scaleX(-1) !important;
    transform-origin: center center !important;
}

nav.sticky-menu .sticky-call-number {
    display: none !important;
}

nav.sticky-menu a.sticky-btn.kakao-btn {
    color: #191919 !important;
    background: #FEE500 !important;
    border-color: #fff !important;
}

nav.sticky-menu a.sticky-btn.kakao-btn span {
    color: #191919 !important;
}

/* PC/태블릿/모바일 공통: 카카오 로고 대신 점 3개 말풍선 아이콘 */
nav.sticky-menu .kakao-img {
    display: none !important;
}

nav.sticky-menu a.sticky-btn.kakao-btn i.kakao-chat-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #191919 !important;
    font-size: 22px !important;
    line-height: 1 !important;
}

.kakao-sticky-menu {
    display: block !important;
}

@media (max-width: 991.98px) {
    .footer-cta-card {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .footer-cta-actions {
        justify-content: flex-start;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    body {
        padding-bottom: calc(60px + env(safe-area-inset-bottom)) !important;
    }

    nav.sticky-menu {
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        padding: 0 0 env(safe-area-inset-bottom) !important;
        background: #fff !important;
        box-shadow: 0 -7px 24px rgba(6,29,63,.16) !important;
    }

    nav.sticky-menu ul {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        width: 100% !important;
    }

    nav.sticky-menu li {
        width: 100% !important;
        margin: 0 !important;
    }

    nav.sticky-menu a.sticky-btn {
        width: 100% !important;
        height: 60px !important;
        min-width: 0 !important;
        min-height: 60px !important;
        flex-direction: row !important;
        gap: 9px !important;
        padding: 0 14px !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    nav.sticky-menu a.sticky-btn i {
        font-size: 18px !important;
    }

    nav.sticky-menu a.sticky-btn span {
        margin: 0 !important;
        font-size: 13px !important;
        line-height: 1.1 !important;
        white-space: nowrap !important;
    }

    /* 태블릿/모바일: 간편상담신청 글씨를 조금 더 크게 */
    nav.sticky-menu a.sticky-btn.kakao-btn span.kakao-sticky-menu {
        font-size: 15px !important;
        font-weight: 900 !important;
        line-height: 1.05 !important;
    }

    /* 태블릿/모바일: '전화상담'은 숨기고 실제 전화번호만 크게 표시 */
    nav.sticky-menu a.sticky-call-btn .sticky-call-label {
        display: none !important;
    }

    nav.sticky-menu a.sticky-call-btn .sticky-call-number {
        display: inline !important;
        font-size: 17px !important;
        font-weight: 900 !important;
        line-height: 1.05 !important;
        letter-spacing: -.035em !important;
        white-space: nowrap !important;
    }

    /* 태블릿/모바일: 카카오 로고 대신 점 3개 말풍선 아이콘 */
    nav.sticky-menu .kakao-img {
        display: none !important;
    }

    nav.sticky-menu a.sticky-btn.kakao-btn i.kakao-chat-icon {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: #191919 !important;
        font-size: 21px !important;
        line-height: 1 !important;
    }

    nav.sticky-menu a.sticky-btn.kakao-btn {
        border-left: 1px solid rgba(25,25,25,.12) !important;
    }
}

@media (max-width: 575.98px) {
    .footer-cta-section {
        padding: 54px 0 58px;
    }

    .footer-cta-card {
        padding: 24px 20px;
        border-radius: 20px;
    }

    .footer-cta-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .footer-cta-btn {
        width: 100%;
    }

    footer.doubleview-footer,
    footer.firstone-footer {
        padding: 42px 0 36px;
    }

    .footer-logo-img {
        width: 196px !important;
    }

    /* 모바일: 전화 + 간편상담신청을 화면 하단에 2분할 고정 */
    body {
        padding-bottom: calc(58px + env(safe-area-inset-bottom)) !important;
    }

    nav.sticky-menu {
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        padding: 0 0 env(safe-area-inset-bottom) !important;
        background: #fff !important;
        box-shadow: 0 -7px 24px rgba(6,29,63,.16) !important;
    }

    nav.sticky-menu ul {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        width: 100% !important;
    }

    nav.sticky-menu li {
        width: 100% !important;
        margin: 0 !important;
    }

    nav.sticky-menu a.sticky-btn {
        width: 100% !important;
        height: 58px !important;
        min-width: 0 !important;
        min-height: 58px !important;
        flex-direction: row !important;
        gap: 8px !important;
        padding: 0 10px !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    nav.sticky-menu .sticky-call-item + .sticky-kakao-item .sticky-btn {
        border-left: 1px solid rgba(255,255,255,.28) !important;
    }

    nav.sticky-menu a.sticky-btn i {
        font-size: 17px !important;
    }

    nav.sticky-menu a.sticky-btn span {
        margin: 0 !important;
        font-size: 13px !important;
        line-height: 1.1 !important;
        white-space: nowrap !important;
    }

    /* 모바일: 간편상담신청 글씨를 조금 더 크게 */
    nav.sticky-menu a.sticky-btn.kakao-btn span.kakao-sticky-menu {
        font-size: 15px !important;
        font-weight: 900 !important;
        line-height: 1.05 !important;
    }

    nav.sticky-menu a.sticky-call-btn .sticky-call-label {
        display: none !important;
    }

    /* 일반 span 13px 규칙보다 우선하도록 더 구체적으로 지정 */
    nav.sticky-menu a.sticky-btn.sticky-call-btn span.sticky-call-number {
        display: inline !important;
        font-size: 17px !important;
        font-weight: 900 !important;
        line-height: 1.05 !important;
        letter-spacing: -.035em !important;
        white-space: nowrap !important;
    }

    /* 모바일: 카카오 로고 대신 점 3개 말풍선 아이콘 */
    nav.sticky-menu .kakao-img {
        display: none !important;
    }

    nav.sticky-menu a.sticky-btn.kakao-btn i.kakao-chat-icon {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: #191919 !important;
        font-size: 21px !important;
        line-height: 1 !important;
    }

    nav.sticky-menu a.sticky-btn.kakao-btn {
        border-left-color: rgba(25,25,25,.12) !important;
    }

}
