/* ==========================================================================
   헤더 / 푸터
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(227, 232, 238, 0.85);
}

.header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 28px;
    width: min(1200px, calc(100% - 48px));
    min-height: 78px;
    margin: 0 auto;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
}

.logo img {
    width: auto;
    height: 40px;
}

.footer-logo img {
    width: auto;
    height: 36px;
}

/* 모바일 전용 요소: 데스크톱에서는 숨긴다 */
.nav-toggle,
.gnb-mobile-contact {
    display: none;
}

.gnb {
    display: flex;
    justify-content: center;
}

.gnb-depth1 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.gnb-depth1 > li {
    position: relative;
    margin-bottom: -14px;
    padding-bottom: 14px;
}

.gnb-depth1 > li > a {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    font-weight: 600;
    color: var(--navy);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.gnb-depth1 > li:hover > a {
    background: var(--gray);
    color: var(--teal-d);
}

.gnb-depth1 > li.active > a {
    background: var(--light);
    color: var(--teal-d);
}

.gnb-panel {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    padding-top: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    pointer-events: none;
}

.gnb-depth1 > li:hover .gnb-panel,
.gnb-depth1 > li:focus-within .gnb-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.gnb-depth2 {
    margin: 0;
    padding: 10px;
    list-style: none;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 40px rgba(13, 27, 46, 0.1);
}

.gnb-depth2 li a {
    display: block;
    padding: 11px 14px;
    border-radius: 12px;
    color: var(--text);
    font-weight: 500;
    white-space: nowrap;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.gnb-depth2 li a:hover {
    background: var(--light);
    color: var(--teal-d);
}

.header-actions {
    display: flex;
    justify-content: flex-end;
}

.header-contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    background: var(--grad-strong);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 10px 22px rgba(0, 137, 123, 0.24);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-contact-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(0, 137, 123, 0.32);
}

/* ---------- 푸터 ---------- */

.site-footer {
    background: var(--navy);
    color: #fff;
}

/* 푸터 위 상담 유도 영역 (페이지에 자체 상담 영역이 있으면 숨긴다) */
.footer-cta {
    background:
        radial-gradient(circle at 12% 20%, rgba(0, 184, 160, 0.14), transparent 55%),
        radial-gradient(circle at 88% 80%, rgba(30, 143, 255, 0.12), transparent 55%),
        var(--light);
    color: var(--navy);
}

.footer-cta-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 24px;
    width: min(1200px, calc(100% - 48px));
    margin: 0 auto;
    padding: 52px 0;
}

.footer-cta-eyebrow {
    display: inline-block;
    margin: 0 0 12px;
    padding: 4px 14px;
    border-radius: 999px;
    background: rgba(0, 184, 160, 0.14);
    color: var(--teal-d);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.footer-cta-copy h2 {
    margin: 0 0 10px;
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 800;
    color: var(--navy);
}

.footer-cta-copy p {
    max-width: 760px;
    margin: 0;
    color: var(--sub);
    line-height: 1.8;
}

.footer-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 26px;
    border-radius: 12px;
    background: var(--grad-strong);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(0, 137, 123, 0.24);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.footer-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(0, 137, 123, 0.32);
}

.footer-main {
    padding: 56px 0 36px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 32px;
    width: min(1200px, calc(100% - 48px));
    margin: 0 auto;
}

.footer-brand-text {
    max-width: 420px;
    margin-top: 18px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.85;
}

.footer-links-group h3,
.footer-contact h3 {
    margin: 4px 0 16px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--teal);
    letter-spacing: 0.02em;
}

.footer-links-group ul,
.footer-contact ul {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-links-group a,
.footer-contact li {
    color: rgba(255, 255, 255, 0.62);
    line-height: 1.7;
}

.footer-links-group a:hover,
.footer-contact a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: min(1200px, calc(100% - 48px));
    min-height: 64px;
    margin: 0 auto;
}

.footer-bottom p {
    margin: 0;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.9rem;
}

.footer-bottom-links {
    display: flex;
    gap: 16px;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.9rem;
}

.footer-bottom-links a:hover {
    color: #fff;
}

/* ---------- 태블릿 / 모바일 ---------- */

@media (max-width: 1100px) {
    .site-header {
        --header-height: 65px;
    }

    .site-header.is-nav-open {
        background: #fff;
    }

    .header-inner {
        grid-template-columns: 1fr auto;
        gap: 16px;
        min-height: 64px;
    }

    .logo img {
        height: 34px;
    }

    .nav-toggle {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        width: 44px;
        height: 44px;
        margin-right: -8px;
        padding: 0;
        border: 0;
        border-radius: 12px;
        background: transparent;
        cursor: pointer;
    }

    .nav-toggle:hover {
        background: var(--gray);
    }

    .nav-toggle-bar {
        display: block;
        width: 22px;
        height: 2px;
        border-radius: 2px;
        background: var(--navy);
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .is-nav-open .nav-toggle-bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .is-nav-open .nav-toggle-bar:nth-child(2) {
        opacity: 0;
    }

    .is-nav-open .nav-toggle-bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* 헤더 아래를 가득 채우는 모바일 메뉴 */
    .gnb {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        height: calc(100vh - var(--header-height));
        height: calc(100dvh - var(--header-height));
        padding: 8px 24px 32px;
        overflow-y: auto;
        overscroll-behavior: contain;
        border-top: 1px solid var(--line);
        background: #fff;
    }

    .site-header.is-nav-open .gnb {
        display: block;
    }

    .gnb-depth1 {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .gnb-depth1 > li {
        margin: 0;
        padding: 16px 0;
        border-bottom: 1px solid #eef1f4;
    }

    .gnb-depth1 > li > a,
    .gnb-depth1 > li:hover > a,
    .gnb-depth1 > li.active > a {
        min-height: 0;
        padding: 0;
        border-radius: 0;
        background: transparent;
        font-size: 1.05rem;
        font-weight: 700;
    }

    .gnb-depth1 > li:hover > a {
        color: var(--navy);
    }

    .gnb-panel {
        position: static;
        min-width: 0;
        padding-top: 8px;
        opacity: 1;
        visibility: visible;
        transform: none;
        pointer-events: auto;
        transition: none;
    }

    .gnb-depth2 {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 16px;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .gnb-depth2 li a {
        padding: 8px 0;
        border-radius: 0;
        white-space: normal;
        color: var(--sub);
    }

    .gnb-depth2 li a:hover {
        background: transparent;
    }

    .gnb-mobile-contact {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 52px;
        margin-top: 24px;
        border-radius: 14px;
        background: var(--grad-strong);
        color: #fff;
        font-weight: 700;
    }

    .header-actions {
        display: none;
    }

    .footer-cta-inner,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .footer-bottom-inner {
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 8px;
        padding: 18px 0;
    }
}

@media (max-width: 640px) {
    .header-inner,
    .footer-cta-inner,
    .footer-inner,
    .footer-bottom-inner {
        width: calc(100% - 32px);
    }

    .gnb {
        padding-left: 16px;
        padding-right: 16px;
    }

    .footer-cta-inner {
        padding: 40px 0;
    }
}
