/* styles.css */

/* 초기화 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
  background: #fff;
}

/* 메인 컨테이너 */
.main-container {
  width: 95vw;
  max-width: 1800px;
  margin: 0 auto;
  position: relative;
  padding-top: 120px;
}

/* 텍스트 영역 */
.text-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0px;
  padding: 10px 130px;
  word-break: normal;
  word-wrap: break-word;
  height: 400px;
  background: #0a0a0a;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  margin-bottom: 50px;
}

/* 별 배경 */
.stars-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.star {
  position: absolute;
  background: white;
  border-radius: 50%;
  animation: twinkle 3s ease-in-out infinite;
}

.star.small {
  width: 2px;
  height: 2px;
  animation-duration: 2s;
}

.star.medium {
  width: 3px;
  height: 3px;
  animation-duration: 3s;
}

.star.large {
  width: 4px;
  height: 4px;
  animation-duration: 4s;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* 텍스트 콘텐츠 */
.text-content {
  position: relative;
  z-index: 1;
  color: white;
}

.subtitle {
  font-size: 18px;
  font-weight: 300;
  margin-bottom: 10px;
  opacity: 0.8;
  letter-spacing: 1px;
}

.subtitle::after {
  content: ' ↗';
  font-size: 16px;
  opacity: 0.6;
}

.title {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.2;
}

/* 탭 섹션 */
.tab-section {
  width: 95vw;
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 20px;
}

.tab-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  color: #333;
}

.section-title::after {
  content: '↗';
  margin-left: 5px;
  font-size: 20px;
  opacity: 0.6;
}

/* 탭 컨테이너 */
.tab-container {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  padding: 4px;
  position: relative;
  overflow: hidden;
  margin-bottom: 60px;
}

.tab-wrapper {
  display: flex;
  flex: 1;
  position: relative;
  align-items: end;
  padding: 0px 12px;
  border-bottom: 2px solid #5a9fd4;
  --item-1st: rgb(10, 55, 151);
  --item-2nd: rgb(22, 73, 184);
  --item-3rd: rgb(34, 91, 217);
  --item-4th: rgb(46, 109, 250);
  --item-5th: rgb(58, 127, 255);
  --item-6th: rgb(70, 145, 255);
}

.tab-item {
  flex: 1;
  /* padding: 14px 12px; */
  max-width:300px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  cursor: pointer;
  border: none;
  background: none;
  font-size: 22px;
  font-weight: 500;
  color: #000;
  transition: all 0.3s ease;
  position: relative;
  z-index: 0;
  box-sizing: Border-box;
  white-space: nowrap;
  /* max-height:50px; */
  color: #000;
  border-radius: 8px 8px 0 0;
  /* box-shadow: 8px 0px 0px rgba(0, 0, 0, 0.05); */
}
.tab-item:not(:first-child) {
  margin-left: -12px;
}
.tab-item:hover {
  color: #333;
}

.tab-item.active {
  /* color: white; */
  font-weight: 600;
  border-bottom: 8px solid var(--border-color);
  /* height:110%;
    max-height:unset;
    height:60px; */
}

.tab-item:nth-child(1) {
  --border-color: var(--item-1st);

  /* background: var(--item-1st); */
  z-index: 7;
}
.tab-item:nth-child(2) {
  --border-color: var(--item-2nd);
  /* background: var(--item-2nd); */
  z-index: 6;
}
.tab-item:nth-child(3) {
  --border-color: var(--item-3rd);
  /* background: var(--item-3rd); */
  z-index: 5;
}
.tab-item:nth-child(4) {
  --border-color: var(--item-4th);
  /* background: var(--item-4th); */
  z-index: 4;
}
.tab-item:nth-child(5) {
  --border-color: var(--item-5th);
  /* background: var(--item-5th); */
  z-index: 3;
}
.tab-item:nth-child(6) {
  --border-color: var(--item-6th);
  /* background: var(--item-6th); */
  z-index: 2;
}

/* 탭 인디케이터 - 더 다이나믹한 애니메이션 */
.tab-indicator {
  position: absolute;
  height: calc(100% - 8px);
  background: var(--item-1st);
  border-radius: 8px;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  top: 4px;
  z-index: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* .tab-wrapper:has(.tab-item:nth-child(2).active) .tab-indicator {
    background: var(--item-2nd);
}
.tab-wrapper:has(.tab-item:nth-child(3).active) .tab-indicator {
    background: var(--item-3rd);
}
.tab-wrapper:has(.tab-item:nth-child(4).active) .tab-indicator {
    background: var(--item-4th);
}
.tab-wrapper:has(.tab-item:nth-child(5).active) .tab-indicator {
    background: var(--item-5th);
}
.tab-wrapper:has(.tab-item:nth-child(6).active) .tab-indicator {
    background: var(--item-6th);
} */

.search-box {
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-left: 1px solid #e0e0e0;
  margin-left: 10px;
}

.search-input {
  border: none;
  outline: none;
  font-size: 14px;
  padding: 8px 12px;
  width: 200px;
  background: transparent;
}

.search-input::placeholder {
  color: #999;
}

.search-icon {
  color: #666;
  font-size: 18px;
  cursor: pointer;
  transition: color 0.3s ease;
}

.search-icon:hover {
  color: #222;
}

/* 콘텐츠 영역 */
.content-area {
  width: 95vw;
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 20px;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.content-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin-bottom: 40px;
}

/* 좌측 고정 박스 */
.fixed-box {
  flex: 0 0 400px;
  position: sticky;
  top: 30vh;
  background: #fff;
  border-radius: 20px;
  padding: 40px;
  color: #000;
  box-shadow: 0 10px 30px rgba(26, 84, 144, 0.3);
  min-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.fixed-box h3 {
  border-left: 4px solid #5a9fd4;
  font-size: 34.5px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-left: 16px;
}

.fixed-box-icon {
  width: 100%;
  flex: 1;
  background: rgba(77, 48, 48, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 30px 0;
  overflow: hidden;
  position: relative; /* absolute 포지셔닝을 위해 필요 */
}

.fixed-box-icon video {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  height: 100%;
  min-width: 100%; /* 최소 너비 보장 */
  object-fit: cover;
}
/* 우측 콘텐츠 */
.scrollable-content {
  flex: 1;
  background: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.content-item {
  margin-bottom: 60px;
  padding-bottom: 60px;
  border-bottom: 1px solid #f0f0f0;
}

.content-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.content-number {
  font-size: 64px;
  font-weight: 800;
  color: #5a9fd4;
  margin-bottom: 20px;
  height: 52px;
  overflow: hidden;
  border-bottom: 1px solid #144368;
}

.content-title {
  font-size: 28px;
  font-weight: 700;
  color: #333;
  margin-bottom: 20px;
}

.feature-box {
 background: #fff;
 border-radius: 12px;
 /* padding: 24px; */
 margin-bottom: 20px;
 box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
 transition: all 0.3s ease;
 overflow: hidden;
 border: 1px solid;
 word-break: keep-all; 
 word-wrap: break-word; 
}

.feature-box:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.feature-box h4 {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
  background-color: #12426e;
  padding: 12px 12px 10px;
  display: flex;
  border-radius: 0 0 4px 4px;
  align-items: center;
  gap: 8px;
  display: none;
}

.feature-list {
  list-style: none;
  padding: 12px;
}

.feature-list li img {
  width: 100%;
}

.feature-list li {
  padding: 8px 0;
  color: #555;
  font-size: 17.5px;
  position: relative;
  padding-left: 20px;
}

.link-swap {
  display: flex;
  gap: 20px;
}
.link-swap a {
  padding: 12px 24px;
  border-radius: 12px;
  background-color: #fff;
  color: #12426e;
  text-decoration: none;
  font-weight: 500;
  font-size: 22px;
  border: 1px solid #12426e;
}
.link-swap a.active {
  background-color: #12426e;
  color: #fff;
}

/* .feature-list li:before {
    content: '•';
    position: absolute;
    left: 0;
    color: #999;
    font-weight: bold;
} */

.text-section.daily-bg {
  background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/bg/daily-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.text-section.clearance-bg {
  background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/bg/clearance-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.text-section.deliver-bg {
  background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/bg/deliver-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.text-section.deliver-korea-bg {
  background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/bg/deliver-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.tab-header:has(.link-swap[style*="display: none"]):has(.section-title[style*="display: block"]) {
    display: none;
}

/* 반응형 */
@media (max-width: 1200px) {
  .fixed-box {
    flex: 0 0 350px;
  }

  .tab-item {
    padding: 14px 18px;
    font-size: 14px;
  }
}

@media (max-width: 968px) {
  .content-layout {
    flex-direction: column;
  }

  .fixed-box {
    position: relative;
    flex: 1;
    width: 100%;
  }

  .tab-container {
    flex-wrap: wrap;
  }

  .tab-wrapper {
    width: 100%;
    overflow-x: auto;
  }

  .search-box {
    width: 100%;
    border-left: none;
    border-top: 1px solid #e0e0e0;
    margin-left: 0;
    margin-top: 10px;
    padding: 10px 20px;
  }
}

@media (max-width: 768px) {
  .text-section {
    padding: 10px 40px;
  }

  .subtitle {
    font-size: 16px;
  }

  .title {
    font-size: 36px;
  }
}

@media (max-width: 480px) {
  .text-section {
    padding: 10px 20px;
  }

  .title {
    font-size: 28px;
  }

  .scrollable-content {
    padding: 20px;
  }

  .content-number {
    font-size: 36px;
  }

  .content-title {
    font-size: 20px;
  }
}

/* 하단 섹션 */
.bottom-section {
  width: 95vw;
  max-width: 1800px;
  margin: 100px auto 50px;
  position: relative;
}
