* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    color: #fff;
    background: #000;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    transition: background 0.3s ease;
    z-index: 1000;
}

.header-inner {
    width: 100%;
    max-width: 1920px;
    padding: 0 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header.scrolled {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.logo img {
    height: 40px;
    width: auto;
    transition: height 0.3s ease;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 40px;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: opacity 0.3s;
}

nav a:hover {
    opacity: 0.7;
}

/* Hero Section */
.hero {
    height: 100vh;
    background: url('../images/pc_01.jpg');
    background-size: cover;
    background-position: top center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: left;
    position: relative;
}

.hero-content {
    width: 100%;
    max-width: 1920px;
    padding-left: 100px;
    animation: fadeInUp 1.2s ease-out;
    position: relative;
    z-index: 1;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-family: 'Libre Caslon Text', 'Big Caslon', 'Caslon', serif;
    font-size: clamp(40px, 9vw, 120px);
    font-weight: 400;
    letter-spacing: 4px;
    line-height: 1.1;
    margin-bottom: 25px;
}

.hero .subtitle {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    font-size: clamp(12px, 1.2vw, 18px);
    font-weight: 400;
    letter-spacing: 4px;
    opacity: 1;
    line-height: 1.3;
}

/* Content Sections with Images */
.content-section {
    padding: 0;
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
}

.section-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

picture {
    width: 100%;
    max-width: 100%;
    display: block;
}

/* Mobile - 100% width for images */
@media (max-width: 768px) {
    .section-image {
        max-width: 100%;
        width: 100%;
    }
    picture {
        max-width: 100%;
        width: 100%;
    }

    /* Mobile Header - Center logo, hide nav */
    header {
        justify-content: center;
        padding: calc(env(safe-area-inset-top) + 20px) 30px 20px;
        transition: padding 0.3s ease;
    }

    .header-inner {
        width: 100%;
        justify-content: center;
        padding: 0;
    }

    .logo {
        margin: 0 auto;
    }

    header.scrolled {
        padding: calc(env(safe-area-inset-top) + 10px) 30px 10px;
    }

    header.scrolled .logo img {
        height: 28px;
    }

    nav {
        display: none;
    }

    /* Mobile Hero - Center content */
    .hero {
        height: 100vh;
        background: url('../images/m_01.jpg');
        background-size: cover;
        background-position: bottom center;
    }

    .hero-content {
        max-width: 100%;
        padding-left: 0;
        padding: 0 30px;
        padding-top: 80px;
        text-align: center;
    }

    /* Hide subtitle on mobile */
    .hero .subtitle {
        display: none;
    }

    /* Hide pc_07 on mobile */
    #additional {
        display: none;
    }

    /* Add padding to last section on mobile - match fixed menu height */
    #country {
        padding-bottom: 70px;
    }
}
.fixed {
    position: fixed;
    top: 150px;
    right: 20px;
    z-index: 9999 !important;
    background: #1F1F1F;
    border-radius: 50px;
    z-index: 9999;
    text-align: center;
    width: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding-top: 30px;
    padding-bottom: 0;
}

.fixed a {
    color: #fff !important;
    text-decoration: none !important;
}

.fixed a:hover {
    opacity: 0.8;
}

.fixed img {
    width: 25px;
    height: 25px;
    margin-bottom: 0px !important;
    padding-bottom: 0px !important;
    margin-left: auto;
    margin-right: auto;
}

.fixed h5 {
    color: #fff !important;
    font-size: 10px;
    font-weight: 400;
    margin: 0;
    padding-bottom: 20px;
}

.topimg {
    margin-top: auto;
    padding-bottom: 0;
}

.topimg img {
    width: 70px !important; 
    height: 70px !important;
    margin-bottom: -10px !important;
    padding-bottom: 0px !important;
}
@media screen and (max-width: 768px) {
    .fixed {
        display: flex;
        margin-bottom: 0px !important;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
        position: fixed !important;
        top: auto;
        right: 0px;
        left: 0px;
        bottom: 0px;
        z-index: 9999 !important;
        padding: 10px 0px calc(env(safe-area-inset-bottom) + 10px);
        flex-direction: row;
        border-radius: 0px;
        width: 100%;
    }
    .topimg {display: none;}
    .fixed div {
        width: calc(25% - 5px);
        justify-content: space-between;
        height: 55px;
    }
 
}
/* Popups */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
}

/* 대형 팝업: 별도로 띄움 */
/* 팝업 전체 래퍼: 모든 팝업을 가로로 정렬 */
#popups-wrapper {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 16px;
    pointer-events: none;
    max-width: 95vw;
    width: 95vw;
}

.popup-container-img {
    display: none;
    flex: 1 1 0;
    min-width: 0;
    max-width: 400px;
    background: #1a1a1a;
    border-radius: 10px;
    overflow: hidden;
    pointer-events: auto;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* 대형 팝업 전용 너비 */
.popup-big {
    width: 480px !important;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10015 !important; /* PC에서 항상 앞 */
}

/* 상단 닫기 버튼 */
.popup-close-top {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: background 0.2s;
}

.popup-close-top:hover {
    background: rgba(0, 0, 0, 0.9);
}

.popup-img-content {
    width: 100%;
    line-height: 0;
}

.popup-img-content img {
    width: 100%;
    height: auto;
    display: block;
}

/* PC에서 popup1~4 동일 높이로 맞춤 */
#popup1,
#popup2,
#popup3,
#popup4 {
    max-width: 400px;
}

#popup1 .popup-img-content,
#popup2 .popup-img-content,
#popup3 .popup-img-content,
#popup4 .popup-img-content {
    flex: 1 1 auto;
    min-height: 0;
    background: #000;
}

#popup1 .popup-img-content img,
#popup2 .popup-img-content img,
#popup3 .popup-img-content img,
#popup4 .popup-img-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#popup1 .popup-footer,
#popup2 .popup-footer,
#popup3 .popup-footer,
#popup4 .popup-footer {
    height: 58px;
    min-height: 58px;
    flex-shrink: 0;
}

.popup-footer {
    background: #111;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #999;
    border-top: 1px solid #333;
}

.today-close {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.today-close input {
    accent-color: #d4a373;
}

.close-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 13px;
    padding: 5px;
}

.close-btn:hover {
    color: #fff;
}

/* Tablet/Small Desktop: 팝업 하나씩 겹쳐서 표시 */
@media (max-width: 1270px) {
    #popups-wrapper {
        position: fixed;
        inset: 0;
        top: auto;
        left: auto;
        transform: none;
        z-index: 10001;
        display: block !important;
        pointer-events: none;
        width: auto;
        max-width: none;
    }

    .popup-container-img {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        margin: 0 !important;
        z-index: 10001 !important;
        max-width: 400px;
        width: 80vw !important;
    }

    .popup-big {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) !important;
        z-index: 10015 !important;
    }

    #popup1,
    #popup2,
    #popup3,
    #popup4 {
        height: auto !important;
        min-height: 0;
    }

    #popup1 .popup-img-content,
    #popup2 .popup-img-content,
    #popup3 .popup-img-content,
    #popup4 .popup-img-content {
        height: auto;
    }

    #popup1 .popup-img-content img,
    #popup2 .popup-img-content img,
    #popup3 .popup-img-content img,
    #popup4 .popup-img-content img {
        height: auto;
        object-fit: contain;
    }
}

/* Mobile Popups */
@media (max-width: 768px) {
    #popups-wrapper {
        position: fixed;
        inset: 0;
        top: auto;
        left: auto;
        transform: none; /* PC용 translate 제거 (모바일 사라짐 방지) */
        z-index: 10001;
        display: block;
        pointer-events: none;
    }

    .popup-container-img {
        width: 76% !important;
        max-width: 310px;
        position: fixed !important; /* 모든 팝업을 고정 위치로 */
        top: 50dvh !important; /* 모바일 실제 화면 기준 중앙 */
        left: 50vw !important;
        transform: translate(-50%, -50%) !important; /* 화면 중앙으로 강제 고정 */
        margin: 0 !important;
        z-index: 10001 !important; /* 오버레이 위로 */
    }

    .popup-big {
        position: fixed;
        top: 50dvh;
        left: 50vw;
        transform: translate(-50%, -50%) !important;
        width: 82% !important;
        max-width: 340px;
        z-index: 10015 !important; /* 대형 팝업이 가장 위에 오도록 */
    }

    #popup1,
    #popup2,
    #popup3,
    #popup4 {
        height: auto;
    }

    #popup1 .popup-img-content,
    #popup2 .popup-img-content,
    #popup3 .popup-img-content,
    #popup4 .popup-img-content {
        height: auto;
    }

    #popup1 .popup-img-content img,
    #popup2 .popup-img-content img,
    #popup3 .popup-img-content img,
    #popup4 .popup-img-content img {
        height: auto;
        object-fit: contain;
    }

    /* 푸터 버튼들 터치 영역 확대 유지 */
    .popup-footer {
        padding: 15px 20px;
    }
    .close-btn {
        font-size: 16px !important;
        font-weight: 700;
        color: #fff !important;
        padding: 10px !important;
    }
}
