:root { --main-orange: #FF6B00; }
html { scroll-behavior: smooth; }

/* 1. 페이지 전체 가로 스크롤 및 기본 설정 */
body, html { 
    margin: 0; 
    padding: 0; 
    overflow-x: hidden !important; /* 하단 스크롤바 제거 */
    width: 100%;
}

body { font-family: 'Pretendard', sans-serif; line-height: 1.6; color: #333; background-color: #fff; }
section { padding: 80px 10%; width: 100%; box-sizing: border-box; }
h2 { font-size: 2.5rem; text-align: center; margin-bottom: 40px; }

/* 네비게이션 스타일 */
nav { position: sticky; top: 0; background: white; display: flex; justify-content: space-between; align-items: center; padding: 1px 10%; box-shadow: 0 2px 10px rgba(0,0,0,0.05); z-index: 1000; }
nav a { text-decoration: none; color: #333; font-weight: 600; }

/* 애니메이션 효과 정의 */
.fade-in { 
    opacity: 0; 
    transform: translateY(30px); 
    transition: opacity 0.8s ease-out, transform 0.8s ease-out; 
}

/* 애니메이션 작동 시 가시성 확보 */
.fade-in.visible { 
    opacity: 1 !important; 
    transform: translateY(0) !important; 
}

/* 2. 주황색 버튼 복구 (가장 중요한 부분) */
.btn-cta { 
    background-color: #FF6B00 !important; 
    color: white !important; 
    padding: 18px 35px !important; 
    border: none !important; 
    border-radius: 50px !important; 
    font-weight: bold !important; 
    font-size: 1.2rem !important; 
    cursor: pointer !important; 
    display: inline-block;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.btn-cta:hover { transform: scale(1.05); }


/* 카드 레이아웃 스타일 */
.grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px; 
    max-width: 1200px; 
    margin: 0 auto; 
}

.card { 
    padding: 40px; 
    border: 1px solid #eee; 
    border-radius: 15px; 
    text-align: center; 
    background: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); /* 은은한 그림자 추가 */
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #333;
}

/* 4단계 로드맵 반응형 스타일 */
@media (max-width: 900px) {
    #roadmap div[style*="flex-wrap: nowrap"] { 
        flex-wrap: wrap !important; 
        justify-content: center !important;
    }
    .step-card { 
        flex: 0 0 45% !important; 
        margin-bottom: 40px; 
    }
}

@media (max-width: 600px) {
    .step-card { 
        flex: 0 0 100% !important; 
    }
}

/* 상담 신청 섹션: 배경색 및 입력창 가시성 해결 */
.contact, section#contact { 
    background-color: #0F172A !important; 
    color: white !important; 
    display: block !important;
}

.contact h2, section#contact h2 { 
    color: white !important; 
    margin-top: 0;
}

.form-box { 
    max-width: 650px; 
    margin: 0 auto; 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
}

.form-box input, .form-box textarea { 
    width: 100% !important; 
    padding: 18px !important; 
    border: 1px solid rgba(255, 255, 255, 0.4) !important; 
    border-radius: 8px !important; 
    background-color: rgba(0, 0, 0, 0.3) !important; 
    color: white !important; 
    display: block !important; 
    box-sizing: border-box !important; 
    font-size: 1rem !important;
}

.form-box input::placeholder, .form-box textarea::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

.btn-submit { 
    background-color: var(--main-orange) !important; 
    color: white !important; 
    padding: 20px !important; 
    border: none !important; 
    border-radius: 8px !important; 
    font-size: 1.2rem !important; 
    font-weight: bold !important; 
    cursor: pointer !important; 
    width: 100% !important;
}

/**--- 히어로 롤링 및 페이드 효과 최적화 완료 --- **/
.hero-wrapper {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 500px; /* 모바일 대응 높이 하향 조정 */
    overflow: hidden;
    background-color: #000;
}

.hero { 
    position: absolute; 
    top: 0; left: 0; 
    width: 100%; height: 100%; 
    opacity: 0; 
    z-index: 1;
    transition: opacity 1.5s ease-in-out; 
    background-size: cover; 
    background-position: center; 
    display: flex; 
    align-items: center; 
}

/* 활성화 및 전환 레이어 */
.hero.active { opacity: 1; z-index: 10; }
.hero.last-active { opacity: 0; z-index: 5; transition: opacity 1.5s ease-in-out; }

/* 하단 인디케이터 (모바일에서도 보이도록 z-index 상향) */
.hero-dots {
    position: absolute;
    bottom: 20px; /* 모바일에서 위로 조금 올림 */
    left: 50%;
    transform: translateX(-50%);
    z-index: 100; /* 최상단으로 */
    display: flex;
    gap: 10px;
}

.dot {
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
}

.dot.active { background-color: #fff; transform: scale(1.2); }

/* --- [1. PC용 기본 배경 설정] --- */
/* 기본 상태는 PC 이미지가 나오도록 설정합니다. */
.hero-slide-1 { 
    background-image: url('hero-background.jpg'); 
}
.hero-slide-2 { 
    background-image: url('hero-background2.jpg'); 
}

/* --- [2. 모바일용 배경 설정 (768px 이하)] --- */
@media (max-width: 768px) {
    /* 모바일 전용 이미지로 강제 교체 */
    .hero-slide-1 { 
        background-image: url('mobile-hero-background.jpg') !important; 
        background-position: center center !important; 
        background-size: cover !important;
    }
    .hero-slide-2 { 
        background-image: url('mobile-hero-background2.jpg') !important; 
        background-position: center center !important;
        background-size: cover !important;
    }

    /* 모바일에서 텍스트 가독성 및 레이아웃 조정 */
    .hero-container {
        padding: 0 20px !important;
    }

    .hero-text-left h1 { 
        font-size: 1.8rem !important; 
        line-height: 1.3 !important;
        /* 모바일 이미지 속 인물의 얼굴을 가리지 않도록 하단 여백 대폭 확보 */
        margin-bottom: 220px !important; 
        text-shadow: 2px 2px 10px rgba(0,0,0,0.6);
    }
    
    .hero-text-left p {
        font-size: 1rem !important;
        margin-bottom: 20px !important;
    }
}


/* 텍스트 가독성을 위한 오버레이 */
.hero-overlay { 
    position: absolute; 
    top: 0; left: 0; 
    width: 100%; height: 100%; 
    background: linear-gradient(to right, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0) 100%); 
    z-index: 1; /* hero 내부 요소이므로 z-index 낮게 설정 */
}

.hero-container { 
    position: relative; 
    z-index: 2; 
    width: 100%; 
    max-width: 1400px; 
    margin: 0 auto; 
    padding: 0 80px; 
}

.hero-text-left { 
    /* 텍스트가 회색으로 보이지 않게 흰색 강제 적용 */
    color: #ffffff !important;
    text-align: left; 
    width: 100%; 
    max-width: 800px !important; 
}

.hero-text-left h1 { 
    /* 텍스트가 회색으로 보이지 않게 흰색 강제 적용 */
    color: #ffffff !important;
    font-size: clamp(2.2rem, 5vw, 4rem); 
    font-weight: 800; 
    line-height: 1.2; 
    margin-bottom: 25px; 
    letter-spacing: -1px; 
    word-break: keep-all; 
}

.hero-text-left p {color: #ffffff !important; font-size: 1.3rem; line-height: 1.6; margin-bottom: 40px; opacity: 0.9; }



/* --- 모바일 반응형 설정 (768px 이하) --- */
@media (max-width: 768px) {
   

    /* 2. 버튼 사이즈 고정 (늘어남 방지) */
    .btn-cta {
        display: inline-block !important;
        width: auto !important; 
        padding: 12px 25px !important;
        font-size: 1rem !important;
        white-space: nowrap;
    }

    /* 3. [신규] 센터 정보 섹션 - 빨간 네모 타이틀 스타일 */
    .center-title-box {
        margin-bottom: 25px;
        text-align: center;
        display: block !important; /* HTML에서 추가할 클래스 */
    }
    .center-title-box h3 {
        color: #FF6B00;
        font-size: 1.5rem;
        font-weight: 800;
        margin: 0;
    }

    /* 4. [수정] 롤링 컨테이너 - 이미지 치우침 및 잘림 해결 */
    #rolling-container {
        height: 320px !important; /* 높이를 줄여 비율 최적화 */
        background: #f8f8f8 !important;
    }

    .roll-img {
        /* [중요] cover 대신 contain을 사용하여 전체 이미지가 잘리지 않게 함 */
        object-fit: contain !important; 
        object-position: center center !important; 
        width: 100% !important;
        height: 100% !important;
    }

    /* 5. 텍스트 정렬 최적화 */
    #center-info h2 { font-size: 1.5rem !important; text-align: center !important; }
    #center-info p { font-size: 0.95rem !important; text-align: center !important; }

    /* 6. 햄버거 메뉴 설정 유지 */
    #hamburger { display: flex !important; }
    #nav-menu {
        display: none !important;
        position: absolute;
        top: 100%;
        right: 10%;
        background-color: white;
        flex-direction: column !important;
        gap: 15px !important;
        padding: 20px;
        box-shadow: 0 10px 25px rgba(0,0,0,0.1);
        border-radius: 10px;
        min-width: 150px;
        z-index: 1001;
    }
    #nav-menu.active { display: flex !important; animation: fadeInDown 0.3s ease; }
}

/* --- 햄버거 메뉴 기본 설정 --- */
#hamburger {
    display: none !important; /* PC에서는 숨김 */
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

/* 햄버거 막대기(3줄) 디자인 */
#hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333; /* 기존 메뉴 글자색과 동일하게 설정 */
    border-radius: 2px;
    transition: 0.3s;
}

/* --- 모바일 반응형 설정 (768px 이하) --- */
@media (max-width: 768px) {
    /* 1. 햄버거 버튼 보이기 */
    #hamburger {
        display: flex !important;
    }

    /* 2. 기존 가로 메뉴를 세로 드롭다운으로 변경 */
    #nav-menu {
        display: none !important; /* 클릭 전 숨김 */
        position: absolute;
        top: 100%; /* 헤더 바로 아래 배치 */
        right: 10%; /* 기존 헤더 padding 값에 맞춤 */
        background-color: white;
        flex-direction: column !important;
        gap: 15px !important;
        padding: 20px;
        box-shadow: 0 10px 25px rgba(0,0,0,0.1);
        border-radius: 10px;
        min-width: 150px;
        z-index: 1001;
    }

    /* 3. 자바스크립트로 추가될 활성화 클래스 */
    #nav-menu.active {
        display: flex !important;
        animation: fadeInDown 0.3s ease; /* 나타날 때 부드러운 효과 */
    }
}

/* 간단한 애니메이션 효과 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* 푸터 전체 스타일 */
    /* 배경색 및 전체 글꼴 유지 */
    .mansour-footer {
        background-color: #000; /* 이미지와 동일한 블랙 */
        color: #999; /* 텍스트 회색조 유지 */
        padding: 30px 20px;
        font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
        font-size: 13px;
        line-height: 1.8;
        text-align: center; /* 핵심: 모든 내용을 가운데로 정렬 */
    }

    .footer-container {
        display: inline-block; /* 내용 너비만큼만 차지하여 중앙 정렬 보조 */
        max-width: 1200px;
        margin: 0 auto;
    }

    .footer-row {
        margin-bottom: 4px;
    }

    /* 구분선 및 간격 유지 */
    .footer-item {
        display: inline-block;
        margin: 0 5px;
    }

    .footer-item:not(:last-child):after {
        content: "|";
        margin-left: 10px;
        color: #444; /* 구분선 색상 유지 */
        font-size: 11px;
    }

    /* 카피라이트 스타일 */
    .copyright {
        display: block;
        margin-top: 10px;
        color: #666;
        font-size: 12px;
    }
    
    /* 마지막 항목 뒤에 구분선이 생기지 않도록 처리 */
    .footer-row:last-child .footer-item:after {
        display: none;
    }

    /* 모바일 환경 대응 */
    @media (max-width: 768px) {
        .footer-item {
            display: block;
            margin: 2px 0;
        }
        .footer-item:after {
            display: none !important;
        }
    }


    /* 탭 버튼 스타일 */
    .tab-btn {
        padding: 10px 25px;
        border: 1px solid #ddd;
        background: #fff;
        border-radius: 5px;
        cursor: pointer;
        font-weight: 600;
        font-size: 1rem;
        transition: all 0.3s;
    }
    .tab-btn.active {
        background-color: #00C73C; /* 이미지의 초록색 포인트 컬러 반영 */
        color: #fff;
        border-color: #00C73C;
    }

    /* 1. 슬라이더를 감싸는 바구니 (넘치는 부분 숨김) */
.slider-wrapper {
    overflow: hidden;
    position: relative;
    width: 100%;
    padding: 20px 0;
}

/* 2. 이미지가 한 줄로 나열되어 흐르는 통로 */
.image-slider {
    display: flex;
    gap: 15px;
    width: max-content; /* 컨텐츠 길이에 맞게 자동 확장 */
    will-change: transform; /* 애니메이션 성능 최적화 */
}

/* 3. 개별 이미지 카드 설정 */
.slider-item {
    flex: 0 0 280px; /* 이미지 너비 고정 */
}

.slider-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: block;
}

/* 4. 마우스 올리면 멈추는 설정 (선택 사항) */
.image-slider:hover {
    animation-play-state: paused;
}

/* 5. 무한 루프 애니메이션 정의 */
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } /* 복제본 덕분에 50%만 밀어도 무한처럼 보임 */
}