/* =====================================================================
   common.css — 헤더 / 모바일 메뉴 / 푸터 공통 스타일
   main_page.css 에서 헤더·푸터 관련 규칙만 추출 (PC + 반응형 포함)

   사용법: 각 페이지 HTML에서 페이지 전용 CSS보다 "먼저" 불러올 것
     <link rel="stylesheet" href="../Vimeo-common/common.css?v=1" />
     <link rel="stylesheet" href="main_page.css?v=8" />

   ※ 헤더/푸터 수정은 이 파일에서만 할 것 (페이지 CSS에 복사 금지)
   ===================================================================== */


/* ---------- 0. 헤더/푸터가 의존하는 최소 기본값 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
a {
  text-decoration: none;
  color: inherit;
}
ul,
p {
  margin: 0;
  padding: 0;
}
li {
  list-style: none;
}


/* =====================================================================
   1. 헤더 (PC 기본)
   ===================================================================== */
.Header {
  height: 70px;
  width: 100%;
  padding: 0 24px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid #ccc;
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
  background: #fff;
  color: #111; /* 어두운 페이지(body 글자색이 흰색)에서도 헤더 글자가 보이도록 */
}

.header-lastImg {
  justify-self: start;
  display: flex;
  align-items: center;
  height: 100%;
}

.Header img {
  width: 110px;
  height: auto;
  max-height: 55px;
  object-fit: contain;
  display: block;
  cursor: pointer;
}

.header-ul {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 2rem;
  font-size: 1.2rem;
  font-weight: 500;
  color: #111;
  grid-column: 2;
}

.header-ul li {
  display: flex;
}

.header-ul a {
  padding: 6px 12px;
  border-radius: 999px;
  transition: background 0.2s ease;
  white-space: nowrap;
}
.header-ul a:hover {
  background: #f0f2f5;
  cursor: pointer;
}

.header-phone {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
  grid-column: 3;
}

.header-phone p {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #111;
  white-space: nowrap;
}

.header-call {
  display: block;
  text-align: center;
  border-right: 1px solid black;
  padding-right: 10px;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  padding-left: 10px;
}
.header-cta:hover {
  opacity: 0.9;
}

.header-cta-img {
  width: 130px;
  height: 50px;
  object-fit: contain;
  display: block;
}

/* 햄버거 버튼 (PC에서는 숨김) */
.menu-btn {
  display: none;
  border: none;
  background: transparent;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 0;
  justify-self: center;
  grid-column: 2;
}
.menu-btn:hover {
  background: #f0f2f5;
}
.menu-btn .bar {
  width: 22px;
  height: 2px;
  background: #111;
  border-radius: 999px;
  display: block;
}


/* =====================================================================
   2. 모바일 메뉴 (햄버거 눌렀을 때 나오는 패널)
   ===================================================================== */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}
.mobile-nav.show {
  display: block;
}
.mobile-nav-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
.mobile-nav-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(300px, 85vw);
  background: #fff;
  padding: 16px 14px;
  color: #111; /* '메뉴' 제목이 페이지 body 색(흰색)을 따라가 안 보이는 문제 방지 */
  transform: translateX(100%);
  transition: transform 0.25s ease;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.2);
}
.mobile-nav.show .mobile-nav-panel {
  transform: translateX(0);
}
.mobile-nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5e7eb;
}
.mobile-nav-close {
  border: none;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  color: #111;
}
.mobile-nav-close:hover {
  background: #f3f4f6;
}
.mobile-nav-list {
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-nav-list a {
  display: block;
  padding: 12px 10px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
}
.mobile-nav-list a:hover {
  background: #f0f2f5;
}


/* =====================================================================
   3. 푸터 (PC 기본)
   ===================================================================== */
.last {
  display: flex;
  width: 100%;
  justify-content: space-around;
  padding: 75px 20px;
  background-color: #f5f5f5;
  color: #111; /* 어두운 페이지에서도 푸터 글자가 보이도록 */
  box-sizing: border-box;
  align-items: center;
  font-size: 14px;
  margin-top: auto;
  flex-shrink: 0;
}

.footer-pc {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  gap: 40px;
}

.last img {
  width: 230px;
}

.last-font {
  line-height: 20px;
}

.last-link {
  display: flex;
  flex-wrap: wrap;
  font-size: 15px;
  margin-bottom: 0.5rem;
  gap: 2px;
}
.last-link li {
  padding: 0 10px;
  border-right: 1px solid #ccc;
}
.last-link li:first-child {
  padding-left: 0;
}
.last-link li:last-child {
  border-right: none;
}
.last-link a {
  color: #111;
  text-decoration: none;
  font-size: 14px;
}
.last-link a:hover {
  text-decoration: underline;
}

.info-wrap {
  display: flex;
  gap: 43px;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-top: 10px;
}
.info-wrap ul {
  display: flex;
  flex-direction: column;
  gap: 5px;
  line-height: 1.6;
  margin-bottom: 10px;
  color: #111;
  font-size: 13px;
}
.info-wrap ul:first-child {
  margin-top: 0;
}

.last-p {
  margin-top: 15px;
  font-size: 14px;
  color: #111;
}

/* 일부 페이지에 전역 `li { color: white }` 가 있어도 푸터 li 는 어둡게 유지 */
.last li {
  color: #111;
}

/* 모바일용 푸터는 PC에서 숨김 */
.footer-inner {
  display: none;
}

/* 태블릿(769~900px) : 푸터가 넘치지 않도록 살짝 촘촘하게 */
@media (min-width: 769px) and (max-width: 900px) {
  .last img {
    width: 170px;
  }
  .info-wrap {
    gap: 24px;
  }
  .last-link {
    font-size: 13px;
    gap: 0;
  }
  .last-link li {
    padding: 0 8px;
  }
}


/* =====================================================================
   4. 반응형 — 헤더
   (원본 main_page.css 의 순서 그대로 유지: 뒤에 오는 규칙이 앞 규칙을 덮음)
   ===================================================================== */

/* ≤960px : 문의번호 숨김, CTA 이미지 축소 */
@media (max-width: 960px) {
  .header-call {
    display: none;
  }
  .header-cta {
    height: 44px;
    padding-left: 0;
  }
  .header-cta-img {
    width: 100px;
    height: 44px;
  }
}

/* ≤768px : 모바일 헤더 (높이 56px, 햄버거) */
@media (max-width: 768px) {
  .Header {
    grid-template-columns: auto 1fr auto;
    padding: 0 14px;
    height: 56px;
  }
  .header-ul {
    display: none;
  }
  .menu-btn {
    display: inline-flex;
    justify-self: center;
  }
  .header-cta-img {
    width: 80px;
    height: 36px;
    display: block;
  }
  .header-call {
    display: none;
  }
}

/* ≤480px : 로고 축소 */
@media (max-width: 480px) {
  .Header img {
    width: 90px;
  }
}

/* 601~905px : 태블릿 — 햄버거 메뉴 */
@media (min-width: 601px) and (max-width: 905px) {
  .Header {
    grid-template-columns: 1fr auto 1fr;
  }
  .header-ul {
    display: none !important;
  }
  .menu-btn {
    display: flex !important;
    justify-self: center;
  }
  .header-call {
    display: none;
  }
}

/* ≤1024px : 문의번호 숨김 */
@media (max-width: 1024px) {
  .header-call {
    display: none;
  }
}

/* ===== 헤더 넘침 보정 (좁은 PC 화면 구간) ===== */
/* 1401px 이상은 기본 헤더 그대로 */
@media (max-width: 1400px) {
  .header-ul {
    font-size: 1.0625rem;
    gap: 1.25rem;
  }
}
/* 문의번호 블록은 1240px 이하에서 숨김 */
@media (max-width: 1240px) {
  .header-call {
    display: none;
  }
}
/* 햄버거 전환 구간을 1000px까지 확장 (906~1000px) */
@media (min-width: 906px) and (max-width: 1000px) {
  .header-ul {
    display: none;
  }
  .menu-btn {
    display: flex;
  }
}


/* 초대형 화면(2560px 이상) : 헤더 메뉴 글자/간격 확대 */
@media (min-width: 2560px) {
  .header-ul {
    font-size: 1.6rem;
    gap: 2.5rem;
  }
}


/* =====================================================================
   5. 반응형 — 푸터 (≤768px : 아코디언 형태의 모바일 푸터)
   ===================================================================== */
@media (max-width: 768px) {
  .last {
    display: block;
    padding: 32px 20px;
    background-color: #f5f5f7;
    border-top: 1px solid #d2d2d7;
  }

  .footer-pc {
    display: none;
  }

  .footer-inner {
    display: block;
    padding: 0 20px;
  }

  .last img {
    width: 130px;
  }

  .footer-accordion-wrap {
    display: flex;
    flex-direction: column;
  }

  .footer-group {
    border-bottom: 1px solid #d2d2d7;
  }
  .footer-group:first-child {
    border-top: 1px solid #d2d2d7;
  }

  .footer-group-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    background: none;
    border: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
    text-align: left;
  }
  .footer-group-btn:focus-visible {
    outline: 2px solid #0a84ff;
    outline-offset: 2px;
  }

  .footer-arrow {
    font-size: 12px;
    color: #6e6e73;
    transition: transform 0.25s ease;
    display: inline-block;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }
  .footer-group.open .footer-arrow {
    transform: rotate(180deg);
  }

  .footer-group-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }
  .footer-group.open .footer-group-list {
    max-height: 300px;
  }
  .footer-group-list li {
    padding: 10px 0;
    font-size: 13px;
    color: #6e6e73;
  }
  .footer-group-list a {
    color: #6e6e73;
    text-decoration: none;
    font-size: 13px;
  }
  .footer-group-list a:hover {
    color: #1d1d1f;
  }

  .footer-bottom {
    border-top: 1px solid #d2d2d7;
    padding: 16px 0 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .footer-bottom p {
    font-size: 11px;
    color: #6e6e73;
    margin: 0;
    line-height: 1.6;
  }
  .footer-copy {
    margin-top: 6px !important;
    color: #1d1d1f !important;
    font-weight: 500;
  }
}


/* =====================================================================
   6. 헤더 동작 / 폰트
   ===================================================================== */

/* 아래로 스크롤하면 부드럽게 숨기고, 위로 올리면 다시 표시 (JS가 .header-hidden 토글) */
.Header {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.Header.header-hidden {
  transform: translateY(-100%);
}
@media (prefers-reduced-motion: reduce) {
  .Header {
    transition: none;
  }
}

/* 헤더·모바일 메뉴 폰트 (Pretendard 링크는 각 HTML <head>에서 불러와야 함) */
.Header,
.mobile-nav {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Malgun Gothic", sans-serif;
  -webkit-font-smoothing: antialiased;
}