﻿/* animation.css */

/* 아래에서 위로 올라오는 효과 */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-up.active {
  opacity: 1;
  transform: translateY(0);
}

/* 왼쪽에서 오른쪽으로 이동하는 효과 */
.fade-right {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-right.active {
  opacity: 1;
  transform: translateX(0);
}

/* 오른쪽에서 왼쪽으로 이동하는 효과 */
.fade-left {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-left.active {
  opacity: 1;
  transform: translateX(0);
}


/* infinite carousel (horizontal) */
.main-esg-box-viewport {
  overflow: hidden;
  width: 65%;
  min-width: 300px;
  max-width: 1000px;
  position: relative;
  margin: 0 auto;
}

.main-esg-box-wrap {
  display: flex;
  gap: 20px;
  will-change: transform;
}

.main-esg-box {
  min-width: 300px;
  flex-shrink: 0;
}

/* 반복 애니메이션 */
@keyframes slide-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* infinite carousel (vertical) */
.main-activities-viewport {
  height: 600px;
  overflow: hidden;
  position: relative;
}

.main-activities-track {
  display: flex;
  flex-direction: column;
  animation: scroll-up 20s linear infinite;
}

.main-activities-text {
  padding: 5px 0;
}

/* 위로 슬라이딩 */
@keyframes scroll-up {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-50%);
  }
}

/* 이미지 카드 hover 효과 */
.main-product-wrap a {
  position: relative;
  display: inline-block;
  text-align: center;
  overflow: hidden;
}

.main-product-wrap a img {
  transition: transform 0.3s ease;
  display: block;
  width: 100%;
}

/* 이미지 확대 효과 */
.main-product-wrap a:hover img {
  transform: scale(1.05); /* 약간 확대 */
}

/* 텍스트 기본 숨김 + 위치 조정 */
.main-product-wrap a span {
  position: absolute;
  color: #fff;
  opacity: 0.5;
  transition: opacity 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
}

/* hover 시 텍스트 보이기 */
.main-product-wrap a:hover span {
  opacity: 1;
}

/* vision expand */
.vision-point-view.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: expandFade 0.3s ease forwards;
}

@keyframes expandFade {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.vision-point-view .close {
  position: absolute;
  top: 20px;
  right: 20px;
}

.vision-point-box.expanded {
  width: 100%;
  height: auto;
  max-width: 1100px;
  background-size: cover !important;
  z-index: 5;
  padding: 60px 40px;
  transition: all 0.4s ease;
}

.vision-point-box.expanded .title,
.vision-point-box.expanded .text {
  text-align: center;
  width: 80%;
}

.vision-point-box.expanded .vision-detail {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  text-align: left;
  margin-top: 30px;
  font-size: 1.25rem;
  line-height: 1.8;
  padding: 0 20px;
}

.vision-detail {
  display: none;
  color: white;
}

.vision-point-box .show-detail-button {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 20px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}
.vision-point-box .show-detail-button:hover {
  background: rgba(255, 255, 255, 0.4);
}