/* ----------------------------------------------
✅ 1. 전체 초기화 및 모바일 제한 레이아웃
----------------------------------------------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html {
  width: 100%;
  min-width: 0;
}
body {
  font-family: 'Pretendard', sans-serif;
  background: #f4f4f4;
  color: #333;
  overflow-x: hidden;
  width: 100%;
  min-width: 0;
}

.site-container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  background: #fff;
  min-height: 100vh;
  overflow: hidden;
}

@media (min-width: 481px) {
  .site-container {
    border: 1px solid #ccc;
    border-radius: 8px;
    margin-top: 20px;
  }
}

/* ----------------------------------------------
✅ 2. 햄버거 사이드 메뉴 (왼쪽 슬라이드)
----------------------------------------------- */
.side-menu {
  position: absolute;
  top: 0;
  left: -100%;
  width: 80%;
  max-width: 300px;
  height: 100%;
  background: white;
  z-index: 99;
  transition: left 0.3s ease;
  box-shadow: 4px 0 12px rgba(0,0,0,0.1);
  padding: 20px;
}
.side-menu.active {
  left: 0;
}

.side-menu-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  z-index: 90;
}
.side-menu-overlay.active {
  display: block;
}

.side-menu-header {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 20px;
  cursor: pointer;
}
.side-menu-list {
  list-style: none;
  padding: 0;
}
.side-menu-list li {
  margin-bottom: 12px;
}
.side-menu-list a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
}

/* ----------------------------------------------
✅ 3. 상단 헤더
----------------------------------------------- */
header {
  height: 88px; /* ✅ 여백 더 확보 */
  width: 100%;
  padding: 0 16px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #eee;
  position: relative;
  min-width: 0;
}

/* ✅ 로고를 중앙에 고정 + 크기 확대 */
.logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* ✅ 정확한 수직·수평 중앙 */
  z-index: 2;
}
.logo img {
  height: 72px;
  max-height: 80px;
  display: block;
}
@media (min-width: 768px) {
  .logo img {
    height: 80px;
  }
}

.menu-icon, .search-icon, .mypage-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 36px;
  font-size: 28px;
  line-height: 1;
  color: #5757ff;
  cursor: pointer;
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 80px;
  margin-left: auto;
}

/* ----------------------------------------------
✅ 4. 메인 배너 슬라이더
----------------------------------------------- */
.main-slider {
  width: 100%;
  max-width: 100%;
  margin-top: 0;
  overflow: hidden;
}
.main-slider img {
  width: 100%;
  height: auto;
  border-radius: 0;
  display: block;
  object-fit: contain;
}

/* ----------------------------------------------
✅ 5. 최신 테스트 제목
----------------------------------------------- */
.section-title {
  padding: 16px 16px 8px;
  font-size: 18px;
  font-weight: bold;
}

/* ----------------------------------------------
✅ 7. 푸터
----------------------------------------------- */
.site-footer {
  text-align: center;
  font-size: 12px;
  color: #888;
  padding: 24px 12px;
  background: #f9f9f9;
}
.footer-links {
  margin-bottom: 8px;
}
.footer-links a {
  color: #666;
  text-decoration: none;
  margin: 0 6px;
  font-weight: 500;
}
.footer-links a:hover {
  text-decoration: underline;
}
.footer-copy {
  color: #aaa;
}

/* ----------------------------------------------
✅ 8. 검색창 클릭 시 애니메이션 효과 (세련된 스타일)
---------------------------------------------- */
.search-box {
  display: flex;
  align-items: center;
  background: #f2f4f8;
  border: 1px solid #e0e0e0;
  border-radius: 14px;
  padding: 12px 16px;
  transform: scale(1);
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: none;
  margin-bottom: 200px; /* ✅ 하단 여백 넉넉히 */
  will-change: transform;
}

.search-box.focused {
  background: #ffffff !important;
  border-color: #a0a0ff !important;
  box-shadow: 0 4px 12px rgba(90, 90, 255, 0.15) !important;
  transform: scale(1.01) !important;
}

.search-box .search-icon {
  font-size: 18px;
  margin-right: 10px;
  color: #aaa;
  flex-shrink: 0;
  transition: color 0.3s ease;
}

.search-box.focused .search-icon {
  color: #5757ff;
}

.search-box .search-input {
  all: unset;
  box-sizing: border-box !important;
  width: 100% !important;
  font-size: 15px !important;
  font-family: 'Pretendard', sans-serif !important;
  color: #333 !important;
  background: transparent !important;
  outline: none !important;
  transition: all 0.3s ease !important;
  line-height: 1.4;
  padding: 0 !important;
}

/* ----------------------------------------------
✅ 상단 헤더 돋보기 아이콘 (사이즈 복구)
---------------------------------------------- */
.search-header-icon {
  font-size: 24px;
  color: #333;
  cursor: pointer;
}

/* ----------------------------------------------
✅ 추천 검색어 간격 보정 (선택 사항)
---------------------------------------------- */
.recommend-keywords {
  padding-top: 200px;  /* 필요 시 늘려도 됨 */
}

/* ----------------------------------------------
✅ 로그인 버튼 부분
---------------------------------------------- */

/* 비주얼 영역 */
.login-visual {
  width: 100%;
  height: 200px;
  background-image: url('/wp-content/themes/jani-child/assets/images/jani-logo.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  animation: float 3s ease-in-out infinite;
  margin-bottom: 24px;
}

/* 카피라이팅 */
.login-copy {
  font-size: 22px;
  line-height: 1.4;
  font-weight: 500;
  color: #222;
  margin-bottom: 32px;
}
.login-copy span {
  font-weight: 700;
  font-family: 'Pretendard', sans-serif;
  color: #0070f3;
}

/* 카카오 로그인 버튼 */
.login-kakao {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #ffe812;
  padding: 14px;
  border-radius: 12px;
  border: none;
  font-weight: 600;
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.2s ease;
}
.login-kakao:hover {
  transform: translateY(-2px);
}
.kakao-icon {
  width: 20px;
  height: 20px;
}
.login-kakao:hover {
  transform: translateY(-2px); /* 이건 유지해도 자연스러움 */
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  background-color: #ffe812; /* ✅ 원래 배경색 강제 유지 */
  color: #000;               /* ✅ 글씨색도 유지 */
}
/* 소셜 원형 버튼 */
.login-social-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}
.login-social {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid #ddd;
  background-size: 24px 24px;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.2s ease;
  background-color: #fff;
}
.login-social:hover {
  transform: scale(1.1);
  background-color: #ffffff; /* ✅ 원래 배경색 강제 유지 */
}

.login-social.google {
  background-image: url('/wp-content/themes/jani-child/assets/images/google.png');
}
.login-social.apple {
  background-image: url('/wp-content/themes/jani-child/assets/images/apple.png');
}
.login-social.facebook {
  background-image: url('/wp-content/themes/jani-child/assets/images/facebook.png');
}

/* ----------------------------------------------
✅ 엘리멘탈 자식 테마 호환성 스타일
----------------------------------------------- */

/* 엘리멘탈 환경에서 site-container 스타일 재정의 */
.elementor-widget-container .site-container {
  max-width: none !important;
  margin: 0 !important;
  background: transparent !important;
  min-height: auto !important;
  overflow: visible !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* 로딩 스피너 */
.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(87, 87, 255, 0.3);
  border-radius: 50%;
  border-top-color: #5757ff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 로딩 인디케이터 */
.loading-indicator {
  text-align: center;
  padding: 10px;
  color: #666;
  font-size: 14px;
  display: none;
}
