/* 한강 메인 layout.css — 푸터 + 푸터용 holder / clearfix / 스프라이트 (https://www.hanriver.or.kr/main/main.php) */

#footer .holder {
    position: relative;
    margin: 0 auto;
    width: 100%;
    max-width: 1400px;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

#footer .footer_left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    flex: 1;
    min-width: 0;
}

#footer .footer_nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
}

#footer .clearfix:after {
    content: "";
    display: block;
    clear: both;
}

#footer .sp {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    font-size: 0;
    background-repeat: no-repeat;
}

#footer .sp.c {
    background-image: url("../img/footer-common.webp");
}

#footer a {
    width: auto;
    height: auto;
}

#footer {
    --footer-wave-overlap: 12rem;
    z-index: 2;
    position: relative;
    margin-top: calc(-1 * var(--footer-wave-overlap));
    overflow-x: hidden;
    overflow-y: visible;
    background-color: transparent;
    padding-top: var(--footer-wave-overlap);
}

/* 타일 파도 + 뷰포트 가로 풀블리드(상위 max-width 안에서도 양끝까지) */
#footer .footer_waves {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    max-width: none;
    z-index: 1;
    pointer-events: none;
}

#footer .footer_waves_svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    display: block;
    overflow: hidden;
    background-color: transparent;
}

#footer .footer_wave_layer_back use {
    fill: #1bace4;
    stroke: #1bace4;
    stroke-width: 3;
    vector-effect: non-scaling-stroke;
    paint-order: stroke fill;
    shape-rendering: geometricPrecision;
}

#footer .footer_wave_layer_front use {
    fill: #005bab;
    stroke: #005bab;
    stroke-width: 3;
    vector-effect: non-scaling-stroke;
    paint-order: stroke fill;
    shape-rendering: geometricPrecision;
}

/* 타일 2장(1920×2) — 트랙 너비의 50%(= 1타일)만큼 이동 (px 고정 시 뷰포트 스케일과 어긋나 이음새 발생) */
@keyframes footer-wave-scroll {
    from {
        transform: translate3d(0, 0, 0);
    }
    to {
        transform: translate3d(-50%, 0, 0);
    }
}

#footer .footer_wave_track {
    transform-box: fill-box;
    transform-origin: 0 0;
    animation: footer-wave-scroll 42s linear infinite;
    will-change: transform;
}

#footer .footer_wave_track--slow {
    animation-duration: 56s;
}

#footer .footer_wave_track--mid {
    animation-duration: 35s;
}

#footer .footer_wave_track--fast {
    animation-duration: 22s;
}

@media (prefers-reduced-motion: reduce) {
    #footer .footer_wave_track {
        animation: none;
    }
}

#footer .footer_content {
    position: relative;
    z-index: 2;
    background: transparent;
    color: #fff;
}

#footer .footer_content a {
    color: #fff;
}

#footer .f_mnu.l {
    display: flex;
    gap: 40px;
}

#footer .f_mnu.l li {
    float: none;
}

#footer .f_mnu.l li + li {
    margin-left: 0;
    padding-left: 0;
}

#footer .f_mnu.l li + li:before {
    left: -20px;
}

#footer .f_mnu.r.sub_mnu {
    display: flex;
    gap: 10px;
}
#footer .f_mnu li {
    float: none;
    color: #fff;
}
#footer .sub_mnu li{
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.30);
    padding: 20px;
}
#footer .f_mnu li a {
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 150%;
    text-decoration: none;
    transition: opacity 0.2s ease, font-weight 0.2s ease;
}

/* 기본: 첫 번째만 굵게 */
#footer .f_mnu li.f_mnu1 a {
    font-weight: 700;
}

/* 다른 항목 호버 시 첫 번째는 일반 굵기로 */
#footer .f_mnu:hover li.f_mnu1:not(:hover) a {
    font-weight: 400;
}

/* 호버한 항목만 opacity 1, 나머지는 0.85 */
#footer .f_mnu:hover li:not(:hover) a {
    opacity: 0.85;
}

#footer .f_mnu li:hover a,
#footer .f_mnu li a:focus-visible {
    opacity: 1;
    font-weight: 700;
}

#footer .f_mnu li + li {
    position: relative;
}

#footer .f_mnu li + li:before,
#footer .siteinfo_addr_item + .siteinfo_addr_item::before {
    content: "";
    position: absolute;
    top: calc(50% - 7px);
    left: 0;
    width: 1px;
    height: 15px;
    background: rgba(255, 255, 255, 0.40);
}
#footer .sub_mnu li + li:before {
    display: none;
}
#footer .f_mnu .sp {
    top: -1px;
    margin-left: 6px;
    width: 12px;
    height: 12px;
    background-position: -101px 0;
    filter: brightness(0) invert(1);
}

#footer .footer_bottom {
    position: relative;
    width: 100%;
}

#footer .footer_logo_wrap {
    display: flex;
    align-items: flex-end;
    gap: 110px;
    flex-shrink: 0;
}

#footer .footer_brand {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 60px;
}

#footer .footer-top-btn {
    position: fixed;
    right: clamp(16px, 2.5vw, 40px);
    bottom: clamp(20px, 3vw, 40px);
    z-index: 999;
    flex-shrink: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

#footer .footer-top-btn.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

#footer .footer-top-btn__link {
    display: flex;
    width: 50px;
    height: 50px;
    padding: 10px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 0 20px 5px rgba(135, 155, 173, 0.3);
    box-sizing: border-box;
    color: inherit;
    text-decoration: none;
}

#footer .footer-top-btn__link svg {
    display: block;
    flex-shrink: 0;
}

#footer .footer_logo {
    margin: 0;
    line-height: 0;
}

#footer .footer_logo img {
    display: block;
    width: auto;
    max-width: 220px;
    height: auto;
}

#footer .familysite {
    position: relative;
    flex-shrink: 0;
}

#footer .familysite dt {
    position: relative;
    border-bottom: 0;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.30);
}

#footer .familysite dt:after {
    content: "";
    position: absolute;
    top: calc(50% - 2px);
    right: 20px;
    width: 7px;
    height: 7px;
    border-bottom: 2px solid #fff;
    border-right: 2px solid #fff;
    transform: rotate(-135deg);
    -ms-transform: rotate(-135deg);
}

#footer .familysite.on dt:after {
    top: calc(50% - 7px);
    transform: rotate(45deg);
    -ms-transform: rotate(45deg);
}

#footer .familysite dt a {
    display: block;
    width: 190px;
    line-height: 48px;
    text-indent: 20px;
    font-size: 18px;
    color: #fff;
    text-decoration: none;
}

#footer .familysite dd {
    z-index: 10;
    display: none;
    position: absolute;
    bottom: 48px;
    left: 0;
    right: 0;
    background-color: rgba(10, 50, 80, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

#footer .familysite dd ul {
    padding: 11px 19px;
}

#footer .familysite dd ul li a {
    line-height: 26px;
    font-size: 13px;
    color: #fff;
    transition: opacity 0.2s;
}

#footer .familysite dd ul li a:hover {
    opacity: 0.85;
}

#footer .siteinfo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    flex: 1;
    min-width: 0;
    line-height: 20px;
    font-size: 14px;
    color: #fff;
}

#footer .siteinfo address,
#footer .siteinfo p {
    margin: 0;
    padding: 0;
    text-align: left;
}

#footer .siteinfo_addr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    font-style: normal;
}

#footer .siteinfo_addr_item {
    position: relative;
}

#footer .siteinfo_addr_item + .siteinfo_addr_item {
    margin-left: 14px;
    padding-left: 15px;
}

#footer .siteinfo .ci {
    position: absolute;
    top: -6px;
    left: 0;
}

#footer .siteinfo .ci .sp {
    width: 54px;
    height: 53px;
    background-position: 0 -291px;
}

@media (max-width: 900px) {
    #footer .holder {
        flex-direction: column;
        align-items: flex-start;
    }

    /* 모바일: footer_left 래퍼 해제 → 로고·메뉴·주소 순서 복원 */
    #footer .footer_left {
        display: contents;
    }

    #footer .footer_bottom {
        display: contents;
    }

    #footer .footer_logo_wrap {
        order: -1;
        width: 100%;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
    }

    #footer .footer_brand {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        gap: 12px;
        flex: 1;
        min-width: 0;
    }

    #footer .footer_nav {
        order: 0;
        width: 100%;
    }

    #footer .siteinfo {
        order: 1;
        width: 100%;
    }

    #footer .familysite {
        margin-left: 0;
    }
    
    #footer .f_mnu.l,
    #footer .f_mnu.r.sub_mnu {
        width: 100%;
    }
    
    #footer .f_mnu.r.sub_mnu {
        flex-wrap: wrap;
    }
    
    #footer .familysite {
        width: 100%;
        max-width: 188px;
    }
    
    #footer .familysite dd {
        bottom: auto;
        top: 100%;
        margin-top: -1px;
    }
    
    #footer .siteinfo .ci {
        position: static;
        margin-bottom: 12px;
    }
    
    #footer .siteinfo address,
    #footer .siteinfo p {
        padding-left: 0;
    }
}
