/* ============================================================
   Layout: header, nav, footer, shared blocks
   ============================================================ */

/* ---- Logo mark ---- */
.logo-mark { display: inline-flex; flex: none; line-height: 0; }

/* ---- Utility / accessibility bar ---- */
.utilbar { background: var(--brand-900); color: #cfe6da; font-family: var(--font-head); font-size: .82rem; }
.contrast-high .utilbar { background: #000; color: #fff; }
.utilbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; flex-wrap: wrap; }
.utilbar__gov { letter-spacing: .02em; opacity: .92; white-space: nowrap; }
.utilbar__right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.a11y-group { display: inline-flex; align-items: center; gap: 6px; padding: 3px 6px 3px 10px; background: rgba(255,255,255,.08); border-radius: var(--r-pill); }
.a11y-size { min-width: 56px; text-align: center; font-weight: 600; font-size: .82rem; white-space: nowrap; }
.a11y-btn { width: 26px; height: 26px; display: inline-grid; place-items: center; border: none; border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; }
.a11y-btn:hover:not(:disabled) { background: var(--gold-500); color: #2a1e05; }
.a11y-btn:disabled { opacity: .4; cursor: not-allowed; }
.a11y-toggle, .utilbar__login { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: var(--r-pill); border: 1px solid rgba(255,255,255,.18); background: transparent; color: inherit; font-family: var(--font-head); font-weight: 600; font-size: .82rem; text-decoration: none; white-space: nowrap; }
.a11y-toggle:hover, .utilbar__login:hover { background: rgba(255,255,255,.1); text-decoration: none; }
.a11y-toggle.is-on { background: var(--gold-500); color: #2a1e05; border-color: var(--gold-500); }
.utilbar__login { border-color: var(--gold-500); color: var(--gold-100); }

/* ---- Header main ---- */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--surface); box-shadow: var(--shadow-sm); }
.header-main { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-main__inner { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 30px); padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; flex: none; }
.brand:hover { text-decoration: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.18; }
.brand__th { font-family: var(--font-head); font-weight: 700; font-size: clamp(1rem, 1.5vw, 1.28rem); color: var(--brand-800); }
.contrast-high .brand__th { color: var(--brand-700); }
.brand__sub { font-family: var(--font-head); font-size: .72rem; letter-spacing: .04em; color: var(--ink-500); text-transform: uppercase; }

.header-search { flex: 1; max-width: 460px; display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 16px; background: var(--surface-2); border: 1.5px solid var(--line); border-radius: var(--r-pill); color: var(--ink-500); }
.header-search:focus-within { border-color: var(--brand-400); box-shadow: 0 0 0 4px var(--brand-50); }
.header-search__input { flex: 1; border: none; background: transparent; font-family: var(--font-body); font-size: .98rem; color: var(--ink-900); padding: 8px 0; min-width: 0; }
.header-search__input:focus { outline: none; }
.header-search__btn { flex: none; padding: 9px 20px; border: none; border-radius: var(--r-pill); background: var(--brand-700); color: #fff; font-family: var(--font-head); font-weight: 600; font-size: .92rem; }
.header-search__btn:hover { background: var(--brand-800); }

.header-hotline { display: flex; align-items: center; gap: 11px; padding: 8px 16px 8px 10px; border-radius: var(--r-md); background: var(--brand-50); text-decoration: none; flex: none; border: 1px solid var(--brand-100); }
.header-hotline:hover { text-decoration: none; background: var(--brand-100); }
.header-hotline__ic { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--emergency); color: #fff; }
.header-hotline__txt { display: flex; flex-direction: column; line-height: 1.15; }
.header-hotline__label { font-size: .72rem; color: var(--ink-500); font-family: var(--font-head); }
.header-hotline__num { font-family: var(--font-head); font-weight: 800; font-size: 1.32rem; color: var(--emergency-dark); letter-spacing: .02em; }

.hamburger { display: none; width: 46px; height: 46px; place-items: center; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--brand-700); }

/* ---- Primary nav (desktop) ---- */
.primary-nav { background: var(--brand-700); }
.contrast-high .primary-nav { background: var(--brand-700); }
.primary-nav__inner { display: flex; }
.nav-list { display: flex; flex-wrap: wrap; }
.nav-li { position: relative; }
.nav-link { display: inline-flex; align-items: center; gap: 5px; padding: 14px 18px; border: none; background: transparent; color: #eaf5ee; font-family: var(--font-head); font-weight: 600; font-size: .98rem; border-bottom: 3px solid transparent; }
.nav-link:hover { background: var(--brand-800); color: #fff; }
.nav-link.is-active { color: #fff; border-bottom-color: var(--gold-500); background: var(--brand-800); }
.nav-caret { opacity: .8; transition: transform .15s ease; }
.nav-li:hover .nav-caret { transform: rotate(180deg); }
.subnav { position: absolute; top: 100%; left: 0; min-width: 248px; background: #fff; border: 1px solid var(--line); border-radius: 0 0 var(--r-md) var(--r-md); box-shadow: var(--shadow-lg); padding: 8px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: all .16s ease; z-index: 50; }
.nav-li:hover .subnav, .nav-li:focus-within .subnav { opacity: 1; visibility: visible; transform: translateY(0); }
.subnav ul { display: flex; flex-direction: column; }
.subnav button { display: block; width: 100%; text-align: right; padding: 11px 14px; border: none; background: transparent; color: var(--ink-800); font-family: var(--font-body); font-size: .96rem; border-radius: var(--r-sm); }
.subnav button:hover { background: var(--brand-50); color: var(--brand-700); }

/* ---- Mobile drawer ---- */
.mobile-drawer { display: none; }
.mobile-nav { padding: 8px var(--gutter) 18px; }
.mobile-nav__row { display: flex; align-items: stretch; border-bottom: 1px solid var(--line); }
.mobile-nav__link { flex: 1; text-align: right; padding: 15px 4px; border: none; background: transparent; font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; color: var(--ink-800); }
.mobile-nav__link.is-active { color: var(--brand-700); }
.mobile-nav__exp { width: 48px; border: none; background: transparent; color: var(--ink-500); display: grid; place-items: center; }
.mobile-sub { padding: 4px 0 10px; }
.mobile-sub button { display: block; width: 100%; text-align: right; padding: 11px 16px; border: none; background: transparent; color: var(--ink-700); font-size: .98rem; }
.mobile-sub button:hover { color: var(--brand-700); }

/* ---- Section head ---- */
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: clamp(22px, 3vw, 36px); flex-wrap: wrap; }
.sec-head__title { margin-top: 8px; }
.sec-head__desc { margin-top: 10px; max-width: 60ch; }

/* ---- Breadcrumb ---- */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-family: var(--font-head); font-size: .9rem; }
.breadcrumb__item { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-500); }
.breadcrumb button { border: none; background: transparent; color: var(--ink-500); font-family: inherit; font-size: inherit; padding: 2px; }
.breadcrumb button:hover { color: var(--brand-700); text-decoration: underline; }
.breadcrumb__cur { color: var(--ink-800); font-weight: 600; }
.breadcrumb__sep { color: var(--ink-300); }

/* ---- Page header band ---- */
.page-band { background: linear-gradient(120deg, var(--brand-800), var(--brand-700)); color: #fff; padding-block: clamp(26px, 4vw, 44px); position: relative; overflow: hidden; }
.page-band::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.08) 1px, transparent 0); background-size: 22px 22px; opacity: .6; pointer-events: none; }
.contrast-high .page-band { background: var(--brand-800); }
.page-band__inner { position: relative; z-index: 1; }
.page-band .breadcrumb, .page-band .breadcrumb button, .page-band .breadcrumb__item { color: #cfe6da; }
.page-band .breadcrumb__cur { color: #fff; }
.page-band__title { margin-top: 12px; font-size: clamp(1.7rem, 3.4vw, 2.5rem); color: #fff; }
.page-band__desc { margin-top: 10px; color: #d7ece1; max-width: 64ch; font-size: 1.08rem; }

/* ---- Footer ---- */
.site-footer { background: var(--brand-900); color: #bcd6c9; margin-top: 40px; }
.contrast-high .site-footer { background: #06120c; color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: clamp(24px, 3vw, 48px); padding-block: clamp(40px, 5vw, 64px); }
.footer-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 16px; }
.footer-brand__th { font-family: var(--font-head); font-weight: 700; color: #fff; font-size: 1.04rem; line-height: 1.3; }
.footer-brand__sub { font-size: .76rem; color: #8fb6a3; text-transform: uppercase; letter-spacing: .04em; }
.footer-addr { font-size: .95rem; line-height: 1.7; color: #a9c8b9; }
.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.footer-social a { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.08); color: #d7ece1; }
.footer-social a:hover { background: var(--gold-500); color: #2a1e05; }
.footer-h { font-family: var(--font-head); color: #fff; font-size: 1.05rem; margin-bottom: 16px; }
.footer-links, .footer-contact { display: flex; flex-direction: column; gap: 11px; }
.footer-links button { border: none; background: transparent; color: #bcd6c9; font-family: var(--font-body); font-size: .96rem; text-align: right; padding: 0; }
.footer-links button:hover { color: #fff; text-decoration: underline; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; color: #bcd6c9; }
.footer-contact .icon { color: var(--gold-500); flex: none; margin-top: 3px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); }
.footer-bottom__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; font-size: .86rem; color: #8fb6a3; flex-wrap: wrap; }
.footer-bottom__links { display: flex; align-items: center; gap: 8px; }
.footer-bottom a { color: #a9c8b9; }
.footer-bottom a:hover { color: #fff; }
.footer-bottom .dot { color: #5a7a69; }

/* ---- Image slot styling ---- */
image-slot { --is-bg: var(--brand-50); border-radius: var(--r-lg); overflow: hidden; }

/* ---- Responsive ---- */
@media (max-width: 1080px) {
  .header-search { max-width: 320px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 920px) {
  .primary-nav { display: none; }
  .header-search, .header-hotline { display: none; }
  .hamburger { display: grid; }
  .header-main__inner { justify-content: space-between; }
  .mobile-drawer { display: block; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md); max-height: 78vh; overflow-y: auto; }
  .header-search--mobile { display: flex; max-width: none; margin: 16px var(--gutter) 4px; }
}
@media (max-width: 620px) {
  .brand__sub { display: none; }
  .brand__th { font-size: 1rem; max-width: 60vw; }
  .footer-grid { grid-template-columns: 1fr; }
  .utilbar__gov { display: none; }
  .utilbar__inner { justify-content: center; }
}
