/* ================================================================
   site-layout.css — 전체 페이지 공통: 폰트, 헤더, 푸터, 네비
   board/stock/inspected/people 등 모든 페이지에 적용
   ================================================================ */

/* ── 전체 폰트 Poppins 오버라이드 ── */
/* Prevent horizontal scroll / iOS zoom shift */
html, body { overflow-x: hidden; }
* { box-sizing: border-box; }
input, select, textarea { min-width: 0; max-width: 100%; }

body, input, button, select, textarea {
  font-family: 'Poppins', sans-serif;
}

/* ── 기본 body 여백 (하단 네비 높이 확보) ── */
body {
  padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
}

/* Board page: unified wrapper matching main page's .page container */
.site-page {
  width: 100%;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  overflow-x: hidden;
}

/* ================================================================
   HEADER  .hdr
   ================================================================ */
.hdr {
  position: relative;
  text-align: center;
  padding: 16px 0 12px;
  background: white;
}
.ham {
  position: absolute;
  left: 18px;
  top: 15px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 6px;
  background: none;
  border: none;
  cursor: pointer;
}
.ham span {
  display: block;
  width: 29px;
  height: 2px;
  border-radius: 1px;
  background: #5C5C5C;
}
.logo {
  font-family: 'Poppins', sans-serif !important;
  font-weight: 800;
  font-size: 30px;
  line-height: 1;
  color: #FF3939;
  letter-spacing: 1.5px;
  margin-bottom: 6px;
}
.logo a { color: inherit; text-decoration: none; }
.tagline {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  color: #333334;
}

/* ── search bar ── */
.site-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 21px 0;
  padding: 0 22px 0 16px;
  height: 46px;
  background: white;
  border: 1px solid #585858;
  border-radius: 8px;
}
.site-search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  color: #5C5C5C;
  background: transparent;
}
.site-search input::placeholder { color: #797B7D; }
.site-search-btn {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* ================================================================
   FOOTER  .site-footer
   ================================================================ */
.site-footer {
  margin-top: 40px;
  padding: 24px;
  background: rgba(240,239,255,0.52);
  font-family: 'Poppins', sans-serif;
}
.site-footer p {
  font-size: 11px;
  color: #5C5C5C;
  line-height: 1.8;
}
.site-footer b { font-weight: 700; }
.site-footer .ft-line {
  display: flex;
  gap: 16px;
}
.site-footer-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: 14px;
}
.site-footer-links a {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 11px;
  color: #5C5C5C;
  text-decoration: none;
  flex: 1;
}
.site-footer-links a:first-child  { text-align: left; }
.site-footer-links a:nth-child(2) { text-align: center; }
.site-footer-links a:last-child   { text-align: right; color: #582EFF; }

/* ================================================================
   BOTTOM NAV  .site-bottom-nav
   ================================================================ */
.site-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  background: rgba(255,255,255,0.96);
  border-top: 1px solid rgba(26,26,46,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0 calc(12px + env(safe-area-inset-bottom));
  z-index: 1000;
  box-shadow: 0 -4px 16px rgba(26,26,46,0.08);
}
.site-bottom-nav .nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  text-decoration: none;
  color: #5c5c7a;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  transition: color 0.2s;
}
.site-bottom-nav .nav-item.active,
.site-bottom-nav .nav-item:hover { color: #3f51ff; }
.site-bottom-nav .nav-item .icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.site-bottom-nav .nav-item .icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}
.site-bottom-nav .nav-item .label {
  font-size: 12px;
  letter-spacing: 0.2px;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .site-page {
    max-width: 1100px;
  }
  .hdr {
    padding: 22px 0 16px;
  }
  .logo { font-size: 42px; letter-spacing: 2px; }
  .tagline { font-size: 16px; }
  .ham { left: 20px; top: 22px; }
  .ham span { width: 32px; height: 2.5px; }
  .site-search {
    margin: 16px 40px 0;
    height: 56px;
    padding: 0 22px;
  }
  .site-search-btn { width: 32px; height: 32px; }
  .site-footer {
    padding: 36px 50px;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
  }
  .site-footer p { font-size: 14px; }
  .site-footer-links a { font-size: 14px; }
  .site-bottom-nav {
    left: 50%;
    transform: translateX(-50%);
    width: min(100%, 1100px);
    border-radius: 8px 8px 0 0;
  }
  .site-bottom-nav .nav-item .icon { width: 28px; height: 28px; }
  .site-bottom-nav .nav-item .label { font-size: 12px; }
}

/* ── Terms/Privacy popup ── */
#site-popup {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
#site-popup-inner {
  background: white;
  border-radius: 12px;
  padding: 24px;
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  min-width: 280px;
}
#site-popup-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 22px;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
}
