/* 🔹 브라우저 기본 여백 제거 + 높이 고정 */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  scroll-behavior: smooth;
  box-sizing: border-box;
  background-color: #000;
}

html {
  scroll-behavior: smooth;
}

/* 🔹 스크롤 스냅용 컨테이너 */
body {
  margin: 0;
  padding: 0;
  height: 100%;
  scroll-snap-type: y mandatory;  /* 🔥 수직 스냅 강제 적용 */
  overflow-y: scroll;            /* 세로 스크롤 허용 */
}

/*****가운데 숫자가 나타났다 사라지는 애니메이션 */
#section-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    font-family: "Inter", sans-serif; /* 🔥 Inter 서체 적용 */
    font-size: 12rem; /* 🔥 숫자 크게 */
    font-weight: 900;
    color: #ffffff;
    opacity: 0;
    pointer-events: none;
    text-shadow:
        0 0 20px rgba(0, 0, 0, 0.8),   /* 기본 그림자 */
        0 0 40px rgba(255, 255, 255, 0.6), /* Glow 효과 */
        0 0 80px rgba(255, 255, 255, 0.4); /* 확산 Glow */
    transition: opacity 0.4s ease, transform 0.4s ease;
    z-index: 9999;
}

#section-indicator.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.5); /* 등장 시 살짝 확대 */
}

/* 🔥 1200px 미만일 때 숫자 크기 축소 */
@media (max-width: 1200px) {
    #section-indicator {
        font-size: 8rem; /* 📌 8rem로 자동 축소 */
    }
}




/* --- 공통 섹션 스타일 --- */
.section {
  scroll-snap-align: start;       /* 🔥 섹션의 시작 위치를 뷰포트 상단에 고정 */
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  background-color: #000;
  position: relative;
  opacity: 0;                /* 🔹 처음엔 보이지 않음 */
  transform: translateY(50px); /* 🔹 아래에서 살짝 올라오게 */
  transition: opacity 1.2s ease, transform 1.2s ease;
}

/* 🔹 활성화된 섹션 (뷰포트 안에 들어온 상태) */
.section.visible {
  opacity: 1;
  transform: translateY(0);
}

#section4 {
  background: 
      linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.7)), 
      url('./rd.jpg') center/cover no-repeat;
}

/*************************************
#section3 { background: #000; }
#section4 { background: #111; }
#section5 { background: radial-gradient(#222, #000); }
#section6 { background: url('./img/bg6.jpg') center/cover no-repeat; }
***************************************/


.container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  
}

.top-left {
  position: absolute;
  top: 3vh;
  left: 3vw;
  z-index: 1000;
}

.logo {
  width: 10vw;
  height: auto;
  min-width: 150px;
  cursor: pointer;
}

/* ✅ 1200px 미만일 때  */
@media (max-width: 1200px) {
  .logo {
    width: 150px;
  height: auto;
 
  }
}



/* 🔹 상단 우측 텍스트 */
.top-right {
  position: absolute;
  top: 4vh;
  right: 4vw;
  font-size: clamp(1rem, 2vw, 3rem);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  z-index: 100;
  text-align: right;       /* ✔ 우측 정렬 */
}

.top-right h1 {
  font-size: clamp(1.8rem, 2.5vw, 6rem);
  color: #fff;
  line-height: 1.1;        /* ✔ 행간 줄이기 (기본은 1.3~1.5) */
}

/* 🔥 2048px 이상에서 2배 크기 */
@media (min-width: 2048px) {
  .top-right {
    font-size: calc(clamp(1rem, 2vw, 3rem) * 1.6);
  }
  .top-right h1 {
    font-size: calc(clamp(1.8rem, 2.5vw, 6rem) * 1.6);
  }
}


.main-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start; /* 캡션은 왼쪽 */
  height: 100vh;
  overflow: hidden;
}

/* 🔹 이미지 (화면 우측 정렬, 전체 높이 맞춤) */
.main-image {
  position: absolute;
  top: 0;
  right: 0; /* ✅ 우측 정렬 */
  width: 100%;
  height: 100vh;
  overflow: hidden;
  z-index: 1;
}

.main-image img {
  position: absolute;
  top: 50%; /* ✅ 수직 중앙정렬 */
  right: 0; /* ✅ 우측 기준 */
  transform: translateY(-50%) translateX(200px); /* 처음엔 오른쪽에서 등장 */
  width: auto;
  height: 100%; /* ✅ 위아래 다 보이게 */
  object-fit: contain; /* ✅ 잘리지 않음 */
  opacity: 0;
  transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}

/* ✅ 1200px 미만일 때 이미지 어둡게 */
@media (max-width: 1200px) {
  .main-image img {
    filter: brightness(0.3); /* 🔹 0~1 사이 값 (0은 완전 어둡고 1은 원본 밝기) */
    transition: filter 0.5s ease;
    left: 0; /* ✅ 우측 기준 */
  }
}

/* 🔹 화면에 보일 때 효과 적용 */
.main-image img.visible {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* 🔹 캡션 (이미지 위로 떠있게) */
.caption {
  position: relative;
  z-index: 2;
  flex: 1;
  padding-left: 8vw;
  background-color: transparent;
}

.caption h2 {
  font-size: clamp(1.2rem, 2.5vw, 3rem);
  margin-bottom: 1vh;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  white-space: nowrap;
  border-right: 0.15em solid #ffa94d;
  width: 0;
  animation:
    typing 3s steps(30, end) forwards,
    blink 0.6s step-end infinite,
    colorChange 0.6s ease-in forwards 3.2s,
    cursorFadeOut 0.5s ease-in forwards 3.6s;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}
@keyframes blink {
  50% { border-color: transparent; }
}
@keyframes colorChange {
  from { color: #fff; }
  to { color: #ffc400; }
}
@keyframes cursorFadeOut {
  to { border-color: transparent; }
}

.caption p {
  color: #ffffff;
  line-height: 1.6;
  margin-top: 1vh;
}

.caption h4 {
  font-family: 'Poppins', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: clamp(0.8rem, 1vw, 1rem);
  line-height: 1.6;
  color: #ddd;
  font-weight: 300;
  margin-top: 3vh;
  max-width: 600px;
  opacity: 0.85;

  /* 🔹 우측 여백 설정 */
  margin-right: 6vw;  /* 화면 크기에 따라 자동으로 여백 조정 */
  text-align: left;   /* 문장은 좌측 정렬 유지 */
}

/* 🔹 모바일(좁은 화면)에서 여백을 더 넓게 */
@media (max-width: 1024px) {
  .caption h4 {
    margin-right: 10vw; /* 더 넓은 여백 확보 */
  }
}



/* 🔹 썸네일 리스트 */
.video-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 1vw;
  margin-top: 4vh;
  justify-content: flex-start;
  z-index: 200;
}

.video-thumb {
  position: relative; /* 아이콘 위치를 위해 필요 */
  width: 14vw;
  min-width: 160px;
  aspect-ratio: 16 / 9;
  cursor: pointer;
  overflow: hidden;
  border-radius: 10px;
  transition: transform 0.4s ease, box-shadow 0.3s ease, border 0.3s ease;
  opacity: 100%;
}

/* 썸네일 이미지 */
.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

/* 마우스 오버 시 */
.video-thumb:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);   
}

.video-thumb:hover img {
  transform: scale(1.05);
  opacity: 0.3;
}

/* ▶️ 아이콘 추가 */
.video-thumb::after {
  content: "▶";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  font-size: 2.2rem;
  color: rgba(255, 0, 115, 0.9);
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none; /* 클릭 방해 방지 */
}

/* 마우스 오버 시 아이콘 나타나기 */
.video-thumb:hover::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}


/* 🔹 반응형 - 가로폭 줄어들면 2개씩 */
@media (max-width: 1200px) {
  .video-gallery {
    justify-content: flex-start;
  }
  .video-thumb {
    width: 30%;
    min-width: 150px;
  }
}

/* 🔹 영상 모달 */
.video-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.video-modal.active {
  display: flex;
  animation: fadeIn 0.4s ease;
}

.video-wrapper {
  position: relative;
  width: 80%;
  max-width: 960px;
  aspect-ratio: 16/9;
}

.video-wrapper iframe {
  width: 100%;
  height: 100%;
  border-radius: 12px;
}

.video-wrapper iframe,
.video-wrapper video {
  width: 100%;
  height: 100%;
  border: none;
  display: none;
  border-radius: 12px;
}


/* 닫기 버튼 */
.close-btn {
  position: absolute;
  top: -40px;
  right: -10px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  transition: transform 0.3s;
}

.close-btn:hover {
  transform: scale(1.2);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 📱 반응형 */
@media (max-width: 768px) {
  .video-thumb {
    width: calc(50% - 0.5rem);
  }
}







/* 🔹 하단 텍스트 */
.bottom-left {
  position: absolute;
  bottom: 20px;
  left: 30px;
  color: #5f5f5f;
  font-size: 0.7rem;
  z-index: 100;
}

/* ✅ 1200px 미만일 때  */
@media (max-width: 1200px) {
  .bottom-left {
    display: none;
  }
}


.bottom-right {
  position: absolute;
  bottom: 20px;
  right: 30px;
  color: #cacaca;
  font-size: 0.7rem;
   z-index: 100;
}

/* 🔹 인디케이터 */
.indicator {
  position: fixed;
  top: 0;
  right: 0;
  width: 20px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background-color: #111;
  z-index: 10;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #555;
  cursor: pointer;
  transition: background-color 0.3s;
}

.dot.active {
  background-color: #ffa94d;
}

/* 🔹 화면 폭이 1600px 이상일 때만 적용 */
@media (min-width: 1600px) {
  .indicator::before {
    content: "";
    position: absolute;
    left: -10vw;
    top: 50%;
    transform: translateY(-50%);
    width: 8vw;
    height: 1px;
    background-color: #ffffff;
    opacity: 0.5;
    z-index: 500;

    /* 🔥 부드러운 '파도 흐름' 이징 적용 */
    animation: smoothWave 2.0s cubic-bezier(0.42, 0.0, 0.58, 1) infinite alternate;
  }
}

/* 🔹 양 끝을 왕복하는 최소 keyframe → 움직임 품질 최상 */
@keyframes smoothWave {
  0% {
    transform: translateY(-50%) translateX(-12px);
    opacity: 0.2;
  }
  100% {
    transform: translateY(-50%) translateX(12px);
    opacity: 0.85;
  }
}

.mini-gallery2 {
    display: flex;
    flex-wrap: wrap; /* 줄바꿈 허용 */
    gap: 12px;
    margin-top: 20px;
    padding-bottom: 10px;
}

/* 이미지 크기 지정: 한 줄에 최대 3개 */
.mini-gallery2 img {
    flex: 1 1 calc(33.333% - 12px); /* 3개 기준 */
    max-width: calc(33.333% - 12px);
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

/* 가로폭이 충분히 넓을 때는 원래 비율 유지 */
@media (min-width: 1280px) {
    .mini-gallery2 img {
        flex: 0 0 auto; /* 원래처럼 가로로 나열 */
        width: auto;
    }
}

.mini-gallery3 {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    padding-bottom: 10px;
    cursor: pointer; /* 🔹 마우스 포인터 */
}



/* 이미지 + 오버레이를 감싸는 컨테이너 */
.mini-item {
    position: relative;      /* 오버레이 위치기반 */
    flex: 1 1 calc(33.333% - 12px);
    max-height: 160px;
    width: auto;
    overflow: hidden;
    border-radius: 4px;
}

/* 이미지 스타일 */
.mini-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ffffff;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* 오버레이(기본 숨김) */
.mini-item .overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 3, 142, 0.85); /* 파란색 배경 */
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;               /* 처음에는 안 보임 */
    transition: opacity 0.35s ease;
    font-size: 0.9rem;
    text-align: center;
}

/* hover 시 이미지 희미하게 + 오버레이 등장 */
.mini-item:hover img {
    opacity: 0.2;
}

.mini-item:hover .overlay {
    opacity: 1;
}

/* 넓은 화면 */
@media (min-width: 1280px) {
    .mini-item {
        flex: 0 0 auto;
        height: 220px;
    }
}

/* 좁은 화면: 1줄 최대 2개 */
@media (max-width: 1024px) {
    .mini-item {
        flex: 1 1 calc(50% - 12px);
        height: 90px;
    }
}

#section5 {
    position: relative;
    overflow: hidden; /* 🔹 영상이 넘칠 때 잘라냄 */
}

#section5 .bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* 🔹 화면 가득 채우기 */
    z-index: -1;       /* 🔹 콘텐츠 뒤로 */
    opacity: 0.3;        /* 필요하면 밝기 ↓ 조절 가능 */
}

#section5 .container {
    position: relative;
    z-index: 2; /* 🔹 영상 위에 콘텐츠 표시 */
}

#section6 {
    position: relative;
    overflow: hidden; /* 배경 영상 잘림 방지 */
}

#section6 .bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;       /* 전체 화면 꽉 채우기 */
    transform: translate(-50%, -50%);
    z-index: -1;             /* 모든 콘텐츠 뒤로 */
    opacity: 0.55;           /* 필요하면 조정 가능 */
}

#section7 {
    position: relative;
    overflow: hidden; /* 배경 영상 잘림 방지 */
}

#section7 .bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;       /* 전체 화면 꽉 채우기 */
    transform: translate(-50%, -50%);
    z-index: -1;             /* 모든 콘텐츠 뒤로 */
    opacity: 0.55;           /* 필요하면 조정 가능 */
}

#section8 {
    position: relative;
    overflow: hidden; /* 배경 영상 잘림 방지 */
}

#section8 .bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;       /* 전체 화면 꽉 채우기 */
    transform: translate(-50%, -50%);
    z-index: -1;             /* 모든 콘텐츠 뒤로 */
    opacity: 0.55;           /* 필요하면 조정 가능 */
}

/* 🔹 모든 콘텐츠 */
#section9 .container {
  position: relative;
  z-index: 200;               /* 영상 위로 */
  width: 100%;
  height: 100%;

  display: flex;
  justify-content: center;    /* 수평 중앙 */
  align-items: center;        /* 수직 중앙 */
}

.image-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;               /* 이미지 간격 */

}

/* 🔹 section9 전체 영역을 flex 중앙정렬 */
#section9 {
  position: relative;
  height: 100vh;
  overflow: hidden;

  display: flex;
  justify-content: center;  /* 수평 중앙 */
  align-items: center;       /* 수직 중앙 */
}

#section9 .bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;       /* 전체 화면 꽉 채우기 */
    transform: translate(-50%, -50%);
    z-index: -1;             /* 모든 콘텐츠 뒤로 */
    opacity: 0.35;           /* 필요하면 조정 가능 */
}


.img-box {
  width: 260px;
  height: 400px;
  background-size: cover;
  background-position: center;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.35s ease;
  z-index: 700;
}

/* 🔹 마우스 오버 시 확대 */
.img-box:hover {
  transform: scale(1.06);
}


/* 🔹 section9 전체 영역을 flex 중앙정렬 */
#section10 {
  position: relative;
  height: 100vh;
  overflow: hidden;

  display: flex;
  justify-content: center;  /* 수평 중앙 */
  align-items: center;       /* 수직 중앙 */
}

#section10 .bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;       /* 전체 화면 꽉 채우기 */
    transform: translate(-50%, -50%);
    z-index: -1;             /* 모든 콘텐츠 뒤로 */
    opacity: 0.65;           /* 필요하면 조정 가능 */
}

/* 🔽 화면 폭이 1024px 이하일 때 세로 정렬 */
@media (max-width: 1024px) {
  .image-row {
    flex-direction: column;   /* 가로 → 세로 */
    gap: 20px;                /* 세로 간격 */
  }

  .img-box {
    width: 70vw;              /* 화면에 맞게 자연스럽게 */
    max-width: 320px;
    height: 300px;
  }
}

/* 🔽 화면 폭이 600px 이하 (모바일) */
@media (max-width: 600px) {
  .img-box {
    width: 85vw;               /* 더 크게 */
    height: 200px;
  }
}







