/*
Theme Name: ManilaPick Kadence Child
Theme URI: https://manilapick.com
Author: ManilaPick
Author URI: https://manilapick.com
Description: Kadence 테마의 차일드 테마입니다. 여행사 스타일 메인 히어로 슬라이더와 갤러리형 게시글 그리드, 여행 콘텐츠 자동화(관련 글/유튜브/지도/추천 장소/CTA)를 추가합니다. Kadence는 GPL 오픈소스이며 이 차일드 테마도 자유롭게 커스텀/배포 가능합니다.
Template: kadence
Version: 1.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: manilapick-child
*/

/* ================= 로고 옆 사이트 제목 텍스트 중복 숨김 =================
   로고 이미지 자체에 "마닐라픽" 글자가 포함되어 있어
   Kadence 헤더의 사이트 제목 텍스트를 숨겨 중복 노출을 방지합니다.
   (더 확실한 방법은 외모 > 사용자 정의하기 > 헤더 빌더에서
   "사이트 제목" 요소 자체를 제거하는 것입니다.)
*/
.site-header .site-title,
.site-header .title-area .site-title,
.site-branding .site-title,
.kadence-title-area .site-title {
  display: none !important;
}

/* ================= 본문 내 유튜브 임베드 크기 제어 =================
   구텐베르크 유튜브 임베드 블록의 가로/세로 비율(9:16 숏폼, 16:9 일반)에 따라
   본문 폭 전체로 늘어나지 않고 적당한 최대 너비로 가운데 정렬되도록 제어합니다.
*/
.wp-block-embed-youtube.wp-embed-aspect-9-16 {
  max-width: 420px;
  margin: 30px auto;
}

.wp-block-embed-youtube.wp-embed-aspect-16-9 {
  max-width: 780px;
  margin: 30px auto;
}

/* ================= 메인 히어로 슬라이더 (여행사 스타일) ================= */
.mp-hero-slider {
  position: relative;
  width: 100%;
  height: 560px;
  max-height: 70vh;
  overflow: hidden;
  background: #111;
}
.mp-hero-slider-track {
  position: relative;
  width: 100%;
  height: 100%;
}
.mp-hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .8s ease;
  display: flex;
  align-items: center;
}
.mp-hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}
.mp-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.15) 60%, rgba(0,0,0,0) 100%);
}
.mp-hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  color: #fff;
}
.mp-hero-title {
  font-size: 2.6rem;
  font-weight: 800;
  margin: 0 0 .3em;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,.4);
}
.mp-hero-subtitle {
  font-size: 1.15rem;
  margin: 0 0 1.2em;
  opacity: .95;
  color: #fff;
}
.mp-hero-btn {
  display: inline-block;
  background: #ff7a00;
  color: #fff;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}
.mp-hero-btn:hover { opacity: .9; color: #fff; text-decoration: none; }
.mp-hero-dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
.mp-hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.5);
  cursor: pointer;
  padding: 0;
}
.mp-hero-dot.is-active { background: #fff; }
.mp-hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: transparent;
  border: none;
  color: rgba(255,255,255,.85);
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.5));
  line-height: 1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: .7;
  transition: opacity .25s ease, transform .25s ease, color .25s ease;
}
.mp-hero-arrow svg { display: block; }
.mp-hero-arrow:hover,
.mp-hero-arrow:focus {
  background: transparent;
  color: #fff;
  opacity: 1;
  outline: none;
  transform: translateY(-50%) scale(1.12);
}
.mp-hero-prev { left: 20px; }
.mp-hero-next { right: 20px; }

@media (max-width: 768px) {
  .mp-hero-slider { height: 380px; }
  .mp-hero-title { font-size: 1.7rem; }
  .mp-hero-subtitle { font-size: 1rem; }
  .mp-hero-arrow { width: 32px; height: 32px; }
  .mp-hero-arrow svg { width: 16px; height: 16px; }
}

/* ================= 카테고리 탭 필터 메뉴 (revu.net 스타일) ================= */
.mp-cat-tabs-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px 10px;
}
.mp-dual-banner {
  max-width: 1200px;
  margin: 24px auto 0;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.mp-social-links {
  max-width: 1200px;
  margin: 24px auto 0;
  padding: 0 20px;
  box-sizing: border-box;
}
.mp-social-links-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.mp-social-item {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 10px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 16px;
  text-decoration: none;
  color: #333;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  box-sizing: border-box;
  min-width: 0;
}
.mp-social-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
  border-color: #0b6e4f;
  color: #0b6e4f;
  text-decoration: none;
}
.mp-social-icon {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 48px !important;
  height: 48px !important;
  min-width: 48px;
  flex: none;
  overflow: hidden;
  border-radius: 12px;
}
.mp-social-icon img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  object-fit: contain;
  border-radius: 10px;
}
.mp-social-label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
@media (max-width: 768px) {
  .mp-social-links-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }
  .mp-social-icon { width: 38px !important; height: 38px !important; min-width: 38px; }
  .mp-social-label { font-size: .74rem; }
}
@media (max-width: 420px) {
  .mp-social-links-grid { grid-template-columns: repeat(3, 1fr); }
}
.mp-dual-banner-item {
  display: block;
  overflow: hidden;
  border-radius: 14px;
  line-height: 0;
}
.mp-dual-banner-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform .35s ease;
}
.mp-dual-banner-item:hover img {
  transform: scale(1.03);
}
@media (max-width: 640px) {
  .mp-dual-banner {
    grid-template-columns: 1fr;
  }
}
.mp-cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.mp-cat-tab {
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
  border-radius: 999px;
  padding: 9px 20px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.mp-cat-tab:hover {
  background: #eafaf3;
  border-color: #0b6e4f;
  color: #0b6e4f;
}
.mp-cat-tab.is-active,
.mp-cat-tab.is-active:hover {
  background: #0b6e4f;
  border-color: #0b6e4f;
  color: #fff;
}
.mp-cat-panel { display: none; }
.mp-cat-panel.is-active { display: block; }
.mp-cat-empty {
  text-align: center;
  color: #999;
  padding: 40px 0;
}

/* ================= 사진 통일 색감 (LUT 느낌) =================
   따뜻한 골드 톤 + 대비 소폭 증가 + 채도 소폭 감소
   실제 사진을 그대로 쓰되, 이 필터 하나로 사이트 전체 사진에
   통일된 브랜드 톤을 입혀 색감이 제각각이어도 하나의 브랜드처럼 보이게 합니다.
*/
.mp-photo-tone img {
  filter: saturate(92%) contrast(106%) brightness(103%) sepia(6%);
}

/* ================= 갤러리형 게시글 그리드 (매거진/여행사 스타일) ================= */
.mp-home-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.mp-home-section { padding: 40px 0; }
.mp-section-title {
  font-size: 1.4rem;
  margin: 0 0 20px;
  border-left: 5px solid #0b6e4f;
  padding-left: 12px;
}
.mp-section-title a { color: inherit; text-decoration: none; }

.mp-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  grid-auto-flow: dense;
}
.mp-gallery-item { border-radius: 12px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.mp-gallery-item--wide { grid-column: span 2; }
.mp-gallery-link { display: block; position: relative; text-decoration: none; }
.mp-gallery-thumb {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  border-radius: 12px;
  background: #eee;
}
.mp-gallery-item--wide .mp-gallery-thumb { aspect-ratio: 21/9; }
.mp-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
  margin: 0;
}
.mp-gallery-link:hover .mp-gallery-thumb img { transform: scale(1.06); }
.mp-gallery-noimg { width: 100%; height: 100%; background: linear-gradient(135deg,#ddd,#f2f2f2); }

/* 사진 위 하단 그라데이션(스크림) - 텍스트 가독성 확보 */
.mp-gallery-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.75) 100%);
  pointer-events: none;
}

/* 사진 위 오버레이 텍스트 (카테고리 배지 → 제목 → 날짜) */
.mp-gallery-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 18px;
  z-index: 2;
}
.mp-gallery-overlay .mp-cat-badge {
  margin-bottom: 8px;
}
.mp-gallery-title {
  font-size: 1.1rem;
  margin: 0 0 4px;
  color: #fff;
  font-weight: 700;
  text-shadow: 0 1px 6px rgba(0,0,0,.5);
  line-height: 1.35;
}
.mp-gallery-item--wide .mp-gallery-title { font-size: 1.35rem; }
.mp-gallery-date {
  font-size: .78rem;
  color: rgba(255,255,255,.85);
}

.mp-cat-badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: #0b6e4f;
  color: #fff;
}
.mp-cat-badge--used {
  background: #b8860b;
}
.mp-card-meta { font-size: .8rem; color: #888; }
.mp-card-price {
  font-weight: 700;
  color: #0b6e4f;
  font-size: .9rem;
}
.mp-card-price del { color: #aaa; font-weight: 400; margin-right: 4px; }
.mp-card-price ins { text-decoration: none; }

/* ================= 카테고리별 섹션 카드 (Airbnb 스타일: 사진 → 흰 카드 → 텍스트) ================= */
.mp-post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
}
.mp-card {
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow .2s ease, transform .2s ease;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.mp-card:hover { box-shadow: 0 10px 26px rgba(0,0,0,.1); transform: translateY(-3px); }
.mp-card a { text-decoration: none; color: inherit; }
.mp-card-thumb {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #eee;
}
.mp-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
  transition: transform .5s ease;
}
.mp-card:hover .mp-card-thumb img { transform: scale(1.05); }
.mp-card .mp-card-body { padding: 16px 16px 18px; }
.mp-card .mp-card-title {
  font-size: 1.02rem;
  margin: 8px 0 6px;
  font-weight: 700;
  line-height: 1.4;
}

/* CTA 박스 */
.mp-cta-box {
  background: linear-gradient(135deg, #0b6e4f, #0a5640);
  color: #fff;
  padding: 28px 24px;
  border-radius: 10px;
  text-align: center;
  margin: 2.5em 0;
}
.mp-cta-box h3 { margin: 0 0 8px; color: #fff; }
.mp-cta-box p { margin: 0 0 16px; opacity: .9; }
.mp-cta-box .mp-btn {
  display: inline-block;
  background: #ff7a00;
  color: #fff;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}
.mp-cta-box .mp-btn:hover { text-decoration: none; opacity: .9; color: #fff; }

/* 지도/유튜브 임베드 */
.mp-embed-wrap { position: relative; margin: 2em 0; }
.mp-embed-wrap iframe { width: 100%; border: 0; border-radius: 10px; }
.mp-embed-wrap.mp-embed-video { aspect-ratio: 16/9; }
.mp-embed-wrap.mp-embed-video iframe { height: 100%; }
.mp-embed-wrap.mp-embed-map iframe { height: 320px; }

.mp-related-wrap, .mp-places-wrap { margin: 3em 0; }
.mp-related-wrap h3, .mp-places-wrap h3 { font-size: 1.2rem; margin-bottom: 14px; }

@media (max-width: 960px) {
  .mp-gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .mp-gallery-item--wide { grid-column: span 2; }
}
@media (max-width: 600px) {
  .mp-gallery-grid { grid-template-columns: 1fr; }
  .mp-gallery-item--wide { grid-column: span 1; }
}

/* ================= 우측 중간 플로팅 문의 버튼 (카카오톡 / 텔레그램) ================= */
.mp-floating-buttons {
  position: fixed;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.mp-float-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
  animation: mp-float-pulse 2.4s ease-in-out infinite;
}
.mp-float-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 22px rgba(0,0,0,.32);
  color: #fff;
  text-decoration: none;
}
.mp-float-kakao {
  background: #FEE500;
  color: #3C1E1E;
}
.mp-float-kakao:hover { color: #3C1E1E; }
.mp-float-telegram {
  background: #229ED9;
}

/* 맨 위로 버튼 - 카톡/텔레그램과 달리 펄스 애니메이션 없이 차분하게, 스크롤 시에만 노출 */
.mp-float-top {
  background: #fff;
  color: #333;
  border: 1px solid #eee;
  cursor: pointer;
  animation: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease, box-shadow .2s ease;
}
.mp-float-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.mp-float-top:hover {
  background: #1e6fd9;
  border-color: #1e6fd9;
  color: #fff;
  transform: translateY(-2px) scale(1.05);
}

@keyframes mp-float-pulse {
  0%, 100% { box-shadow: 0 6px 18px rgba(0,0,0,.25); }
  50% { box-shadow: 0 6px 24px rgba(0,0,0,.35), 0 0 0 6px rgba(255,255,255,.15); }
}

@media (max-width: 768px) {
  .mp-floating-buttons {
    top: auto;
    bottom: 24px;
    right: 16px;
    transform: none;
  }
  .mp-float-btn { width: 50px; height: 50px; }
}

/* =========================================================================
   SINGLE POST 본문(article) 매거진 스타일
   -------------------------------------------------------------------------
   - 적용 범위: body.single-post .entry-content 내부에서만 동작 (헤더/푸터/
     사이드바/관리자 화면/에디터 화면에는 영향 없음)
   - SEO 구조(H1~H3 태그, 마크업 계층)는 그대로 유지하고 시각적 스타일만 조정
   - 외부 라이브러리/자바스크립트 없이 순수 CSS로만 구현 (페이지 속도 영향 없음)
   - 기존 규칙은 수정하지 않고 이 섹션만 추가되었습니다.
   ========================================================================= */

/* 본문 폭 제한 + 데스크탑 중앙 정렬 + 기본 타이포그래피 */
body.single-post .entry-content {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  font-size: 17px;
  line-height: 1.8;
  color: #2b2b2b;
}
@media (min-width: 992px) {
  body.single-post .entry-content {
    font-size: 18px;
  }
}

/* 문단 간격 */
body.single-post .entry-content p {
  margin-top: 0;
  margin-bottom: 20px;
}

/* H1은 테마 기본 스타일을 최대한 유지 (별도 재정의하지 않음) */

/* H2: 섹션 구분이 뚜렷하도록 위쪽 여백을 넉넉하게 확보 */
body.single-post .entry-content h2 {
  margin-top: 48px;
  margin-bottom: 18px;
  line-height: 1.4;
}

/* H3: H2보다 확실히 작게, 위쪽 여백은 H2보다 살짝 좁게 */
body.single-post .entry-content h3 {
  margin-top: 34px;
  margin-bottom: 14px;
  font-size: .92em;
  line-height: 1.45;
}

/* 이미지: 반응형 + 은은한 라운드 처리 */
body.single-post .entry-content img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

/* figure(이미지 캡션 포함) 상하 여백 */
body.single-post .entry-content figure {
  margin: 32px 0;
}
body.single-post .entry-content figcaption {
  margin-top: 10px;
  font-size: .85em;
  color: #888;
  text-align: center;
}

/* 유튜브 임베드 공통: 중앙 정렬 */
body.single-post .entry-content .wp-block-embed-youtube {
  margin-left: auto;
  margin-right: auto;
}

/* ul / ol 가독성 개선 */
body.single-post .entry-content ul,
body.single-post .entry-content ol {
  margin: 0 0 20px;
  padding-left: 1.4em;
}
body.single-post .entry-content li {
  margin-bottom: 8px;
}
body.single-post .entry-content li > ul,
body.single-post .entry-content li > ol {
  margin-top: 8px;
  margin-bottom: 0;
}

/* blockquote: 브랜드 컬러 포인트 바 + 은은한 배경 */
body.single-post .entry-content blockquote {
  margin: 28px 0;
  padding: 16px 20px;
  border-left: 4px solid #0b6e4f;
  background: #f4faf7;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #3a3a3a;
}
body.single-post .entry-content blockquote p:last-child {
  margin-bottom: 0;
}

/* 정보/주의사항 박스 (본문에서 <!-- wp:group {"className":"mp-info-box"} --> 등으로 사용 가능) */
body.single-post .entry-content .mp-info-box,
body.single-post .entry-content .mp-note-box {
  margin: 28px 0;
  padding: 18px 20px;
  border-radius: 8px;
  font-size: .95em;
  line-height: 1.7;
}
body.single-post .entry-content .mp-info-box {
  background: #eef6ff;
  border: 1px solid #cfe4ff;
  color: #17406b;
}
body.single-post .entry-content .mp-note-box {
  background: #fff8e8;
  border: 1px solid #ffe4a8;
  color: #6b4e17;
}

/* 표: 모바일에서 좌우 스크롤 가능하도록 래핑 */
body.single-post .entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
}
body.single-post .entry-content .wp-block-table {
  overflow-x: auto;
  display: block;
  -webkit-overflow-scrolling: touch;
}
body.single-post .entry-content table th,
body.single-post .entry-content table td {
  padding: 10px 14px;
  border: 1px solid #e6e6e6;
  text-align: left;
}
body.single-post .entry-content table th {
  background: #f7f7f7;
  font-weight: 700;
}

/* 링크: 브랜드 컬러 적용, 과한 호버 효과 없이 밑줄 색상만 살짝 변화 */
body.single-post .entry-content a {
  color: #0b6e4f;
  text-decoration: underline;
  text-decoration-color: rgba(11,110,79,.35);
  text-underline-offset: 2px;
}
body.single-post .entry-content a:hover {
  text-decoration-color: #0b6e4f;
}

/* 모바일 세부 조정 */
@media (max-width: 600px) {
  body.single-post .entry-content {
    font-size: 16px;
    padding-left: 4px;
    padding-right: 4px;
  }
  body.single-post .entry-content h2 {
    margin-top: 36px;
  }
  body.single-post .entry-content h3 {
    margin-top: 26px;
  }
}
