/* 기본 */
body {
  margin: 0;
  font-family: 'Pretendard', sans-serif;
  background: black;
  color: white;
  font-weight: 400;
  letter-spacing: -0.3px;
}
html {
  scroll-behavior: smooth;
}
/* 헤더 */
header {
  position: fixed;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 25px;
  transition: all 0.3s ease;
  background: transparent;
  z-index: 100;
}

header.scrolled {
  background: rgba(0, 0, 0, 0.9);
  padding: 15px;
}

.logo {
  position: absolute;
  left: 30px;
  font-weight: bold;
}

nav a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  margin: 0 15px;
  position: relative;
  transition: 0.3s;
}
nav a.active {
  color: white;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0%;
  height: 2px;
  background: white;
  transition: 0.3s;
}

nav a.active::after {
  width: 100%;
}
/* 히어로 */
.hero {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background: black;
    padding-top: 180px;

}

.hero-img {
  max-width: 100%;
  height: auto;
}

.overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.overlay h1 {
  font-size: 60px;
  font-weight: 700;
  letter-spacing: 2px;
}

/* 공통 섹션 */
section {
  padding: 100px 20px;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
  scroll-margin-top: 80px;
}

/* ===== 타임라인 ===== */
.timeline {
  position: relative;
  margin: 50px auto;
  padding-left: 20px;
  text-align: left;
  flex: 1;
  max-width: 500px;
  margin-left: 20px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 0;
  width: 2px;
  height: 100%;
  background: white;
}

.timeline-item {
  position: relative;
  margin-bottom: 30px;
  padding-left: 30px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 5px;
  width: 10px;
  height: 10px;
  background: white;
  border-radius: 50%;
}

.timeline-date {
  font-size: 14px;
  color: gray;
  margin-bottom: 5px;
}

.timeline-content {
  font-size: 18px;
}

/* 갤러리 */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
   scroll-padding-left: 15px;
}

.grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  cursor: pointer;
  transition: 0.3s;
   flex: 0 0 75%;
}

.grid img:hover {
  transform: scale(1.05);
  opacity: 0.8;
}

/* 라이트박스 */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: none;
  justify-content: center;
  align-items: center;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
}

/* SNS */
.sns {
  margin-top: 50px;
}

.sns a {
  color: white;
  font-size: 28px;
  margin: 0 15px;
  transition: 0.3s;
}

.sns a:hover {
  color: gray;
}

/* 반응형 */
@media (max-width: 768px) {

  /* 🔥 1. 전체 여백 줄이기 */
  section {
    padding: 60px 15px;
  }

  /* 🔥 2. 헤더 정리 */
  header {
    padding: 12px 15px;
  }

  .logo {
    left: 15px;
    font-size: 14px;
  }

  nav a {
    margin: 0 8px;
    font-size: 13px;
  }

  /* 🔥 3. 메인 타이틀 */
  .overlay h1 {
    font-size: 28px;
    letter-spacing: 1px;
  }

  /* 🔥 4. 갤러리 */
   .grid {
    display: flex;
    overflow-x: auto;
    gap: 12px;

    padding: 0 20px 10px;

    scroll-snap-type: x mandatory;
    scroll-padding-left: 20px; /* 👉 추가 (중앙 정렬) */
  }

  .grid img {
    flex: 0 0 60% !important;  /* 👉 여기 60으로 변경 */
    max-width: 60%;            /* 👉 이거 추가 (확실히 먹게) */
    aspect-ratio: 1 / 1;

    border-radius: 10px;
    scroll-snap-align: center;
  }


  /* 스크롤바 제거 */
  .grid::-webkit-scrollbar {
    display: none;
  }

  /* 🔥 5. 타임라인 + 국가대표 구조 변경 */
  .career-wrapper {
    flex-direction: column;
    gap: 30px;
  }

  .timeline {
    padding-left: 15px;
    max-width: 100%;
  }

  .timeline::before {
    left: 6px;
  }

  .timeline-item {
    padding-left: 20px;
  }

  .timeline-item::before {
    left: -4px;
  }

  .timeline-date {
    font-size: 12px;
  }

  .timeline-content {
    font-size: 15px;
  }

  /* 🔥 6. 국가대표 카드 */
  .national {
    width: 100%;
    max-width: none;
    text-align: center;
    padding: 20px;
  }

  .national h3 {
    font-size: 18px;
  }

  .national p {
    font-size: 14px;
  }

  .video-grid {
    display: flex !important;   /* 👉 핵심 */
    overflow-x: auto !important;
    gap: 16px;

    padding: 0 20px 10px;

    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .video-card {
    flex: 0 0 90% !important;   /* 👉 핵심 */
    scroll-snap-align: center;
  }

  .video-grid::-webkit-scrollbar {
    display: none;
  }

  .video-card img {
    width: 100%;
    height: auto;
    display: block;
  }

}

/* 2컬럼 구조 */
.career-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 60px;
  max-width: 900px;
  margin: 0 auto;
}

/* 오른쪽 박스 */
.national {
  flex: 1;
  max-width: 300px;
  text-align: left;
  background: rgba(255,255,255,0.03);
  padding: 25px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

.national h3 {
  margin-bottom: 15px;
  font-size: 20px;
}

.national p {
  font-size: 16px;
  color: gray;
}

#gallery {
  min-height: 50vh;
}

.grid::-webkit-scrollbar {
  display: none;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* 카드 */
.video-card {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border-radius: 12px;
    text-decoration: none;
  color: inherit;
}

.video-card img {
  width: 100%;
  display: block;
  transition: 0.4s;
}

/* 호버 효과 */
.video-card:hover img {
  transform: scale(1.05);
  opacity: 0.8;
}

/* 플레이 버튼 */
.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.play-button::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 18px;
  border-style: solid;
  border-width: 12px 0 12px 18px;
  border-color: transparent transparent transparent white;
}