/*
Theme Name: GeneratePress Child
Template: generatepress
Version: 1.0
*/

/* ===============================
   admin-bar 여백 제거
=============================== */
html,
body.admin-bar {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* ===============================
   GeneratePress 기본 헤더 겹치기
=============================== */
.has-acf-header .site-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: transparent !important;
    z-index: 50;
}

/* 기본 로고/브랜딩 제거 */
.has-acf-header .site-header .site-logo,
.has-acf-header .site-header .site-branding {
    display: none !important;
}

/* ===============================
   ACF 커스텀 헤더
=============================== */
.custom-page-header {
    position: relative;
    min-height: 55vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-page-header-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.custom-page-header-inner {
    position: relative;
    z-index: 2;
    color: #fff;
}

/* ===============================
   로고 + 제목 + 태그라인
=============================== */
.header-branding-wrap {
    display: flex;
    align-items: center;
    gap: 28px;
}

.header-logo img {
    max-height: 148px;
    width: auto;
}

.header-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.header-title {
    margin: 0;
    font-size: 2.4rem;
    line-height: 1.2;
}

.header-tagline {
    margin-top: 0.4rem;
    font-size: 1rem;
    opacity: 0.85;
}

.custom-page-header-bg {
    pointer-events: none;
}

.header-logo {
    position: relative;
    z-index: 5;
}

.header-logo a {
    cursor: pointer;
}


/* 기본 헤더는 마우스 이벤트 차단 */
.has-acf-header .site-header {
    pointer-events: none;
}

/* ACF 헤더는 클릭 가능 */
.custom-page-header,
.custom-page-header * {
    pointer-events: auto;
}

/* ===============================
   Archive Grid (Category/Tag/Date)
=============================== */

.archive-header-simple {
    margin: 40px 0 24px;
}

.archive-title {
    margin: 0 0 10px;
    font-size: 2rem;
    line-height: 1.2;
}

.archive-description {
    color: #666;
    max-width: 60ch;
}

.gp-archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
    margin: 26px 0 40px;
}

.gp-archive-card {
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 22px 22px 18px;
    background: #fff;
    transition: transform .15s ease, border-color .15s ease;
}

.gp-archive-card:hover {
    transform: translateY(-2px);
    border-color: #ddd;
}

.gp-archive-card-title {
    margin: 0 0 12px;
    font-size: 1.2rem;
    line-height: 1.35;
}

.gp-archive-card-title a {
    text-decoration: none;
}

.gp-archive-card-excerpt {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;

    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gp-archive-card-meta {
    margin-top: 14px;
    font-size: 0.82rem;
    color: #aaa;
}

.custom-page-header-inner {
  animation: fadeUp 0.6s ease-out both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .header-tagline {
    display: none;
  }
}

/* ===============================
   Archive card thumbnail control
=============================== */

/* 기본: 아카이브 카드 썸네일 숨김 */
.gp-archive-grid .post-image {
  display: none;
}

/* Recipe, JoyofMusic 카테고리에서는 표시 */
.category-recipe .gp-archive-grid .post-image,
.category-joyofmusic .gp-archive-grid .post-image {
  display: block;
  margin-bottom: 12px;
}

/* 썸네일 작게 */
.category-recipe .post-image img,
.category-joyofmusic .post-image img {
  width: 100%;
  max-height: 140px;
  object-fit: cover;
  border-radius: 8px;
}

/* ===============================
   TooMi 카테고리 - 리스트형
=============================== */

/* 그리드 해제 */
.category-toomi .gp-archive-grid {
  display: block;
}

/* 카드 스타일 제거 */
.category-toomi .gp-archive-grid article {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 18px 0;
  margin: 0;
  border-bottom: 1px solid #eaeaea;
}

/* 썸네일 숨김 */
.category-toomi .post-image {
  display: none !important;
}

/* 제목 */
.category-toomi .gp-archive-card-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 6px;
}

/* 요약 텍스트 */
.category-toomi .gp-archive-card-excerpt {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #555;
}

/* 날짜 */
.category-toomi .gp-archive-card-meta {
  font-size: 0.8rem;
  color: #999;
  margin-top: 6px;
}

/* 더 일기장 같은 느낌 */
.category-toomi .gp-archive-card-title a {
  text-decoration: none;
}

.category-toomi .gp-archive-card-title a:hover {
  text-decoration: underline;
}

/* ===============================
   Life 카테고리 - 연표형
=============================== */

.category-life .life-archive-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  column-gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid #eaeaea;
}

/* 날짜 */
.life-timeline-date {
  text-align: center;
  color: #888;
  line-height: 1.2;
}

.life-date-year {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #666;
}

.life-date-md {
  display: block;
  font-size: 0.75rem;
  color: #aaa;
  margin-top: 2px;
}

/* 제목/본문 간격 */
.category-life .gp-archive-card-title {
  margin: 0 0 4px 0;
}

.category-life .gp-archive-card-excerpt {
  margin: 0;
}

/* 썸네일 제거 */
.category-life .post-image {
  display: none !important;
}

/* ===============================
   Life 카테고리: 전체를 1열 연표로
=============================== */

.category-life .gp-archive-grid {
  display: block !important;
}

/* Life 연표 날짜 - 두 줄 강제 */
.category-life .life-timeline-date {
  display: block;
}

.category-life .life-date-year,
.category-life .life-date-md {
  display: block;
  width: 100%;
  text-align: center;
}

/* ===============================
   Life 연표형 - 연결된 타임라인
=============================== */

/* 리스트 전체 기준 */
.category-life .gp-archive-grid {
  position: relative;
}

/* 전체를 관통하는 세로선 */
.category-life .gp-archive-grid::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 45px;              /* 날짜 중앙 위치 */
  width: 1px;
  background: #e6e6e6;
}

/* 각 글 카드 */
.category-life .life-archive-row {
  position: relative;
  display: grid;
  grid-template-columns: 90px 1fr;
  column-gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid #eaeaea;
}

/* 날짜 */
.category-life .life-timeline-date {
  position: relative;
  text-align: center;
  line-height: 1.2;
}

/* 각 글의 점 */
.category-life .life-timeline-date::after {
  content: "";
  position: absolute;
  top: 14px;
  right: -14px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #cfcfcf;
  z-index: 2;
}


/* ===============================
   TooMi 카테고리 - 메모형 (안 깨지는 버전)
=============================== */

/* 카드 기본 리셋 */
.category-toomi article.gp-archive-card{
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 16px 0;
  margin: 0;
  border-bottom: 1px solid #eaeaea;
}

/* 한 줄 메모 구조 */
.category-toomi article.gp-archive-card{
  display: grid;
  grid-template-columns: 16px 1fr;
  column-gap: 12px;
  align-items: start;
}

/* 왼쪽 점 */
.category-toomi article.gp-archive-card::before{
  content: "•";
  font-size: 18px;
  line-height: 1;
  margin-top: 4px;
  color: #666;
}

/* 제목 */
.category-toomi .gp-archive-card-title{
  margin: 0 0 4px 0;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
}

.category-toomi .gp-archive-card-title a{
  text-decoration: none;
}

.category-toomi .gp-archive-card-title a:hover{
  text-decoration: underline;
}

/* 요약 텍스트 – 한 덩어리로 */
.category-toomi .gp-archive-card-excerpt{
  margin: 0;
  font-size: .95rem;
  line-height: 1.6;
  color: #555;
}

/* 요약 안의 p 태그 문제 제거 */
.category-toomi .gp-archive-card-excerpt p{
  margin: 0;
}

/* 날짜 */
.category-toomi .gp-archive-card-meta{
  margin-top: 6px;
  font-size: .85rem;
  color: #999;
}

/* 날짜 앞에 — */
.category-toomi .gp-archive-card-meta time::before{
  content: "— ";
}

/* ===============================
   TooMi 메모형 - grid 깨짐 FIX
=============================== */

/* 모든 텍스트를 2열로 강제 */
.category-toomi article.gp-archive-card > * {
  grid-column: 2;
}

/* 왼쪽 점만 1열 유지 */
.category-toomi article.gp-archive-card::before {
  grid-column: 1;
}

/* ===============================
   TooMi 메모형 - 요약 줄수 제한
=============================== */

.category-toomi .gp-archive-card-excerpt{
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;   /* ← 여기서 줄 수 조절 */
  overflow: hidden;
}

/* TooMi 메모 아이콘: 연필 */
.category-toomi article.gp-archive-card::before{
  content: "✏️";
  font-size: 14px;
  line-height: 1;
  margin-top: 4px;
  opacity: .7;
}

/* 헤더 타이틀 링크 스타일 유지 */
.custom-page-header .header-title a {
  color: inherit;
  text-decoration: none;
}

/* 호버 시에도 밑줄 제거 */
.custom-page-header .header-title a:hover {
  color: inherit;
  text-decoration: none;
}

/* ===============================
   Header text fade on scroll
=============================== 

.custom-page-header .header-text {
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.custom-page-header.text-faded .header-text {
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
}

.custom-page-header.text-faded .header-text {
  opacity: 0.2;
  transform: translateY(-10px);
}
*/

/* ===============================
   Header branding fade on scroll
   (logo + text together)
=============================== */

.custom-page-header .header-branding-wrap {
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.custom-page-header.text-faded .header-branding-wrap {
  opacity: 0.2;
  transform: translateY(-20px);
  pointer-events: none;
}

/* ===============================
   SINGLE POST – copy protection
=============================== */
.single .entry-content {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 이미지 드래그 방지 */
.single img {
    pointer-events: none;
}

/* ===============================
   JoyofMusic archive card
=============================== */

.music-archive-row {
	display: flex;
	gap: 14px;
	align-items: flex-start;
}

.music-archive-thumb {
	flex: 0 0 80px;
}

.music-archive-thumb img {
	width: 80px;
	height: 80px;
	object-fit: cover;
	border-radius: 6px;
}

.music-archive-content {
	flex: 1;
}

/* 모바일에서는 위아래로 */
@media (max-width: 640px) {
	.music-archive-row {
		flex-direction: column;
	}

	.music-archive-thumb img {
		width: 100%;
		height: auto;
	}
}

/* ===============================
   Music archive thumbnail hover
=============================== */

.music-archive-thumb {
	overflow: hidden;
	border-radius: 6px;
}

.music-archive-thumb img {
	transition: transform 0.3s ease;
}

.music-archive-row:hover .music-archive-thumb img {
	transform: scale(1.08);
}

.music-archive-thumb img {
	transition: transform 0.3s ease, filter 0.3s ease;
}

.music-archive-row:hover .music-archive-thumb img {
	transform: scale(1.08);
	filter: brightness(1.05);
}


/* ===============================
   JoyofMusic ONLY - LP style hover
=============================== */

.category-joyofmusic .music-archive-thumb {
	position: relative;
	overflow: hidden;
	border-radius: 50%;
	width: 80px;
	height: 80px;
	flex: 0 0 80px;
}

.category-joyofmusic .music-archive-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
	transition: transform 0.8s cubic-bezier(.22,.61,.36,1);
}

/* 카드 hover 시 LP 회전 */
.category-joyofmusic .music-archive-row:hover .music-archive-thumb img {
	transform: rotate(12deg) scale(1.08);
}

/* LP 중앙 구멍 */
.category-joyofmusic .music-archive-thumb::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 10px;
	height: 10px;
	background: rgba(255,255,255,0.7);
	border-radius: 50%;
	transform: translate(-50%, -50%);
	pointer-events: none;
}
