/*
Theme Name: Junes Press
Theme URI: https://example.com/junes-press
Author: Junes Press
Description: 쿠폰, 카드 혜택, 쇼핑 정보를 위한 따뜻하고 깔끔한 매거진형 워드프레스 테마입니다.
Version: 1.1.4
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: benefit-press
*/

:root {
  --ink: #252522;
  --muted: #72716c;
  --paper: #fffdf8;
  --cream: #f7f1e5;
  --peach: #ffe4ba;
  --green: #cfe7a8;
  --green-dark: #315b45;
  --blue: #2879c8;
  --line: #e7e1d7;
  --shadow: 0 10px 28px rgba(45, 43, 37, .12);
  --radius: 22px;
  --max: 1420px;
  --grid-columns: 3;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #f4f4f3;
  font-family: Pretendard, "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  word-break: keep-all;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-top: 5px solid #343431;
  border-bottom: 1px solid rgba(0,0,0,.06);
  background: rgba(255,252,245,.94);
  backdrop-filter: blur(14px);
}
.header-inner { max-width: var(--max); min-height: 92px; margin: auto; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 38px; }
.brand { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.custom-logo-link { display: block; }
.custom-logo { width: auto; max-width: 220px; max-height: 64px; }
.brand-mark { position: relative; width: 58px; height: 50px; }
.brand-mark::before { content: ""; position: absolute; inset: 12px 5px 2px; border: 2px solid #53534f; border-radius: 4px; background: linear-gradient(90deg, var(--green) 0 45%, #fff8e9 45% 55%, var(--green) 55%); }
.brand-mark::after { content: "✧"; position: absolute; left: 19px; top: -11px; color: #5f5e58; font-size: 34px; transform: rotate(-4deg); }
.brand-title { display: block; font-weight: 900; font-size: 23px; line-height: 1.05; letter-spacing: -.07em; }
.brand-subtitle { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.primary-nav ul { display: flex; align-items: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.primary-nav li { position: relative; }
.primary-nav a { display: block; padding: 17px 20px; border-radius: 15px; font-size: 18px; font-weight: 800; }
.primary-nav a:hover, .primary-nav .current-menu-item > a { background: var(--peach); }
.primary-nav .menu-item-has-children > a { display: flex; align-items: center; gap: 8px; }
.primary-nav .menu-item-has-children > a::after { content: "⌄"; position: relative; top: -2px; font-size: 16px; line-height: 1; transition: transform .2s ease; }
.primary-nav .sub-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  display: block;
  visibility: hidden;
  min-width: 190px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.primary-nav .sub-menu::before { content: ""; position: absolute; right: 0; bottom: 100%; left: 0; height: 10px; }
.primary-nav .sub-menu a { padding: 10px 13px; border-radius: 9px; font-size: 15px; white-space: nowrap; }
.primary-nav li:hover > .sub-menu,
.primary-nav li:focus-within > .sub-menu { visibility: visible; opacity: 1; transform: translate(-50%, 0); }
.primary-nav li:hover > a::after,
.primary-nav li:focus-within > a::after { transform: rotate(180deg); }
.primary-nav .sub-menu .sub-menu { top: 0; left: auto; right: calc(100% + 8px); transform: translate(8px, 0); }
.primary-nav .sub-menu li:hover > .sub-menu,
.primary-nav .sub-menu li:focus-within > .sub-menu { transform: translate(0, 0); }
.menu-toggle { display: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--cream); font-size: 23px; cursor: pointer; }

.site-shell { max-width: var(--max); margin: 0 auto; padding: 28px; }
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; align-items: start; gap: 24px; }
.hero { position: relative; overflow: hidden; margin-bottom: 24px; padding: 38px 48px; border-radius: 28px; background: var(--paper); box-shadow: var(--shadow); }
.hero::after { content: ""; position: absolute; top: -85px; right: -55px; width: 250px; height: 250px; border-radius: 50%; background: radial-gradient(circle, rgba(207,231,168,.7), rgba(207,231,168,0) 68%); }
.eyebrow { margin: 0 0 8px; color: var(--green-dark); font-size: 13px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.hero h1 { position: relative; z-index: 1; margin: 0; font-size: clamp(32px,4vw,49px); line-height: 1.22; letter-spacing: -.055em; }
.hero p { position: relative; z-index: 1; margin: 13px 0 0; color: #55534e; font-size: 18px; }

.post-grid { display: grid; grid-template-columns: repeat(var(--grid-columns), minmax(0,1fr)); align-items: start; gap: 22px; }
.post-card { align-self: start; overflow: hidden; border: 1px solid rgba(40,40,35,.06); border-radius: var(--radius); background: white; box-shadow: 0 7px 18px rgba(45,43,37,.1); transition: transform .2s ease, box-shadow .2s ease; }
.post-card:hover { transform: translateY(-5px); box-shadow: 0 14px 30px rgba(45,43,37,.15); }
.card-media { position: relative; display: block; aspect-ratio: 1.45 / 1; overflow: hidden; background: linear-gradient(145deg,#fff7e7,#f8f4ee 65%,#efe8dd); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.post-card:hover .card-media img { transform: scale(1.035); }
.fallback-art { width: 100%; height: 100%; display: grid; place-items: center; background: radial-gradient(circle at 72% 20%,#ffe0aa 0 9%,transparent 30%), linear-gradient(145deg,#fff9ed,#f3eadb); }
.fallback-card { width: 42%; aspect-ratio: .64; display: grid; place-items: center; border-radius: 11px; color: white; background: linear-gradient(155deg,#243c31,#13241d); box-shadow: 0 18px 30px rgba(32,46,39,.23); transform: rotate(2deg); font-weight: 900; letter-spacing: .08em; }
.card-body { padding: 23px 25px 20px; }
.card-category { display: inline-block; margin-bottom: 8px; color: var(--green-dark); font-size: 12px; font-weight: 900; letter-spacing: .04em; }
.card-title { margin: 0; font-size: 21px; line-height: 1.38; letter-spacing: -.035em; }
.card-excerpt { display: -webkit-box; overflow: hidden; margin: 12px 0 18px; color: var(--muted); font-size: 14px; line-height: 1.65; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; }
.card-excerpt p { margin: 0; }
.card-meta { display: flex; align-items: center; gap: 8px; padding-top: 14px; border-top: 1px solid #f0ede7; color: var(--blue); font-size: 13px; }
.card-meta svg { width: 16px; flex: 0 0 auto; fill: #71839d; }

.sidebar {
  position: static;
  display: grid;
  gap: 20px;
}
.widget { padding: 28px; border: 1px solid rgba(40,40,35,.06); border-radius: 20px; background: white; box-shadow: var(--shadow); }
.widget-title { margin: 0 0 17px; font-size: 20px; letter-spacing: -.035em; }
.widget-title::before { content: "◎"; margin-right: 8px; color: #6f9baa; }
.tagcloud { display: flex; flex-wrap: wrap; gap: 9px; }
.tagcloud a { padding: 5px 10px; border: 1px solid #ddd9d2; border-radius: 7px; background: linear-gradient(#fff,#f8f7f5); color: #55534f; font-size: 14px !important; line-height: 1.4; }
.tagcloud a:hover { border-color: #b9d28e; background: #f2f9e7; color: #35583f; }
.widget ul { margin: 0; padding: 0; list-style: none; }
.widget li + li { margin-top: 10px; }
.widget li a:hover { color: var(--blue); }
.widget_recent_entries ul,
.widget .wp-block-latest-posts { display: grid; gap: 22px; }
.widget_recent_entries li,
.widget .wp-block-latest-posts li {
  position: relative;
  overflow: hidden;
  margin: 0 !important;
  padding: 0 0 16px;
  border: 1px solid #ded8ce;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 5px 15px rgba(45,43,37,.07);
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.widget_recent_entries li:hover,
.widget .wp-block-latest-posts li:hover {
  border-color: #ceddb6;
  box-shadow: 0 10px 22px rgba(45,43,37,.1);
  transform: translateY(-3px);
}
.widget .wp-block-latest-posts__featured-image { overflow: hidden; margin: 0 0 15px !important; }
.widget .wp-block-latest-posts__featured-image a { display: block; }
.widget .wp-block-latest-posts__featured-image img { width: 100%; height: auto; margin: 0; transition: transform .3s ease; }
.widget .wp-block-latest-posts li:hover .wp-block-latest-posts__featured-image img { transform: scale(1.025); }
.widget_recent_entries li > a,
.widget .wp-block-latest-posts__post-title {
  display: block;
  position: relative;
  padding: 0 45px 0 17px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 850;
  line-height: 1.5;
  letter-spacing: -.035em;
}
.widget_recent_entries li > a::after,
.widget .wp-block-latest-posts__post-title::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: 17px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: var(--green-dark);
  background: #edf5df;
  font-size: 14px;
  transform: translateY(-50%);
  transition: transform .2s ease, background .2s ease;
}
.widget_recent_entries li:hover > a,
.widget .wp-block-latest-posts li:hover .wp-block-latest-posts__post-title { color: var(--green-dark); }
.widget_recent_entries li:hover > a::after,
.widget .wp-block-latest-posts li:hover .wp-block-latest-posts__post-title::after { background: var(--green); transform: translate(3px,-50%); }
.widget .wp-block-latest-posts__post-date { display: block; margin: 8px 17px 0; color: var(--muted); font-size: 12px; }
.widget_block > .wp-block-heading,
.widget_recent_entries > .widget-title { position: relative; padding-bottom: 15px; border-bottom: 2px solid #ece7de; }
.widget_block > .wp-block-heading::after,
.widget_recent_entries > .widget-title::after { content: ""; position: absolute; bottom: -2px; left: 0; width: 52px; height: 3px; border-radius: 4px; background: var(--green-dark); }
.search-form { display: flex; gap: 8px; }
.search-field { min-width: 0; width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fbfaf7; }
.search-submit { border: 0; border-radius: 10px; padding: 0 14px; color: #fff; background: var(--green-dark); cursor: pointer; }

.pagination { margin-top: 32px; }
.nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.page-numbers { min-width: 40px; padding: 7px 12px; border-radius: 10px; background: white; text-align: center; }
.page-numbers.current { color: white; background: var(--green-dark); }
.article { padding: clamp(26px,5vw,64px); border-radius: 26px; background: white; box-shadow: var(--shadow); }
.article-header { margin-bottom: 32px; }
.article-title { margin: 6px 0 12px; font-size: clamp(32px,4.5vw,54px); line-height: 1.22; letter-spacing: -.055em; }
.article-meta { color: var(--muted); font-size: 14px; }
.article-thumbnail { margin: 0 0 34px; overflow: hidden; border-radius: 18px; }
.article-content { font-size: 18px; }
.article-content > * { max-width: 780px; margin-right: auto; margin-left: auto; }
.article-content > .alignwide { max-width: 1050px; }
.article-content > .alignfull { max-width: none; }
.article-content h2, .article-content h3, .article-content h4 { line-height: 1.35; }
.article-content > h2 {
  position: relative;
  margin-top: 2.4em;
  margin-bottom: 1em;
  padding: 22px 26px 22px 34px;
  overflow: hidden;
  border: 1px solid #e4e9da;
  border-radius: 17px;
  background: linear-gradient(120deg,#f7faef 0%,#fffdf8 68%);
  box-shadow: 0 7px 18px rgba(48,72,50,.07);
  font-size: clamp(25px,3vw,34px);
  letter-spacing: -.045em;
}
.article-content > h2::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 8px; background: linear-gradient(var(--green-dark),var(--green)); }
.article-content > h2::after { content: ""; position: absolute; top: -45px; right: -35px; width: 125px; height: 125px; border-radius: 50%; background: rgba(207,231,168,.23); }
.article-content > h3 {
  margin-top: 2em;
  margin-bottom: .9em;
  padding: 15px 19px;
  border-left: 5px solid var(--green-dark);
  border-radius: 0 12px 12px 0;
  background: #faf9f5;
  font-size: clamp(21px,2.3vw,27px);
  letter-spacing: -.035em;
}
.article-content > h4 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 1.7em;
  margin-bottom: .75em;
  color: var(--green-dark);
  font-size: 19px;
  letter-spacing: -.025em;
}
.article-content > h4::before { content: ""; width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: var(--green-dark); box-shadow: 0 0 0 5px #edf5df; }
.article-content > ul,
.article-content > ol {
  padding: 20px 24px 20px 48px;
  border: 1px solid #e7e2d9;
  border-radius: 15px;
  background: #fffdfa;
  box-shadow: 0 5px 15px rgba(45,43,37,.06);
}
.article-content > ul li,
.article-content > ol li { padding: 7px 5px; }
.article-content > ul li + li,
.article-content > ol li + li { border-top: 1px dashed #e9e4dc; }
.article-content > ul li::marker { color: var(--green-dark); font-size: 1.15em; }
.article-content > ol { counter-reset: article-list; padding-left: 24px; list-style: none; }
.article-content > ol > li { position: relative; min-height: 38px; padding-left: 46px; counter-increment: article-list; }
.article-content > ol > li::before { content: counter(article-list); position: absolute; top: 6px; left: 0; display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; background: var(--green-dark); color: white; font-size: 13px; font-weight: 900; }
.article-content a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.article-content blockquote { padding: 18px 24px; border-left: 5px solid var(--green); background: #fafbf6; }
.article-content pre { overflow: auto; padding: 20px; border-radius: 12px; background: #252522; color: white; }
.article-content mjx-container[display="true"] { max-width: 100%; margin: 1.6em auto !important; padding: 18px 12px; overflow-x: auto; overflow-y: hidden; border-radius: 12px; background: #faf9f5; }
.article-content mjx-container:not([display="true"]) { margin: 0 .12em; }
.empty-state { grid-column: 1 / -1; padding: 60px 30px; border-radius: var(--radius); background: white; text-align: center; }

.site-footer { margin-top: 50px; padding: 42px 28px; border-top: 1px solid var(--line); background-color: #fffcf5; color: var(--ink); }
.footer-inner { max-width: var(--max); margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 25px; }
.footer-title { font-weight: 900; color: var(--ink); }
.footer-copy { color: var(--muted); font-size: 13px; }
.footer-brand { display: grid; gap: 5px; }
.footer-meta { display: grid; justify-items: end; gap: 12px; }
.footer-nav ul { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px 0; margin: 0; padding: 0; list-style: none; }
.footer-nav li { display: flex; align-items: center; }
.footer-nav li + li::before { content: ""; width: 1px; height: 11px; margin: 0 12px; background: #d5d0c7; }
.footer-nav a { color: #55534e; font-size: 13px; font-weight: 700; text-underline-offset: 3px; }
.footer-nav a:hover { color: var(--green-dark); text-decoration: underline; }
.cookie-notice { position: fixed; z-index: 1000; right: 22px; bottom: 22px; left: 22px; max-width: 680px; margin-left: auto; padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); box-shadow: 0 15px 45px rgba(30,30,25,.2); }
.cookie-notice[hidden] { display: none; }
.cookie-notice p { margin: 0 0 12px; color: #55534e; font-size: 14px; }
.cookie-notice a { color: var(--blue); text-decoration: underline; }
.cookie-actions { display: flex; justify-content: flex-end; gap: 8px; }
.cookie-actions button { padding: 8px 15px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.cookie-reject { background: white; color: var(--ink); }
.cookie-accept { border-color: var(--green-dark) !important; background: var(--green-dark); color: white; }
.contact-form { display: grid; gap: 16px; max-width: 720px !important; }
.contact-form label { display: grid; gap: 6px; font-weight: 800; }
.contact-form input, .contact-form textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fbfaf7; }
.contact-form button { justify-self: start; padding: 11px 22px; border: 0; border-radius: 10px; background: var(--green-dark); color: white; font-weight: 800; cursor: pointer; }
.form-message { padding: 12px 15px; border-radius: 10px; background: #f2f9e7; }

@media (max-width: 1120px) {
  .post-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .content-layout { grid-template-columns: minmax(0,1fr) 290px; }
  .primary-nav a { padding: 14px 12px; font-size: 16px; }
}
@media (max-width: 820px) {
  .header-inner { min-height: 76px; padding: 0 18px; }
  .menu-toggle { display: block; }
  .primary-nav { display: none; position: absolute; top: 75px; right: 18px; left: 18px; padding: 12px; border-radius: 16px; background: white; box-shadow: var(--shadow); }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { display: block; }
  .primary-nav a { padding: 12px 14px; }
  .primary-nav .sub-menu { position: static; visibility: visible; margin: 2px 0 5px 18px; padding: 2px 0 2px 10px; border: 0; border-left: 2px solid var(--green); border-radius: 0; background: transparent; box-shadow: none; opacity: 1; transform: none; }
  .primary-nav .sub-menu a { padding: 9px 12px; white-space: normal; }
  .primary-nav .menu-item-has-children > a::after { margin-left: auto; }
  .site-shell { padding: 18px; }
  .content-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .hero { padding: 30px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .brand-mark { width: 48px; height: 44px; }
  .brand-title { font-size: 20px; }
  .post-grid { grid-template-columns: 1fr; }
  .hero { border-radius: 20px; }
  .hero p { font-size: 16px; }
  .card-title { font-size: 20px; }
  .footer-inner { display: grid; }
  .footer-meta { justify-items: start; }
  .footer-nav ul { justify-content: flex-start; }
}
