/* =========================================================
   common.css
   모든 페이지가 공유하는 공통 레이아웃 스타일
   (헤더 / 푸터 / 모바일 메뉴 / 페이지 래퍼)
   ※ 이 파일을 수정하면 모든 페이지에 즉시 반영됩니다.
========================================================= */

/* ===== STICKY FOOTER 기반 구조 ===== */
html, body {
  height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== WRAPPER ===== */
.page-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px 20px;
  width: 100%;
  flex: 1; /* 콘텐츠가 짧아도 footer를 하단으로 밀어냄 */
}

#footer-placeholder {
  margin-top: auto;
  width: 100%;
}

.inner {
  width: 100%;
  max-width: var(--max);
}

/* ===== NAV ===== */
nav {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 40px;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 28px 0;
  width: 100%;
  max-width: var(--max);
  height: 104px;
}

.nav-logo {
  justify-self: start;
}

.nav-center {
  justify-self: center;
}

.nav-right {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  justify-self: end;
}

.nav-logo {
  font-family: 'Pretendard', sans-serif;
  font-weight: 500;
  font-size: 36px;
  line-height: 120%;
  letter-spacing: -0.05em;
  color: var(--accent4);
  text-decoration: none;
}

.nav-center {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 16px 40px;
  gap: 40px;
  background: rgba(255,255,255,0.4);
  backdrop-filter: blur(15px);
  border-radius: 100px;
}

.nav-center a {
  font-family: 'Pretendard', sans-serif;
  font-weight: 700;
  font-size: 20px;
  line-height: 140%;
  letter-spacing: -0.025em;
  color: var(--text-headline);
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.nav-center a:hover { opacity: 0.6; }

.btn-login,
.btn-login-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  background: var(--accent-mid);
  border-radius: 1000px;
  font-family: 'Pretendard', sans-serif;
  font-weight: 700;
  font-size: 20px;
  line-height: 140%;
  letter-spacing: -0.025em;
  color: var(--text-on-accent1);
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.btn-login:hover,
.btn-login-nav:hover { opacity: 0.85; }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-headline);
  border-radius: 2px;
  transition: all 0.3s;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 104px; left: 0; right: 0;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  padding: 1.5rem 5% 2rem;
  border-bottom: 1px solid var(--divider);
  z-index: 99;
  flex-direction: column;
  gap: 0;
}

.mobile-menu.open { display: flex; }

.mobile-menu a {
  font-family: 'Pretendard', sans-serif;
  font-weight: 700;
  font-size: 19px;
  color: var(--text-headline);
  text-decoration: none;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--divider);
}

.mobile-menu a:last-child { border-bottom: none; }

/* ===== FOOTER ===== */
#header-placeholder,
#footer-placeholder {
  width: 100%;
}

footer {
  width: 100%;
  max-width: var(--max);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 40px 0 ;
  gap: 5px;
  border-top: 1px solid var(--divider);
}

.footer-links-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-legal {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 27px;
  flex-wrap: wrap;
}

.footer-legal a {
  font-family: 'Pretendard', sans-serif;
  font-weight: 500;
  font-size: 17px;
  line-height: 140%;
  letter-spacing: -0.025em;
  color: rgba(0,0,0,0.5);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-legal a:hover { color: var(--text-headline); }

.footer-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 1200px;
  padding: 0 10px; /* 좌우 여백 */
}

.footer-org-name {
  font-family: 'Pretendard', sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 140%;
  letter-spacing: -0.025em;
  color: var(--text-headline);
}

.footer-details {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 6px 24px;
}

.footer-details span {
  font-family: 'Pretendard', sans-serif;
  font-weight: 500;
  font-size: 18px;
  line-height: 140%;
  letter-spacing: -0.025em;
  color: var(--text-headline);
}

/* ===== RESPONSIVE ===== */

/* 1024px ~ 1279px : 소형 데스크탑 / 노트북 */
@media (max-width: 1279px) {
  .nav-inner { height: 88px; }
  .nav-logo { font-size: 30px; }
  .nav-center { padding: 14px 28px; gap: 28px; }
  .nav-center a { font-size: 17px; }
  .btn-login,
  .btn-login-nav { padding: 6px 16px; font-size: 17px; }
}

/* 1023px ~ 768px : 태블릿 */
@media (max-width: 1023px) {
  .nav-inner { height: 76px; }
  .nav-logo { font-size: 26px; }
  .nav-center { display: none; }
  .btn-login,
  .btn-login-nav { display: none; }
  .nav-hamburger { display: flex; }
  .mobile-menu { top: 76px; }
  .page-wrap { padding: 0 16px 16px; }
  footer { padding: 32px 0 16px; }
  .footer-org-name { font-size: 20px; }
  .footer-details span { font-size: 15px; }
  .footer-legal a { font-size: 15px; }
}

/* 767px ~ 480px : 대형 모바일 */
@media (max-width: 767px) {
  .nav-inner { height: 64px; padding: 0; }
  .nav-logo { font-size: 22px; }
  .page-wrap { padding: 0 14px 14px; }
  footer { padding: 24px 0 14px; gap: 10px; }
  .footer-org-name { font-size: 17px; }
  .footer-details { flex-direction: column; gap: 4px; }
  .footer-details span { font-size: 13px; }
  .footer-legal { gap: 16px; }
  .footer-legal a { font-size: 13px; }
}

/* 479px 이하 : 소형 모바일 */
@media (max-width: 479px) {
  nav { padding: 0 16px; }
  .nav-logo { font-size: 20px; }
  .page-wrap { padding: 0 12px 12px; }
  .footer-links-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .footer-legal { gap: 12px; }
}