.main section {
  margin-bottom: 40px;
}
.center {
  text-align: center;
}
.main section h2{
  font-size: 5rem;
  margin-bottom: 50px;
  opacity: 0;
  transform: translateY(60px);
  color: var(--font_color);
  transition: opacity 0.5s, transform 0.5s;
}

@media (max-width:800px) {
  .main section h2 {
    font-size: 4rem;
  }
}


/* ---------- section01 */
  .main .section01 {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden; /* 중요: ::before 확대한 이미지 넘침 방지 */
  }
  
  /* 기존 배경 제거하고 가상요소에 배경 이동 */
  .main .section01::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url(../../img/main1.jpg);
    background-position: 100% 50%;
    background-repeat: no-repeat;
    background-size: cover;
    transform: scale(1.3); /* 처음엔 살짝 확대된 상태 */
    animation: zoomOutBg 1s ease-out forwards;
    z-index: 0;
  }
  
  /* 텍스트는 그대로 위에 떠 있음 */
  .main .section01 .main_text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    text-align: center;
    color: #fff;
    width: 80%;
    z-index: 1; /* 중요: 텍스트가 배경 위에 보이도록 */
  }
  
  .main .section01 .main_text h1 {
    font-size: 9.6rem;
    white-space: nowrap;
  }
  .main section .main_text p{
    font-size: 4rem;
    opacity: 0;
    transform: translateY(60px);
    color: white;
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 2.5s;
  }
  @keyframes fadeInUp {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* 애니메이션 정의 */
  @keyframes zoomOutBg {
    to {
      transform: scale(1);
    }
  }
  
/* .section01 .main_text h1 span{
    font-size: 9.6rem;
    color: var(--sub_color);
} */

  .main .section01 .main_text h1 span {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.35s cubic-bezier(0.21, 0.95, 0.46, 0.99) forwards;
    animation-play-state: paused; /* 처음엔 멈춘 상태 */
  }
  
  .main .section01 .main_text h1 span.start {
    animation-play-state: running; /* 이때 재생 */
  }
  
  @keyframes fadeInUp {
    from {
      transform: translateY(20px);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
  .main mark.highlight {
    background-color: transparent;  /* 형광펜 배경 제거 */
  }
  
  .main mark.highlight span {
    color: var(--sub_color);  /* SMART FARM에만 색상 적용 */
    font-weight: bold;
  }


  @media (max-width: 1000px) {
    .main .section01 .main_text h1 {
      font-size: 7rem;
    }
    .main section .main_text p{
      font-size: 3rem;
    }
  }
  @media (max-width: 720px) {
    .main .section01 .main_text h1 {
      font-size: 5.2rem;
    }
    .main section .main_text p{
      font-size: 2.2rem;
    }
  }
  @media (max-width: 540px) {
    .main .section01 .main_text h1 {
      font-size: 4.4rem;
    }
    .main section .main_text p{
      font-size: 1.8rem;
    }
  }
  @media (max-width: 400px) {
    .main .section01 .main_text h1 {
      font-size: 3.4rem;
    }
    .main section .main_text p{
      font-size: 1.8rem;
    }
  }


/* ---------- section02 */
.main .section02 {
  max-width: 1440px;
  width: 100%;
  height: 100%;
  margin: 160px auto 0;
}
.main .section02.on {
  opacity: 1;
  transform: none;
}


.main .section02 h2.on{
  opacity: 1;
  transform: none;
}
.main .section02 .article_wrap {
  width:100%;
  position: relative;
  display: flex;
  padding: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: translateY(60px);
  /* transition: background-image 0.5s ease; */
  transition: opacity 0.6s 0.2s, transform 0.6s 0.2s;  /* 0.4s delay */
  height: 700px;
  overflow: hidden;
}
.main .section02 .article_wrap.on {
  opacity: 1;
  transform: none;
}


.main .section02 .article_wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  background-image: var(--big-bg, none);
  background-position: center center;
  background-size: cover;
  transition: opacity 0.4s;
}

.main .section02 .article_wrap.reveal1::before,
.main .section02 .article_wrap.reveal2::before,
.main .section02 .article_wrap.reveal3::before {
  opacity: 1;
}
.main .section02 .article_wrap.reveal1 .article,
.main .section02 .article_wrap.reveal2 .article,
.main .section02 .article_wrap.reveal3 .article {
  background: transparent !important;
}

.main .section02 .article_wrap.reveal1 .article:not(.active) *,
.main .section02 .article_wrap.reveal2 .article:not(.active) *,
.main .section02 .article_wrap.reveal3 .article:not(.active) * {
  opacity: 0 !important;
  pointer-events: none;
  transition: opacity 0.3s;
}

/* ✅ active 카드(hover 중)만 텍스트 보임 (구체적인 우선순위!) */
.main .section02 .article_wrap.reveal1 .article.active *,
.main .section02 .article_wrap.reveal2 .article.active *,
.main .section02 .article_wrap.reveal3 .article.active * {
  opacity: 1 !important;
  pointer-events: auto;
  transition: opacity 0.3s;
}




/* 카드 개별 스타일 */
.main .article_wrap .article {
  min-width: 250px; /* 카드가 너무 작아지는 것 방지 */
  flex: 1 1 33.3%; /* 유연한 반응형 비율 */
  padding: 20px;
  background-color: rgba(0,0,0,0.3);
  color: #fff;
  cursor: pointer;
  transition: transform 0.3s, background 0.3s;
  position: relative;
  z-index: 2;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.main .article,
.main .article_wrap::before {
  background-position: center center;
  background-size: cover;
  border: 1px solid white;
}

/* hover 시 카드 살짝 튀어나오는 효과 */
/* .article_wrap .article:hover {
  transform: translateY(-5px);
} */

/* reveal1 상태에서 카드 배경 투명 */
.main .section02 .article_wrap.reveal1 .article {
  background: transparent !important;
}

.main .article h3 {
  margin-bottom: 30px;
  margin-left: 20px;
  font-size: 3rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.main .article p {
  font-size: 2rem;
  font-weight: 500;
  margin-bottom: 10px;
  margin-left: 20px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.main .section02 .article_wrap::before {
  z-index: 1;   /* 배경(아래) */
}
.main .article_wrap .article {
  z-index: 2;   /* 카드 내용(위) */
  position: relative;
}

@media screen and (max-width: 1440px) {
  .main .section02 .article_wrap {
    height: 54rem; /* 기존 700px → 540px 정도로 줄이기 */
  }

  .main .article_wrap .article {
    padding: 16px;
  }

  .main .article h3 {
    font-size: 2.4rem;
    margin-bottom: 20px;
  }

  .main .article p {
    font-size: 1.6rem;
    margin-bottom: 6px;
  }
}

@media (max-width:800px) {

  .main .section02 .article_wrap {
    flex-direction: column;
    height: 90rem;
  }

  .main .article_wrap .article {
    width: 100%;
    height: 30rem; /* 원래 비율 유지하되 필요시 auto 로 조정 가능 */
    background-size: cover; /* 유지 필요 */
    background-position: center;
  }
  /* ::before 배경도 비례 축소 */
  .main .section02 .article_wrap::before {
    background-size: cover;
    background-position: center;
  }
}


/* 섹션3_0 */
.main .section03_0 {
  max-width: 1440px;
  width: 100%;
  margin: 160px auto 0;
}

.main .section03_0.on {
  opacity: 1;
  transform: none;
}

.main .section03_0 h2 {
  width: 1440px;
  margin: 0 auto 0;
}

.main .section03_0 h2.on {
  opacity: 1;
  transform: none;
}

.main .section03_0 .products_wrap {
  position: relative;
  display: flex;
  padding: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.6s 0.2s, transform 0.6s 0.2s;
  height: 700px;
  overflow: hidden;
  margin-top: 60px;
}

.main .section03_0 .products_wrap article {
  width: 50%;
  position: relative;
  height: 700px;
  cursor: pointer;
  overflow: hidden;
}

.main .section03_0 .products_wrap article img {
  width: 100%;
  height: 700px;
  display: block;
  transition: transform 0.3s ease;
}

.main .section03_0 .products_wrap article .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 700px;
  background-color: rgba(0, 0, 0, 0.2);
  z-index: 2; 
  transition: 0.5s;
}

.main .section03_0 .products_wrap article:hover img {
  transform: scale(1.1);
}

.main .section03_0 .products_wrap article:hover .overlay {
  background-color: rgba(0, 0, 0, 0.3);
}

.main .section03_0 .products_wrap article .products_text {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
}

.main .section03_0 .products_wrap article .products_text h3 {
  font-size: 4.4rem;
  font-weight: 800;
  color: white;
  text-wrap: nowrap;
}

.main .section03_0 .products_wrap .products1 {
  /* 비어 있음 */
}

.main .section03_0 .products_wrap.on {
  opacity: 1;
  transform: none;
}

@media (max-width:1440px) {
  .main .section03_0 {
    margin: 160px auto 0;
    padding: 0 2rem;
  }
  .main .section03_0 .products_wrap {
    background-size: cover;
    background-position: center;
    flex-wrap: nowrap;
  }
  
  .main .section03_0 .products_wrap article {
    width: 50%;
    position: relative;
    height: 600px;
    cursor: pointer;
    overflow: hidden;
  }
}
@media (max-width:1000px) {
  .main .section03_0 {
    margin: 160px auto 0;
    padding: 0 2rem;
  }
  .main .section03_0 .products_wrap {
    padding: 0;
    background-size: cover;
    background-position: center;
    flex-wrap: wrap;
  }
  
  .main .section03_0 .products_wrap article {
    width: 100%;
    position: relative;
    height: 700px;
  }
}
@media (max-width:800px) {
  .main .section03_0 .products_wrap {
    margin-top: 60px;
    flex-wrap: wrap;
    height: 1000px;
  }
  
  .main .section03_0 .products_wrap article {
    width: 100%;
    position: relative;
    height: 500px;
    cursor: pointer;
    overflow: hidden;
  }
  .main .section03_0 .products_wrap article .products_text h3 {
    font-size: 3.4rem;
    font-weight: 800;
  }
}



/* 섹션3 */
.main .section03 {
  width: 100%;
  
  margin: 160px auto 0;
}
.main .section03.on {
  opacity: 1;
  transform: none;
}
.main .section03 h2{
  width: 1440px;
  margin: 0 auto 0;
}
.main .section03 h2.on{
  opacity: 1;
  transform: none;
}
.main .section03 .products_wrap {
  position: relative;
  display: flex;
  padding: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: translateY(60px);
  /* transition: background-image 0.5s ease; */
  transition: opacity 0.6s 0.2s, transform 0.6s 0.2s;  /* 0.4s delay */
  height: 700px;
  overflow: hidden;
  margin-top: 60px;
}
.main .section03 .products_wrap article {
  width: 20%;
  position: relative;
  height: 500px;
  cursor: pointer;
  overflow: hidden;
}
.main .section03 .products_wrap article img{
  width: 100%;
  height: 500px;
  display: block;
  transition: transform 0.3s ease;
}
.main .section03 .products_wrap article .overlay{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 500px;
  background-color: rgba(0, 0, 0, 0.2);
  z-index: 2; 
  transition: 0.5s;
}
.main .section03 .products_wrap article:hover img{
  transform: scale(1.1); /* 10% 확대 */
}
.main .section03 .products_wrap article:hover .overlay{
  background-color: rgba(0, 0, 0, 0.3);
}
.main .section03 .products_wrap article .products_text{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  z-index: 3;
}
.main .section03 .products_wrap article .products_text h3 {
  font-size: 3rem;
  font-weight: 800;
  color: white;
  text-wrap: nowrap;
}
.main .section03 .products_wrap .products1 {
  text-align: center;
}

.main .section03 .products_wrap.on {
  opacity: 1;
  transform: none;
}

@media (max-width:1440px) {
  .main .section03 {
    margin: 160px auto 80px;
    padding: 0 2rem;
  }
  .main .section03 .products_wrap {
    height: auto;
    flex-wrap: wrap;
  }
  .main .section03 .products_wrap article {
    width: 33.33%;
    position: relative;
    height: 500px;
    cursor: pointer;
    overflow: hidden;
  }
  .main .section03 .products_wrap article .products_text h3 {
    word-break: keep-all;
    text-wrap: wrap;
  }
}
@media (max-width:800px) {

  .main .section03 .products_wrap article {
    width: 50%;
    position: relative;
    height: 400px;
    cursor: pointer;
    overflow: hidden;
  }
}
@media (max-width:600px) {
  .main .section03 .products_wrap article {
    width: 100%;
    position: relative;
    height: 300px;
    cursor: pointer;
    overflow: hidden;
  }
}

/* 섹션4 */
.main .section04 {
  width: 1440px;
  height: 100%;
  margin: 160px auto 0;
}
.main .section04 h2.on{
  opacity: 1;
  transform: none;
}
.main .section04 .smart_wrap {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: translateY(60px);
  /* transition: background-image 0.5s ease; */
  transition: opacity 0.6s 0.2s, transform 0.6s 0.2s;  /* 0.4s delay */
  margin-top: 60px;
}
.main .section04 .smart_wrap.on {
  opacity: 1;
  transform: none;
}
.main .section04 .smart_wrap .smart_img {
  position: relative;
}
.main .section04 .smart_wrap .smart_img .ellipse{
  width: 5rem;
  height: 5rem;
  background-color: var(--primary-900);
  border-radius: 50%;
  border: 1px solid white;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  font-weight: 600;
  transition: 0.5s;
  cursor: pointer;
}
.main .section04 .smart_wrap .smart_img .ellipse:hover{
  transform: scale(1.5);
}
.main .section04 .smart_wrap .smart_img .ps01{
  position: absolute;
  top: 342px;
  left: 412px;
  z-index: 99;
}
.main .section04 .smart_wrap .smart_img .smart_description {
  position: absolute;
  top: 342px;
  left: 412px;
  transform: scale(0);
  z-index: 100;
  padding: 2rem;
  background-color: white;
  border-radius: 1rem;
  transition: 0.5s;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}
.main .section04 .smart_wrap .smart_img .ellipse.active + .smart_description {
  transform: scale(2);
}
.smart_description .close_btn {
  position: absolute;
  top: 2px;
  right: 4px;
  background: none;
  border: none;
  font-size: 2rem;
  color: #333;
  cursor: pointer;
}

@media (max-width: 1200px) {
  .section02 h2,
  .section03 h2,
  .section03_0 h2,
  .section02 .article_wrap,
  .section03 .products_wrap,
  .section03_0 .products_wrap,
  .section04 h2,
  .section04 .smart_wrap {
    opacity: 1 !important;
    transform: none !important;
  }
}