/* ===========================================
   Footer
   푸터 스타일 (데스크탑 & 모바일)
   =========================================== */

/* Footer */
.footer {
    background-color: #fff;
    border-top: 1px solid #E7E7E7;
    height: auto;
}

#footer {
    height: 200px;
}

.footer-container {
    max-width: 1300px;
    margin: 0 auto;
    position: relative;
}

/* 데스크탑 푸터 - 기본 표시 */
.footer-desktop {
    display: block;
    position: relative;
    height: 300px;
    padding-top: 16px;
    transition: height 0.3s ease;
}

.footer-desktop.collapsed {
    height: 150px;
}

/* 모바일 푸터 - 기본 숨김 */
.footer-mobile {
    display: none;
    position: relative;
    height: 160px;
    padding: 10px 20px;
    transition: height 0.3s ease;
}

.footer-mobile.expanded {
    height: 232px;
}

/* 미디어 쿼리: 데스크탑 (769px 이상) */
@media (min-width: 769px) {
    .footer-desktop {
        display: block;
    }
    .footer-mobile {
        display: none !important;
    }
}

/* 미디어 쿼리: 모바일 (768px 이하) */
@media (max-width: 768px) {
    .footer-desktop {
        display: none !important;
    }
    .footer-mobile {
        display: block;
    }
    .footer {
        height: auto;
    }
    .footer-container {
        height: auto;
    }
}

.footer-logo {
    margin-top: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    position: relative;
}

.footer-logo-img {
    height: 46px;
    width: auto;
    display: block;
}

/* 데스크탑 푸터 요소 위치 */
.footer-desktop .footer-logo {
    position: absolute;
    left: 16px;
    top: 26px;
    margin: 0;
    width: auto;
    height: auto;
}

.footer-desktop .footer-toggle-btn {
    position: absolute;
    right: 80px;
    top: 12px;
    display: flex;
    align-items: center;
    gap: 90px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 0;
}

.footer-desktop .toggle-text {
    color: #5A5A5A;
    font-family: "Noto Sans KR";
    font-size: 14px;
    font-weight: 500;
}

.footer-desktop .toggle-icon {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

/* 접힌 상태: 아래 화살표 (펼치기) */
.footer-desktop.collapsed .toggle-icon {
    transform: rotate(0deg);
}

/* 펼쳐진 상태: 위 화살표 (접기) */
.footer-desktop:not(.collapsed) .toggle-icon {
    transform: rotate(180deg);
}

.footer-desktop .footer-info-row-1 {
    position: absolute;
    left: 16px;
    top: 90px;
}

.footer-desktop .footer-info-row-2 {
    position: absolute;
    left: 11px;
    top: 90px;
    display: flex;
    flex-wrap: nowrap;
    gap: 80px;
    padding-top: 7px;
    padding-bottom: 7px;
    max-width: calc(100% - 350px);
    font-size: 15px;
}

.footer-desktop .info-item {
    display: flex;
    flex-direction: row;
    gap: 6px;
    flex-shrink: 0;
    white-space: nowrap;
}

.footer-desktop .info-item-address {
    white-space: nowrap;
    max-width: none;
}

.footer-desktop .info-title {
    color: #5A5A5A;
    font-family: "Noto Sans KR";
    font-size: 15px;
    font-weight: 500;
}

/* Hide the empty info-title placeholder */
.footer-desktop .info-item .info-title:first-child:empty {
    font-size: 0px;
}

.footer-desktop .info-content {
    color: #8C8C8C;
    font-family: "Noto Sans KR";
    font-size: 14px;
    font-weight: 400;
}

.footer-desktop .desktop-sns-icons {
    position: absolute;
    left: 194px;
    top: 34px;
    display: flex;
    gap: 2px;
    transform: none;
    height: 40px;
}

.footer-desktop .footer-privacy {
    position: absolute;
    left: 16px;
    top: 130px;
    margin: 0;
    text-align: left;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.footer-desktop .footer-copyright {
    position: absolute;
    left: 15px;
    top: 160px;
    margin: 0;
}

/* 접힌 상태에서 숨기기 */
.footer-desktop.collapsed .footer-collapsible {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

/* 접힌 상태에서 요소 위치 조정 */
.footer-desktop .footer-privacy {
    opacity: 1;
    visibility: visible;
}

.footer-desktop.collapsed .footer-privacy {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.footer-desktop.collapsed .footer-copyright {
    left: 15px;
    top: 112px;
}

.footer-desktop.collapsed .desktop-sns-icons {
    left: 194px;
    top: 34px;
    height: 40px;
    gap: 2px;
}

/* 데스크탑 SNS 아이콘 */
.desktop-sns-icons {
    display: flex;
    gap: 2px;
    align-items: center;
    position: absolute;
    right: 80px;
    top: 50%;
    transform: translateY(-50%);
    height: 40px;
}

.desktop-sns-icon {
    display: flex;
    width: 50px;
    height: 50px;
    justify-content: center;
    align-items: center;
    border-radius: 600px;
    background: transparent;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.desktop-sns-icon:hover {
    transform: translateY(-2px);
}

.desktop-sns-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ========== 모바일 푸터 스타일 ========== */
.footer-mobile .footer-logo-mobile {
    left: 20px;
    top: 10px;
}

.footer-mobile .footer-logo-img-mobile {
    width: 100px;
    height: auto;
}

.footer-mobile .mobile-toggle-btn {
    position: absolute;
    right: 20px;
    top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 0;
}

.footer-mobile .toggle-text {
    color: #5A5A5A;
    font-family: "Noto Sans KR";
    font-size: 12px;
    font-weight: 500;
}

.footer-mobile .toggle-icon {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

/* 접힌 상태: 아래 화살표 (펼치기) */
.footer-mobile .toggle-icon {
    transform: rotate(0deg);
}

/* 펼쳐진 상태: 위 화살표 (접기) */
.footer-mobile.expanded .toggle-icon {
    transform: rotate(180deg);
}

.footer-mobile .mobile-company-info {
    position: absolute;
    left: 20px;
    top: 45px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: opacity 0.3s ease, max-height 0.3s ease;
}

.footer-mobile .mobile-info-row {
    display: flex;
    gap: 8px;
}

.footer-mobile .mobile-info-title {
    color: #5A5A5A;
    font-family: "Noto Sans KR";
    font-size: 11px;
    font-weight: 500;
}

.footer-mobile .mobile-info-content {
    color: #8C8C8C;
    font-family: "Noto Sans KR";
    font-size: 11px;
    font-weight: 400;
}

/* 접힌 상태에서 회사 정보 숨기기 */
.footer-mobile:not(.expanded) .footer-collapsible-mobile {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    pointer-events: none;
}

.footer-mobile .mobile-sns-icons {
    position: absolute;
    left: 20px;
    top: 87px;
    display: flex;
    gap: 8px;
    transition: top 0.3s ease;
}

.footer-mobile.expanded .mobile-sns-icons {
    top: 175px;
}

.footer-mobile .mobile-sns-icon {
    width: 32px;
    height: 32px;
}

.footer-mobile .mobile-sns-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.footer-mobile .mobile-privacy-row-inside {
    margin-top: 8px;
}

.footer-mobile .mobile-privacy-link {
    color: #5A5A5A;
    font-family: "Noto Sans KR";
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
}

.footer-mobile .mobile-copyright-row {
    position: absolute;
    left: 20px;
    top: 125px;
    transition: top 0.3s ease;
}

.footer-mobile.expanded .mobile-copyright-row {
    top: 200px;
}

.footer-mobile .mobile-copyright {
    color: #ADADAD;
    font-family: "Noto Sans KR";
    font-size: 11px;
    font-weight: 400;
}

/* 모바일에서 푸터 로고 스타일 */
@media (max-width: 768px) {
    /* 모바일에서는 데스크탑 SNS 아이콘 숨기기 */
    .desktop-sns-icons {
        display: none;
    }

    .footer-logo-img {
        display: flex;
        width: 144px;
        height: 36px;
        align-items: center;
        object-fit: contain;
    }

    /* 모바일에서는 기존 푸터 정보 숨기기 */
    .footer-container .footer-info,
    .footer-container .footer-info-second,
    .footer-container .footer-privacy,
    .footer-container .footer-copyright {
        display: none !important;
    }

    /* 모바일 간략 정보 표시 */
    .footer-mobile-simple {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-top: 20px;
        align-items: center;
    }

    /* SNS 아이콘 컨테이너 */
    .mobile-sns-icons {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 8px;
        top: 175px;
    }

    /* SNS 아이콘 공통 스타일 */
    .sns-icon {
        display: flex;
        width: 48px;
        height: 48px;
        justify-content: center;
        align-items: center;
        border-radius: 480px;
        background: transparent;
        text-decoration: none;
        transition: transform 0.2s ease;
    }

    .sns-icon:hover {
        transform: translateY(-2px);
    }

    /* 인스타그램 아이콘 */
    .instagram-icon img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    /* 유튜브 아이콘 */
    .youtube-icon img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .mobile-simple-row {
        width: 100%;
        text-align: center;
    }

    .mobile-simple-title {
        color: var(--Foundation-Grey-G200, #5A5A5A);
        text-align: center;
        font-family: "Noto Sans KR";
        font-size: 14px;
        font-style: normal;
        font-weight: 500;
        line-height: 150%;
    }

    .mobile-simple-content {
        color: var(--Foundation-Grey-G100, #8C8C8C);
        font-family: "Noto Sans KR";
        font-size: 14px;
        font-style: normal;
        font-weight: 400;
        line-height: 150%;
    }
}

/* 푸터 개인정보 및 저작권 */
.footer-privacy a {
    color: #5A5A5A;
    font-family: "Noto Sans KR";
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.footer-privacy a:hover {
    text-decoration: underline;
}

.footer-copyright {
    color: #ADADAD;
    font-family: "Noto Sans KR";
    font-size: 13px;
    font-weight: 400;
}
