/**
 * 세이피안 홈페이지 - 본문 섹션 1~8
 *
 * ⚠ 규칙 순서를 함부로 바꾸지 말 것.
 *   `.mobile-only { display:none }` 과 `.circle-wrapper { display:flex }` 는
 *   특정도가 같아서 **나중에 온 쪽이 이긴다**. 원본(위젯 1 → 2 → 3)의 순서를
 *   그대로 옮겨 놓은 것이라, 섹션 8 의 모바일 원형 슬라이더가 여기에 달려 있다.
 */

/* ===================================================================
 * 1. Hero
 * =================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url('https://safeean.club/wordpress/main/img/main_bg_v2.png') no-repeat center center / cover;
  background-size: cover;
  z-index: -1;
  animation: kenburns-top 10s ease-out 1 forwards;
}

@keyframes kenburns-top {
  0% {
    transform: scale(1) translateY(0);
    transform-origin: 50% 16%;
  }

  100% {
    transform: scale(1.25) translateY(-15px);
    transform-origin: top;
  }
}

.mobile-only {
  display: none;
}

.scroll-down {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  cursor: pointer;
  animation: bounce 2s infinite;
  width: 1.75rem;
  height: 3.65rem;
  background-image: url('https://safeean.club/wordpress/main/img/scrolldown.png');
  background-size: contain;
  background-repeat: no-repeat;
}

@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 8px); }
}

/* ===================================================================
 * 2. Features
 * =================================================================== */
.features {
  position: relative;
  background: url('https://safeean.club/wordpress/main/img/BG_gradient.png') no-repeat center center / cover;
}

.feature-items {
  width: 30%;
  display: flex;
  flex-direction: column;
  align-content: center;
  justify-content: center;
  padding-top: 56px;
}

.feature-desc {
  background-color: rgba(13, 77, 39, 0.35);
  border-radius: 99px;
  box-shadow: inset 0 6px 10px rgba(0, 0, 0, 0.15);
  width: 100%;
  padding: 15px 0;
  margin-bottom: 17px;
}

/* ===================================================================
 * 3. 카드 그리드
 * =================================================================== */
.section3 {
  width: 80%;
  margin: 0 auto;
  padding: 5% 0;
}

.safeean-grid-wrapper {
  position: relative;
  width: 100%;
  max-width: 1052px;
  aspect-ratio: 1052 / 669;
  margin: 0 auto;
}

.safeean-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: auto;
  gap: 20px;
}

.card {
  background-color: #3DB54B;
  color: white;
  border-radius: 20px;
  padding: 20px 0 20px 20px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  align-items: start;
}

.card:hover {
  transform: translateY(-5px);
}

.card-lg {
  gap: 10px;
  padding-top: 0px;
  padding-bottom: 30px;
}

.card-care {
  grid-column: 2;
  grid-row: 1 / span 2;
  padding-top: 20%;
  background: url('https://safeean.club/wordpress/main/img/main3_2.png') no-repeat center center / cover;
}

.card-start {
  grid-column: 1;
  grid-row: 2 / span 2;
  background: url('https://safeean.club/wordpress/main/img/main3_1.png') no-repeat center center / cover;
}

.card-end {
  grid-column: 2;
  grid-row: 3;
  padding-top: 20%;
  background: url('https://safeean.club/wordpress/main/img/main_3_3.png') no-repeat center center / cover;
}

.tag {
  font-size: clamp(12px, 0.875vw, 14px);
  background: white;
  color: #3DB54B;
  padding: 2px 10px;
  border-radius: 99px;
  display: inline-block;
}

.card-safeean {
  display: flex;
  width: 35%;
}

/* ===================================================================
 * 4. 스크롤 섹션
 * =================================================================== */
.scroll-section {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.foreground-content {
  background: url('https://safeean.club/wordpress/main/img/main_4_background.png') no-repeat center center / contain;
  width: 90%;
  max-width: 1324px;
  max-height: 2826px;
  margin: 5% auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 140px;
  text-align: center;
  color: white;
  aspect-ratio: 375 / 2282;
}

.feature-group {
  width: 100%;
  margin: 0 auto;
}

.feature-content-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.feature-sub {
  margin: 15px 0 23px 0;
  flex-direction: column;
}

.box img {
  width: clamp(300px, 40vw, 642px);
  aspect-ratio: 642 / 300;
  object-fit: cover;
}

.sec4-img {
  padding-top: 10%;
}

.sec4-img img {
  width: 22.161vw;
  max-width: 354.57px;
}

/* ===================================================================
 * 1~4 모바일
 * =================================================================== */
@media (max-width: 768px) {
  /* 1. Hero */
  .hero::before {
    animation: none;
    background-position: 30%;
  }

  .hero .txt-box {
    padding-top: 39px;
  }

  .mobile-title-logo {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  /* 2. Features */
  .features {
    background-position: 20%;
  }

  .feature-items {
    width: 100%;
    max-width: 80.080vw;
  }

  .feature-desc {
    padding: 10px 0;
  }

  /* 3. 카드 그리드 */
  .section3 {
    width: 85%;
    justify-content: space-between;
  }

  .card-safeean {
    width: 100%;
  }

  .card-safeean img {
    width: 34.667vw;
  }

  .tag {
    font-size: 2.613vw;
  }

  .safeean-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .card {
    grid-column: auto;
    grid-row: auto;
    height: auto;
  }

  .card-lg {
    padding-top: 35px;
    padding-bottom: 25px;
  }

  .card-care {
    aspect-ratio: 315 / 153;
    background: url('https://safeean.club/wordpress/main/img/main3_2_m.png') no-repeat center center / cover;
  }

  .card-start {
    aspect-ratio: 315 / 232;
    background: url('https://safeean.club/wordpress/main/img/main3_1_m.png') no-repeat center center / cover;
  }

  .card-end {
    aspect-ratio: 315 / 153;
  }

  .m-sec3-txt {
    display: none;
  }

  /* 4. 스크롤 섹션 */
  .scroll-section {
    padding: 120px 0;
  }

  .foreground-content {
    background: url('https://safeean.club/wordpress/main/img/main_4_background_m.png') no-repeat center center / contain;
    width: 100%;
    padding: 50% 0;
    gap: 110px;
    aspect-ratio: 375 / 2282;
  }

  .sec4-img img {
    width: 52.949vw;
    max-width: 198.56px;
  }

  .feature-group {
    width: 85%;
  }

  .feature-content-group {
    flex-direction: column-reverse;
  }

  .feature-sub {
    margin-bottom: 0;
  }

  .sec4-mb {
    margin-bottom: 20px;
  }

  .box img {
    aspect-ratio: 315 / 240;
  }
}

@media (max-width: 1024px) {
  .scroll-down {
    background-image: url('https://safeean.club/wordpress/main/img/scrollw.png');
    width: 71px;
    height: 30px;
  }
}

/* ===================================================================
 * 5. 파트너사 슬라이더
 * =================================================================== */
.slider-area {
  background-color: white;
  margin: 130px 0px;
  overflow: hidden;
}

.customer-slider {
  margin: 0;
}

.customer-slider.reverse {
  /* slick 의 RTL 처리 문제를 피하려고 방향을 직접 뒤집는다 */
  direction: rtl;
  min-height: 0px;
  margin-top: 0;
  padding-top: 0;
}

.slick-slide {
  /* 슬라이드 사이 여백 제거 */
  margin: 0 !important;
  padding: 0 !important;
}

.customer-slider .slick-slide {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.customer-slider img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: 60px;
  width: auto;
  object-fit: contain;
}

.slider-title {
  color: #000;
  text-align: center;
  padding: 30px 0 10px;
  font-weight: bold;
}

.slider-sub-title {
  color: #000;
  text-align: center;
  padding: 20px 0 10px;
}

/* ===================================================================
 * 6·7·8. 스마트한 케어 / 건강한 질문 / 식탁 습관의 변화
 * =================================================================== */
.smart-care {
  width: 80%;
  margin: 0 auto;
  padding: 5% 0;
}

/* --- 6. 스마트한 케어 --- */
.samll-button {
  display: flex;
  justify-content: center;
  align-content: center;
  background: white;
  border-radius: 999px;
  padding: 15px 30px;
  font-weight: bold;
  color: black;
  font-size: 1.25rem;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.08);
  margin: 22px 0 55px 0;
  gap: 10px;
}

.logo-shape1 {
  height: 1em !important;
}

.care-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px 20px;
  max-width: 1052px;
  margin: 0 auto;
}

.care-box {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  width: 32.25rem;
  height: 15.75rem;
  aspect-ratio: 516 / 252;
  border-radius: 20px;
  padding: 0 0 20px 20px;
  text-align: left;
  transition: transform 0.3s ease;
}

.care-1 { background: url('https://safeean.club/wordpress/main/img/main6_a.png') no-repeat center center / cover; }
.care-2 { background: url('https://safeean.club/wordpress/main/img/main6_b.png') no-repeat center center / cover; }
.care-3 { background: url('https://safeean.club/wordpress/main/img/main6_c.png') no-repeat center center / cover; }
.care-4 { background: url('https://safeean.club/wordpress/main/img/main_6_4.png') no-repeat center center / cover; }

.care-box:hover {
  transform: translateY(-5px);
}

.content-group {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  margin-top: auto;
  gap: 10px;
}

.badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: white;
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  z-index: 1;
}

.bc-badge { background-color: #3DB54B; }
.ai-badge { background-color: #4093D7; }

.small-txt {
  font-size: 1rem;
  font-weight: bold;
}

/* --- 7. 건강한 질문 --- */
.title-padding {
  padding-top: 200px;
}

.faq-row {
  width: 85%;
  max-width: 1052px;
  display: flex;
  justify-content: center;
  gap: 35px;
  margin-bottom: 21px;
}

.faq-tag {
  padding: 10px 20px;
  border: 1px solid #3DB54B;
  border-radius: 999px;
  font-size: clamp(16px, 1.25vw, 20px);
  color: #3DB54B;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
}

/* --- 8. 식탁 습관의 변화 --- */
.pill-container {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 1052px;
  width: 100%;
  height: 356px;
  margin: 0 auto 34px;
}

.pill-box {
  flex: 1;
  height: 100%;
}

.pill-box.left {
  background: url('https://safeean.club/wordpress/main/img/main7_1.png') no-repeat center center / cover;
  border-top-left-radius: 999px;
  border-bottom-left-radius: 999px;
}

.pill-box.middle {
  background: url('https://safeean.club/wordpress/main/img/main_7_2.png') no-repeat center center / cover;
}

.pill-box.right {
  background: url('https://safeean.club/wordpress/main/img/main7_3.png') no-repeat center center / cover;
  border-top-right-radius: 999px;
  border-bottom-right-radius: 999px;
}

.description {
  /* 21px */
  font-size: clamp(16px, 1.3125vw, 21px);
  font-weight: bold;
  margin: 0 0 100px 0;
}

/* ⚠ `.mobile-only { display:none }`(위 1번 섹션) 보다 **뒤에** 있어야
   모바일에서 원형 슬라이더가 보인다. 순서를 바꾸면 사라진다. */
.circle-wrapper {
  width: 95%;
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.circle-frame {
  width: 315px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid #cfcfcf;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.circle-slider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===================================================================
 * 6·7·8 모바일
 * =================================================================== */
@media (max-width: 768px) {
  .care-grid {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: auto;
    margin-top: 10px;
    grid-template-columns: 1fr;
  }

  .care-box {
    width: 84vw;
    height: 41.024vw;
    aspect-ratio: 315 / 153.84;
  }

  .samll-button {
    padding: 10px 21px;
    margin-bottom: 27px;
    gap: 7px;
  }

  .faq-row {
    width: 95%;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
  }

  .faq-tag {
    width: 100%;
    font-size: 14px;
  }
}

@media screen and (max-width: 768px) {
  .pc-only {
    display: none !important;
  }

  .description {
    /* 16px */
    font-size: clamp(14px, 4.1vw, 16px);
    font-weight: normal;
  }
}

@media screen and (min-width: 769px) {
  .mobile-only {
    display: none !important;
  }
}
