@charset "utf-8";

@font-face {
    font-family: 'SEBANG_Gothic';
    src: url('https://cdn.jsdelivr.net/gh/wizfile/font/SEBANG_Gothic.eot');
    src:url('https://cdn.jsdelivr.net/gh/wizfile/font/SEBANG_Gothic.woff') format('woff');
    font-weight: 700;
    font-style: normal;
}
@font-face {
    font-family: 'SEBANG_Gothic_Bold';
    src: url('https://cdn.jsdelivr.net/gh/wizfile/font/SEBANG_Gothic_Bold.eot');
    src:url('https://cdn.jsdelivr.net/gh/wizfile/font/SEBANG_Gothic_Bold.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

/* ============================================
   🟢 그린/에메랄드 테마 CSS 변수
   ============================================ */
:root {
  --primary:        #059669;   /* emerald-600 */
  --primary-dark:   #047857;   /* emerald-700 */
  --primary-deeper: #065f46;   /* emerald-900 */
  --primary-light:  #d1fae5;   /* emerald-100 */
  --primary-mid:    #6ee7b7;   /* emerald-300 */
  --teal:           #0d9488;   /* teal-600 */
  --teal-dark:      #0f766e;   /* teal-700 */
  --hover-bg:       #ecfdf5;   /* emerald-50 */
  --page-bg:        #f0fdf4;   /* 전체 배경 */
  --link-color:     #065f46;
  --border:         #a7f3d0;
  --shadow-green:   rgba(5, 150, 105, 0.15);
}

body {
  font-family: 'SEBANG_Gothic', Arial, sans-serif;
  background-color: var(--page-bg);
  margin: 0;
  padding: 0;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  background-color: #fff;
  padding: 10px;
  box-shadow: 0 0 16px var(--shadow-green);
  border-top: 3px solid var(--primary);
}

/* ============================================
   사이트 타이틀
   ============================================ */
.site-title {
  text-align: center;
  width: 100%;
  font-family: 'SEBANG_Gothic', 'Arial', sans-serif;
  font-size: 2.5em;
  font-weight: bold;
  padding: 20px 0;
  letter-spacing: 2px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}
.site-title a {
  background: linear-gradient(135deg, var(--primary), var(--teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

/* ============================================
   헤더 / 네비게이션
   ============================================ */
header {
  background: linear-gradient(135deg, var(--primary-deeper), var(--teal-dark));
  color: #fff;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.header-content {
  display: flex;
  align-items: center;
}

.header-content span {
  font-weight: bold;
  font-size: 1.2em;
  margin-left: 30px;
}

#main-header {
  background: linear-gradient(135deg, var(--primary-deeper), var(--teal-dark));
  color: #fff;
  padding: 15px 0;
  text-align: center;
  transition: all 0.3s ease;
  z-index: 999;
  border-radius: 8px;
  margin-bottom: 12px;
  box-shadow: 0 3px 10px var(--shadow-green);
}

#main-header.fixed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  border-radius: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.menu {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  padding: 0 8px;
  overflow: hidden;
}

.menu a {
  color: #e6fff6;
  text-decoration: none;
  font-size: 14px;       /* 16px → 14px */
  margin: 0 4px;         /* 0 15px → 0 4px */
  font-weight: 600;
  border-radius: 5px;
  padding: 5px 6px;      /* 좌우 패딩도 줄임 */
  white-space: nowrap;   /* 줄바꿈 방지 */
  transition: background-color 0.2s ease, color 0.2s ease;
}

.menu a:hover {
  background-color: rgba(255,255,255,0.18);
  color: #fff;
  text-decoration: none;
}

.menu-icon {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.menu-icon span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #fff;
  transition: all 0.3s ease;
  margin-left: 10px;
}

/* ============================================
   검색바
   ============================================ */
.search-bar {
  margin: 20px 0;
  text-align: center;
}

.search-bar form {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  flex-wrap: nowrap;
}

.search-bar input[type="text"] {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  font-size: 15px;
  border: 2px solid var(--primary-mid);
  border-right: none;
  border-radius: 8px 0 0 8px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
}

.search-bar input[type="text"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5,150,105,0.15);
}

.search-bar input[type="submit"] {
  white-space: nowrap;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 0 8px 8px 0;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  color: #fff;
  cursor: pointer;
  transition: opacity 0.2s;
}

.search-bar input[type="submit"]:hover {
  opacity: 0.88;
}

/* ============================================
   테이블
   ============================================ */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

table, th, td {
  border: 1px solid #d1fae5;
}

th {
  background-color: var(--hover-bg);
  color: var(--primary-deeper);
  padding: 10px;
  text-align: left;
}

td {
  padding: 10px;
  text-align: left;
}

table tr:hover {
  background-color: var(--hover-bg);
}

table tr td a {
  color: var(--primary-dark);
  text-decoration: none;
}

table tr td a:hover {
  text-decoration: underline;
}

/* ============================================
   시/도, 시군구 박스
   ============================================ */
.sido_box {
  margin-top: 16px;
  background-color: #fff;
  padding: 0 12px 14px 12px;
  box-shadow: 0 2px 10px var(--shadow-green);
  border: 1px solid var(--primary-light);
  border-radius: 10px;
}

.sido_box h2 {
  font-size: 1.1em;
  font-weight: 700;
  color: var(--primary-deeper);
  margin-bottom: 10px;
  margin-top: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-light);
  display: flex;
  align-items: center;
  gap: 6px;
}

.sido_box h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 16px;
  background: var(--primary);
  border-radius: 2px;
  flex-shrink: 0;
}

.sido_box .regions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sido_box .regions a {
  color: var(--primary-deeper);
  text-decoration: none;
  padding: 5px 13px;
  background-color: var(--hover-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.18s, color 0.18s, transform 0.12s, box-shadow 0.18s;
}

.sido_box .regions a:hover {
  background-color: var(--primary);
  color: #fff;
  border-color: var(--primary);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(5,150,105,0.25);
}

/* 선택된(active) 지역 강조 */
.sido_box .regions a[style*="background-color"] {
  background: linear-gradient(135deg, var(--primary), var(--teal)) !important;
  color: #fff !important;
  border-color: var(--primary-dark) !important;
  box-shadow: 0 3px 10px rgba(5,150,105,0.35) !important;
}

/* ============================================
   주소 리스트
   ============================================ */
.address-list {
  margin-top: 30px;
}

.address-list h2 {
  font-size: 1.3em;
  margin-bottom: 10px;
  color: var(--primary-deeper);
}

.address-list ul {
  list-style-type: none;
  padding: 0;
}

.address-list li {
  padding: 8px 4px;
  border-bottom: 1px solid #d1fae5;
  transition: background 0.15s;
}

.address-list li:hover {
  background: var(--hover-bg);
}

/* ============================================
   페이지네이션
   ============================================ */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 4px;
}

.pagination a {
  margin: 2px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  color: var(--primary-dark);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.18s, color 0.18s;
}

.pagination a:hover {
  background-color: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.pagination a.active {
  background: linear-gradient(135deg, var(--primary), var(--teal));
  color: #fff;
  border-color: var(--primary-dark);
  box-shadow: 0 2px 6px var(--shadow-green);
}

/* ============================================
   상세 주소 테이블 (responsive-table)
   ============================================ */
.responsive-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 16px;
  box-shadow: 0 2px 12px var(--shadow-green);
  background-color: #f9fffc;
  overflow: hidden;
  border-radius: 8px;
}

.responsive-table caption {
  background: linear-gradient(135deg, var(--primary), var(--teal)) !important;
  color: #ffffff !important;
  font-size: 1.2em !important;
  padding: 14px 20px !important;
  text-align: left !important;
  font-weight: 700 !important;
  letter-spacing: -0.2px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5) !important;
}

/* caption 안의 모든 텍스트도 흰색 강제 */
.responsive-table caption *,
.responsive-table caption h2,
.responsive-table caption span,
.responsive-table caption a {
  color: #ffffff !important;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5) !important;
}

.responsive-table td.label {
  background-color: #e6fff6;
  font-weight: bold;
  padding: 12px;
  width: 25%;
  border: 1px solid #c6f0de;
  color: var(--primary-deeper);
}

.responsive-table td.value {
  background-color: #ffffff;
  padding: 12px;
  border: 1px solid #d1fae5;
}

.responsive-table tr:nth-child(even) td.value {
  background-color: #f0fdf4;
}

.responsive-table input[type="button"] {
  background: linear-gradient(135deg, var(--primary), var(--teal));
  color: #fff;
  border: none;
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
  margin-left: 10px;
  font-weight: 600;
  transition: opacity 0.2s;
}

.responsive-table input[type="button"]:hover {
  opacity: 0.85;
}

/* 상세보기 헤더용 (기존 .blue 클래스) */
.blue {
  background: linear-gradient(135deg, var(--primary), var(--teal)) !important;
  color: #ffffff !important;
  font-size: 1.2em;
  padding: 15px;
  caption-side: top;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5) !important;
  font-weight: 700;
}
.blue * {
  color: #ffffff !important;
}

/* ============================================
   푸터
   ============================================ */
.footer {
  background: linear-gradient(135deg, var(--primary-deeper), var(--teal-dark));
  color: #fff;
  text-align: center;
  padding: 20px 0;
  font-size: 14px;
  position: relative;
  bottom: 0;
  width: 100%;
  margin-top: 10px;
  margin-bottom: 100px;
}

.footer-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.footer .left, .footer .middle, .footer .right {
  font-family: 'Arial', sans-serif;
}

.footer .middle {
  color: rgba(255,255,255,0.4);
}

.footer a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s;
}

.footer a:hover {
  color: var(--primary-mid);
}

/* ============================================
   모바일 스타일
   ============================================ */
@media screen and (max-width: 768px) {

  body {
    font-size: 14px;
  }

  .container {
    padding: 5px;
    width: 95%;
  }

  .header-content span {
    font-size: 1em;
  }

  .menu a {
    font-size: 14px;
  }

  .search-bar {
    margin: 10px 0 -10px 0;
  }

  .search-bar input[type="text"],
  .search-bar input[type="submit"] {
    font-size: 14px;
    padding: 8px;
  }

  .sido_box h2,
  .address-list h2,
  caption h2 {
    font-size: 1.1em;
  }

  .sido_box .regions a {
    font-size: 12px;
    padding: 4px 10px;
  }

  table th, table td {
    font-size: 13px;
    padding: 8px;
  }

  .responsive-table .label,
  .responsive-table .value {
    font-size: 13px;
  }

  .responsive-table caption {
    font-size: 16px;
  }

  .header-content {
    display: none;
  }

  .menu-icon {
    display: flex;
  }

  .menu-icon span {
    display: block;
    width: 30px;
    height: 3px;
    background-color: #fff;
    transition: all 0.3s ease;
    margin-left: 10px;
  }

  .menu {
    flex-direction: row;
    justify-content: left;
    align-items: left;
    position: absolute;
    top: 40px;
    right: 0;
    width: 100%;
    background: linear-gradient(135deg, var(--primary-deeper), var(--teal-dark));
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.3s ease;
    max-height: 0;
    overflow: hidden;
    flex-wrap: wrap;
    border-radius: 0 0 8px 8px;
  }

  .menu.show {
    transform: scaleY(1);
    max-height: 500px;
  }

  .menu a {
    margin: 5px 8px;
    padding: 5px 12px;
    text-align: center;
    white-space: nowrap;
  }

  .search-bar form {
    flex-wrap: nowrap;
  }

  .search-bar input[type="text"] {
    width: 70%;
  }

  .search-bar input[type="submit"] {
    width: auto;
  }

  .site-title {
    font-size: 18px;
    margin: -10px 0;
  }

  .pagination a {
    margin: 2px;
    padding: 4px 8px;
    font-size: 1.1em;
  }

  .address-list {
    font-size: 13px;
  }

  .footer-content {
    flex-direction: column;
    gap: 10px;
  }

  .responsive-table caption,
  .responsive-table caption h2 {
    font-size: 15px !important;
  }

}

/* ============================================
   ★ 최우선 적용 - caption 글자 흰색 강제
     (user_lib.php: <caption><h2>주소</h2></caption> 구조)
   ============================================ */
table caption h2 { color: #ffffff !important; margin: 0 !important; }
table caption    { color: #ffffff !important; }
.responsive-table caption,
.responsive-table caption h2,
.responsive-table caption * {
  color: #ffffff !important;
  text-shadow: 0 1px 5px rgba(0,0,0,0.5) !important;
  margin: 0 !important;
}