/**
 * 🏠 메인 페이지 전용 스타일
 * 
 * index.html에서만 사용되는 스타일들을 정의합니다.
 * 히어로 섹션, 서비스 소개, 스크롤 스냅 등 메인 페이지의 고유한 레이아웃을 담당합니다.
 */

/* ========================================
   스크롤 및 레이아웃 설정
   ======================================== */

/* 스크롤 스냅 설정 - proximity로 부드러운 스냅 효과 */
html {
    scroll-snap-type: y proximity;
    scroll-padding-top: 80px; /* 헤더 높이만큼 여백 */
}

/* 메인 페이지는 헤더 높이만큼 패딩 추가 */
body {
    padding-top: 80px;
}

/* ========================================
   헤더 컨테이너 (고정 위치)
   ======================================== */
   
#header-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    height: 80px;
    transition: height 0.3s ease;
    pointer-events: none; /* 클릭 이벤트는 통과 */
}

#header-container > * {
    pointer-events: auto; /* 헤더 내부 요소는 클릭 가능 */
}

/* ========================================
   공통 섹션 스타일
   ======================================== */
   
.content-section {
    min-height: 100vh;
    scroll-snap-align: start;
    position: relative;
    padding: 0;
    margin: 0;
}

/* 섹션 배경색으로 시각적 구분 */
.content-section:nth-child(odd) {
    background-color: #FFFFFF;
}

.content-section:nth-child(even) {
    background-color: var(--bg-light);
}

/* ========================================
   히어로 섹션
   ======================================== */
   
.hero-section {
    height: calc(100vh - 80px); /* 헤더 높이 제외 */
    margin-top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    scroll-snap-align: start;
    position: relative;
    overflow: hidden;
}

/* 히어로 배경 이미지 - 매우 흐리게 */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.2;
    filter: blur(2px);
    z-index: -1;
}

/* 히어로 배경 오버레이 - 추가 흐림 효과 */
/* .hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(248, 250, 252, 0.85) 0%, 
        rgba(224, 242, 254, 0.8) 100%);
    z-index: 0;
} */

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
    position: relative;
    z-index: 2;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-medium);
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease 0.2s forwards;
    position: relative;
    z-index: 2;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease 0.4s forwards;
    position: relative;
    z-index: 2;
}

/* 스크롤 인디케이터 */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: fadeIn 1s ease 1s forwards, bounce 2s infinite 1s;
    z-index: 2;
}

.scroll-indicator::after {
    content: '↓';
    font-size: 2rem;
    color: var(--primary);
}

/* ========================================
   에코걸 3D 갤러리 섹션
   ======================================== */
   
.ecogirl-section {
    background: var(--bg-white);
    height: 100vh;
    padding: 0;
    display: flex;
    position: relative;
}

.ecogirl-3d-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.ecogirl-gallery-link {
    position: absolute;
    top: 6rem;
    left: 2rem;
    z-index: 10;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid rgba(14, 165, 233, 0.5);
    border-radius: var(--radius-full);
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.5s forwards;
}

.ecogirl-gallery-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ========================================
   서비스 소개 섹션
   ======================================== */
   
.services-intro {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* 배경 이미지 컨테이너 + 뽀샤시 효과 */
.services-intro-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: brightness(1.1) saturate(1.1);
    transform: scale(1.02);
    z-index: 0;
}

/* 오버레이 효과로 텍스트 가독성 확보 */
.services-intro-overlay {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    padding: 4rem 3rem;
    border-radius: var(--radius-lg);
    max-width: 1200px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.services-intro-title {
    font-size: 4rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.services-intro-subtitle {
    font-size: 1.75rem;
    color: #FFFFFF;
    max-width: 900px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease 0.2s forwards;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* ========================================
   서비스 iframe 섹션
   ======================================== */
   
.service-iframe-section {
    height: 100vh;
    width: 100%;
    display: flex;
}

.service-iframe-section iframe {
    width: 100%;
    height: 100%;
    border: none;
    overflow: hidden;
}

/* ========================================
   개별 서비스 섹션 (iframe 없는 경우)
   ======================================== */
   
.service-section {
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 0;
}

.service-section:nth-child(odd) {
    background: var(--bg-white);
}

.service-section:nth-child(even) {
    background: var(--bg-light);
}

.service-content {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* 짝수 섹션은 이미지와 텍스트 순서 반대로 */
.service-section:nth-child(even) .service-content {
    direction: rtl;
}

.service-section:nth-child(even) .service-info {
    direction: ltr;
}

/* 서비스 이미지 */
.service-image {
    width: 100%;
    height: 600px;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.service-badge {
    position: absolute;
    top: 2rem;
    left: 2rem;
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 600;
}

/* 서비스 정보 */
.service-info {
    padding: 2rem;
}

.service-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.service-desc {
    font-size: 1.25rem;
    color: var(--text-medium);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.service-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.service-features li {
    font-size: 1.125rem;
    color: var(--text-medium);
    margin-bottom: 1rem;
    padding-left: 2rem;
    position: relative;
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
    font-size: 1.25rem;
}

/* ========================================
   모바일 스크롤 힌트
   ======================================== */
   
.mobile-scroll-hint {
    display: none;
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--text-medium);
    font-size: 0.875rem;
    opacity: 0.8;
}

.mobile-scroll-hint::after {
    content: '↓';
    display: block;
    font-size: 1.5rem;
    margin-top: 5px;
}

/* 푸터 조정 */
footer {
    scroll-snap-align: start;
}

/* ========================================
   반응형 디자인
   ======================================== */
   
@media (max-width: 1200px) {
    .services-intro-title {
        font-size: 3rem;
    }
    
    .services-intro-subtitle {
        font-size: 1.5rem;
    }
    
    .services-intro-overlay {
        padding: 3rem 2rem;
    }
}

@media (max-width: 1024px) {
    .services-intro-subtitle {
        white-space: normal;
        font-size: 1.5rem;
    }
    
    .service-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .service-section:nth-child(even) .service-content {
        direction: ltr;
    }
    
    .service-image {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        padding: 0 2rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .services-intro-title {
        font-size: 2rem;
    }
    
    .services-intro-subtitle {
        font-size: 1.25rem;
    }
    
    .services-intro-overlay {
        padding: 2rem 1.5rem;
        width: 95%;
    }
    
    .service-title {
        font-size: 2.5rem;
    }
    
    .service-desc {
        font-size: 1.125rem;
    }
    
    .service-image {
        height: 300px;
    }
    
    /* 모바일에서 스크롤 힌트 표시 */
    .mobile-scroll-hint {
        display: block;
    }
}

/* 모바일에서 스크롤 스냅 비활성화 (터치 디바이스) */
@media (hover: none) and (pointer: coarse) {
    html {
        scroll-snap-type: none;
    }
}

/* ========================================
   초기 상태 설정 (애니메이션 전)
   ======================================== */
   
.services-intro-title,
.services-intro-subtitle {
    opacity: 0;
}

/* ========================================
   에코걸 리스트 링크 추가 스타일
   ======================================== */

.ecogirl-list-link {
    position: absolute;
    top: 6rem;
    right: 2rem;
    z-index: 10;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid rgba(14, 165, 233, 0.5);
    border-radius: var(--radius-full);
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.5s forwards;
}

.ecogirl-list-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ========================================
   메인 페이지 푸터 조정
   ======================================== */

/* 메인 페이지에서만 푸터 위 여백 제거 */
.footer {
    margin-top: 0 !important;
}
