/*
Theme Name: Danang Masangmu
Theme URI: https://danangmasangmu.com
Author: JorgeLIM1
Description: 다낭마상무 전용 모바일 우선 WordPress 테마
Version: 0.4.0
Text Domain: danang-masangmu
*/

:root {
  --dm-bg: #0f1115;
  --dm-surface: #171a21;
  --dm-card: #1f232c;
  --dm-text: #f5f7fa;
  --dm-muted: #aeb6c2;
  --dm-accent: #ffb703;
  --dm-line: rgba(255,255,255,.1);
  --dm-width: 1180px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--dm-bg); color: var(--dm-text); font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Noto Sans KR", sans-serif; line-height: 1.7; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
input, button { font: inherit; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.dm-container { width: min(calc(100% - 32px), var(--dm-width)); margin: 0 auto; }
.dm-header { position: sticky; top: 0; z-index: 50; background: rgba(15,17,21,.94); border-bottom: 1px solid var(--dm-line); backdrop-filter: blur(12px); }
.admin-bar .dm-header { top: 32px; }
.dm-header__inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.dm-header__actions { display: flex; align-items: center; gap: 10px; order: 3; }
.dm-brand { position: relative; z-index: 61; font-size: 1.25rem; font-weight: 900; letter-spacing: -.04em; }
.dm-brand strong { color: var(--dm-accent); }
.dm-nav { margin-left: auto; }
.dm-nav ul { display: flex; gap: 20px; margin: 0; padding: 0; list-style: none; font-size: .95rem; }
.dm-nav a { display: block; font-weight: 700; }
.dm-nav a:hover { color: var(--dm-accent); }
.dm-header-search { display: flex; width: 180px; height: 40px; overflow: hidden; border: 1px solid var(--dm-line); border-radius: 12px; background: var(--dm-card); }
.dm-header-search input { min-width: 0; width: 100%; padding: 0 12px; border: 0; outline: 0; background: transparent; color: var(--dm-text); }
.dm-header-search button { width: 42px; border: 0; background: transparent; color: var(--dm-accent); cursor: pointer; font-size: 1.25rem; }
.dm-menu-toggle { display: none; width: 44px; height: 44px; padding: 10px; border: 1px solid var(--dm-line); border-radius: 12px; background: var(--dm-card); cursor: pointer; }
.dm-menu-toggle span { display: block; width: 100%; height: 2px; margin: 5px 0; background: var(--dm-text); transition: transform .2s ease, opacity .2s ease; }
.dm-menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.dm-menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.dm-menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.dm-hero { padding: 88px 0 56px; background: radial-gradient(circle at 80% 20%, rgba(255,183,3,.18), transparent 34%); }
.dm-eyebrow { color: var(--dm-accent); font-weight: 800; }
.dm-hero h1 { max-width: 760px; margin: 12px 0 18px; font-size: clamp(2.25rem, 7vw, 5.25rem); line-height: 1.05; letter-spacing: -.055em; }
.dm-hero p { max-width: 680px; margin: 0; color: var(--dm-muted); font-size: 1.08rem; }
.dm-category-strip { padding: 22px 0; border-top: 1px solid var(--dm-line); border-bottom: 1px solid var(--dm-line); background: var(--dm-surface); }
.dm-category-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.dm-category-link { min-height: 86px; padding: 14px; border: 1px solid var(--dm-line); border-radius: 14px; background: var(--dm-card); display: flex; flex-direction: column; justify-content: space-between; transition: transform .2s ease, border-color .2s ease; }
.dm-category-link:hover { transform: translateY(-3px); border-color: rgba(255,183,3,.55); }
.dm-category-link strong { font-size: .95rem; line-height: 1.35; }
.dm-category-link span { color: var(--dm-accent); font-size: .78rem; font-weight: 800; }
.dm-section { padding: 56px 0; }
.dm-section__head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.dm-section h2 { margin: 0; font-size: clamp(1.6rem, 4vw, 2.35rem); letter-spacing: -.04em; }
.dm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.dm-card { overflow: hidden; background: var(--dm-card); border: 1px solid var(--dm-line); border-radius: 18px; }
.dm-card__body { padding: 20px; }
.dm-card__meta { color: var(--dm-accent); font-size: .84rem; font-weight: 800; }
.dm-card h3 { margin: 8px 0 10px; font-size: 1.22rem; line-height: 1.35; }
.dm-card p { margin: 0; color: var(--dm-muted); font-size: .94rem; }
.dm-footer { border-top: 1px solid var(--dm-line); padding: 36px 0; color: var(--dm-muted); }
.dm-archive-hero { padding: 68px 0 42px; border-bottom: 1px solid var(--dm-line); background: radial-gradient(circle at 85% 20%, rgba(255,183,3,.14), transparent 30%); }
.dm-archive-hero h1 { margin: 8px 0 10px; font-size: clamp(2.3rem, 6vw, 4.5rem); line-height: 1.1; letter-spacing: -.05em; }
.dm-archive-hero p, .dm-archive-desc { margin: 0; color: var(--dm-muted); }
.dm-list-grid { display: grid; gap: 18px; }
.dm-list-card { display: grid; grid-template-columns: 320px 1fr; overflow: hidden; border: 1px solid var(--dm-line); border-radius: 18px; background: var(--dm-card); }
.dm-list-card__thumb { min-height: 210px; background: #151820; }
.dm-list-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.dm-no-image { width: 100%; height: 100%; min-height: 210px; display: grid; place-items: center; color: var(--dm-accent); font-weight: 900; letter-spacing: .08em; }
.dm-list-card__body { padding: 24px; }
.dm-list-card h2 { margin: 6px 0 10px; font-size: clamp(1.35rem, 3vw, 1.8rem); line-height: 1.35; }
.dm-list-card p { margin: 0 0 18px; color: var(--dm-muted); }
.dm-read-more { color: var(--dm-accent); font-weight: 800; }
.dm-empty-state { padding: 60px 24px; text-align: center; border: 1px solid var(--dm-line); border-radius: 18px; background: var(--dm-card); }
.dm-pagination { margin-top: 34px; }
.dm-pagination .page-numbers { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.dm-pagination a, .dm-pagination span { display: grid; min-width: 42px; height: 42px; padding: 0 13px; place-items: center; border: 1px solid var(--dm-line); border-radius: 10px; background: var(--dm-card); }
.dm-pagination .current { border-color: var(--dm-accent); color: var(--dm-accent); }
.dm-single__header { padding: 64px 0 40px; border-bottom: 1px solid var(--dm-line); }
.dm-single__header-inner { max-width: 900px; }
.dm-single__cats { color: var(--dm-accent); font-size: .9rem; font-weight: 800; }
.dm-single__header h1 { margin: 10px 0 16px; font-size: clamp(2.25rem, 6vw, 4.4rem); line-height: 1.13; letter-spacing: -.05em; }
.dm-single__meta { display: flex; gap: 16px; color: var(--dm-muted); font-size: .9rem; }
.dm-single__layout { display: grid; grid-template-columns: minmax(0, 820px) 280px; gap: 44px; align-items: start; padding-top: 48px; padding-bottom: 80px; }
.dm-single__thumb { overflow: hidden; margin: 0 0 34px; border-radius: 20px; }
.dm-entry-content { font-size: 1.06rem; }
.dm-entry-content p, .dm-entry-content li { color: #d7dce4; }
.dm-entry-content h2 { margin: 46px 0 18px; font-size: 1.85rem; line-height: 1.3; }
.dm-entry-content h3 { margin: 34px 0 14px; font-size: 1.35rem; }
.dm-entry-content a { color: var(--dm-accent); text-decoration: underline; }
.dm-entry-content img { margin: 26px auto; border-radius: 16px; }
.dm-single__aside { position: sticky; top: 96px; display: grid; gap: 16px; }
.dm-aside-box { padding: 20px; border: 1px solid var(--dm-line); border-radius: 16px; background: var(--dm-card); }
.dm-aside-box > strong { display: block; margin-bottom: 10px; font-size: 1.05rem; }
.dm-aside-box p { margin: 0; color: var(--dm-muted); font-size: .9rem; }
.dm-aside-box ul { margin: 0; padding: 0; list-style: none; }
.dm-aside-box li + li { margin-top: 8px; }
.dm-aside-box a:hover { color: var(--dm-accent); }
.dm-aside-box .search-form { display: flex; overflow: hidden; border: 1px solid var(--dm-line); border-radius: 10px; }
.dm-aside-box .search-field { min-width: 0; width: 100%; padding: 10px 12px; border: 0; outline: 0; background: #151820; color: var(--dm-text); }
.dm-aside-box .search-submit { padding: 0 14px; border: 0; background: var(--dm-accent); color: #111; font-weight: 800; cursor: pointer; }
.dm-related { margin-top: 54px; padding-top: 34px; border-top: 1px solid var(--dm-line); }
.dm-related h2 { margin: 0 0 18px; font-size: 1.55rem; }
.dm-related__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dm-related__item a { display: block; height: 100%; padding: 16px; border: 1px solid var(--dm-line); border-radius: 14px; background: var(--dm-card); }
.dm-related__item a:hover { border-color: rgba(255,183,3,.55); }
.dm-related__item span { display: block; color: var(--dm-accent); font-size: .78rem; font-weight: 800; }
.dm-related__item strong { display: block; margin-top: 6px; line-height: 1.4; }
.dm-post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 54px; padding-top: 28px; border-top: 1px solid var(--dm-line); }
.dm-post-nav a { display: block; min-height: 88px; padding: 16px; border: 1px solid var(--dm-line); border-radius: 14px; background: var(--dm-card); }
.dm-post-nav span { display: block; color: var(--dm-accent); font-size: .78rem; font-weight: 800; }
.dm-post-nav strong { display: block; margin-top: 5px; line-height: 1.4; }
@media (max-width: 1040px) {
  .dm-category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dm-single__layout { grid-template-columns: 1fr; }
  .dm-single__aside { position: static; grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .admin-bar .dm-header { top: 46px; }
  .dm-header-search { width: 150px; }
  .dm-menu-toggle { display: block; position: relative; z-index: 61; }
  .dm-nav { display: none; position: fixed; inset: 68px 0 auto 0; z-index: 60; padding: 18px 16px 24px; background: rgba(15,17,21,.99); border-bottom: 1px solid var(--dm-line); box-shadow: 0 18px 40px rgba(0,0,0,.35); }
  .admin-bar .dm-nav { top: 114px; }
  .dm-nav.is-open { display: block; }
  .dm-nav ul { width: min(100%, var(--dm-width)); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .dm-nav a { padding: 13px 14px; border: 1px solid var(--dm-line); border-radius: 12px; background: var(--dm-card); }
  body.dm-menu-open { overflow: hidden; }
  .dm-grid { grid-template-columns: 1fr 1fr; }
  .dm-list-card { grid-template-columns: 240px 1fr; }
}
@media (max-width: 560px) {
  .dm-grid { grid-template-columns: 1fr; }
  .dm-category-grid { grid-template-columns: 1fr 1fr; }
  .dm-category-link:last-child { grid-column: 1 / -1; }
  .dm-hero { padding: 64px 0 42px; }
  .dm-hero h1 { font-size: clamp(2.45rem, 13vw, 4.2rem); }
  .dm-header-search { width: 42px; }
  .dm-header-search input { display: none; }
  .dm-nav ul { grid-template-columns: 1fr; }
  .dm-list-card { grid-template-columns: 1fr; }
  .dm-list-card__thumb { min-height: 200px; }
  .dm-single__header { padding: 46px 0 30px; }
  .dm-single__layout { padding-top: 30px; }
  .dm-single__aside { grid-template-columns: 1fr; }
  .dm-related__grid, .dm-post-nav { grid-template-columns: 1fr; }
}