:root {
    --bg-dark: #1a1d2c;
    --text-light: #f5f5f5;
    --text-secondary: #a0a0b0;
    --accent-color: #87CEEB;
    /* Sky Blue for peace */
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Pretendard', sans-serif;
}

/* Base Styles */
html {
    scroll-behavior: auto;
    /* GSAP ScrollTrigger works best with auto */
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: var(--font-sans);
    margin: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Header */
.peace-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 40px;
    z-index: 100;
    box-sizing: border-box;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    opacity: 0.8;
    transition: opacity 0.3s, transform 0.3s;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.back-link:hover {
    opacity: 1;
    transform: translateX(-5px);
}

/* --- GSAP Scroll Animation Structure --- */
main {
    height: 300vh;
    /* Provides the scrollable track for the animation */
    position: relative;
    background-color: #000;
    /* Fallback background */
}

.pin-container {
    height: 100vh;
    width: 100vw;
    position: relative;
    overflow: hidden;
}

.hero-section,
.content-section {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* --- Layer 1: Hero Section --- */
.hero-section {
    z-index: 2;
    /* Sits on top initially */
    display: flex;
    justify-content: center;
    align-items: flex-start;
    /* ✅ 콘텐츠를 위쪽부터 정렬하도록 변경 */
    padding-top: 30vh;
    /* ✅ 상단 여백 추가 (값을 조절하여 위치 변경) */
    box-sizing: border-box;
    /* ✅ 패딩을 높이에 포함시켜 레이아웃 유지 */
}

.hero-section video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;

    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: var(--text-light);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.hero-content h1 {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 8vw, 6rem);
    margin: 0 0 0.5rem;
    font-weight: 700;
}

.hero-content p {
    font-size: clamp(1rem, 3vw, 1.5rem);
    margin: 0;
    font-weight: 400;
    opacity: 0.9;
}


/* --- Layer 2: Content Section --- */
.content-section {
    z-index: 1;
    /* Sits below the hero initially */
    display: flex;
    justify-content: center;
    align-items: center;
}

.content-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/assets/images/facility/peacebg.jpg');
    background-size: cover;
    background-position: center;
}

.story-content-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 3rem;
    align-items: center;
    max-width: 1100px;
    width: 90%;
}

.text-block {
    flex: 1;
    color: var(--text-light);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.text-block h2 {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    line-height: 1.3;
    margin: 0 0 1.5rem 0;
    color: var(--accent-color);
}

.text-block p {
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    margin: 0 0 1rem 0;
}

.image-block {
    flex: 0 0 40%;
    max-width: 300px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    aspect-ratio: 3 / 4;
}

.image-block img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* NEW: Footer */
.facility-footer {
    padding: 1rem 1rem;
    background-color: var(--bg-dark);
    color: var(--text-secondary);
    border-top: 2px solid;
    border-image: linear-gradient(to right, transparent, var(--accent-color), transparent) 1;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.copyright {
    font-size: 0.8rem;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .peace-header {
        padding: 15px 20px;
    }

    .hero-content h1 {
        /* ✅ 모바일에서 h1 폰트 크기 축소 */
        font-size: clamp(1.8rem, 8vw, 3rem);
    }

    .story-content-wrapper {
        flex-direction: column;
        /* 텍스트만 표시되므로 gap 제거 */
        gap: 0;
    }

    .text-block {
        /* ✅ 모바일에서 텍스트를 좌측 정렬로 변경하여 줄바꿈 개선 */
        text-align: center;
    }

    .text-block h2 {
        /* ✅ 모바일에서 h2 폰트 크기 조정 */
        font-size: 1.7rem;
    }

    .text-block p {
        /* ✅ 모바일에서 p 폰트 크기 및 줄 간격 조정 */
        font-size: 0.8rem;
        line-height: 1.2;
        text-align: left;
    }

    .image-block {
        /* ✅ 모바일 뷰에서 이미지 블록 숨김 */
        display: none;
    }
}