/*
 * HONJADOC Light 1.0.15
 * Minimal layout + controlled desktop/mobile menus + aligned header/content frame.
 */
:root {
  --honjadoc-text: #111827;
  --honjadoc-muted: #6b7280;
  --honjadoc-border: #e5e7eb;
  --honjadoc-soft: #f8fafc;
  --honjadoc-primary: #2563eb;
  --honjadoc-primary-dark: #1d4ed8;
  --honjadoc-radius: 12px;
  --honjadoc-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  --honjadoc-container: 1140px;
  --honjadoc-gutter: 0px;
  --honjadoc-gutter-mobile: 8px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

@supports (overflow-x: clip) {
  html { overflow-x: clip; }
}

body.honjadoc-light {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  overflow-x: hidden;
  color: var(--honjadoc-text);
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: break-word;
}

@supports (overflow-x: clip) {
  body.honjadoc-light { overflow-x: clip; }
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--honjadoc-primary); }

img, svg, video, canvas, iframe { max-width: 100%; }
img { height: auto; vertical-align: middle; border-style: none; }
button, input, select, textarea { max-width: 100%; font: inherit; }

.screen-reader-text,
.skip-link {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus,
.skip-link:focus {
  z-index: 100000;
  top: 5px;
  left: 5px;
  width: auto;
  height: auto;
  margin: 0;
  padding: 12px 18px;
  clip: auto;
  background: #eee;
  color: #333;
  text-decoration: none;
}

/* Header: lightweight sticky header with safer dropdown/mobile handling. */
.site-header.honjadoc-site-header {
  position: sticky;
  top: 0;
  z-index: 10000;
  width: 100%;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--honjadoc-border);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
}

body.admin-bar .site-header.honjadoc-site-header { top: 32px; }
@media (max-width: 782px) {
  body.admin-bar .site-header.honjadoc-site-header { top: 46px; }
}

.header-inner.honjadoc-header-inner {
  width: calc(100% - var(--honjadoc-gutter));
  max-width: var(--honjadoc-container);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-block: 10px;
  min-width: 0;
}

.site-branding.honjadoc-site-branding {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  max-width: calc(100% - 56px);
}

.site-title.honjadoc-site-title {
  margin: 0;
  font-size: 32px;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.site-title.honjadoc-site-title a {
  color: var(--honjadoc-primary);
  text-decoration: none;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-title.honjadoc-site-title a:hover { color: var(--honjadoc-primary-dark); }
.site-description.honjadoc-site-description { margin: 0; color: var(--honjadoc-muted); font-size: 13px; }
.site-logo.honjadoc-site-logo img { display: block; width: auto; max-height: 56px; }

.honjadoc-desktop-navigation { display: flex; align-items: center; justify-content: flex-end; flex: 1 1 auto; min-width: 0; }
.honjadoc-menu,
.honjadoc-menu ul { list-style: none; margin: 0; padding: 0; }

.honjadoc-menu--desktop { display: flex; align-items: center; justify-content: flex-end; gap: 4px; min-width: 0; }
.honjadoc-menu--desktop > li { position: relative; }
.honjadoc-menu--desktop > li > a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  color: #1f2937;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.honjadoc-menu--desktop > li:hover > a,
.honjadoc-menu--desktop > li:focus-within > a,
.honjadoc-menu--desktop > li.current-menu-item > a,
.honjadoc-menu--desktop > li.current-menu-ancestor > a {
  background: #eef4ff;
  color: var(--honjadoc-primary-dark);
}

.honjadoc-menu--desktop .sub-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 1010;
  min-width: 190px;
  padding: 8px;
  border: 1px solid var(--honjadoc-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--honjadoc-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(5px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
}

.honjadoc-menu--desktop li:hover > .sub-menu,
.honjadoc-menu--desktop li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.honjadoc-menu--desktop .sub-menu a {
  display: block;
  padding: 9px 11px;
  border-radius: 10px;
  color: #374151;
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
  text-decoration: none;
}

.honjadoc-menu--desktop .sub-menu a:hover,
.honjadoc-menu--desktop .sub-menu .current-menu-item > a {
  background: #f3f6fb;
  color: var(--honjadoc-primary-dark);
}

/* Mobile menu: no overlay, no fixed panel, submenus always visible. */
.honjadoc-mobile-toggle {
  display: none;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: rgba(0, 0, 0, .05);
  color: #494c4f;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.honjadoc-mobile-toggle-icon,
.honjadoc-mobile-toggle-icon::before,
.honjadoc-mobile-toggle-icon::after {
  display: block;
  width: 19px;
  height: 3px;
  border-radius: 3px;
  background: currentColor;
  transition: transform .18s ease, box-shadow .18s ease;
}

.honjadoc-mobile-toggle-icon { position: relative; }
.honjadoc-mobile-toggle-icon::before,
.honjadoc-mobile-toggle-icon::after { content: ""; position: absolute; left: 0; }
.honjadoc-mobile-toggle-icon::before { top: -7px; }
.honjadoc-mobile-toggle-icon::after { top: 7px; }
.honjadoc-mobile-toggle[aria-expanded="true"] .honjadoc-mobile-toggle-icon { background: transparent; }
.honjadoc-mobile-toggle[aria-expanded="true"] .honjadoc-mobile-toggle-icon::before { top: 0; transform: rotate(45deg); }
.honjadoc-mobile-toggle[aria-expanded="true"] .honjadoc-mobile-toggle-icon::after { top: 0; transform: rotate(-45deg); }

.honjadoc-mobile-navigation[hidden] { display: none !important; }
.honjadoc-mobile-navigation {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 6px 10px 12px;
  border-top: 1px solid #eef2f7;
  border-bottom: 1px solid #eef2f7;
  background: #fff;
}

.honjadoc-menu--mobile,
.honjadoc-menu--mobile li,
.honjadoc-menu--mobile a { max-width: 100%; min-width: 0; }
.honjadoc-menu--mobile > li { border-bottom: 1px solid #eef2f7; }
.honjadoc-menu--mobile li:last-child { border-bottom: 0; }
.honjadoc-menu--mobile a {
  display: block;
  padding: 11px 0;
  color: #111827;
  font-size: 16px;
  font-weight: 750;
  text-decoration: none;
  white-space: normal;
}
.honjadoc-menu--mobile .sub-menu {
  display: block;
  padding: 0 0 9px 12px;
}
.honjadoc-menu--mobile .sub-menu a {
  padding: 7px 4px 7px 12px;
  border-left: 2px solid #e5e7eb;
  color: #4b5563;
  font-size: 14px;
  font-weight: 650;
}
.honjadoc-menu--mobile a:hover,
.honjadoc-menu--mobile .current-menu-item > a,
.honjadoc-menu--mobile .current-menu-ancestor > a { color: var(--honjadoc-primary-dark); }

/* Shared HONJADOC frame.
   Header logo/menu, main content and footer use the exact same left/right edges. */
body.honjadoc-light .header-inner.honjadoc-header-inner,
body.honjadoc-light .site-main.honjadoc-site-main,
body.honjadoc-light .honjadoc-mobile-navigation,
body.honjadoc-light .honjadoc-footer-inner {
  width: calc(100% - var(--honjadoc-gutter));
  max-width: var(--honjadoc-container);
  margin-left: auto;
  margin-right: auto;
  padding-left: 0;
  padding-right: 0;
}

/* Shortcode shells should fill the shared frame, not create their own wider/narrower frame. */
body.honjadoc-light .hd-hm-map-app,
body.honjadoc-light .hdsb-board {
  width: 100%;
  max-width: 100%;
}

/* The visible map/board card and the header share the same content frame. */
body.honjadoc-light .honjadoc-page-content > .hd-hm-map-app,
body.honjadoc-light .honjadoc-page-content > .hdsb-board {
  margin-left: 0;
  margin-right: 0;
}

.site-footer.honjadoc-site-footer {
  width: 100%;
  max-width: 100%;
}

.site-main.honjadoc-site-main {
  padding-block: 22px 48px;
  min-height: 56vh;
}

.page-header.honjadoc-page-header { margin-block: 0 20px; }
.entry-title { margin: 0; line-height: 1.25; letter-spacing: -0.04em; }
.page-content.honjadoc-page-content { width: 100%; min-width: 0; }
.page-content.honjadoc-page-content a:not(.button):not(.wp-block-button__link) { text-decoration: underline; }
.honjadoc-page-content > *:first-child { margin-top: 0; }
.honjadoc-page-content > *:last-child { margin-bottom: 0; }

/* Avoid duplicate/large page headers when shortcode plugins already render their own title. */
.honjadoc-has-map-shortcode .honjadoc-page-header,
.honjadoc-has-board-shortcode .honjadoc-page-header,
.honjadoc-map-template .honjadoc-page-header { display: none; }
.honjadoc-has-map-shortcode .site-main.honjadoc-site-main,
.honjadoc-map-main { padding-block-start: 14px; }

.alignright { float: right; margin-left: 1rem; }
.alignleft { float: left; margin-right: 1rem; }
.aligncenter { clear: both; display: block; margin-inline: auto; }
.alignwide { margin-inline: -40px; }
.alignfull { margin-inline: calc(50% - 50vw); max-width: 100vw; width: 100vw; }
.alignfull img { width: 100vw; }
.wp-caption { max-width: 100%; margin-block-end: 1.25rem; }
.pagination { display: flex; justify-content: space-between; margin: 20px auto; }

/* Archive cards. */
.honjadoc-post-list { display: grid; gap: 18px; }
.hd-post-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--honjadoc-border);
  border-radius: 16px;
  background: #fff;
}
.hd-post-card__thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
}
.hd-post-card__title { margin: 0 0 8px; font-size: 20px; line-height: 1.35; letter-spacing: -0.03em; }
.hd-post-card__title a { color: #111827; text-decoration: none; }
.hd-post-card__title a:hover { color: var(--honjadoc-primary-dark); }
.hd-post-card__excerpt { color: #4b5563; }
.hd-post-card__excerpt p { margin: 0; }
.hd-post-card__eyebrow { margin-bottom: 6px; color: var(--honjadoc-primary); font-size: 13px; font-weight: 800; }
.hd-empty-state { padding: 36px 0; }

.post-thumbnail.honjadoc-post-thumbnail { margin-bottom: 24px; }
.post-thumbnail.honjadoc-post-thumbnail img { width: 100%; border-radius: 14px; }
.honjadoc-entry-meta { margin-top: 8px; color: var(--honjadoc-muted); font-size: 14px; }
.honjadoc-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--honjadoc-primary);
  color: #fff;
  text-decoration: none !important;
  font-weight: 700;
}
.honjadoc-button:hover { background: var(--honjadoc-primary-dark); color: #fff; }

/* Footer: minimal footer. */
.site-footer.honjadoc-site-footer {
  position: relative;
  padding-block: 18px;
  border-top: 1px solid var(--honjadoc-border);
  color: #4b5563;
  background: #fff;
}
.honjadoc-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.honjadoc-footer-menu { display: flex; flex-wrap: wrap; gap: 12px 18px; list-style: none; margin: 0; padding: 0; }
.honjadoc-footer-menu a { color: #4b5563; font-size: 14px; text-decoration: none; }
.honjadoc-footer-menu a:hover { color: var(--honjadoc-primary-dark); }
.honjadoc-footer-copy { margin-left: auto; font-size: 13px; color: #6b7280; }

/* Alignment safeguard: header left/right must match the visible content shell. */
body.honjadoc-light .honjadoc-site-header .honjadoc-header-inner,
body.honjadoc-light main.honjadoc-site-main,
body.honjadoc-light .honjadoc-footer-inner {
  box-sizing: border-box;
}


@media (max-width: 1180px) and (min-width: 576px) {
  body.honjadoc-light .header-inner.honjadoc-header-inner,
  body.honjadoc-light .site-main.honjadoc-site-main,
  body.honjadoc-light .honjadoc-mobile-navigation,
  body.honjadoc-light .honjadoc-footer-inner {
    width: calc(100% - 24px);
  }
}

@media (max-width: 575px) {
  body.honjadoc-light .site-main.honjadoc-site-main,
  body.honjadoc-light .honjadoc-footer-inner {
    width: calc(100% - var(--honjadoc-gutter-mobile));
  }

  /* Mobile header should align with the visible map/card edge,
     not stick to the absolute viewport edge. */
  body.honjadoc-light .header-inner.honjadoc-header-inner,
  body.honjadoc-light .honjadoc-mobile-navigation {
    width: calc(100% - 32px);
  }

  .site-main.honjadoc-site-main { padding-block: 16px 38px; }
  .honjadoc-has-map-shortcode .site-main.honjadoc-site-main,
  .honjadoc-map-main { padding-block-start: 10px; }
}

@media (max-width: 980px) {
  .honjadoc-desktop-navigation { display: none; }
  .honjadoc-mobile-toggle { display: inline-flex; }
  .header-inner.honjadoc-header-inner { padding-block: 8px; gap: 10px; }
  .site-title.honjadoc-site-title { font-size: 30px; }
  .site-logo.honjadoc-site-logo img { max-height: 52px; }
}

@media (max-width: 640px) {
  .hd-post-card { grid-template-columns: 1fr; padding: 14px; }
  .hd-post-card__thumb img { aspect-ratio: 16 / 9; }

  /* Mobile footer: keep links away from the viewport edge and center them. */
  body.honjadoc-light .honjadoc-footer-inner {
    width: calc(100% - 32px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
  }
  .honjadoc-footer-navigation { width: 100%; }
  .honjadoc-footer-menu {
    justify-content: center;
    gap: 10px 18px;
  }
  .honjadoc-footer-menu a {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    justify-content: center;
  }
  .honjadoc-footer-copy {
    width: 100%;
    margin-top: 0;
    margin-left: 0;
    text-align: center;
  }
}
