/**
 * ┌─────────────────────────────────────────────────────────────────────┐
 * │  FILE INDEX — 여수뉴스포털                                          │
 * ├──────────────┬──────────────────────────────────────────────────────┤
 * │  파일명      │  wellbeing.css                                        │
 * │  위치        │  /wellbeing/assets/css/wellbeing.css                  │
 * │  생성일      │  2026-07-11                                           │
 * ├──────────────┼──────────────────────────────────────────────────────┤
 * │  기능/역할   │  행복포털 전용 CSS                                    │
 * │  접두사 규칙 │  CSS 변수: --wb-*  /  클래스: .wb-*                   │
 * │  전역 금지   │  :root에서 --primary 등 전역 변수 재정의 금지         │
 * │              │  .btn .card .badge 등 전역 클래스명 재정의 금지       │
 * │  참고        │  공통 목록 스타일: /assets/css/portal-list.css        │
 * │              │  (life-list.css는 portal-list.css와 동일 — 중복)      │
 * └──────────────┴──────────────────────────────────────────────────────┘
 */

/* ── 1. 행복포털 전용 CSS 변수 ── */
:root {
  --wb-primary:      var(--primary,      #10b981);
  --wb-primary-dark: var(--primary-dark, #059669);
  --wb-link:         var(--link-color,   #10b981);

  --wb-fs-xs:   var(--fs-xs,   14px);
  --wb-fs-sm:   var(--fs-sm,   14px);
  --wb-fs-base: var(--fs-base, 16px);
  --wb-fs-lg:   var(--fs-lg,   18px);
  --wb-lh:      1.7;

  --wb-gray-100: #f8fafc;
  --wb-gray-200: #f1f5f9;
  --wb-gray-300: #e2e8f0;
  --wb-gray-500: #94a3b8;
  --wb-gray-700: #475569;
  --wb-gray-900: #1e293b;

  --wb-radius:  var(--card-radius, 12px);
  --wb-shadow:  var(--card-shadow, 0 1px 6px rgba(0,0,0,.08));
  --wb-gap:     var(--grid-gap,    20px);
}

/* ── 2. 래퍼 ── */
.wb-wrap {
  width: 100%;
  font-size: var(--wb-fs-base);
  line-height: var(--wb-lh);
  color: var(--wb-gray-900);
}
.wb-wrap * { box-sizing: border-box; }

/* ── 3. 섹션 헤더 ── */
.wb-sec-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--wb-primary);
}
.wb-sec-title {
  font-size: var(--wb-fs-lg);
  font-weight: 700;
  color: var(--wb-gray-900);
}

/* ── 4. 콘텐츠 카드 ── */
.wb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--wb-gap);
}
.wb-card {
  background: #fff;
  border: 1px solid var(--wb-gray-300);
  border-radius: var(--wb-radius);
  box-shadow: var(--wb-shadow);
  overflow: hidden;
  transition: box-shadow .2s;
}
.wb-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.wb-card-body  { padding: 16px; }
.wb-card-title {
  font-size: var(--wb-fs-sm);
  font-weight: 700;
  color: var(--wb-gray-900);
  margin: 0 0 8px;
}
.wb-card-meta {
  font-size: var(--wb-fs-xs);
  color: var(--wb-gray-500);
}

/* ── 5. 카테고리 배지 ── */
.wb-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: var(--fs-xs);  /* 배지 — 14px SSOT */
  font-weight: 600;
  border-radius: 4px;
  background: var(--wb-primary);
  color: #fff;
}

/* ── 6. 반응형 ── */
@media (max-width: 768px) {
  .wb-grid { grid-template-columns: 1fr; }
}

/* ── 7. 허브 인덱스 (WIDGET_STANDARD §7 파일럿) ── */
.wb-hub {
  padding: 22px 0 48px;
}
.wb-hub .wb-sec-header {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 14px;
}
.wb-sec-title {
  font-size: var(--fs-lg);
  font-weight: 800;
  color: var(--wb-gray-900);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  border-left: 4px solid var(--wb-primary);
  padding-left: 10px;
}
.wb-sec-more {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--wb-primary);
  text-decoration: none;
}
.wb-sec-more:hover { text-decoration: underline; }

.wb-hub-grid.pw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}
.wb-hub-card {
  background: #fff;
  border: 1px solid var(--wb-gray-300);
  border-radius: var(--wb-radius);
  padding: 18px 12px;
  text-align: center;
  text-decoration: none;
  color: var(--wb-gray-900);
  transition: box-shadow .2s, border-color .2s, transform .15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 44px;
}
.wb-hub-card:hover {
  box-shadow: 0 4px 18px rgba(16, 185, 129, .18);
  border-color: var(--wb-primary);
  transform: translateY(-2px);
}
.wb-hub-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ecfdf5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-lg);
  color: var(--wb-primary);
}
.wb-hub-card__name {
  font-size: var(--fs-base);
  font-weight: 700;
  line-height: 1.3;
}
.wb-hub-card__desc {
  font-size: var(--fs-sm);
  color: var(--wb-gray-500);
  line-height: 1.3;
}
.wb-sec-header--spaced { margin-top: 28px; }

.wb-post-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}
.wb-post-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--wb-gray-300);
  border-radius: 10px;
  text-decoration: none;
  color: var(--wb-gray-900);
  transition: background .15s;
}
.wb-post-item:hover { background: #f0fdf9; }
.wb-post-badge {
  font-size: var(--fs-xs);
  font-weight: 700;
  background: #ecfdf5;
  color: var(--wb-primary-dark);
  border-radius: 6px;
  padding: 3px 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.wb-post-title {
  flex: 1;
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wb-post-date {
  font-size: var(--fs-sm);
  color: var(--wb-gray-500);
  white-space: nowrap;
  flex-shrink: 0;
}
.wb-empty {
  text-align: center;
  padding: 40px 16px;
  color: var(--wb-gray-500);
  background: var(--wb-gray-100);
  border-radius: var(--wb-radius);
  font-size: var(--fs-sm);
}
.wb-empty i { font-size: var(--fs-2xl); display: block; margin-bottom: 10px; }
.wb-empty-sub {
  font-size: var(--fs-md);
  color: var(--wb-gray-500);
}
.wb-empty-cta { margin-top: 14px; }
.wb-cta-wrap { text-align: center; margin-top: 8px; }
.wb-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--wb-primary);
  color: #fff;
  border-radius: 8px;
  padding: 12px 28px;
  font-size: var(--fs-md);
  font-weight: 700;
  text-decoration: none;
  transition: background .2s;
}
.wb-btn:hover { background: var(--wb-primary-dark); }

/* ══ 모바일 보강 (768px/480px) ══ */
@media (max-width: 768px) {
  [class^="wb-page-header"], [class*=" wb-page-header"],
  [class^="wb-hd"], [class*=" wb-hd"],
  [class^="wb-filter"], [class*=" wb-filter"] { flex-wrap: wrap !important; }
  [class^="wb-sidebar"], [class*=" wb-sidebar"],
  [class^="wb-side"], [class*=" wb-side"] { display: none !important; }
  [class^="wb-grid"], [class*=" wb-grid"],
  [class^="wb-row2"], [class*=" wb-row2"],
  .wb-hub-grid.pw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
  .wb-post-item { flex-wrap: wrap; gap: 8px; min-height: 44px; }
  .wb-post-title { flex: 1 1 100%; white-space: normal; }
  .wb-post-date { margin-left: auto; }
  [class^="wb-list-item"], [class*=" wb-list-item"],
  [class^="wb-card-row"], [class*=" wb-card-row"] { flex-wrap: wrap !important; }
  input[type="text"], input[type="search"], input[type="email"], select, textarea { font-size: 16px !important; min-height: 44px !important; }
}
@media (max-width: 480px) {
  [class^="wb-grid"], [class*=" wb-grid"],
  [class^="wb-card-grid"], [class*=" wb-card-grid"],
  .wb-hub-grid.pw-grid { grid-template-columns: 1fr !important; }
}
