/* style.css - 최종 버전 */

/* 기본 스타일 및 폰트 */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;700;900&display=swap');
@import url('https://db.onlinewebfonts.com/c/4f752cc1bd2cd9cfac305ea1323ebdf9?family=CAT+North');

:root {
    /* New Color Palette */
    --background-color: #F8F5ED;
    /* 메인 배경 (따뜻한 오프 화이트) */
    --text-color: #4B3F33;
    /* 기본 텍스트 (다크 브라운) */
    --accent-color: #1ABC9C;
    /* 포인트 색상 (틸/터콰이즈) */
    --secondary-color: #8A7E6F;
    /* 보조 텍스트 (톤 다운된 브라운) */
    --section-bg-alt: #EAE3D3;
    /* 대체 배경 (라이트 베이지) */
    --border-color: #DCD3BF;
    /* 테두리 색상 */
    --card-background: #FFFFFF;
    /* 카드/헤더 배경 (흰색) */
    --footer-bg-color: var(--section-bg-alt);
    /* 푸터 배경색 (대체 배경색 사용) */

    /* Font and Layout Variables */
    --section-padding: clamp(80px, 15vh, 150px);
    --font-family: 'Montserrat', sans-serif;
    --header-height: 70px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.7;
    font-size: 16px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

a {
    text-decoration: none;
    color: var(--accent-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--text-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 강조 텍스트 스타일 */
.text-accent {
    color: var(--accent-color);
    font-weight: inherit;
}

b {
    font-weight: 700;
    color: inherit;
}

/* 헤더 */
.site-header {
    background-color: var(--card-background);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100;
    height: var(--header-height);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    gap: 15px;
}



.logo {
    /* 기존 스타일 유지 (font-weight, font-size 등은 .logo-text로 이동 가능) */
    flex-shrink: 0;
    /* font-size는 .logo-link 또는 .logo-text에서 조정 */
}

.logo-link {
    display: flex;
    /* 이미지와 텍스트를 가로로 배치 */
    align-items: center;
    /* 수직 중앙 정렬 */
    gap: 10px;
    /* 이미지와 텍스트 사이 간격 */
    text-decoration: none;
    color: inherit;
    /* 부모(.logo) 색상 상속 */
}

.logo-link:hover {
    /* 로고 호버 효과 (선택 사항) */
    /* 예: opacity: 0.9; */
}

.logo-text {
    font-family: 'CAT North', var(--font-family), sans-serif;
    /* CatNorth 적용, 없을 경우 기본 폰트 사용 */
    /*letter-spacing: 0.25em; /* 자간을 폰트 크기의 25%만큼 늘림 */
    font-weight: bold;
    /* Cat North 폰트의 기본 두께 사용 (폰트에 따라 bold 등으로 변경 가능) */
    font-size: 1.6em;
    /* 기존 크기 유지 또는 조정 */
    color: var(--text-color);
    /* 기존 색상 유지 */
    line-height: 1;
    /* 기존 값 유지 */
    /* 기존 letter-spacing: -0.5px; 규칙은 삭제하거나 이 규칙으로 덮어씀 */
    text-transform: none;
    /* 대소문자 변환 없음 확인 */
    display: inline-block;
    /* 안정적인 렌더링 위해 */
}

/* 로고 텍스트 첫 글자 스타일 (폰트 변경에 따라 조정) */
.logo-text::first-letter {
    color: var(--accent-color);
    /* Cat North 폰트에 900 두께가 없을 수 있으므로, */
    /* font-weight를 normal로 하거나 제거하여 기본 두께를 따르도록 할 수 있음 */
    font-weight: bold;
    /* 또는 normal, 폰트에 맞춰 조정 */
    /* letter-spacing은 상속받으므로 별도 지정 불필요 */
}

/* 로고 링크 스타일 (기존 유지) */
.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.logo-image {
    height: 35px;
    width: auto;
}



/* 메인 네비게이션 (데스크탑) */
.main-nav {
    margin-left: auto;
}

.main-nav ul {
    display: flex;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.main-nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
    font-size: 0.95em;
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.main-nav ul li a:hover {
    color: var(--accent-color);
}

.main-nav ul li a:hover::after {
    width: 100%;
}

.main-nav ul li a[aria-current="page"] {
    font-weight: 700;
    color: var(--accent-color);
}

.main-nav ul li a[aria-current="page"]::after {
    width: 100%;
}


/* 커스텀 언어 선택기 */
.custom-language-selector {
    position: relative;
    margin-left: 15px;
}

.custom-language-selector .selected-lang {
    background: none;
    border: none;
    padding: 5px;
    font-family: inherit;
    font-size: 0.95em;
    font-weight: 700;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.custom-language-selector .selected-lang::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--secondary-color);
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.custom-language-selector .selected-lang[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

.custom-language-selector .lang-options {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 8px 0;
    z-index: 110;
    min-width: 80px;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.custom-language-selector .lang-options:not(.hidden) {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.custom-language-selector .lang-options.hidden {
    display: block;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

.custom-language-selector .option {
    display: block;
    width: 100%;
    padding: 10px 20px;
    background: none;
    border: none;
    text-align: left;
    font-family: inherit;
    font-size: 0.9em;
    color: var(--text-color);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.custom-language-selector .option:hover,
.custom-language-selector .option:focus {
    background-color: var(--section-bg-alt);
    outline: none;
}

.custom-language-selector .option.is-selected {
    font-weight: 700;
    background-color: #f0f0f0;
}

/* 햄버거 메뉴 버튼 */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    margin-left: 10px;
    z-index: 1100;
    order: 3;
}

.hamburger {
    display: block;
    position: relative;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: background-color 0s 0.3s;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    transition: transform 0.3s ease-in-out, top 0.3s ease-in-out;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    top: 8px;
}

.nav-toggle.active .hamburger {
    background-color: transparent;
}

.nav-toggle.active .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle.active .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}

/* 메인 컨텐츠 */
main {
    padding-top: var(--header-height);
}

/* 섹션 기본 스타일 및 배경색 */
main section {
    padding: var(--section-padding) 0;
    overflow: hidden;
    background-color: var(--background-color);
    /* 기본 배경: Main BG */
}

/* Hero 섹션 배경 */
main section.hero {
    background: linear-gradient(to bottom, #fdfdfd, var(--background-color));
}

/* 짝수번째 섹션에 대체 배경색 적용 */
main section:nth-of-type(even) {
    background-color: var(--section-bg-alt);
    /* 짝수번째(Image, Split1, Split3)는 Alt BG */
}

/* Text 섹션(3번째, 홀수)은 기본 배경색을 유지해야 함 */
main section.text-section {
    background-color: var(--background-color);
    /* Main BG 명시 (선택적이지만 확실하게) */
}

/* 홀수번째 Split 섹션(5, 7)도 기본 배경색 유지 */


/* Hero Section 상세 스타일 */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    padding-top: calc(var(--section-padding) / 2);
    padding-bottom: calc(var(--section-padding) / 2);
}

.hero-title {
    font-size: clamp(3.2rem, 8vw, 6.2rem);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 25px;
    color: var(--text-color);
}

.hero-title span {
    display: inline-block;
}

.hero-title-accent {
    color: var(--accent-color);
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    color: var(--secondary-color);
    max-width: 650px;
    font-weight: 400;
}

/* Image Section 상세 스타일 */
.image-wrapper {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(75, 63, 51, 0.1);
}

.image-wrapper img {
    width: 100%;
    height: auto;
}

/* Text Section 상세 스타일 */
.text-section {
    text-align: left;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    margin-bottom: 35px;
    color: var(--text-color);
}

.animated-text {
    font-size: clamp(1rem, 2.8vw, 1.2rem);
    color: var(--text-color);
    max-width: 750px;
    margin: 0 0 25px 0;
    font-weight: 400;
}

.animated-text b {
    font-weight: 700;
    color: var(--text-color);
}

/* Split Layout Section 상세 스타일 */
.split-container {
    display: flex;
    align-items: center;
    gap: 6%;
    flex-wrap: wrap;
}

.split-content,
.split-image {
    flex: 1;
    min-width: 300px;
}

.split-image {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(75, 63, 51, 0.1);
}

.split-content h3 {
    margin-bottom: 25px;
}

.split-content p {
    font-weight: 400;
    color: var(--text-color);
    line-height: 1.75;
}

.split-content p b {
    font-weight: 700;
}

.split-container.image-left {
    flex-direction: row-reverse;
}

/* Contact Page Styles */
.contact-page-section {
    padding: var(--section-padding) 0;
    background-color: var(--background-color);
    min-height: calc(100vh - var(--header-height) - 100px);
    display: flex;
    align-items: center;
}

.contact-split-container {
    display: flex;
    background-color: var(--card-background);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(75, 63, 51, 0.1);
    overflow: hidden;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info-left {
    flex: 0 0 45%;
    padding: clamp(30px, 5vw, 60px);
    background-color: var(--section-bg-alt);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-info-left .info-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 25px;
}

.contact-info-left .info-description {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    line-height: 1.7;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.contact-info-left .info-details {
    margin-top: 30px;
    font-size: 0.95em;
    color: var(--secondary-color);
}

.contact-info-left .info-details p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.contact-info-left .info-details i {
    color: var(--accent-color);
    margin-right: 12px;
    width: 18px;
    text-align: center;
}

.contact-info-left .info-details a {
    color: var(--text-color);
    text-decoration: underline;
}

.contact-info-left .info-details a:hover {
    color: var(--accent-color);
}

.contact-form-right {
    flex: 1;
    padding: clamp(30px, 5vw, 60px);
}

.contact-form-right .form-title {
    font-size: clamp(1.5rem, 3.5vw, 2.2rem);
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 35px;
}

.contact-form .form-group {
    margin-bottom: 25px;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--secondary-color);
    font-size: 0.9em;
}

.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1em;
    background-color: #fff;
    color: var(--text-color);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input[type="email"]:focus,
.contact-form input[type="tel"]:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(26, 188, 156, 0.15);
}

.contact-form textarea {
    min-height: 120px;
    resize: vertical;
}

.contact-form button[type="submit"] {
    background-color: var(--accent-color);
    color: #fff;
    border: none;
    padding: 14px 30px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-block;
    width: auto;
}

.contact-form button[type="submit"]:hover {
    background-color: #16a085;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(22, 160, 133, 0.3);
}


/* 푸터 */
.site-footer {
    padding: 40px 0;
    text-align: center;
    color: var(--secondary-color);
    font-size: 0.9em;
    margin-top: calc(var(--section-padding) / 1.5);
    border-top: 1px solid var(--border-color);
    background-color: var(--footer-bg-color);
}

.social-links {
    margin-bottom: 25px;
    text-align: center;
}

.social-links a {
    display: inline-block;
    margin: 0 15px;
    color: var(--secondary-color);
    font-size: 1.7em;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    color: var(--accent-color);
    transform: translateY(-3px) scale(1.05);
}

/* *** 언어 표시/숨김 CSS *** */
html[lang="en"] .lang-ko {
    display: none;
}

html[lang="en"] .lang-en {
    display: inline;
}

/* Span은 기본이 inline */
html[lang="ko"] .lang-ko {
    display: inline;
}

html[lang="ko"] .lang-en {
    display: none;
}

/* 만약 span 때문에 줄바꿈이 이상하다면 아래 주석 해제 */
/* p .lang-en, p .lang-ko { display: inline; } */


/* --- 애니메이션 준비 (Initial States) --- */
.reveal-up {
    opacity: 0;
    transform: translateY(60px);
    visibility: hidden;
}

.reveal-fade {
    opacity: 0;
    visibility: hidden;
}

.reveal-left {
    opacity: 0;
    transform: translateX(-80px);
    visibility: hidden;
}

.reveal-right {
    opacity: 0;
    transform: translateX(80px);
    visibility: hidden;
}


/* --- 반응형 (Responsive) --- */
@media (max-width: 768px) {

    /* 모바일 헤더 레이아웃 */
    .site-header .container {
        gap: 10px;
    }

    .main-nav {
        display: block;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(5px);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease-out;
        z-index: 1000;
    }

    .main-nav.active {
        max-height: calc(100vh - var(--header-height));
        overflow-y: auto;
    }

    .main-nav ul {
        flex-direction: column;
        padding: 20px 0;
        gap: 0;
    }

    .main-nav ul li {
        margin: 0;
        text-align: center;
    }

    .main-nav ul li a {
        display: block;
        padding: 15px 20px;
        border-bottom: 1px solid var(--border-color);
        width: 100%;
    }

    .main-nav ul li:last-child a {
        border-bottom: none;
    }

    .main-nav ul li a::after {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    .language-selector {
        order: 2;
        margin-left: auto;
    }

    .nav-toggle {
        order: 3;
        margin-left: 10px;
    }

    .logo {
        order: 1;
    }

    /* Contact 페이지 모바일 */
    .contact-split-container {
        flex-direction: column;
    }

    .contact-info-left {
        flex: 0 0 auto;
        border-radius: 12px 12px 0 0;
    }

    .contact-form-right {
        border-radius: 0 0 12px 12px;
    }

    /* 다른 섹션 모바일 스타일 */
    .split-container {
        flex-direction: column;
        gap: 40px;
    }

    .split-image {
        order: -1;
    }

    .split-container.image-left {
        flex-direction: column;
    }

    .split-container.image-left .split-image {
        order: -1;
    }

    .section-title {
        font-size: clamp(1.8rem, 6vw, 2.8rem);
    }

    .hero-title {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }
    
}

/* Contact Form Phone Input Group */
.phone-input-group {
    display: flex;
    /* 필드들을 가로로 배치 */
    align-items: center;
    /* 수직 중앙 정렬 */
    gap: 8px;
    /* 국가번호와 전화번호 필드 사이 간격 */
}

.country-code-input {
    flex: 0 0 70px;
    /* 국가번호 필드 너비 고정 (조절 가능) */
    text-align: center;
    /* 텍스트 중앙 정렬 (선택 사항) */
    /* 기존 input 스타일 상속받도록 함 */
    padding: 14px 10px;
    /* 패딩 조정 */
}

.phone-number-input {
    flex: 1;
    /* 남은 너비 모두 차지 */
    /* 기존 input 스타일 상속받도록 함 */
}

/* 모바일에서 폰트 크기 등 미세 조정 (선택 사항) */
@media (max-width: 480px) {
    .logo-text {
        font-size: 1.2em;
    }

    /* 더 줄임 */
    .logo-image {
        height: 28px;
    }

    .logo-link {
        gap: 6px;
    }

    .site-header .container {
        gap: 5px;
    }

    .nav-toggle {
        margin-left: 5px;
    }

    .country-code-input {
        flex-basis: 60px;
        /* 모바일에서 너비 약간 줄임 */
        padding: 12px 8px;
    }

    .phone-number-input {
        padding: 12px 15px;
    }
}

/* --- style.css 파일 하단 등에 다시 추가 --- */

/* 기본 오류 메시지 스타일 (처음에는 숨김) */
.error-message {
    display: none;
    /* 기본적으로 숨김 */
    position: relative;
    /* 말풍선 꼬리 위치 기준 */
    background-color: var(--card-background);
    /* 흰색 배경 */
    border: 1px solid #f0c4c4;
    /* 붉은 계열 테두리 */
    border-radius: 4px;
    padding: 8px 12px 8px 35px;
    /* 아이콘 공간 확보 */
    margin-top: 8px;
    /* 입력 필드와의 간격 */
    font-size: 0.85em;
    color: #d9534f;
    /* 붉은 계열 텍스트 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 말풍선 꼬리 (::before와 ::after 사용) */
.error-message::before,
.error-message::after {
    content: "";
    position: absolute;
    bottom: 100%;
    /* 메시지 박스 위에 위치 */
    left: 25px;
    /* 왼쪽에서 약간 떨어진 위치 */
    border: solid transparent;
    height: 0;
    width: 0;
    pointer-events: none;
}

.error-message::before {
    /* 테두리 역할 */
    border-color: rgba(240, 196, 196, 0);
    /* 투명 */
    border-bottom-color: #f0c4c4;
    /* 테두리 색 */
    border-width: 9px;
    margin-left: -9px;
}

.error-message::after {
    /* 실제 배경색 역할 */
    border-color: rgba(255, 255, 255, 0);
    /* 투명 */
    border-bottom-color: var(--card-background);
    /* 메시지 박스 배경색 */
    border-width: 8px;
    margin-left: -8px;
}

/* 오류 아이콘 (Font Awesome 사용) */
.error-message .error-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2em;
    /* 아이콘 크기 */
    color: #f0ad4e;
    /* 주황색 아이콘 */
}

/* 오류 발생 시 input 테두리 변경 (클래스 기반) */
.form-group.has-error input,
.form-group.has-error textarea,
.form-group.has-error .iti__tel-input {
    /* intl-tel-input 포함 */
    border-color: #d9534f !important;
    /* 테두리 색 변경 (important로 우선순위 확보) */
}

.form-group.has-error input:focus,
.form-group.has-error textarea:focus,
.form-group.has-error .iti__tel-input:focus {
    border-color: #d9534f !important;
    box-shadow: 0 0 0 3px rgba(217, 83, 79, 0.15) !important;
    /* 포커스 시에도 유지 */
}

/* :invalid 관련 스타일은 제거하거나 주석처리 */
/*
.contact-form input:invalid,
.contact-form textarea:invalid { ... }
*/