/*
Theme Name: GeneratePress Child - Marketiary
Description: Marketiary 브랜드 아이덴티티 적용 자식 테마
Template: generatepress
Version: 1.0
*/

/* ===== 홈페이지/카테고리 공통 히어로 섹션 (헤더 바로 아래, 전체 폭, 높이 통일) ===== */
.marketiary-hero {
  width: 100%;
  min-height: 340px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-align: center;
  padding: 5em 2em;
  margin: 0;
  background-color: #23211d;
  background-image: linear-gradient(to bottom, rgba(20,18,14,0.25), rgba(20,18,14,0.75)), url('https://marketiary.com/wp-content/uploads/2026/07/marketiary_hero_final.jpg');
  background-size: cover;
  background-position: center;
}

/* ===== 로고 이미지 ===== */
.site-logo {
  display: inline-block;
}

.site-logo .header-image.is-logo-image {
  max-height: 64px;
  width: auto;
  height: 64px;
  display: block;
}

.site-logo + .site-branding {
  display: none;
}

@media (max-width: 768px) {
  .site-logo .header-image.is-logo-image {
    max-height: 46px;
    height: 46px;
  }
}

.marketiary-hero-title {
  color: #ffffff;
  font-size: 42px;
  font-weight: 700;
  margin: 0 0 0.5em 0;
  line-height: 1.3;
}

.marketiary-hero-desc {
  color: #cbd5e0;
  font-size: 18px;
  line-height: 1.8;
  max-width: 700px;
  margin: 0 auto;
}

.marketiary-home-hero {
  min-height: 480px;
  text-align: left;
}

.marketiary-home-hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3em;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}

.marketiary-home-hero-text {
  flex: 1;
  text-align: left;
}

.marketiary-home-hero-text .marketiary-hero-title {
  margin: 0 0 0.5em;
}

.marketiary-home-hero-text .marketiary-hero-desc {
  margin: 0;
  max-width: 460px;
  text-align: left;
}

.marketiary-home-cta-row {
  display: flex;
  flex-direction: column;
  gap: 0.9em;
  flex-shrink: 0;
}

.marketiary-home-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: 0.9em 1.9em;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  background-color: #F4A340;
  color: #292524;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, background-color 0.2s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.marketiary-home-cta:hover {
  background-color: #ffb75e;
  transform: translateY(-3px) translateX(2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

.marketiary-home-cta-arrow {
  transition: transform 0.2s ease;
}

.marketiary-home-cta:hover .marketiary-home-cta-arrow {
  transform: translateX(4px);
}

/* 홈 화면은 히어로 단독 구성 — #page(글 목록+사이드바 담는 박스) 자체를 통째로 제거 */
body.home.blog #page {
  display: none;
}

html {
  height: 100%;
}

body.home.blog {
  height: 100vh;
  overflow: hidden;
  margin: 0;
  display: flex;
  flex-direction: column;
}

body.home.blog .site-header {
  flex-shrink: 0;
}

body.home.blog .marketiary-home-hero {
  flex: 1 1 auto;
  min-height: 0;
}

body.home.blog .site-footer {
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .marketiary-home-hero-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.8em;
  }
  .marketiary-home-cta-row {
    flex-direction: row;
    width: 100%;
  }
  .marketiary-home-cta {
    flex: 1;
  }
}

@media (max-width: 768px) {
  .marketiary-hero {
    min-height: 260px;
    padding: 3em 1.2em;
  }
  .marketiary-home-hero {
    min-height: 420px;
    text-align: center;
  }
  .marketiary-home-hero-text,
  .marketiary-home-hero-text .marketiary-hero-desc {
    text-align: center;
    max-width: 100%;
  }
  .marketiary-hero-title {
    font-size: 26px;
  }
  .marketiary-hero-desc {
    font-size: 15px;
  }
  .marketiary-home-hero-inner {
    align-items: center;
  }
  .marketiary-home-cta-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.8em;
    width: 100%;
  }
}

/* ===== 가독성 개선 ===== */
.entry-content {
  word-break: keep-all;
  overflow-wrap: break-word;
}

.entry-content p {
  margin-bottom: 1.7em;
  line-height: 1.9;
}

.entry-content h2 {
  color: #23211d;
  margin-top: 2.8em;
  margin-bottom: 1em;
  padding-left: 0.6em;
  border-left: 4px solid #23211d;
  font-size: 24px;
}

.entry-content h3 {
  color: #23211d;
  font-size: 19px;
  margin-top: 1.8em;
}

.entry-content ul,
.entry-content ol {
  margin-bottom: 1.7em;
  line-height: 1.9;
}

.entry-content li {
  margin-bottom: 0.5em;
}

.entry-content strong {
  font-weight: 700;
}

.entry-content figure.wp-block-image {
  margin: 2.2em auto;
  text-align: center;
}

.entry-content figure.wp-block-image img {
  max-width: 100%;
  max-height: 480px;
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}

.entry-content figure.wp-block-image figcaption {
  font-size: 0.82em;
  font-style: italic;
  color: #8a8474;
  margin-top: 0.7em;
  line-height: 1.6;
}

.entry-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.5em 0;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.entry-content table th,
.entry-content table td {
  border: 1px solid #dde3ea;
  padding: 0.6em 1em;
  word-break: keep-all;
}

.entry-content table th {
  background-color: #f0f4f8;
}

@media (max-width: 768px) {
  .entry-content table {
    font-size: 14px;
  }

  .entry-content table th,
  .entry-content table td {
    padding: 0.5em 0.7em;
    white-space: normal;
  }

  .entry-content table th:first-child,
  .entry-content table td:first-child {
    min-width: 90px;
  }
}

/* ===== 브랜드 색·타이포그래피 ===== */
body, .entry-content, .site-title, .entry-title {
  font-family: -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", sans-serif;
}

html {
  overflow-y: scroll; /* 스크롤바 유무로 페이지마다 좌우 폭이 미세하게 달라지는 것 방지 */
}

body {
  background-color: #faf9f6;
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-footer {
  margin-top: auto; /* 내용이 짧은 페이지에서도 푸터가 항상 화면 하단에 붙도록 */
}

.site-logo .main-title a,
.site-title a {
  color: #23211d;
  font-weight: 700;
  font-size: 1.6em;
}

.site-description {
  color: #718096;
}

.entry-content a {
  color: #23211d;
  text-decoration: underline;
  text-decoration-color: #b9b3a3;
}

.entry-content a:hover {
  color: #0a0908;
}

.button,
input[type="submit"],
.wp-block-button__link {
  background-color: #23211d !important;
  border-color: #23211d !important;
  border-radius: 4px;
}

.button:hover,
input[type="submit"]:hover,
.wp-block-button__link:hover {
  background-color: #0a0908 !important;
}

/* ===== 헤더 (공통, 카테고리 무관 중립 차콜, 스티키) ===== */
.site-header {
  background-color: #23211d;
  border-bottom: 3px solid #23211d;
  padding: 0.9em 0;
  position: sticky;
  top: 0;
  z-index: 999;
}

.site-header .site-title a,
.site-header .site-logo .main-title a {
  color: #ffffff;
}

.site-header .site-description {
  color: #cfcabd;
}

.main-navigation,
.main-navigation .inside-navigation,
.main-navigation .menu-bar-items {
  background-color: transparent !important;
}

.main-navigation a,
.main-navigation .main-nav ul li a,
.main-navigation .menu-toggle,
.main-navigation .menu-bar-items {
  color: #e8e5db !important;
  font-weight: 600;
  font-size: 17px !important;
  transition: color 0.2s ease;
}

.main-navigation .main-nav ul li a {
  padding-top: 1.1em;
  padding-bottom: 1.1em;
}

@media (max-width: 768px) {
  .main-navigation a,
  .main-navigation .main-nav ul li a {
    font-size: 15px !important;
  }
}

.main-navigation .main-nav ul li[class*="current-menu-"] > a {
  color: #ffffff !important;
}

.main-navigation a:hover {
  color: #ffffff !important;
}

/* ===== 콘텐츠 영역 ===== */
.content-area {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  padding: 2em;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.entry-content {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  font-size: 17px;
  color: #2d3748;
}

.entry-title {
  font-size: 32px;
  font-weight: 700;
  color: #23211d;
  line-height: 1.3;
}


/* ===== 글 목록 카드 ===== */
article.post {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  padding: 1.8em;
  margin-bottom: 1.8em;
}

.cat-links {
  display: inline-block;
  background-color: #eceae4;
  color: #23211d;
  font-size: 13px;
  font-weight: 600;
  padding: 0.25em 0.8em;
  border-radius: 999px;
  margin-bottom: 0.6em;
}

.cat-links a {
  color: #23211d;
  text-decoration: none;
}

/* ===== 접근성 ===== */
a:focus,
button:focus {
  outline: 2px solid #23211d;
  outline-offset: 2px;
}

/* ===== 푸터 (공통, 카테고리 무관 중립 차콜) ===== */
.site-info {
  background-color: #23211d;
  color: #cfcabd;
  padding: 2em 0;
  font-size: 0.9em;
}

.site-info a {
  color: #ffffff;
}

.site-info .inside-site-info {
  flex-wrap: wrap;
}

.marketiary-footer-menu {
  flex: 0 0 100%;
  width: 100%;
  text-align: center;
  order: -1;
  margin-bottom: 0.9em;
}

.marketiary-footer-menu-list {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 1.6em;
  margin: 0;
  padding: 0;
}

.marketiary-footer-menu-list a {
  color: #cfcabd;
  font-size: 0.92em;
  text-decoration: none;
}

.marketiary-footer-menu-list a:hover {
  color: #ffffff;
  text-decoration: underline;
}

@media (max-width: 600px) {
  .marketiary-footer-menu-list {
    flex-direction: column;
    align-items: center;
    gap: 0.6em;
  }
}

/* ===== 카테고리별 브랜드 컬러 =====
   마케팅(2) = 딥그린, 브랜드 딥다이브(3) = 차콜+앰버
   헤더/푸터/로고는 위에서 이미 중립 차콜로 고정되어 영향받지 않음 */

.mkt-cat-2 .entry-content h2 {
  color: #0F7A54;
  border-left-color: #0F7A54;
}

.mkt-cat-2 .entry-content h3 {
  color: #0A4A34;
}

.mkt-cat-2 .entry-content a {
  color: #0F7A54;
  text-decoration-color: #9bcbb8;
}

.mkt-cat-2 .entry-content a:hover {
  color: #0A4A34;
}

.mkt-cat-2 .cat-links {
  background-color: #E1F2EA;
  color: #0F7A54;
}

.mkt-cat-2 .cat-links a {
  color: #0F7A54;
}

.mkt-cat-2 .entry-content strong {
  color: #0A4A34;
}

.mkt-cat-3 .entry-content h2 {
  color: #B5751F;
  border-left-color: #F4A340;
}

.mkt-cat-3 .entry-content h3 {
  color: #8a5a17;
}

.mkt-cat-3 .entry-content a {
  color: #B5751F;
  text-decoration-color: #f0c98a;
}

.mkt-cat-3 .entry-content a:hover {
  color: #292524;
}

.mkt-cat-3 .cat-links {
  background-color: #292524;
  color: #F4A340;
}

.mkt-cat-3 .cat-links a {
  color: #F4A340;
}

.mkt-cat-3 .entry-content strong {
  color: #B5751F;
}

/* ===== 카테고리 아카이브 페이지: GP 기본 page-header는 숨기고 (중복 방지) ===== */
/* 대신 홈 히어로와 동일하게 generate_after_header 훅에서 만든 배너를 사용 (헤더와 완벽히 맞물림) */
.mkt-cat-2 .content-area .page-header,
.mkt-cat-3 .content-area .page-header {
  display: none;
}

.marketiary-category-hero.mkt-cat-2 {
  background-color: #0F7A54;
  background-image: linear-gradient(135deg, #0F7A54, #0A4A34);
}

.marketiary-category-hero.mkt-cat-3 {
  background-color: #292524;
  background-image: linear-gradient(135deg, #292524, #1a1815);
}

.marketiary-category-hero .marketiary-hero-title {
  letter-spacing: 0.04em;
}

.marketiary-category-hero.mkt-cat-2 .marketiary-hero-desc {
  color: #d3ede1;
}

.marketiary-category-hero.mkt-cat-3 .marketiary-hero-desc {
  color: #e8c98f;
}

/* ===== 단일 글 제목 섹션 (카테고리 컬러 포인트) ===== */
.single-post .entry-header {
  padding-left: 0.9em;
  border-left: 5px solid #23211d;
  margin-bottom: 1.2em;
}

.mkt-cat-2.single-post .entry-header {
  border-left-color: #0F7A54;
}

.mkt-cat-3.single-post .entry-header {
  border-left-color: #F4A340;
}

/* ===== 고정 페이지(소개·문의·개인정보처리방침) 제목 섹션 ===== */
.page .entry-header {
  padding-left: 0.9em;
  border-left: 5px solid #8a8474;
  margin-bottom: 1.2em;
}

/* ===== 반응형(모바일) ===== */
@media (max-width: 768px) {
  .content-area {
    max-width: 100%;
    padding: 1.2em;
  }

  .entry-content {
    font-size: 16px;
  }

  .entry-title {
    font-size: 24px;
  }

  .entry-content h2 {
    font-size: 20px;
  }

  .entry-content h3 {
    font-size: 17px;
  }

  article.post {
    padding: 1.2em;
  }

  .site-logo .main-title a {
    font-size: 1.3em;
  }
}

/* ===== 댓글 폼 ===== */
.comment-respond {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 1.6em;
  margin-top: 1em;
}

.comment-reply-title {
  font-size: 20px;
  margin-bottom: 0.8em;
}

#commentform textarea#comment {
  width: 100%;
  height: 90px;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid #dde3ea;
  border-radius: 6px;
  padding: 0.7em;
  font-family: inherit;
  font-size: 15px;
  resize: vertical;
}

#commentform input[type="text"],
#commentform input[type="email"],
#commentform input[type="url"] {
  width: 100%;
  max-width: 280px;
  box-sizing: border-box;
  border: 1px solid #dde3ea;
  border-radius: 6px;
  padding: 0.5em 0.7em;
  font-size: 14px;
  margin: 0.4em 0.4em 0.4em 0;
}

#commentform .form-submit input#submit {
  background-color: #23211d;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 0.55em 1.4em;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

#commentform .form-submit input#submit:hover {
  background-color: #0a0908;
}

.mkt-cat-2 #commentform .form-submit input#submit {
  background-color: #0F7A54;
}

.mkt-cat-2 #commentform .form-submit input#submit:hover {
  background-color: #0A4A34;
}

.mkt-cat-3 #commentform .form-submit input#submit {
  background-color: #292524;
}

.mkt-cat-3 #commentform .form-submit input#submit:hover {
  background-color: #000000;
}

/* ===== 글 하단 좋아요 마이크로인터랙션 ===== */
.marketiary-like-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5em;
  padding: 1.6em 0 0.4em;
  margin-top: 1.4em;
  border-top: 1px solid #e2ddd0;
}

.marketiary-like-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4em;
  line-height: 0;
  transition: transform 0.15s ease;
}

.marketiary-like-btn svg {
  width: 40px;
  height: 40px;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.marketiary-like-btn path {
  fill: none;
  stroke: #a39c8a;
  stroke-width: 1.8;
  transition: all 0.25s ease;
}

.marketiary-like-btn:active {
  transform: scale(0.9);
}

.marketiary-like-btn.liked svg {
  transform: scale(1.15);
}

.marketiary-like-btn.liked path {
  fill: #e0505a;
  stroke: #e0505a;
}

.marketiary-like-caption {
  font-size: 0.86em;
  color: #a39c8a;
  transition: color 0.2s ease;
}

.marketiary-like-caption.liked {
  color: #e0505a;
  font-weight: 600;
}

/* ===== 댓글 작성자 본인 삭제 링크 ===== */
.marketiary-own-comment-actions {
  margin: 0.5em 0 0 !important;
}

.marketiary-delete-comment-link {
  font-size: 0.78em;
  color: #a39c8a;
  text-decoration: underline;
}

.marketiary-delete-comment-link:hover {
  color: #e0505a;
}

/* ===== 카테고리 아카이브: 카드 그리드 (대표이미지 + 제목만) ===== */
body.category #main {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.6em;
  align-items: stretch;
}

body.category article.post {
  padding: 0;
  margin-bottom: 0;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.category article.post:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.1);
}

body.category article.post .inside-article {
  display: flex;
  flex-direction: column;
  height: 100%;
}

body.category article.post .post-image {
  order: 1;
  margin: 0;
}

body.category article.post .post-image img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
}

body.category article.post .entry-header {
  order: 2;
  padding: 1em 1.2em 1.3em;
}

body.category article.post .entry-title {
  font-size: 18px;
  line-height: 1.4;
  margin: 0;
}

body.category article.post .entry-meta,
body.category article.post .entry-summary,
body.category article.post footer.entry-meta {
  display: none;
}

@media (max-width: 600px) {
  body.category #main {
    grid-template-columns: 1fr;
  }
}

/* ===== 페이지네이션 ===== */
.pagination {
  grid-column: 1 / -1;
  margin: 1.5em 0 1em;
  text-align: center;
}

.pagination .nav-links {
  display: inline-flex;
  gap: 0.5em;
  flex-wrap: wrap;
  justify-content: center;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4em;
  height: 2.4em;
  padding: 0 0.7em;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #e5e1d8;
  color: #23211d;
  text-decoration: none;
  font-size: 0.9em;
  transition: all 0.2s ease;
}

.pagination .page-numbers:hover {
  border-color: #23211d;
}

.pagination .page-numbers.current {
  background: #23211d;
  color: #fff;
  border-color: #23211d;
}

.pagination .page-numbers.dots {
  border: none;
  background: none;
}

.mkt-cat-2 .pagination .page-numbers:hover {
  border-color: #0F7A54;
  color: #0F7A54;
}

.mkt-cat-2 .pagination .page-numbers.current {
  background: #0F7A54;
  border-color: #0F7A54;
  color: #fff;
}

.mkt-cat-3 .pagination .page-numbers:hover {
  border-color: #292524;
  color: #292524;
}

.mkt-cat-3 .pagination .page-numbers.current {
  background: #292524;
  border-color: #292524;
  color: #F4A340;
}
