/* ========== 푸터 영역 ========== */
/* 푸터 전체 컨테이너 - 회색 배경의 사이트 정보 영역 */
.footer {
  font-family: "SpoqaHanSansNeo-Regular", sans-serif;
  background-color: var(--color-bg-light);
  padding: 60px 0;
  display: flex;
  flex-direction: column;
  gap: 6rem;
}

/* ========== 푸터 링크 섹션 ========== */
/* 푸터 상단 링크 영역 - 메뉴와 SNS를 양쪽에 배치 */
.footer-link {
  display: flex;
  justify-content: space-between; /* 메뉴는 좌측, SNS는 우측 */
  border-bottom: 1px solid var(--gray-300);
  padding-bottom: 3rem; /* 하단 여백 */
}
.footer-menu-toggle {
  display: none;
  align-items: center;
  gap: 1rem;
  width: 100%;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
}

.footer-menu-toggle .arrow {
  display: none;
  transition: transform 0.3s ease;
}

/* 메뉴 열리면 화살표 위로 회전 */
.footer-menu-toggle[aria-expanded="true"] .arrow {
  transform: rotate(180deg);
}
/* ========== 푸터 모바일 반응형 ========== */

/* ========== 태블릿 반응형 디자인 (768px ~ 1023px) ========== */
@media screen and (min-width: 768px) and (max-width: 1023px) {
  .footer-menu ul {
    flex-wrap: wrap; /* 메뉴 아이템이 많을 때 줄바꿈 허용 */
    justify-content: center;
    gap: 2rem 3.2rem; /* 세로 2rem, 가로 3.2rem 간격 */
  }

  .footer-menu a {
    font-size: 1.3rem; /* 태블릿 화면에서 글자 크기 작게 */
    white-space: nowrap; /* 메뉴 아이템 텍스트 줄바꿈 방지 */
  }
}
/* ========== 태블릿 이하 화면에서 메뉴 토글 버튼 활성화 ========== */
@media screen and (max-width: 860px) {
  .footer-menu-toggle {
    display: flex; /* 토글 버튼 표시 */
    margin-bottom: 10px;
  }

  /* 숨김 상태의 메뉴는 완전히 숨김 */
  .footer-menu[hidden] {
    display: none;
  }

  /* 토글 버튼 내부 화살표 표시 */
  .footer-menu-toggle .arrow {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    top: 1px;
  }
}

/* ========== 푸터 메뉴 스타일 ========== */
/* 푸터 메뉴 컨테이너 */
.footer-menu {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 푸터 메뉴 리스트 - 가로 배열 */
.footer-menu ul {
  display: flex;
  gap: 3.2rem; /* 메뉴 아이템 간격 */
  align-items: center;
}

/* 푸터 메뉴 아이템 - 구분선 표시를 위한 relative 포지션 */
.footer-menu li {
  position: relative;
  display: flex;
  align-items: center;
}

.footer-menu a {
  color: var(--text-color);
  font-size: 1.4rem;
}

/* 메뉴 아이템 간 구분선(|) - CSS 가상요소로 구현 */
.footer-menu li::after {
  content: "|"; /* 수직라인 문자로 구분선 표시 */
  color: var(--text-color);
  margin-left: 3.2rem;
  position: absolute;
  right: -1.6rem; /* 링크 텍스트 우측에 배치 */
  font-size: 1.4rem;
}

/* 마지막 메뉴 아이템에는 구분선 숨김 */
.footer-menu li:last-child::after {
  display: none;
}

/* ========== 푸터 SNS 링크 ========== */
/* SNS 링크 리스트 - 가로 배열 */
.footer-sns ul {
  display: flex;
  gap: 1.4rem; /* SNS 아이콘 간격 */
}

/* SNS 링크 공통 스타일 - 아이콘과 텍스트 세로 배열 */
.insta,
.facebook,
.youtube {
  display: flex;
  flex-direction: column; /* 아이콘 위, 텍스트 아래 */
  align-items: center;
  gap: 0.5rem; /* 아이콘과 텍스트 사이 간격 */
}

/* SNS 아이콘 공통 스타일 - CSS 가상요소로 SVG 아이콘 표시 */
.insta::before,
.facebook::before,
.youtube::before {
  content: ""; /* 빈 콘텐츠로 배경이미지만 표시 */
  display: block;
  width: 3.2rem; /* 32px 정사각형 아이콘 */
  height: 3.2rem;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  flex: none; /* flexbox에서 크기 고정 */
}

/* 각 SNS별 아이콘 이미지 */
.insta::before {
  background-image: url(../images/insta.svg); /* 인스타그램 아이콘 */
}

.facebook::before {
  background-image: url(../images/facebook.svg); /* 페이스북 아이콘 */
}

.youtube::before {
  background-image: url(../images/youtube.svg); /* 유튜브 아이콘 */
}

/* ========== 푸터 사업자 정보 ========== */
/* 푸터 하단 사업자 정보 영역 */
.footer-info {
  margin-top: 3rem;
  /* padding: var(--gap-xl); 💫*/
  color: var(--gray-700);
  font-size: 1.4rem;
  line-height: 1.8;
}

/* 사업자 정보 텍스트 배열 - 가로 배열하되 줄바꿈 허용 */
.footer-info-business {
  display: flex;
  gap: 0.5rem; /* 각 정보 간격 */
  flex-wrap: wrap; /* 화면이 좁으면 줄바꿈 */
}

/* ========== 푸터 정보 모바일 반응형 ========== */
@media screen and (max-width: 767px) {
  .footer {
    padding: 30px 0;
  }
  /* 푸터 링크 영역 - 세로 배열로 변경 */
  .footer-link {
    flex-direction: column; /* 메뉴와 SNS를 세로 배열 */
    gap: 0;
    justify-content: center;
    align-items: center;
  }
  /* 푸터 메뉴 - 세로 배열로 변경 */
  .footer-menu ul {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.2rem; /* 모바일에서 줄 간격 조정 */
  }

  /* 모바일에서 메뉴 구분선 제거 */
  .footer-menu li::after {
    display: none;
  }
  /* 모바일에서 토글 버튼 중앙 정렬 */
  .footer-menu-toggle {
    justify-content: center;
    margin-bottom: 15px;
  }
  .footer-sns {
    margin-top: 15px;
  }
  .footer-info {
    padding: 0;
    text-align: center; /* 텍스트 중앙 정렬 */
  }

  /* 모바일 사업자 정보 - 중앙 정렬 */
  .footer-info-business {
    align-items: center;
    justify-content: center; /* 가로 중앙 정렬 */
  }
}
