/* R-ADV-1206-1839 (Snow 12-06 18:38 「교회 페이지 uiux 톤앤매너 맞춰서 전반적으로 수정해 / 하위페이지들도」)
   Every public church page (home, sermons, news, post, verse, videos, watch, live, analysis, giving, schedule, segments)
   wraps its content in .cb-page and loads this file after church_b2b.css. Only app tokens from style.css
   (--brandFill navy, --surface, --ink, --caption, --line, --radius) - no church purple, no fixed white cards, no serif,
   so light and dark both follow the app. Markup/data/links are unchanged; this is look only. */

.cb-page { --cb-accent: var(--brandFill); font-family: var(--font-family); color: var(--ink); }
.cb-page h1, .cb-page h2, .cb-page h3, .cb-page h4, .cb-page h5, .cb-page h6,
.cb-page .card-title, .cb-page .video-title { font-family: var(--font-family); letter-spacing: -0.2px; color: var(--ink); }
.cb-page a { text-decoration: none; }

/* ---- shared back header (replaces the underlined '← 뒤로가기' / '‹ 교회 홈' text links) ---- */
/* no negative margins: .cb-page has overflow-x:hidden and would clip the 44px button (review 1839 M2) */
.cb-backbar { display: flex; align-items: center; gap: 2px; min-height: 48px; margin: 0 0 6px; min-width: 0; }
.cb-back { flex: none; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; color: var(--ink) !important; background: transparent; border: 0; }
.cb-back:hover, .cb-back:focus-visible { background: var(--chip); }
.cb-back svg { width: 22px; height: 22px; }
.cb-backbar-title { font: 700 1rem/1.3 var(--font-family); color: var(--ink); min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }

/* ---- page title + sub line ---- */
.cb-title { font: 800 1.375rem/1.3 var(--font-family); margin: 0; color: var(--ink); word-break: keep-all; overflow-wrap: anywhere; }
.cb-title .cb-count { font-size: .9375rem; font-weight: 600; color: var(--caption); margin-left: 4px; }
.cb-sub { font-size: .875rem; color: var(--caption); margin-top: 4px; }
.cb-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; min-width: 0; }
.cb-head .church-logo { width: 48px; height: 48px; flex: none; border-radius: 50%; object-fit: cover; background: #fff; border: 1px solid var(--line); }
.cb-head-body { min-width: 0; flex: 1 1 auto; }

/* ---- hero (church home): app navy card instead of the church purple ---- */
/* background-color only: the cover hero keeps church_b2b.css background-size/position (review 1839 M1) */
.cb-page .cb-hero { background-color: var(--brand-card); color: #fff; border-radius: var(--radius); padding: 20px 16px; }
html.dark .cb-page .cb-hero { border: 1px solid var(--line); }
.cb-page .cb-hero.has-cover { background-color: var(--brand-card); background-size: cover; background-position: center; }
.cb-page .cb-hero h1 { font: 800 1.5rem/1.3 var(--font-family); color: #fff; }
.cb-page .cb-meta { font-size: .9rem; opacity: 1; color: rgba(255, 255, 255, .88); margin-top: 6px; }
.cb-page .cb-badge-official { background: rgba(255, 255, 255, .16); color: #fff; font-size: .8125rem; }

/* ---- buttons: one height / radius / weight on every church page ---- */
.cb-page .btn { min-height: 48px; border-radius: var(--radius-sm); font-size: .9375rem; font-weight: 700; padding: 0 16px;
  box-shadow: none; text-decoration: none; }
.cb-page .btn-sm { min-height: 44px; font-size: .9375rem; }
.cb-page .btn-primary, .cb-page .btn-success, .cb-page .cb-btn-primary {
  background: var(--brandFill) !important; border: 1px solid var(--brandFill) !important; color: #fff !important; }
.cb-page .btn-primary:hover, .cb-page .btn-success:hover { filter: brightness(1.08); }
.cb-page .btn-outline-primary, .cb-page .btn-outline-secondary, .cb-page .btn-outline-danger, .cb-page .btn-outline-warning,
.cb-page .btn-warning, .cb-page .btn-light, .cb-page .btn-outline-light, .cb-page .cb-btn {
  background: var(--surface) !important; border: 1px solid var(--bd2) !important; color: var(--ink) !important; }
.cb-page .btn-outline-primary:hover, .cb-page .btn-outline-secondary:hover, .cb-page .cb-btn:hover { border-color: var(--brand) !important; }
.cb-page .btn-link { min-height: 44px; padding: 0 4px; color: var(--brand); font-weight: 700; }
.cb-page .cb-hero .btn-light { background: #fff !important; border-color: #fff !important; color: #1c2230 !important; }
.cb-page .cb-hero .btn-outline-light, .cb-page .cb-hero .btn-warning {
  background: transparent !important; border: 1px solid rgba(255, 255, 255, .55) !important; color: #fff !important; }
.cb-page .cb-cta { gap: 8px; }
.cb-page .cb-cta .btn, .cb-page .cb-cta form { flex: 1 1 140px; }
.cb-page .cb-cta form .btn { width: 100%; }
/* NEW badge: app pill instead of the yellow flag */
.cb-page .new-feature-flag { background-color: var(--surface) !important; }
.cb-new { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 999px; margin-left: 6px;
  background: var(--brandFill); color: #fff; font-size: .6875rem; font-weight: 800; letter-spacing: .02em; }
/* 2-column action grid (videos page / watch page) */
.cb-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 12px; }
.cb-actions > .btn, .cb-actions > form > .btn { width: 100%; }
.cb-actions > form { margin: 0; }
.cb-actions > :only-child { grid-column: 1 / -1; }
/* favourite on/off stays visible after the shared button look (review 1839 L1) */
.cb-page #favToggleBtn.btn-warning { background: var(--soft) !important; border-color: var(--brand) !important; color: var(--ink) !important; }

/* ---- chips (tabs, archive axes, sort): same look as 영상보기 / 찬양하기 chips ---- */
.cb-page .cb-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0; margin: 0; scrollbar-width: none; }
.cb-page .cb-tabs::-webkit-scrollbar { display: none; }
.cb-page .cb-tabs a, .cb-page .cb-tabs span { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: .9rem;
  font-weight: 600; text-decoration: none; white-space: nowrap; }
.cb-page .cb-tabs a:hover:not(.active) { border-color: var(--brand); }
.cb-page .cb-tabs a.active { background: var(--brandFill); border-color: var(--brandFill); color: #fff; }
.cb-page .cb-tabs span[aria-disabled="true"] { color: var(--caption); border-style: dashed; }
@media (max-width: 480px) { .cb-page .cb-tabs a, .cb-page .cb-tabs span { font-size: .875rem; padding: 0 14px; } }

/* ---- cards / lists follow the theme (was a fixed white card with light-grey text in dark mode) ---- */
.cb-page .cb-card, .cb-page .category-card, .cb-page .card { background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--ink); box-shadow: none; transform: none; }
.cb-page .category-card:hover { transform: none; box-shadow: none; }
.cb-page .cb-card h2, .cb-page .cb-h2 { font: 800 1.0625rem/1.35 var(--font-family); color: var(--ink); margin: 0 0 10px; }
.cb-page .cb-source, .cb-page .cb-empty, .cb-page .text-muted { color: var(--caption) !important; }
.cb-page .cb-verse-text { color: var(--ink); }
.cb-page .cb-verse-text sup { color: var(--brand); }
.cb-page .cb-list li { border-bottom-color: var(--line); }
.cb-page .cb-list .ttl { color: var(--ink); font-weight: 600; }
.cb-page .cb-more-link { color: var(--brand); font-weight: 700; }
.cb-page .cb-pin { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 6px; background: #c22f35;
  color: #fff; font-size: .75rem; font-weight: 800; flex: none; }
.cb-page .cb-fix .cb-fix-link { color: var(--brand); }
.cb-page hr { border-color: var(--line); opacity: 1; }
.cb-page .list-group-item { background: var(--surface); color: var(--ink); border-color: var(--line); min-height: 52px;
  display: flex; align-items: center; font-weight: 600; }
.cb-page .alert-light { background: var(--chip); color: var(--ink2); border: 0 !important; border-radius: var(--radius-sm); }
.cb-page .text-success { color: var(--brand) !important; }
.cb-page .border-bottom, .cb-page .border-top { border-color: var(--line) !important; }

/* tags (유튜브 · 주보 · 분류 · 준비중 · 최근/인기): one quiet pill instead of white Bootstrap badges */
.cb-tag, .cb-page .badge.text-bg-light, .cb-page .badge.bg-light { display: inline-flex; align-items: center; height: 24px;
  padding: 0 8px; border-radius: 6px; background: var(--chip) !important; color: var(--ink2) !important; border: 0 !important;
  font-size: .75rem; font-weight: 700; line-height: 1; vertical-align: middle; }
.cb-tag-hot { background: var(--soft) !important; color: var(--brand) !important; }

/* ---- forms (search box placeholder was unreadable in dark) ---- */
.cb-page .form-control, .cb-page .form-select { background-color: var(--surface); color: var(--ink); border: 1px solid var(--bd2);
  border-radius: var(--radius-sm); min-height: 44px; font-size: .9375rem; box-shadow: none; }
.cb-page .form-control:focus, .cb-page .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--soft); }
.cb-page .form-control::placeholder { color: var(--ink3); opacity: 1; }
.cb-page .form-label { color: var(--ink2); font-weight: 600; }
html.dark .cb-page .form-select { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%239ba3b0' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); }
html.dark .cb-page input[type="date"] { color-scheme: dark; }
.cb-page .page-link { background: var(--surface); color: var(--ink); border-color: var(--line); }
.cb-page .page-item.active .page-link { background: var(--brandFill); border-color: var(--brandFill); color: #fff; }
.cb-page .page-item.disabled .page-link { background: var(--surface); color: var(--caption); }

/* archive search: one row = search box (with icon button) + bible book + order */
.cb-search { display: flex; gap: 6px; align-items: center; margin: 2px 0 14px; min-width: 0; }
.cb-search-q { position: relative; flex: 1 1 auto; min-width: 0; }
.cb-search-q .form-control { padding-right: 44px; width: 100%; }
.cb-search-go { position: absolute; right: 0; top: 0; width: 44px; height: 44px; border: 0; background: transparent;
  color: var(--ink2); display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); }
.cb-search-go svg { width: 20px; height: 20px; }
.cb-search .form-select { flex: 0 0 auto; width: 92px; padding-left: 10px; padding-right: 24px; background-position: right 7px center; font-size: .875rem; }
.cb-search .cb-order { width: 80px; }
.cb-search-more { display: flex; gap: 6px; margin: -6px 0 14px; }
.cb-search-more .form-select { flex: 1 1 auto; }

/* ---- video cards: same anatomy as the 영상보기 tab (16:9 thumb, 2-line title, views/date line) ---- */
.cb-vgrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px 14px; }
@media (min-width: 720px) { .cb-vgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .cb-vgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cb-vcard { display: block; text-decoration: none; color: inherit; min-width: 0; }
.cb-vthumb { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #111; margin-bottom: 8px; }
.cb-vthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cb-vcard .vd-card-title { font-size: 1rem; font-weight: 700; line-height: 1.4; color: var(--ink); display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; font-family: var(--font-family); }
.cb-vmeta { font-size: .8125rem; color: var(--caption); margin-top: 3px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.cb-vmeta .cb-tag { height: 20px; font-size: .6875rem; padding: 0 6px; }
.cb-page .cb-card .cb-vgrid { margin-top: 4px; }

/* comments block on the videos page */
.cb-page .church-like-btn { min-height: 44px; }
.cb-page .cb-comments .cb-avatar { width: 32px; height: 32px; border-radius: 50%; flex: none; background: var(--soft);
  display: flex; align-items: center; justify-content: center; }
