@import url("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css");

/* 푸터 - Figma 디자인 기반 */
.footer {
    background: #ffffff;
    padding: 50px 0 70px 0;
    border-top: 1px solid #DDD;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
}

.footer-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 23px;
}

.footer-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.footer-link {
    /*font-family: 'Noto Sans KR', sans-serif;*/
    font-weight: 500;
    font-size: 15px;
    line-height: 18px;
    letter-spacing: -0.3px;
    text-decoration: none;
    color: #222222;
    white-space: nowrap;
}

.footer-link.privacy-link {
    color: #1281BE;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.footer-info p {
    /*font-family: 'Noto Sans KR', sans-serif;*/
    font-weight: 500;
    font-size: 12px;
    line-height: 20px;
    letter-spacing: -0.48px;
    color: #666666;
    margin: 0;
}

.footer-copyright {
    margin-top: 0;
}

.footer-copyright p {
    /*font-family: 'Noto Sans KR', sans-serif;*/
    font-weight: 500;
    font-size: 12px;
    line-height: 20px;
    letter-spacing: -0.48px;
    color: #666666;
    margin: 0;
}

.footer-right {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 47px;
}

/* Family Site 스타일 - Figma 디자인 기반 */
.family-site-wrapper {
    position: relative;
}

.family-site-selector {
    position: relative;
    width: 350px;
    height: 45px;
}

.family-site-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    height: 100%;
    background: #ffffff;
    border: 1px solid #dddddd;
    box-sizing: border-box;
    padding: 0 20px;
    /*font-family: 'Noto Sans KR', sans-serif;*/
    font-weight: 400;
    font-size: 15px;
    line-height: 22px;
    letter-spacing: -0.6px;
    color: #999999;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;

}

/*.family-site-link:hover {*/
/*    border-color: #117D8D;*/
/*    color: #117D8D;*/
/*}*/

/* 드롭다운 화살표 */
.family-site-selector::after {
    content: '';
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #999999;
    pointer-events: none;
    transition: transform 0.3s ease, border-top-color 0.3s ease;
}

.family-site-selector:hover::after,
.family-site-selector:focus::after {
    /*border-top-color: #1281be;*/
    transform: translateY(-50%) rotate(180deg);
}

/* Family Site 메뉴 */
.family-site-selector:hover .family-site-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.family-site-menu {
    position: absolute;
    bottom: 44px;
    right: 0;
    width: 350px;
    border: 1px solid #ddd;
    box-sizing: border-box;
    background-color: #fff;
    transform: translateY(10px);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 2;
}

.family-site-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.family-site-menu li {
    border-bottom: 1px solid #f0f0f0;
}

.family-site-menu li:last-child {
    border-bottom: none;
}

.family-site-menu a {
    display: block;
    padding: 12px 20px;
    color: #666666;
    text-decoration: none;
    /*font-family: 'Noto Sans KR', sans-serif;*/
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: -0.3px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.family-site-menu a:hover {
    background: #f8f9fa;
    color: #117D8D;
}

/* 지도 팝업 모달 스타일 */
.map-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.map-modal-overlay.active {
    display: flex;
}

.map-modal {
    background: white;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    max-width: 800px;
    max-height: 90vh;
    width: 90%;
    position: relative;
    animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.map-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    height: 70px;
    background: #000;
    color: #fff;
}

.map-modal-title {
    font-size: 20px;
    font-weight: bold;
    margin: 0;
}

.map-modal-close {
    height: 21px;
    border: none;
    background: none;
    cursor: pointer;

}

/* .map-modal-close:hover {
     background: rgba(255, 255, 255, 0.3);
 } */

.map-modal-body {
    padding: 0;
}

.map-container {
    width: 100%;
    height: 400px;
    position: relative;
}

.map-info {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.map-address {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.map-detail-item span {
    display: flex;
    flex-wrap: wrap;
    line-height: 1.1;
    color: #000;
}

.map-detail-item .metro3 {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 16.5px;
    height: 16.5px;
    border-radius: 50%;
    background-color: #F8641F;
    font-size: 13px;
    color: #fff;
    font-style: normal;
}

.map-detail-item .metrosinbun {
    display: flex;
    justify-content: center;
    align-items: center;
    padding:0 5px;
    background-color: #A51C2D;
    border-radius: 10px;
    font-size: 13px;
    color: #fff;
    font-style: normal;
}

.map-address-text {
    font-weight: 600;
    font-size: 16px;
    line-height: 1.2;
    color: #000;
}

.map-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.map-detail-item {
    display: flex;
    align-items: center;
    padding-left: 30px;
    font-weight: 400;
    font-size: 16px;
    
}

.map-detail-icon {
    width: 16px;
    height: 16px;
    background: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
}

.leaflet-container a.leaflet-popup-close-button{
    top:16px;
    right:12px;
    width: 11px;
    height: 11px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='11' height='11' fill='none'%3E%3Cpath fill='url(%23a)' d='M0 0h11v11H0z'/%3E%3Cdefs%3E%3Cpattern id='a' width='1' height='1' patternContentUnits='objectBoundingBox'%3E%3Cuse xlink:href='%23b' transform='scale(.0909)'/%3E%3C/pattern%3E%3Cimage xlink:href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAYAAACprHcmAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDkuMS1jMDAzIDc5Ljk2OTBhODdmYywgMjAyNS8wMy8wNi0yMDo1MDoxNiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIDI2LjYgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MEVFNDQ4OTM2RjNBMTFGMDhFQjFDRjAzRDhCNUUzMzMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MEVFNDQ4OTQ2RjNBMTFGMDhFQjFDRjAzRDhCNUUzMzMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpENkFBNEM5QzZGMzkxMUYwOEVCMUNGMDNEOEI1RTMzMyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowRUU0NDg5MjZGM0ExMUYwOEVCMUNGMDNEOEI1RTMzMyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PhXKOPgAAAAySURBVHjalI85AQAwEMLi33QqoMMRJgZeANngRy7hZXBNcN22fulCa6K12rrResYnwAAc7RTs8rzFlwAAAABJRU5ErkJggg==' id='b' width='11' height='11' preserveAspectRatio='none'/%3E%3C/defs%3E%3C/svg%3E");
}
.leaflet-container a.leaflet-popup-close-button > span{
    display: none;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .footer {
        padding: 40px 0 50px 0;
    }

    .footer-container {
        padding: 0 15px;
    }

    .footer-content {
        flex-direction: column;
        gap: 30px;
        align-items: center;
        text-align: center;
    }

    .footer-left {
        width: 100%;
        align-items: center;
        gap: 20px;
    }

    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 25px;
    }

    .footer-link {
        font-size: 14px;
    }

    .footer-info p {
        font-size: 11px;
        line-height: 18px;
    }

    .footer-copyright p {
        font-size: 11px;
    }

    .footer-right {
        width: 100%;
        align-items: center;
    }

    .family-site-selector {
        width: 280px;
    }

    .family-site-link {
        font-size: 14px;
        padding: 0 16px;
        box-sizing: border-box;
    }

    .family-site-menu {
        left: 0;
        right: auto;
        width: 100%;
    }

    .family-site-menu .list_site {
        margin: 0 0 10px;
        padding: 0;
    }

    .family-site-menu .list_site li {
        flex: 1 1 100%;
        justify-content: center;

    }

    .footer-link:focus {
        outline: 2px solid #1281be;
        outline-offset: 2px;
        border-radius: 3px;
    }

    .family-site-link:focus {
        outline: 2px solid #1281be;
        outline-offset: 2px;
    }

    .map-modal {
        width: 95%;
        margin: 10px;
    }

    .map-container {
        height: 300px;
    }

    .map-modal-header {
        padding: 15px;
    }

    .map-modal-title {
        font-size: 18px;
    }

    .map-details {
        grid-template-columns: 1fr;
    }
    .map-detail-item{
        padding-left:25px;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 30px 0 40px 0;
    }

    .footer-container {
        padding: 0 12px;
    }

    .footer-content {
        gap: 25px;
    }

    .footer-left {
        gap: 18px;
    }

    .footer-links {
        flex-direction: column;
        gap: 15px;
    }

    .footer-link {
        font-size: 13px;
    }

    .footer-info p {
        font-size: 10px;
        line-height: 16px;
    }

    .footer-copyright p {
        font-size: 10px;
    }

    .family-site-selector {
        width: 240px;
        height: 40px;
    }

    .family-site-link {
        font-size: 13px;
        padding: 0 14px;
    }

    .family-site-menu a {
        font-size: 13px;
        padding: 10px 16px;
    }
    .map-detail-item span{
        /* asdf */
    }
}