/*
Theme Name: GeneratePress Child
Template: generatepress
Version: 1.0
Description: Child theme for GeneratePress.
Author: ChatGPT Helper
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* ---------- Custom Typography & Layout ---------- */
p  { margin-left:12px; font-size:24px; color:#353535; }
ul { margin-left:45px; font-size:20px; }

h2 { margin-left:0;   font-size:32px; }
h3 { margin-left:12px; font-size:30px; }
h4 { margin-left:25px; font-size:30px; }
h5 { margin-left:25px; font-size:29px; }
h6 { margin-left:30px; font-size:28px; }

#sidebar b { font-size:14px; }


/* ---------- Hide GeneratePress meta info ---------- */
.single footer.entry-meta { display:none; }
.home .cat-links .archive,
.home .entry-meta { display:none; }
/* ---------------------------------------- */

/* ---------------------------------------- */
/* --기존버튼 애니메이션기능 추가시작-- */
.wp-block-button__link {
  display: inline-block;
  padding: 12px 28px;
  font-size: 16px;
  font-weight: bold;
  color: white;
  background-color: #0073aa;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 4px 12px rgb(0 115 170 / 0.3);
  transition: background-color 0.3s ease;
  animation: pulseScale 1.2s infinite alternate ease-in-out;
}

/* 자식 요소에 혹은 가상의 자식 선택자 사용시 예시 */
.wp-block-button__link > * {
  /* 자식 요소에 별도 효과 줄 때 활용 */
}

 /* 기본버튼 애니메이션적용 */
.wp-block-button__link:hover {
  background-color: #005f87;
  animation-duration: 0.5s; /* 작을수록 빠른애니메이션 */
  color: #ccc; /* 글자색 회색계통으로 변경 */
}

@keyframes pulseScale {
  from { transform: scale(1); }
  to { transform: scale(1.15); }
}
/* ----끝------------------------------------ */

/* ---------------------------------------- */
 /* 대표이미지 가운데정렬 */
.single img.wp-post-image,
.single .page-header-image-single img,
.single .entry-content img {
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
  float: none !important;
}

/* GeneratePress 기본 목록 썸네일 */
.blog .post-image,
.home .post-image,
.archive .post-image {
  text-align: center;
}

.blog .post-image img,
.home .post-image img,
.archive .post-image img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  float: none;
}

/* 구텐베르그 Query Loop 블록( wp-block-post-featured-image )일 때 */
.blog .wp-block-post-featured-image,
.home .wp-block-post-featured-image {
  text-align: center;
}

.blog .wp-block-post-featured-image img,
.home .wp-block-post-featured-image img {
  display: block;
  margin: 0 auto;
  float: none;
}

/* 동적 홈(새 글 3개) 썸네일 가운데 정렬 - 후보들 전부 잡기 */
.home .inside-article .post-image img,
.home .inside-article .wp-post-image,
.home .dynamic-entry .post-image img,
.home .dynamic-entry .wp-post-image,
.home .gb-query-loop .wp-block-post-featured-image img,
.home .gb-query-loop .wp-post-image {
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
  float: none !important;
  text-align: center !important;
}
/* --끝-------------------------------------- */

/* 광고스타일들 시작 */
/* 최상단광고 */
.top-banner-ad {
  max-width: 1400px;
  width: 100%;
  margin: 10px auto;
  padding: 0 10px;
  box-sizing: border-box;
}

/* 사이드바광고 */
 .sidebar-ad {
      max-width: 300px;
      width: 100%;
      margin: 0 auto;
      box-sizing: border-box;
    }
    @media (max-width: 768px) {
      .sidebar-ad {
        max-width: 100%;
        width: 100%;
        padding: 0 5px;
      }
    }
    
 /* 최하단멀티플렉스 */   
    .ads-wrapper {
  max-width: 1200px;
  width: 100%;
  margin: 40px auto;
  box-sizing: border-box;
}
/* ---끝------------------------------------- */

/* ---------------------------------------- */
/* 3열2행,3행 갤러리 시작 */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 가로 3열 */
  gap: 10px;
  max-width: 900px;
  margin: 0 auto;
}

.gallery img {
  width: 100%;
  aspect-ratio: 1 / 1; /* 정사각형 유지 */
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  cursor: pointer;
}

.gallery img:hover {
  transform: scale(1.03);
}

/* 팝업(모달) */
.image-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
}

.image-modal img {
  max-width: 90%;
  max-height: 85%;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  animation: zoomIn 0.3s ease;
}

/* 닫기 버튼 */
.image-modal .close-btn {
  position: absolute;
  top: 25px;
  right: 35px;
  color: #fff;
  font-size: 38px;
  font-weight: bold;
  cursor: pointer;
}

/* 확대 애니메이션 */
@keyframes zoomIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* 반응형 설정 */
@media (max-width: 768px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .gallery {
    grid-template-columns: 1fr;
  }
}
/* ---끝------------------------------------- */