/* Desktop Styles - Improved Responsive Design */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=S-Core+Dream:wght@300;400;500;600;700&display=swap');
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'S-Core Dream', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
    font-size: 16px;
}

body {
    /*font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;*/
    line-height: 1.6;
    color: #333;
    overflow-x: hidden; /* 가로 스크롤 방지 */
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1420px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.nav-logo h2 {
    color: #4c63d2;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #4c63d2;
}

.language-selector select {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    background: #3D4DAB;
    min-height: 600px;
    height: auto; /* 자동 높이로 변경하여 내용에 맞게 확장 */
    position: relative;
    display: flex;
    align-items: flex-start; /* 상단 정렬로 변경 */
    padding: 2rem;
    color: white;
    overflow: visible; /* 중첩을 위해 overflow visible로 변경 */
    z-index: 2; /* hero-visual이 아래 섹션과 중첩되도록 */
}

.hero-container {
    max-width: 1420px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: flex-start; /* 상단 정렬로 변경 */
    min-height: 500px; /* 최소 높이 설정 */
    height: 700px; /* 원래 높이 복원 */
}

.hero-content {
    padding: 2rem 0;
    display: flex;
    margin-top: 100px;
    align-items: flex-start; /* 상단 정렬로 변경 */
    flex-direction: column;
    justify-content: center;
}

/* 메인 로고 스타일 */
.main-logo {
    height: 65px; /* 고정 높이에서 유연하게 변경 */
    width: 330px;
    display: block; /* block 요소로 설정하여 margin auto 효과 적용 */
    transition: transform 0.3s ease;
}

.main-logo:hover {
    transform: scale(1.05);
}

.hero-content h1 {
    font-size: clamp(2rem, 4vw, 3rem); /* 반응형 폰트 크기 */
    font-weight: 700;
    margin-bottom: 2rem;
    line-height: 1.2;
}

/* 서브타이틀과 작은 로고 컨테이너 */
.description-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.hero-content .subtitle {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    opacity: 0.9;
    line-height: 1.5;
}

.subtitle-logo {
    height: auto;
    width: 100px;
    transition: transform 0.3s ease;
}

.subtitle-logo:hover {
    transform: scale(1.1);
}

.hero-content .description {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    opacity: 0.8;
    line-height: 1.5;
}

.hero-content .description2 {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    margin-bottom: 2.5rem;
    opacity: 0.8;
    line-height: 1.8;
    color: #08FBFF;
}

.app-download {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.download-btn {
    height: 50px; /* 고정 높이에서 조정 */
    max-width: 280px;
    width: auto;
    border-radius: 12px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.download-btn:hover {
    transform: translateY(-2px);
}

.hero-visual {
    width: 600px; /* 원래 크기 복원 */
    position: relative;
    margin-top: 170px; /* 원래 위치 복원 */
    display: flex;
    justify-content: center;
    align-items: flex-start; /* 상단 정렬 */
    z-index: 15; /* features-section보다 높은 z-index */
    overflow: visible; /* 중첩을 위해 visible */
}

.hero-visual img {
    max-width: 600px; /* 원래 크기 복원 */
    height: auto;
    position: relative;
    z-index: 15; /* 이미지도 높은 z-index */
}

/* Features Sections */
.features-section {
    height: 860px; /* 원래 고정 높이 복원 */
    background: #f8f9ff;
    padding: 6rem 2rem;
    position: relative; /* hero-visual과의 중첩을 위해 position 추가 */
    z-index: 1; /* hero-visual보다 낮은 z-index */
}

.features-section1 {
    height: 1260px; /* 원래 고정 높이 복원 */
    background: #f8f9ff;
    padding: 6rem 2rem;
    position: relative; /* hero-visual과의 중첩을 위해 position 추가 */
    z-index: 1; /* hero-visual보다 낮은 z-index */
    margin-top: -250px; /* hero-visual과 중첩되도록 음수 마진 추가 */
}

.features-section2 {
    height: 860px; /* 원래 고정 높이 복원 */
    background: #F0F2FF;
    padding: 6rem 2rem;
    position: relative; /* hero-visual과의 중첩을 위해 position 추가 */
    z-index: 1; /* hero-visual보다 낮은 z-index */
}

.features-section {
    background: #f8f9ff;
}

.features-section1 {
    background: #f8f9ff;
}

.features-section2 {
    background: #F0F2FF;
}

.features-container {
    max-width: 1420px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.features-container1 {
    max-width: 1420px;
    margin-top: 250px;
    margin-left: auto;
    margin-right: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.features-content {
    padding: 1rem;
}

.features-content h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    color: #2d3748;
    margin-bottom: 2rem;
    font-weight: 700;
}

.feature-desc {
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: #343434;
    margin-bottom: 0.2rem;
    line-height: 1.0;
}

/* Feature Icons - 원래 크기 복원 */
.features-icon1 {
    width: 200px;
    height: 161px;
}

.features-icon2 {
    width: 200px;
    height: 200px;
}

.features-icon3 {
    width: 200px;
    height: 201px;
}

.features-icon4 {
    width: 200px;
    height: 200px;
}

.features-icon5 {
    width: 200px;
    height: 200px;
}

.features-icon6 {
    width: 200px;
    height: 160px;
}

.highlight-text {
    color: #4c63d2;
    font-weight: 600;
}

.phones-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 505px; /* 원래 크기로 복원 */
    max-width: 500px;
}

.phones-visual1 {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 505px; /* 원래 크기로 복원 */
    max-width: 505px;
    margin-top: 150px;
}

.phones-visual img,
.phones-visual1 img {
    width: 505px; /* 고정 크기로 복원 */
    height: auto;
    max-width: 505px;
}

/* Footer */
.footer {
    background: #2d3748;
    color: white;
    padding: 3rem 2rem 1rem;
}

.footer-container {
    max-width: 1420px;
    margin: 0 auto;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    /*display: flex;*/
    /*align-items: center;*/
    /*justify-content: center;*/
    margin-bottom: 1rem;
}

.footer-logo h3 {
    color: #4c63d2;
    margin-bottom: 1rem;
}

.footer-logo p {
    opacity: 0.8;
}

.footer-bottom-logo {
    width: 200px;
    height: 30px;
}

.footer-links {
    display: flex;
    flex-direction: column;
}

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.6;
}

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

/* 1200px 이하 반응형 디자인 개선 */
@media (max-width: 1200px) {
    .nav-container {
        padding: 0 1.5rem;
    }

    .nav-menu {
        gap: 1.5rem;
    }

    .hero-container,
    .features-container {
        max-width: 100%;
        gap: 1.5rem;
    }

    .hero-content h1 {
        font-size: clamp(1.8rem, 4vw, 2.5rem);
    }

    .features-content h2 {
        font-size: clamp(1.8rem, 4vw, 2.5rem);
    }
}

/* 1024px 이하 (태블릿) */
@media (max-width: 1024px) {
    .nav-container {
        padding: 0 1rem;
    }

    .nav-menu {
        gap: 1rem;
    }

    .language-selector select {
        padding: 0.4rem 0.8rem;
        font-size: 13px;
    }

    .hero-section {
        padding: 1.5rem;
    }

    .hero-container {
        gap: 1.5rem;
        min-height: 500px;
        height: auto; /* 작은 화면에서는 자동 높이로 변경 */
    }

    .hero-content {
        padding: 1rem 0;
        margin-top: 0; /* 작은 화면에서는 마진 제거 */
    }

    .hero-visual {
        width: auto; /* 작은 화면에서는 자동 너비 */
        margin-top: 0; /* 작은 화면에서는 마진 제거 */
    }

    .main-logo {
        height: 50px;
        margin: 0 auto 1.5rem auto; /* 태블릿에서도 가운데 정렬 */
        display: block;
    }

    .download-btn {
        height: 45px;
        max-width: 140px;
    }

    .app-download {
        gap: 0.8rem;
    }

    .features-section,
    .features-section1,
    .features-section2 {
        padding: 3rem 1.5rem;
        height: auto; /* 태블릿에서는 자동 높이 */
    }

    .features-section1 {
        margin-top: -100px; /* 태블릿에서는 중첩 정도 줄임 */
    }

    .phones-visual,
    .phones-visual1 {
        max-width: 450px; /* 태블릿에서 적절한 크기 */
        width: 450px;
    }

    .phones-visual img,
    .phones-visual1 img {
        width: 450px;
        max-width: 450px;
    }
}

/* 900px 이하 */
@media (max-width: 900px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        height: auto; /* 900px 이하에서는 자동 높이 */
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center; /* 모든 자식 요소들을 가운데 정렬 */
        margin-top: 0; /* 900px 이하에서는 마진 제거 */
    }

    .hero-visual {
        order: -1; /* 이미지를 위로 이동 */
        width: auto; /* 자동 너비 */
        margin-top: 0; /* 마진 제거 */
    }

    .features-container .phones-visual,
    .features-container .phones-visual1 {
        order: -1; /* 이미지를 위로 이동 */
    }

    .hero-content h1 {
        font-size: clamp(1.8rem, 5vw, 2.5rem);
        margin-bottom: 1.5rem;
    }

    .description-container {
        justify-content: center;
    }

    .app-download {
        justify-content: center;
    }
}

/* 768px 이하 (모바일) */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
        flex-wrap: wrap;
    }

    .nav-menu {
        gap: 0.8rem;
        flex-wrap: wrap;
    }

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

    .language-selector select {
        padding: 0.3rem 0.6rem;
        font-size: 12px;
    }

    .hero-section {
        padding: 1rem;
        min-height: auto;
    }

    .hero-container {
        gap: 1.5rem;
        min-height: auto;
        padding: 1rem 0;
    }

    .main-logo {
        height: 40px;
        margin: 0 auto 1rem auto; /* 모바일에서도 가운데 정렬 확실히 */
        display: block;
    }

    .hero-content h1 {
        font-size: clamp(1.5rem, 6vw, 2.2rem);
        margin-bottom: 1rem;
    }

    .description-container {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .subtitle-logo {
        height: 1.2rem;
    }

    .download-btn {
        height: 40px;
        max-width: 130px;
    }

    .app-download {
        gap: 0.5rem;
        flex-direction: column;
        align-items: center;
    }

    .features-section,
    .features-section1,
    .features-section2 {
        padding: 2rem 1rem;
        height: auto; /* 모바일에서는 자동 높이 */
    }

    .features-content {
        padding: 0;
    }

    .features-content h2 {
        font-size: clamp(1.5rem, 5vw, 2rem);
        margin-bottom: 1.5rem;
    }

    .feature-desc {
        font-size: clamp(0.9rem, 3vw, 1.2rem);
    }

    .features-icon1,
    .features-icon2,
    .features-icon3,
    .features-icon4,
    .features-icon5,
    .features-icon6 {
        max-width: 120px;
    }

    .phones-visual,
    .phones-visual1 {
        max-width: 300px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .footer-links {
        align-items: center;
    }
}

/* 480px 이하 (소형 모바일) */
@media (max-width: 480px) {
    .nav-container {
        padding: 0 0.5rem;
    }

    .nav-menu {
        gap: 0.5rem;
    }

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

    .hero-section {
        padding: 0.5rem;
    }

    .hero-container {
        gap: 1rem;
        padding: 0.5rem 0;
    }

    .main-logo {
        height: 35px;
        margin: 0 auto 1rem auto; /* 소형 모바일에서도 가운데 정렬 */
        display: block;
    }

    .hero-content h1 {
        font-size: clamp(1.3rem, 7vw, 2rem);
    }

    .download-btn {
        height: 35px;
        max-width: 120px;
    }

    .features-section,
    .features-section1,
    .features-section2 {
        padding: 1.5rem 0.5rem;
        height: auto; /* 소형 모바일에서는 자동 높이 */
    }

    .features-content h2 {
        font-size: clamp(1.3rem, 6vw, 1.8rem);
    }

    .feature-desc {
        font-size: clamp(0.8rem, 4vw, 1.1rem);
    }

    .features-icon1,
    .features-icon2,
    .features-icon3,
    .features-icon4,
    .features-icon5,
    .features-icon6 {
        max-width: 100px;
    }

    .phones-visual,
    .phones-visual1 {
        max-width: 250px;
    }
}

/* 추가 개선사항 */

/* 컨테이너 최대 너비 제한 */
.hero-container,
.features-container,
.footer-container {
    width: 100%;
    max-width: 1420px;
}

/* 이미지 최적화 */
img {
    max-width: 100%;
    height: auto;
}

/* 텍스트 오버플로우 방지 */
h1, h2, h3, p {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 플렉스 아이템 축소 방지 */
.hero-content,
.features-content {
    flex-shrink: 0;
    min-width: 0;
}

/* 그리드 아이템 최소 너비 */
.hero-container > *,
.features-container > * {
    min-width: 0;
}