/*
Theme Name: HopeLJM
Theme URI: https://your-website.com/
Author: Your Name or Nickname
Author URI: https://your-website.com/
Description: 이재명을 지지하는 디자이너들의 희망을 담은 디자인 갤러리 테마입니다. 사용자 참여, 관리자 승인, 라이트박스, 좋아요 기능을 포함합니다. 최신버전 041125
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hopeljm
Tags: gallery, community, portfolio, simple, clean, light, custom-post-type
*/

/* --- 기본 & 레이아웃 --- */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'NanumGothic', 'Malgun Gothic', sans-serif;
  background-color: #fff;
  color: #333;
  word-break: keep-all;
  line-height: 1.6;
}

body.admin-bar .site-header {
  margin-top: 0 !important;
}

.site-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: #fff !important;
}

.site-content {
  flex: 1;
  width: 100%;
  box-sizing: border-box;
}

.entry-content {
  overflow: visible !important;
}

a {
  color: #0073aa;
  text-decoration: none;
}

a:hover {
  color: #0a4b78;
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- 헤더 --- */
.site-header {
  background-color: #005BAC;
  padding: 0;
  color: #fff;
  position: relative;
  z-index: 10;
}

.site-header h1 {
  margin: 0 auto;
  font-size: 1.8rem;
  font-weight: bold;
  padding: 1rem 2rem;
  max-width: 1140px;
  box-sizing: border-box;
}

.site-header h1 a {
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-header h1 a img {
  height: 48px;
  width: auto;
  display: inline-block;
}

.site-header h1 a:hover {
  text-decoration: none;
  opacity: 0.9;
}

/* --- 푸터 --- */
.site-footer {
  background-color: #f1f1f1;
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.9em;
  color: #555;
  margin-top: auto;
}

.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.footer-links a {
  margin: 0 10px;
  color: #555;
}

.footer-links a:hover {
  color: #0073aa;
}

/* --- 메인 hero 영역 --- */
.hero {
  text-align: center;
  padding: 60px 20px;
  background-color: #fff;
  border-radius: 8px;
  margin: 40px auto;
  max-width: 1140px;
  box-sizing: border-box;
  position: relative;
  z-index: 5;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: #005BAC;
}

.hero p {
  font-size: 1.1rem;
  color: #555;
  line-height: 1.7;
  margin-bottom: 30px;
}

.button-group {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.main-button {
  background-color: #0070c0;
  color: white !important;
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
  display: inline-block;
  border: none;
  cursor: pointer;
}

.main-button:hover {
  background-color: #005ea8;
  text-decoration: none;
  transform: translateY(-2px);
}

/* ====[ 갤러리 스타일 시작 ]==== */
.gallery-title,
.archive .entry-header h1,
.page-template-page-gallery .entry-header h1 {
  text-align: center;
  font-size: 2rem;
  margin: 40px 0 20px;
  font-weight: bold;
  color: #333;
  position: relative;
  z-index: 5;
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  padding: 40px;
  box-sizing: border-box;
  justify-items: center;
  margin-top: 0;
  margin-bottom: 40px;
}

.gallery-card {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gallery-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 10px;
}

.gallery-card .hover-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 12px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 0 0 10px 10px;
  box-sizing: border-box;
}

/* 페이지네이션 */
.pagination {
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin-bottom: 60px;
  gap: 6px;
}

.pagination li {
  margin: 0;
}

.pagination a,
.pagination span {
  display: block;
  padding: 8px 12px;
  background-color: #f0f0f0;
  color: #333;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.2s ease;
  font-weight: bold;
}

.pagination a:hover {
  background-color: #0070c0;
  color: white;
}

.pagination .current {
  background-color: #005BAC;
  color: white;
}

/* 참여하기 */
.page-id-38 .site-content {
  padding-top: 40px;
  padding-bottom: 40px;
  display: flex;
  justify-content: center;
}

.page-id-38 #forminator-module-14 {
  max-width: 600px !important;
  width: 100% !important;
  padding: 30px;
  border-radius: 10px;
  background-color: #fdfdfd;
  box-shadow: 0 5px 25px rgba(0,0,0,0.08);
  box-sizing: border-box;
  margin: 0 auto !important;
}

.page-id-38 #forminator-module-14 .forminator-field,
.page-id-38 #forminator-module-14 .forminator-input,
.page-id-38 #forminator-module-14 .forminator-textarea {
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* 제출하기 버튼 스타일 Forminator용 */
#forminator-module-14 .forminator-button-submit {
  background-color: #0070c0 !important;
  color: white !important;
  padding: 12px 28px !important;
  border-radius: 8px !important;
  border: none !important;
  font-weight: bold !important;
  cursor: pointer !important;
  transition: background-color 0.3s ease, transform 0.2s ease !important;
}

#forminator-module-14 .forminator-button-submit:hover {
  background-color: #005ea8 !important;
  transform: translateY(-2px) !important;
}

/* 모바일 폼 여백 추가 */
@media (max-width: 480px) {
  .page-id-38 #forminator-module-14 {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

/* 메인 페이지 타이틀 숨기기 */
.page-id-100 .entry-header {
  display: none;
}

.page-id-100 .wp-block-group.has-background {
  background-color: transparent !important;
  padding-top: 0;
  padding-bottom: 0;
}

/* 공통 타이틀 스타일 */
.page .entry-header,
.archive .entry-header {
  text-align: center;
  margin-bottom: 30px;
  margin-top: 40px;
  position: relative;
  z-index: 5;
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.entry-header h1 {
  font-size: 2rem;
  font-weight: bold;
  margin: 0;
}

/* 반응형 */
@media (max-width: 768px) {
  .gallery-grid {
    gap: 20px;
    padding: 20px;
  }
  .hero {
    padding: 50px 20px;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .entry-header h1 {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 15px;
  }
  .site-header h1 {
    font-size: 1.5rem;
    padding: 1rem;
  }
  .site-header h1 a img {
    height: 36px;
  }
  .main-button {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
  .hero {
    padding: 40px 15px;
  }
  .hero h1 {
    font-size: 1.8rem;
  }
  .page-id-38 #forminator-module-14 {
    padding: 20px;
  }
  .entry-header h1 {
    font-size: 1.6rem;
  }
}

/* 로그인 버튼 스타일 */
.login-button {
  display: inline-block;
  padding: 8px 14px;
  background-color: #005BAC;
  color: white;
  border-radius: 4px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.3s ease;
}
.login-button:hover {
  background-color: #005BAC;
  color: white;
}

/* 아이콘 페이지네이션 커스텀 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 40px 0;
  padding: 0;
  list-style: none;
}

.pagination a,
.pagination span {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #f0f0f0;
  color: #333;
  border-radius: 6px;
  font-weight: bold;
  text-decoration: none;
  font-size: 1rem;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.pagination a:hover {
  background-color: #0070c0;
  color: white;
  transform: translateY(-2px);
}

.pagination .current {
  background-color: #005BAC;
  color: white;
}

.pagination-icon {
  font-size: 1.2em;
  line-height: 1;
}

/* 📬 Contact 페이지 스타일 (page ID: 245) - 참여하기와 동일하게 */
.page-id-245 .site-content {
  padding-top: 40px;
  padding-bottom: 40px;
  display: flex;
  justify-content: center;
}

/* 폼 전체 카드화 */
.page-id-245 .forminator-ui {
  max-width: 600px !important;
  width: 100% !important;
  padding: 30px;
  border-radius: 10px;
  background-color: #fdfdfd;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
  margin: 0 auto !important;
}

/* 입력 필드 정리 */
.page-id-245 .forminator-field,
.page-id-245 .forminator-input,
.page-id-245 .forminator-textarea {
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* 버튼 스타일 - 참여하기와 동일하게 */
.page-id-245 .forminator-button {
  background-color: #0070c0 !important;
  color: white !important;
  padding: 12px 28px !important;
  border-radius: 8px !important;
  border: none !important;
  font-weight: bold !important;
  font-size: 16px !important;
  cursor: pointer !important;
  transition: background-color 0.3s ease, transform 0.2s ease !important;
}

.page-id-245 .forminator-button:hover {
  background-color: #005ea8 !important;
  transform: translateY(-2px) !important;
}

/* 모바일 대응 */
@media (max-width: 480px) {
  .page-id-245 .forminator-ui {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

