/* 기본 리셋 및 변수 설정 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Noto Sans KR', sans-serif; color: #333; line-height: 1.6; background-color: #fcfcfc; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
ul, li { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

:root {
    --primary-color: #0d9488; /* 고급스러운 틸 그린 계열로 변경 */
    --dark-color: #0f172a;    
    --light-bg: #f8fafc;
}

/* 유틸리티 클래스 */
.inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.flex-between { display: flex; justify-content: space-between; }
.align-center { align-items: center; }
.text-center { text-align: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }

/* 공통 애니메이션 (스크롤 시 등장) */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* 버튼 스타일 */
.btn { display: inline-block; padding: 14px 32px; font-weight: 500; border-radius: 4px; transition: 0.3s; font-size: 16px; }
.btn-primary { background: var(--primary-color); color: #fff; }
.btn-primary:hover { background: #0f766e; transform: translateY(-3px); box-shadow: 0 5px 15px rgba(13, 148, 136, 0.4); }
.btn-outline { border: 1px solid rgba(255,255,255,0.5); color: #fff; backdrop-filter: blur(5px); }
.btn-outline:hover { background: #fff; color: var(--dark-color); border-color: #fff; }

/* =========================================
   헤더 (깨짐 방지 구조 강화)
========================================= */
#header { position: fixed; top: 0; left: 0; width: 100%; height: 80px; background: rgba(255, 255, 255, 0.95); border-bottom: 1px solid rgba(0,0,0,0.05); z-index: 1000; transition: all 0.3s ease; }
.header-wrap { display: flex; justify-content: space-between; align-items: center; height: 100%; }

/* 로고 영역 */
#header .logo { flex-shrink: 0; }
#header .logo img { height: 40px; width: auto; object-fit: contain; }

/* 네비게이션 영역 */
#header .nav { flex-grow: 1; display: flex; justify-content: center; }
#header .nav ul { display: flex; gap: 30px; }
#header .nav ul li a { font-weight: 500; font-size: 16px; transition: 0.3s; padding: 10px 0; position: relative; }
#header .nav ul li a::after { content: ''; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: var(--primary-color); transition: 0.3s; }
#header .nav ul li a:hover::after { width: 100%; }
#header .nav ul li a:hover { color: var(--primary-color); }

/* 우측 버튼 영역 */
.header-right { display: flex; align-items: center; gap: 15px; flex-shrink: 0; }
.btn-call { display: inline-flex; align-items: center; gap: 8px; background: var(--dark-color); color: #fff; padding: 10px 24px; border-radius: 30px; font-weight: 500; font-size: 15px; transition: 0.3s; white-space: nowrap; }
.btn-call:hover { background: var(--primary-color); }
.m-menu-btn { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--dark-color); }

/* 메인 비주얼 (Hero) */
#hero { background: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.8)), url('/img/main_visual1.jpg') no-repeat center/cover; height: 100vh; display: flex; align-items: center; justify-content: center; color: #fff; }
.hero-content h2 { font-size: 54px; font-weight: 700; margin-bottom: 20px; letter-spacing: -1.5px; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.hero-content p { font-size: 22px; font-weight: 300; margin-bottom: 40px; color: #e2e8f0; }
.hero-btns { display: flex; gap: 15px; justify-content: center; }

/* 섹션 공통 */
.section-title { margin-bottom: 60px; }
.section-title h3 { font-size: 34px; color: var(--dark-color); margin-bottom: 15px; font-weight: 700; letter-spacing: -1px; }
.section-title p { color: #64748b; font-size: 17px; }

/* 주요 업무 안내 (Services) */
#services { padding: 120px 0; background: var(--light-bg); }
.service-card { background: #fff; padding: 50px 30px; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.03); border: 1px solid #f1f5f9; transition: all 0.3s ease; }
.service-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.08); }
.service-card .icon-box { font-size: 44px; color: var(--primary-color); margin-bottom: 25px; }
.service-card h4 { font-size: 22px; color: var(--dark-color); margin-bottom: 15px; font-weight: 700; }
.service-card p { color: #64748b; font-size: 16px; line-height: 1.6; }

/* 회사 소개 (About) */
#about { padding: 120px 0; }
#about .inner { display: flex; align-items: center; justify-content: space-between; gap: 50px; }

/* 텍스트 영역 */
.about-text { flex: 1; min-width: 0; }
.about-text h3 { font-size: 38px; color: var(--dark-color); margin-bottom: 30px; font-weight: 700; line-height: 1.3; word-break: keep-all; }
.about-text h3 span { color: var(--primary-color); }
.about-list li { margin-bottom: 25px; font-size: 17px; display: flex; align-items: flex-start; gap: 15px; color: #334155; line-height: 1.6; }
.about-list li i { color: var(--primary-color); font-size: 22px; margin-top: 3px; flex-shrink: 0; } /* 아이콘 크기 고정 (찌그러짐 방지) */
.about-list li .text-box { flex: 1; word-break: keep-all; }

/* 이미지 영역 */
.about-img { flex: 1; max-width: 50%; }
.about-real-img { width: 100%; height: auto; border-radius: 16px; box-shadow: 0 20px 40px rgba(0,0,0,0.1); object-fit: cover; aspect-ratio: 4/3; display: block; }

/* 모바일/태블릿 반응형 */
@media (max-width: 850px) {
    #about .inner { flex-direction: column; gap: 40px; }
    .about-text, .about-img { width: 100%; max-width: 100%; }
}

/* =========================================
   포토 갤러리 (신규 추가)
========================================= */
#gallery { padding: 100px 0 120px; background: #fff; border-top: 1px solid #f1f5f9; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 20px; }
.gallery-item { position: relative; overflow: hidden; border-radius: 12px; cursor: pointer; aspect-ratio: 4/3; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.gallery-item .overlay { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.6); display: flex; align-items: center; justify-content: center; opacity: 0; transition: all 0.3s ease; }
.gallery-item .overlay i { color: #fff; font-size: 32px; transform: scale(0.5); transition: transform 0.3s ease; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item:hover .overlay { opacity: 1; }
.gallery-item:hover .overlay i { transform: scale(1); }

/* =========================================
   작업 진행 절차 (새로 추가)
========================================= */
#process { padding: 120px 0; background: var(--dark-color); color: #fff; }
#process .section-title h3 { color: #fff; }
#process .section-title p { color: #94a3b8; }

.process-wrap { display: flex; align-items: center; justify-content: space-between; max-width: 1050px; margin: 0 auto; }
.process-step { text-align: center; width: 22%; position: relative; }
.step-num { font-size: 14px; font-weight: 700; color: var(--primary-color); margin-bottom: 12px; letter-spacing: 2px; }
.step-icon { 
    width: 90px; height: 90px; 
    margin: 0 auto 20px; 
    background: rgba(255,255,255,0.05); 
    border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; 
    font-size: 34px; color: #fff; 
    border: 1px solid rgba(255,255,255,0.1); 
    transition: all 0.3s ease; 
}
.process-step:hover .step-icon { 
    background: var(--primary-color); 
    border-color: var(--primary-color); 
    transform: translateY(-5px); 
    box-shadow: 0 10px 25px rgba(13, 148, 136, 0.4); 
}
.process-step h4 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.process-step p { font-size: 15px; color: #94a3b8; line-height: 1.5; word-break: keep-all; }
.step-arrow { font-size: 24px; color: #475569; }

/* 모바일 화면 대응 */
@media (max-width: 850px) {
    .process-wrap { flex-direction: column; gap: 20px; }
    .process-step { width: 100%; padding: 20px 0; }
    .step-arrow { transform: rotate(90deg); margin: 0; }
}

/* 푸터 */
footer { background: #020617; color: #64748b; padding: 50px 0; font-size: 15px; }
footer p { margin-bottom: 8px; }
footer p strong { color: #f8fafc; font-size: 16px; }
footer .copy { margin-top: 30px; opacity: 0.5; font-size: 14px; }

/* 반응형 레이아웃 */
@media (max-width: 1024px) {
    #header .nav ul { gap: 20px; }
}

@media (max-width: 850px) {
    /* 모바일 헤더 및 드롭다운 메뉴 대응 */
    #header .nav { 
        display: none; /* 평소엔 숨김 (JS로 열기) */
        position: absolute; 
        top: 80px; left: 0; width: 100%; 
        background: rgba(255, 255, 255, 0.98); 
        border-bottom: 1px solid #e2e8f0;
        box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    }
    #header .nav ul { 
        flex-direction: column; gap: 0; padding: 10px 0; 
    }
    #header .nav ul li a { 
        display: block; padding: 15px 20px; text-align: center; 
        font-size: 17px; border-bottom: 1px solid #f1f5f9; 
    }
    #header .nav ul li a::after { display: none; } /* 모바일에선 밑줄 애니메이션 제거 */
    #header .nav ul li:last-child a { border-bottom: none; }
    
    .btn-call { display: none; }
    .m-menu-btn { display: block; outline: none; }
    
    /* 레이아웃 대응 */
    .hero-content h2 { font-size: 36px; }
    .hero-content p { font-size: 18px; }
    .hero-btns { flex-direction: column; gap: 10px; }
    .grid-3 { grid-template-columns: 1fr; }
    
    #about .inner { flex-direction: column; gap: 40px; }
    .about-text, .about-img { width: 100%; max-width: 100%; }
    .btn-main-call { font-size: 24px; padding: 15px 40px; }
}

/* =========================================
   플로팅 전화상담 버튼 (번호 직접 대형 노출)
========================================= */
.floating-call {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 9999;
}

.floating-call a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background-color: #0d9488; /* 눈에 띄는 강렬한 빨간색 */
    color: #fff;
    padding: 18px 35px;
    border-radius: 50px;
    font-size: 28px; /* 글씨를 대폭 키움 */
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 10px 25px rgba(13, 148, 136, 0.4);
    transition: all 0.3s ease;
}

.floating-call a:hover {
    transform: translateY(-5px);
    background-color: #dc2626;
    box-shadow: 0 15px 30px rgba(239, 68, 68, 0.6);
}

.floating-call i {
    font-size: 28px;
    animation: ring 2s infinite ease-in-out;
}

/* 통화 아이콘 흔들림 애니메이션 */
@keyframes ring {
    0%, 100% { transform: rotate(0deg); }
    10% { transform: rotate(15deg); }
    20% { transform: rotate(-15deg); }
    30% { transform: rotate(10deg); }
    40% { transform: rotate(-10deg); }
    50% { transform: rotate(0deg); }
}

/* 모바일 화면: 화면 맨 아래 꽉 차는 고정 바 형태로 변경 (전화 유도율 200%) */
@media (max-width: 850px) {
    /* 모바일에서는 버튼이 하단을 다 차지하므로 푸터가 가려지지 않게 여백 추가 */
    body { padding-bottom: 70px; } 
    
    .floating-call {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
    }
    
    .floating-call a {
        border-radius: 0; /* 모바일은 둥근 테두리 제거하고 꽉 채움 */
        padding: 20px 0;
        font-size: 30px; /* 모바일에서 번호가 화면을 압도하도록 키움 */
        width: 100%;
    }
    
    .floating-call a:hover {
        transform: none; /* 모바일에서는 떠오르는 액션 제거 */
    }
}

/* =========================================
   갤러리 이미지 확대 팝업 (모달)
========================================= */
.modal {
    display: none; /* 평소에는 숨김 */
    position: fixed; 
    z-index: 10000; /* 플로팅 전화버튼보다 위로 올라오게 설정 */
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    background-color: rgba(15, 23, 42, 0.9); /* 고급스럽게 어두운 배경 */
    backdrop-filter: blur(5px); /* 배경 살짝 흐리게 */
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    animation: zoomIn 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.close-modal {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10001;
}

.close-modal:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* 팝업 등장 애니메이션 */
@keyframes zoomIn {
    from { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
    to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* 모바일 화면 팝업 대응 */
@media (max-width: 850px) {
    .close-modal { top: 15px; right: 20px; font-size: 35px; }
    .modal-content { max-width: 95%; max-height: 70vh; }
}