/* ==========================================================================
   전체 리셋 및 기본 스타일
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 부드러운 스크롤 전역 설정 */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* 공통 컨테이너 스타일 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   헤더 스타일 (상단 고정 네비게이션)
   ========================================================================== */
header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 1rem 0;
    position: fixed; /* 스크롤해도 상단에 고정 */
    width: 100%;
    top: 0;
    z-index: 1000; /* 다른 요소들보다 위에 표시 */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 네비게이션 바 레이아웃 */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 로고 스타일 */
.logo h1 {
    font-size: 1.8rem;
    font-weight: bold;
}

/* 메뉴 리스트 */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    transition: all 0.3s ease;
}

/* 메뉴 링크 스타일 */
.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

/* 메뉴 링크 호버 효과 */
.nav-menu a:hover {
    color: #87ceeb;
    text-shadow: 0 0 5px rgba(135, 206, 235, 0.5);
}

/* ==========================================================================
   언어 선택 스타일
   ========================================================================== */
.language-selector {
    margin-left: 1rem;
}

.language-selector select {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-selector select:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.language-selector select:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 5px rgba(135, 206, 235, 0.5);
}

.language-selector option {
    background: #1e3c72;
    color: white;
}

/* 모바일용 언어 선택 숨김 (데스크톱에서) */
.mobile-language {
    display: none;
}

/* ==========================================================================
   햄버거 메뉴 (모바일용)
   ========================================================================== */
.hamburger {
    display: none; /* 기본적으로 숨김 */
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

/* 햄버거 메뉴 선들 */
.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* 햄버거 메뉴 활성화 시 X자 모양으로 변환 */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ==========================================================================
   메인 콘텐츠 영역
   ========================================================================== */
main {
    margin-top: 78px; /* 고정 헤더 높이만큼 여백 추가 */
}

/* ==========================================================================
   히어로 섹션 (첫 화면 배너)
   ========================================================================== */
.hero {
    /* 배경 이미지와 어두운 오버레이 */
    background-image: linear-gradient(rgba(30, 60, 114, 0.7), rgba(42, 82, 152, 0.7)), url('./image/boat2.jpg');
    background-size: cover; /* 배경 이미지 전체 덮도록 */
    background-position: center; /* 이미지 중앙 정렬 */
    background-repeat: no-repeat; /* 이미지 반복 안함 */
    /* 모바일에서 패럴랙스 효과 제거 - 성능 문제 해결 */
    background-attachment: scroll;
    color: white;
    text-align: center;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
    /* 폴백 배경색 (이미지 로드 실패시) */
    background-color: #1e3c72;
}

/* 히어로 섹션 장식 효과 */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><radialGradient id="a" cx="50" cy="50" r="50"><stop offset="0" stop-color="rgba(255,255,255,.1)"/><stop offset="1" stop-color="rgba(255,255,255,0)"/></radialGradient></defs><circle cx="10" cy="10" r="10" fill="url(%23a)"><animateTransform attributeName="transform" type="translate" values="0 0; 90 0; 0 0" dur="2s" repeatCount="indefinite"/></circle></svg>') repeat;
    opacity: 0.1;
    /* 모바일에서는 장식 효과 숨김 */
    display: block;
}

/* 모바일에서 장식 효과 완전 제거 */
@media (max-width: 768px) {
    .hero::before {
        display: none;
    }
}

/* 히어로 콘텐츠 */
.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    min-height: 400px; /* 웹에서 충분한 높이 확보 */
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    text-align: center;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    text-align: center;
}

/* ==========================================================================
   공통 섹션 스타일
   ========================================================================== */
section {
    padding: 80px 0;
}

/* 짝수 번째 섹션 배경색 */
section:nth-child(even) {
    background-color: white;
}

/* 섹션 제목 스타일 */
section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #ffffff !important; /* 강제로 흰색 고정 */
    position: relative;
}

/* 섹션 제목 밑줄 장식 */
section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-radius: 2px;
}

/* ==========================================================================
   소개 섹션
   ========================================================================== */
.about {
    background-color: #f8f9fa;
}

.about h2 {
    color: #2c3e50 !important;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2열 그리드 */
    gap: 3rem;
    align-items: center;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #666;
    line-height: 1.8;
    word-break: keep-all; /* 단어 단위로 줄바꿈 */
    text-align: justify;
}

/* 첫 번째 문단 특별 처리 */
.about-text p:first-child {
    text-align: justify;
}

/* 이미지 플레이스홀더 (실제 이미지로 교체 가능) */
.placeholder-image {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    height: 300px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: 0 10px 30px rgba(74, 144, 226, 0.3);
    background-image: url('/image/dock2.png');
    background-size: cover;
    background-position: center;
}

/* ==========================================================================
   서비스 섹션
   ========================================================================== */
.services {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
}

.services h2 {
    color: #ffffff !important; /* 서비스 섹션도 흰색 강제 고정 */
}

.services h2::after {
    background: white;
}

/* 서비스 카드 그리드 */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* 반응형 그리드 */
    gap: 2rem;
}

/* 개별 서비스 카드 */
.service-card {
    background: rgba(255, 255, 255, 0.1); /* 반투명 배경 */
    padding: 2rem;
    border-radius: 15px;
    text-align: left; /* 왼쪽 정렬로 변경 */
    backdrop-filter: blur(10px); /* 블러 효과 */
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* 서비스 카드 호버 효과 */
.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: white;
    text-align: center; /* 제목만 중앙 정렬 유지 */
}

/* 서비스 설명 리스트 스타일 */
.service-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.5;
    word-break: keep-all; /* 단어 단위로 줄바꿈 */
}

.service-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #87ceeb;
    font-weight: bold;
    font-size: 1.2rem;
}

/* ==========================================================================
   연락처 섹션
   ========================================================================== */
.contact {
    background-color: #f8f9fa;
}

.contact h2 {
    color: #2c3e50 !important;
}

.contact-content {
    display: flex;
    justify-content: center;
    padding: 40px 0;
}

.contact-info {
    text-align: center;
    max-width: 500px;
    padding: 30px;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #333;
}

.contact-info p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: #666;
}

/* ==========================================================================
   푸터
   ========================================================================== */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

footer p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ==========================================================================
   반응형 디자인 (태블릿 및 모바일)
   ========================================================================== */

/* 태블릿 크기 (768px 이하) */
@media (max-width: 768px) {
    /* 햄버거 메뉴 표시 */
    .hamburger {
        display: flex;
    }
    
    /* 데스크톱 언어 선택기 숨김 */
    .language-selector {
        display: none;
    }
    
    /* 모바일용 언어 선택 표시 */
    .mobile-language {
        display: block !important;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.3);
    }
    
    .mobile-language select {
        background: rgba(255, 255, 255, 0.1);
        color: white;
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 5px;
        padding: 10px 15px;
        font-size: 1rem;
        cursor: pointer;
        width: 200px;
        text-align: center;
    }
    
    .mobile-language select:focus {
        outline: none;
        background: rgba(255, 255, 255, 0.2);
        box-shadow: 0 0 10px rgba(135, 206, 235, 0.5);
    }
    
    .mobile-language option {
        background: #1e3c72;
        color: white;
    }
    
    /* 모바일 메뉴 스타일 */
    .nav-menu {
        position: fixed;
        top: 80px;
        right: -100%; /* 화면 밖에 숨김 */
        width: 100%;
        height: calc(100vh - 80px);
        background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 2rem;
        transition: right 0.3s ease; /* 슬라이드 애니메이션 */
    }
    
    /* 메뉴 활성화 시 */
    .nav-menu.active {
        right: 0; /* 화면으로 슬라이드 인 */
    }
    
    .nav-menu li {
        margin: 1rem 0;
    }
    
    .nav-menu a {
        font-size: 1.2rem;
    }
    
    /* 모바일에서 히어로 섹션 이미지 중앙 정렬 */
    .hero {
        background-position: center center; /* 모바일에서 중앙 정렬 */
    }
    
    /* 히어로 섹션 텍스트 크기 조정 */
    .hero h2 {
        font-size: 2rem;
    }
    
    /* 그리드를 1열로 변경 */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    /* 섹션 패딩 축소 */
    section {
        padding: 50px 0;
    }
    
    section h2 {
        font-size: 2rem;
    }
}

/* 모바일 크기 (480px 이하) */
@media (max-width: 480px) {
    /* 헤더 패딩 축소 */
    header {
        padding: 0.8rem 0;
    }
    
    nav {
        padding: 0 15px;
    }
    
    /* 로고 크기 축소 */
    .logo h1 {
        font-size: 1.4rem;
    }
    
    /* 언어 선택기 더 작게 */
    .language-selector {
        margin-left: 0.5rem;
    }
    
    .language-selector select {
        font-size: 0.8rem;
        padding: 3px 6px;
    }
    
    /* 모바일 메뉴 위치 조정 */
    .nav-menu {
        top: 70px;
        height: calc(100vh - 70px);
    }
    
    main {
        margin-top: 60px;
    }
    
    /* 히어로 섹션 모바일 최적화 */
    .hero {
        padding: 60px 0;
        min-height: 50vh; /* 모바일에서 높이 조정 */
        /* 모바일에서 배경 이미지 강제 적용 */
        background-attachment: scroll !important;
        background-position: center center !important; /* 모바일에서 강제로 중앙 정렬 */
        -webkit-background-size: cover;
        -moz-background-size: cover;
        -o-background-size: cover;
        background-size: cover;
        /* iOS Safari에서 배경 이미지 버그 해결 */
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }
    
    /* 모바일에서 히어로 콘텐츠 정렬 */
    .hero-content {
        text-align: center;
        align-items: center;
        padding: 60px 20px 0 20px; /* 위쪽 패딩 40px 추가 */
        min-height: auto;
    }
    
    /* 모바일에서 장식 효과 완전 제거 */
    .hero::before {
        display: none !important;
    }
    
    .hero h2 {
        font-size: 1.8rem;
        line-height: 1.3;
        word-break: keep-all; /* 단어 단위로 줄바뀜 */
        text-align: center; /* 모바일에서 중앙 정렬 */
        margin-bottom: 1rem;
    }
    
    .hero p {
        font-size: 1rem;
        text-align: center; /* 모바일에서 중앙 정렬 */
        word-break: keep-all;
        line-height: 1.5;
    }
    
    /* 컨테이너 패딩 축소 */
    .container {
        padding: 0 15px;
    }
}