/**
 * 세이피안 홈페이지 - 푸터
 *
 * ⚠ 이 파일 하나만 붙여도 어디서든 같은 모양이 나와야 한다.
 *   홈페이지에서는 base.css 의 전역 리셋(`*{margin:0;box-sizing:border-box}`)과
 *   `html body{line-height:1.3}` · `.safeean-home{overflow-wrap:break-word}` 를
 *   물려받아 맞아떨어졌지만, 키즈 페이지(kids/)는 그 전역 리셋이 절대좌표 캔버스를
 *   깨뜨려 base.css 를 뺐다. 게다가 푸터는 `#kids-page` **바깥**에 그려져
 *   kids.css 의 `#kids-page *{box-sizing}` 마저 못 받는다.
 *   그 결과 같은 푸터가 사이트마다 달라졌다(실측 2026-09-16:
 *   PC 748 → 762px · 모바일 900 → 939px · e-mail 줄바꿈 안 됨).
 *   그래서 필요한 상속값을 여기서 **직접** 정한다. 값은 홈페이지에서 물려받던 것과 같아
 *   홈페이지 모양은 그대로다.
 */

.safeean-footer,
.safeean-footer * {
  box-sizing: border-box;
}

.safeean-footer h4,
.safeean-footer p {
  margin: 0;
}

/* 폭 90%·가운데 정렬은 원본 설정을 그대로 옮긴 것이다.
   Elementor 쪽에 컨테이너 boxed_width 90%(PC·모바일) + 위젯 _element_custom_width 90%
   _flex_align_self:center 로 박혀 있었다. 빼면 푸터가 화면 끝까지 붙는다. */
.safeean-footer {
  width: 90%;
  margin: 0 auto;
  background-color: #41B64A;
  color: #fff;
  padding: 40px 20px;
  border-radius: 40px;
  font-family: 'SUIT-Regular', sans-serif;
  line-height: 1.3;
  overflow-wrap: break-word;
}

.footer-container {
  max-width: 90%;
  margin: 0 auto;
}

.footer-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.footer-title {
  font-size: 2.5vh;
  font-weight: bold;
  color: #f3f3f3;
}

.footer-title img.footerlogo {
  display: block;
  width: clamp(70px, 10%, 200px);
  max-height: 40px;
  height: auto;
}

.footer-social {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.footer-social a {
  display: inline-block;
}

.footer-social img {
  width: 32px;
  height: auto;
  filter: brightness(0) invert(1);
}

.footer-divider {
  border: none;
  border-top: 1px solid #ccc;
  margin: 20px 0 30px !important;
  opacity: 0.5;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand-info {
  margin-right: 35%;
}

.footer-brand-info h4,
.footer-brand-info p {
  font-size: 14px;
  margin: 4px 0;
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 29% 29% 22% 20%;
  gap: 10px;
  margin: 0;
}

.footer-grid strong {
  font-weight: bold;
  font-size: 14px;
  display: block;
  margin-bottom: 6px;
  color: #fff;
}

.footer-grid p {
  font-size: 14px;
  line-height: 1.6;
  color: #fff;
  /* 원본에서는 본문이 `.entry-content` 안이라 Astra 의 `p{margin-bottom:1.6em}` 이
     여기까지 닿았다(14px × 1.6 = 22.4px). 이 템플릿은 그 바깥이라 안 닿는다.
     빼면 두 줄 모두 22.4px 씩 낮아져 푸터가 44px 짧아진다(실측).
     페이지 전체에서 <p> 는 푸터에만 8개 있고, 그중 .footer-brand-info p 는
     제 여백(4px)을 따로 갖고 있어 영향이 없다 — 실제 대상은 이 5칸뿐이다. */
  margin-bottom: 1.6em;
}

.footer-grid a,
.footer-brand-info a {
  color: #fff !important;
  text-decoration: none !important;
}

.footer-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  width: 100%;
  flex-wrap: nowrap;
}

.footer-bottom-bar .footer-logo-text {
  font-size: 8vh;
  font-weight: bold;
  color: #fff;
  line-height: 1;
}

.footer-bottom-bar small {
  font-size: 12px;
  color: #eee;
  margin-left: auto;
  padding-top: 120px;
}

/* ===== 반응형 ===== */
@media screen and (max-width: 1024px) {
  .safeean-footer {
    padding: 40px 16px 20px;
  }

  .footer-brand-info {
    margin-right: 0;
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-top {
    flex-direction: column;
    gap: 20px;
  }

  .footer-bottom-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .footer-bottom-bar .footer-logo-text {
    font-size: clamp(24px, 6vw, 32px);
  }

  /* ⚠ `.safeean-footer` 를 앞에 붙여 특정도를 (0,2,1) 로 올려 둔다.
     Elementor Canvas 페이지(키즈)에서는 `.elementor img{max-width:100%}` 가
     같은 특정도(0,1,1)로 **뒤에** 와서 max-width 만 뺏어갔다.
     그러면 로고가 88px → 115px 로 커지고 푸터가 14px 높아진다(실측). */
  .safeean-footer .footer-logo-text img {
    width: 50%;
    max-width: 300px;
    height: auto;
  }

  .footer-bottom-bar small {
    margin-left: 0 !important;
    text-align: left;
    padding-top: 0;
  }

  .footer-social img {
    width: 28px;
  }
}

@media screen and (max-width: 768px) {
  .safeean-footer .footer-logo-text img {
    width: 40%;
    max-width: 220px;
  }

  .footer-social img {
    width: 24px;
  }
}
