/*
Theme Name: 주소허브
Theme URI: https://example.com/
Author: Dev1L
Description: 주소허브 SEO 링크 안내 사이트용 클래식 WordPress 테마.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.0
Text Domain: jusohub
*/

:root {
  --jh-bg: #f7fbff;
  --jh-surface: #ffffff;
  --jh-surface-soft: #eaf4ff;
  --jh-text: #102033;
  --jh-muted: #64748b;
  --jh-primary: #1473e6;
  --jh-primary-dark: #0b54b8;
  --jh-primary-soft: #dbeafe;
  --jh-accent: #22b8ff;
  --jh-line: #d8e6f7;
  --jh-shadow: 0 10px 26px rgba(20, 115, 230, 0.08);
  --jh-radius-lg: 18px;
  --jh-radius-md: 14px;
  --jh-radius-sm: 14px;
  --jh-container: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--jh-bg);
  color: var(--jh-text);
  font-family: "Noto Sans KR", "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  word-break: keep-all;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  height: auto;
  max-width: 100%;
}

button,
input,
textarea,
select {
  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;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(216, 230, 247, 0.8);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
}

.header-inner,
.container {
  width: min(var(--jh-container), calc(100% - 40px));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  gap: 24px;
}

.site-branding {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 1.28rem;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--jh-primary);
  color: #fff;
  box-shadow: none;
}

.primary-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-menu li {
  position: relative;
}

.primary-menu a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  color: #263b55;
  font-weight: 700;
  font-size: 0.95rem;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a {
  background: var(--jh-primary-soft);
  color: var(--jh-primary-dark);
}

.primary-menu .sub-menu {
  position: absolute;
  left: 50%;
  top: 100%;
  z-index: 20;
  display: grid;
  min-width: 132px;
  margin: 0;
  padding: 14px 0 15px;
  list-style: none;
  border-right: 3px solid #2f8cff;
  background: #fff;
  box-shadow: none;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: translateX(-50%);
  transition: opacity 120ms ease;
}

.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translateX(-50%);
}

.primary-menu .sub-menu a {
  display: flex;
  justify-content: center;
  min-height: 43px;
  padding: 0 22px;
  border-radius: 0;
  background: transparent;
  color: #a4a4a4;
  font-size: 19px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
}

.primary-menu .sub-menu a:hover,
.primary-menu .sub-menu .current-menu-item > a {
  background: transparent;
  color: #1f1f1f;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--jh-line);
  border-radius: 14px;
  background: #fff;
  color: var(--jh-text);
  cursor: pointer;
}

.menu-toggle span,
.menu-toggle::before,
.menu-toggle::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.menu-toggle {
  flex-direction: column;
  gap: 4px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 54px;
  background:
    linear-gradient(180deg, #ffffff 0%, #eef7ff 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  gap: 44px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 6px 10px;
  border: 1px solid var(--jh-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--jh-primary-dark);
  font-size: 0.88rem;
  font-weight: 800;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(2.1rem, 4.4vw, 3.9rem);
  line-height: 1.15;
  letter-spacing: 0;
}

.hero-copy {
  margin: 18px 0 0;
  max-width: 620px;
  color: var(--jh-muted);
  font-size: 1.12rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.button,
.wp-block-button__link,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--jh-primary);
  color: #fff;
  font-weight: 800;
  box-shadow: none;
  cursor: pointer;
}

.button:hover,
.wp-block-button__link:hover,
input[type="submit"]:hover {
  background: var(--jh-primary-dark);
}

.button.secondary {
  border: 1px solid var(--jh-line);
  background: #fff;
  color: var(--jh-primary-dark);
  box-shadow: none;
}

.hero-panel {
  padding: 20px;
  border: 1px solid rgba(216, 230, 247, 0.9);
  border-radius: var(--jh-radius-lg);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--jh-shadow);
}

.search-card {
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.search-card h2 {
  margin: 0 0 12px;
  font-size: 1.28rem;
}

.search-form {
  display: flex;
  gap: 10px;
}

.search-form label {
  flex: 1;
}

.search-field,
input[type="text"],
input[type="email"],
input[type="url"],
textarea {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--jh-line);
  border-radius: 16px;
  background: #fff;
  color: var(--jh-text);
  padding: 0 15px;
  outline: none;
}

textarea {
  min-height: 150px;
  padding-top: 13px;
  resize: vertical;
}

.search-field:focus,
input:focus,
textarea:focus {
  border-color: var(--jh-primary);
  box-shadow: 0 0 0 4px rgba(20, 115, 230, 0.12);
}

.section {
  padding: 54px 0;
}

.section.alt {
  background: #fff;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.section-head h2,
.entry-content h2 {
  margin: 0;
  font-size: clamp(1.55rem, 2.4vw, 2.15rem);
  line-height: 1.18;
  letter-spacing: 0;
}

.section-head p {
  margin: 10px 0 0;
  max-width: 560px;
  color: var(--jh-muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card,
.post-card,
.link-card,
.widget {
  border: 1px solid var(--jh-line);
  border-radius: var(--jh-radius-md);
  background: var(--jh-surface);
  box-shadow: none;
}

.card,
.post-card,
.link-card {
  padding: 24px;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  border-radius: 16px;
  background: var(--jh-primary-soft);
  color: var(--jh-primary-dark);
  font-weight: 900;
}

.card h3,
.post-card h3,
.link-card h3 {
  margin: 0 0 10px;
  font-size: 1.18rem;
  line-height: 1.38;
}

.card p,
.post-card p,
.link-card p {
  margin: 0;
  color: var(--jh-muted);
}

.link-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
}

.link-card a {
  color: var(--jh-primary-dark);
  font-weight: 900;
}

.badge {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--jh-primary-soft);
  color: var(--jh-primary-dark);
  font-size: 0.78rem;
  font-weight: 800;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 34px;
  align-items: start;
}

.page-hero {
  padding: 64px 0;
  background: linear-gradient(180deg, #ffffff 0%, #edf7ff 100%);
  border-bottom: 1px solid var(--jh-line);
}

.page-hero p {
  max-width: 680px;
  margin: 18px 0 0;
  color: var(--jh-muted);
  font-size: 1.05rem;
}

.entry-card {
  padding: 34px;
  border: 1px solid var(--jh-line);
  border-radius: var(--jh-radius-lg);
  background: #fff;
  box-shadow: 0 12px 34px rgba(15, 50, 90, 0.06);
}

.entry-content > *:first-child {
  margin-top: 0;
}

.entry-content a {
  color: var(--jh-primary-dark);
  font-weight: 800;
}

.entry-meta {
  margin-bottom: 14px;
  color: var(--jh-muted);
  font-size: 0.92rem;
}

.post-list {
  display: grid;
  gap: 18px;
}

.post-card {
  display: block;
  padding: 20px;
}

.post-card time {
  color: var(--jh-muted);
  font-size: 0.88rem;
}

.sidebar {
  display: grid;
  gap: 18px;
}

.widget {
  padding: 22px;
}

.widget h2,
.widget h3 {
  margin: 0 0 14px;
  font-size: 1.08rem;
}

.widget ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer {
  padding: 48px 0 36px;
  border-top: 1px solid var(--jh-line);
  background: #0c2442;
  color: #d9e8ff;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
}

.footer-brand {
  color: #fff;
  font-weight: 900;
  font-size: 1.25rem;
}

.footer-description {
  max-width: 560px;
  margin: 12px 0 0;
  color: #aecaef;
}

.footer-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-menu a {
  color: #d9e8ff;
  font-weight: 700;
}

.copyright {
  margin-top: 28px;
  color: #8fb2dd;
  font-size: 0.9rem;
}

.pagination {
  display: flex;
  gap: 8px;
  margin-top: 26px;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  border: 1px solid var(--jh-line);
  border-radius: 12px;
  background: #fff;
  font-weight: 800;
}

.page-numbers.current {
  background: var(--jh-primary);
  color: #fff;
}

@media (max-width: 900px) {
  .menu-toggle {
    display: inline-flex;
  }

  .site-navigation {
    position: absolute;
    left: 20px;
    right: 20px;
    top: 74px;
    display: none;
    padding: 12px;
    border: 1px solid var(--jh-line);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--jh-shadow);
  }

  .site-navigation.is-open {
    display: block;
  }

  .primary-menu {
    display: grid;
    gap: 4px;
  }

  .primary-menu a {
    justify-content: flex-start;
  }

  .primary-menu .sub-menu {
    position: static;
    min-width: 0;
    padding: 2px 0 6px 14px;
    border-right: 0;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .primary-menu .sub-menu a {
    justify-content: flex-start;
    min-height: 30px;
    padding: 0 10px;
    font-size: 0.9rem;
  }

  .hero-grid,
  .content-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .card-grid,
  .link-list {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: block;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .container {
    width: min(100% - 28px, var(--jh-container));
  }

  .hero {
    padding: 58px 0 44px;
  }

  .hero-panel,
  .entry-card {
    padding: 20px;
    border-radius: 22px;
  }

  .search-form {
    display: grid;
  }

  .stats-row {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 52px 0;
  }
}

/* Reference-style main page */
body.ref-layout {
  background: #fff;
  color: #1f1f1f;
  font-family: Arial, "Noto Sans KR", sans-serif;
  font-size: 14px;
  line-height: 1.8;
}

body.ref-layout .site-header {
  position: relative;
  border-bottom: 0;
  background: #fff;
  backdrop-filter: none;
}

body.ref-layout .header-inner,
body.ref-layout .ref-container {
  width: min(900px, calc(100% - 44px));
  margin: 0 auto;
}

body.ref-layout .header-inner {
  min-height: 52px;
  gap: 18px;
}

.site-branding-ref {
  gap: 6px;
  font-size: 15px;
  font-weight: 900;
}

.brand-pin {
  display: inline-block;
  width: 22px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0b1f3a 0 38%, #2f8cff 38% 100%);
  transform: skewX(-14deg);
}

.brand-text {
  color: #111;
}

body.ref-layout .primary-menu {
  gap: 52px;
}

body.ref-layout .primary-menu a {
  min-height: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #252525;
  font-size: 12px;
  font-weight: 500;
}

body.ref-layout .primary-menu a:hover,
body.ref-layout .primary-menu .current-menu-item > a {
  background: transparent;
  color: #1d64d8;
}

body.ref-layout .primary-menu .sub-menu a {
  color: #a4a4a4;
  font-size: 19px;
  font-weight: 400;
}

body.ref-layout .primary-menu .sub-menu a:hover,
body.ref-layout .primary-menu .sub-menu .current-menu-item > a {
  color: #1f1f1f;
}

body.is-address-collection .primary-menu .sub-menu li:nth-child(1) > a,
body.is-link-collection .primary-menu .sub-menu li:nth-child(2) > a {
  color: #1f1f1f;
}

.ref-hero {
  background: linear-gradient(90deg, #38a8ff 0%, #0f4ea3 100%);
  padding: 34px 0 32px;
  text-align: center;
}

.ref-hero h1 {
  margin: 0 0 18px;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
}

.ref-hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 260px;
  min-height: 28px;
  border: 2px solid #0a326f;
  color: #06285b;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.04);
}

.ref-article {
  padding: 54px 0 86px;
}

.ref-copy {
  max-width: 780px;
}

.ref-lead {
  margin: 0 0 52px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
}

.ref-text-section {
  margin: 0 0 54px;
}

.ref-text-section h2 {
  margin: 0 0 24px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.5;
}

.ref-text-section p {
  margin: 0 0 15px;
  color: #626262;
  font-size: 12px;
  line-height: 2.05;
}

.ref-image-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 64px auto 34px;
  max-width: 680px;
}

.ref-image-row-bottom {
  margin-top: 84px;
}

.ref-image-card,
.ref-blog-image {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: #f7d6da;
}

.ref-image-card {
  aspect-ratio: 440 / 298;
}

.ref-image-card img,
.ref-blog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ref-image-card span,
.ref-blog-image span {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.68);
  color: #111;
  font-size: 12px;
  font-weight: 900;
  transform: translate(-50%, -50%);
}

.ref-image-card span::before,
.ref-blog-image span::before,
.footer-brand-ref .brand-pin {
  content: "";
  display: inline-block;
  width: 18px;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0b1f3a 0 38%, #2f8cff 38% 100%);
  transform: skewX(-14deg);
}

.ref-caption {
  margin: 0 0 54px;
  text-align: center;
  color: #1f1f1f;
  font-size: 13px;
  font-weight: 800;
}

.ref-blog {
  padding: 20px 0 110px;
  background: #fff;
}

.ref-blog h2 {
  margin: 0 0 36px;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
}

.ref-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 34px;
  max-width: 760px;
  margin: 0 auto;
}

.ref-blog-card {
  border: 1px solid #e6e6e6;
  background: #fff;
  min-height: 360px;
}

.ref-blog-link {
  display: block;
  height: 100%;
  color: inherit;
}

.ref-blog-link:hover h3 {
  color: #1d64d8;
}

.ref-blog-image {
  aspect-ratio: 332 / 250;
}

.ref-blog-body {
  padding: 22px 18px 18px;
}

.ref-blog-body h3 {
  margin: 0 0 16px;
  color: #242424;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

.ref-blog-body p {
  margin: 0;
  color: #626262;
  font-size: 11px;
  line-height: 1.9;
}

.ref-blog-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 42px;
}

.ref-blog-meta span {
  width: 28px;
  height: 3px;
  background: #e9e9e9;
}

.ref-blog-author {
  display: grid;
  gap: 4px;
  margin-top: 28px;
  color: #767676;
  font-size: 11px;
  line-height: 1.5;
}

.ref-single {
  padding: 64px 0 120px;
  background: #fff;
}

.ref-single-inner {
  max-width: 760px;
}

.ref-single-meta {
  display: flex;
  gap: 10px;
  margin: 0 0 22px;
  color: #777;
  font-size: 12px;
}

.ref-single-image {
  position: relative;
  aspect-ratio: 760 / 430;
  margin: 0 0 52px;
  overflow: hidden;
  background: #eef6ff;
}

.ref-single-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ref-single-image span {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.68);
  color: #111;
  font-size: 12px;
  font-weight: 900;
  transform: translate(-50%, -50%);
}

.ref-single-image span::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0b1f3a 0 38%, #2f8cff 38% 100%);
  transform: skewX(-14deg);
}

.ref-single-content {
  max-width: 640px;
  margin: 0 auto;
}

.ref-single-content p {
  margin: 0 0 20px;
}

.ref-directory {
  padding: 0 0 110px;
  background: #fff;
}

.ref-directory h2 {
  margin: 0 0 34px;
  text-align: center;
  color: #1f1f1f;
  font-size: 16px;
  font-weight: 800;
}

.ref-link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  max-width: 780px;
  margin: 0 auto;
}

.ref-link-card {
  min-height: 168px;
  padding: 22px 18px;
  border: 1px solid #e6e6e6;
  background: #fff;
}

.ref-link-card h3 {
  margin: 0 0 12px;
  color: #242424;
  font-size: 13px;
  font-weight: 800;
}

.ref-link-card p {
  margin: 0 0 24px;
  color: #626262;
  font-size: 11px;
  line-height: 1.9;
}

.ref-link-card a {
  color: #222;
  font-size: 11px;
  font-weight: 700;
  text-decoration: underline;
}

.ref-contact {
  padding: 54px 0 110px;
  background: #fff;
}

.ref-contact-card {
  max-width: 620px;
  margin: 0 auto;
}

.ref-form {
  display: grid;
  gap: 22px;
}

.ref-form p {
  margin: 0;
}

.ref-form label {
  display: block;
  margin-bottom: 8px;
  color: #222;
  font-size: 12px;
  font-weight: 700;
}

.ref-form input,
.ref-form textarea {
  width: 100%;
  border: 1px solid #cfcfcf;
  border-radius: 0;
  background: #fff;
  color: #222;
  font: inherit;
  font-size: 13px;
}

.ref-form input {
  min-height: 36px;
  padding: 7px 10px;
}

.ref-form textarea {
  min-height: 150px;
  padding: 10px;
  resize: vertical;
}

.ref-submit {
  justify-self: start;
  min-width: 120px;
  min-height: 34px;
  border: 1px solid #222;
  border-radius: 0;
  background: #222;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.ref-form-status {
  margin: 0 0 24px;
  color: #222;
  font-size: 12px;
  font-weight: 800;
}

body.ref-layout .site-footer {
  padding: 56px 0 36px;
  border-top: 0;
  background: #fff;
  color: #1b1b1b;
}

body.ref-layout .footer-grid {
  display: block;
  width: min(760px, calc(100% - 44px));
}

body.ref-layout .footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #111;
  font-size: 16px;
  font-weight: 900;
}

body.ref-layout .footer-description {
  margin-top: 28px;
  max-width: 520px;
  color: #565656;
  font-size: 12px;
}

body.ref-layout .copyright {
  margin-top: 38px;
  color: #777;
  font-size: 11px;
}

body.ref-layout .footer-menu {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

body.ref-layout .footer-menu a {
  color: #222;
  font-size: 11px;
  font-weight: 500;
  text-decoration: underline;
}

@media (max-width: 900px) {
  body.ref-layout .menu-toggle {
    display: none;
  }

  body.ref-layout .site-navigation {
    position: static;
    display: block;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body.ref-layout .primary-menu {
    display: flex;
    gap: 34px;
  }

  body.ref-layout .primary-menu .sub-menu {
    position: absolute;
    min-width: 132px;
    padding: 14px 0 15px;
    border-right: 3px solid #2f8cff;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(-4px);
  }

  body.ref-layout .primary-menu li:hover > .sub-menu,
  body.ref-layout .primary-menu li:focus-within > .sub-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }

  body.ref-layout .primary-menu .sub-menu a {
    justify-content: center;
    min-height: 43px;
    padding: 0 22px;
    font-size: 19px;
  }
}

@media (max-width: 640px) {
  body.ref-layout .header-inner,
  body.ref-layout .ref-container {
    width: min(100% - 28px, 900px);
  }

  body.ref-layout .header-inner {
    min-height: 50px;
  }

  body.ref-layout .primary-menu {
    gap: 26px;
  }

  body.ref-layout .primary-menu a {
    font-size: 10px;
  }

  .site-branding-ref {
    font-size: 13px;
  }

  .brand-pin {
    width: 18px;
    height: 10px;
  }

  .ref-hero {
    padding: 31px 0 29px;
  }

  .ref-article {
    padding: 48px 0 70px;
  }

  .ref-copy {
    max-width: none;
  }

  .ref-lead {
    margin-bottom: 44px;
    font-size: 13px;
  }

  .ref-text-section {
    margin-bottom: 48px;
  }

  .ref-text-section h2 {
    margin-bottom: 18px;
    font-size: 13px;
  }

  .ref-text-section p {
    font-size: 10.5px;
    line-height: 2.05;
  }

  .ref-image-row {
    gap: 10px;
    margin-top: 50px;
  }

  .ref-caption {
    font-size: 11px;
  }

  .ref-blog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px 12px;
  }

  .ref-blog-card {
    min-height: 292px;
  }

  .ref-blog-body {
    padding: 14px 10px 12px;
  }

  .ref-blog-body h3 {
    font-size: 9.5px;
    line-height: 1.55;
  }

  .ref-blog-body p {
    font-size: 8.5px;
    line-height: 1.75;
  }

  .ref-blog-meta {
    margin-top: 28px;
  }

  .ref-link-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .ref-link-card {
    min-height: auto;
  }

  .ref-contact {
    padding: 48px 0 86px;
  }
}
