/* HolyLink - church page (home / bulletin / board tabs), 10-10 layout.
   Functional styling only; the design pass comes later.
   CrocoBuilder emits `cb-<node id>` per node; shared pieces also carry
   hl-* classes set on the nodes. */

.cb-sp_page {
	--hl-ink: #16181d;
	--hl-muted: #646b7a;
	--hl-line: #e4e7ec;
	--hl-accent: #7a1f2b;
	--hl-bg-soft: #f7f8fa;
	max-width: var(--hl-container, 1750px);
	margin: 0 auto;
	padding: 0 var(--hl-gutter, 20px) 72px;
	color: var(--hl-ink);
}

/* ---------- hero ---------- */
.cb-sp_hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 36px; align-items: center; padding: 32px 0 8px; }
.cb-sp_media { border-radius: 14px; overflow: hidden; background: var(--hl-bg-soft); aspect-ratio: 16 / 9; }
.cb-sp_photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.cb-sp_dio { margin: 0 0 10px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--hl-accent); font-weight: 600; }
.cb-sp_name { margin: 0; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.2; font-weight: 700; }
.cb-sp_name_en { margin: 8px 0 0; font-size: 16px; color: var(--hl-muted); }
.cb-sp_addr { margin: 16px 0 0; font-size: 15px; line-height: 1.6; color: #3d434f; }
.cb-sp_chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hl-chip { display: inline-flex; align-items: center; padding: 7px 13px; border: 1px solid var(--hl-line); border-radius: 999px; font-size: 13.5px; background: #fff; color: inherit; text-decoration: none; word-break: break-all; }
.hl-chip:empty, .hl-chip:not(:has(span)) { display: none; }
.hl-chip span { margin: 0; }

/* ---------- clergy row: every priest and sister in the same card (10-10) ---------- */
.hl-clergy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin: 22px 0 0; padding: 16px 0; border-top: 1px solid var(--hl-line); }
.hl-clergy-card { display: flex; align-items: center; gap: 12px; }
.hl-clergy-card__photo { width: 56px; height: 56px; flex: none; border-radius: 50%; object-fit: cover; background: var(--hl-bg-soft); }
.hl-clergy-card__photo:not([src]), .hl-clergy-card__photo[src=""] { display: none; }
.hl-clergy-card__title { margin: 0; font-size: 12px; color: var(--hl-accent); font-weight: 600; }
.hl-clergy-card__name { margin: 2px 0 0; font-size: 18px; font-weight: 700; }
.cb-sp_others_loop { flex: 1; min-width: 200px; }
.hl-clergy-row .cb-sp_others_loop { display: flex !important; flex-wrap: wrap; gap: 12px 28px; grid-template-columns: none; }

/* ---------- tabs ---------- */
.hl-tabs { display: flex; gap: 4px; margin: 4px 0 28px; border-bottom: 1px solid var(--hl-line); position: sticky; top: 0; background: #fff; z-index: 5; }
.hl-tabs__link { padding: 12px 18px; color: var(--hl-muted); text-decoration: none; font-weight: 600; font-size: 15px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.hl-tabs__link span { margin: 0; }
body.hl-tab-home .hl-tabs__link--home,
body.hl-tab-bulletin .hl-tabs__link--bulletin,
body.hl-tab-board .hl-tabs__link--board { color: var(--hl-ink); border-bottom-color: var(--hl-accent); }

/* ---------- home grid ---------- */
.hl-church__grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 24px 96px; align-items: start; } /* 10-10: wider gutter between content and sidebar */
.hl-church__main, .hl-church__side { display: flex; flex-direction: column; gap: 56px; }
.hl-church__side { position: sticky; top: 64px; }
.hl-card { border: 0; border-radius: 0; background: transparent; padding: 0; } /* 10-10: no boxes, BIFF-style open sections */
.hl-card h2 { margin: 0 0 16px; font-size: 26px; font-weight: 700; letter-spacing: -0.01em; }
.hl-card h3 { margin: 0; font-size: 15px; font-weight: 700; }
.hl-card p { margin: 0; }

/* lists inside cards */
.cb-sp_group { padding: 12px 0; border-bottom: 1px solid #f0f2f5; }
.cb-collection-item:last-child .cb-sp_group { border-bottom: 0; }
.cb-sp_ann_date, .cb-sp_bull_date, .cb-sp_bt_label { font-size: 12px; color: var(--hl-muted); }
.cb-sp_ann_body, .cb-sp_group_desc { margin-top: 4px; font-size: 14px; color: #3d434f; }
.cb-sp_group_contact { font-size: 13px; color: var(--hl-muted); }
.hl-info__row { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f0f2f5; font-size: 14px; }
.hl-info__k { color: var(--hl-muted); }
.hl-info__v { word-break: break-word; }

.cb-sp_mass_loop_item .cb-collection-item__content,
.cb-sp_office_row { display: grid; grid-template-columns: 70px 1fr auto; gap: 8px; padding: 9px 0; border-bottom: 1px solid #f0f2f5; font-size: 14px; }
.cb-sp_office_row { grid-template-columns: 70px auto auto 1fr; }
.cb-sp_office_open::after { content: " –"; }
.cb-sp_office_note { font-size: 12px; color: var(--hl-muted); text-align: right; }
.cb-sp_mass_day, .cb-sp_office_day { color: var(--hl-muted); margin: 0; }
.cb-sp_mass_time { font-weight: 600; margin: 0; }
.cb-sp_mass_lang { font-size: 12px; color: var(--hl-muted); margin: 0; }

.hl-btn { display: inline-block; margin-top: 10px; padding: 8px 14px; border-radius: 8px; background: var(--hl-accent); color: #fff; text-decoration: none; font-size: 14px; font-weight: 600; }
.hl-btn span { margin: 0; }
.hl-more { display: inline-block; margin-top: 12px; font-size: 13px; color: var(--hl-accent); }
.hl-link { font-size: 13px; color: var(--hl-accent); }
.hl-empty { color: var(--hl-muted); }

/* location */
.cb-sp_loc:not(:has(.hl-map)) { display: none; }

/* nearby */
.cb-sp_near { margin-top: 28px; }
.hl-near-card { display: block; color: inherit; text-decoration: none; }
.cb-sp_near_photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: var(--hl-bg-soft); display: block; }
.cb-sp_near_name { margin: 8px 0 0; font-size: 15px; }
.cb-sp_near_alt, .cb-sp_near_city { font-size: 13px; color: var(--hl-muted); }

/* bulletin tab */
.cb-sp_tab_bulletin_body { display: flex; flex-direction: column; gap: 20px; max-width: 960px; }
.cb-sp_bt_h, .cb-sp_bd_h { margin: 0; font-size: 22px; }
.cb-sp_bt_row { display: grid; grid-template-columns: 140px 1fr auto; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f0f2f5; font-size: 14px; }
.cb-sp_tab_board_body { max-width: 960px; display: flex; flex-direction: column; gap: 12px; }

/* ---------- tablet / mobile: one column, sidebar items moved up ---------- */
@media (max-width: 1024px) {
	.hl-church__grid { display: flex; flex-direction: column; align-items: stretch; }
	.hl-church__main, .hl-church__side { display: contents; }
	.hl-church__main > *, .hl-church__side > * { width: 100%; max-width: none; box-sizing: border-box; }
	.hl-church__side { position: static; }
	.cb-sp_mass_card { order: 1; }
	.cb-sp_bull { order: 2; }
	.cb-sp_office { order: 3; }
	.cb-sp_about { order: 4; }
	.cb-sp_ann { order: 5; }
	.cb-sp_info { order: 6; }
	.cb-sp_events { order: 7; }
	.cb-sp_loc { order: 8; }
	.cb-sp_groups { order: 9; }
	.cb-sp_reg { order: 10; }
}

@media (max-width: 767px) {
	.cb-sp_hero { grid-template-columns: 1fr; gap: 18px; padding-top: 16px; }
	.cb-sp_page { padding: 0 16px 56px; }
	.hl-card { padding: 0; }
	.hl-church__grid { gap: 48px; }
	.hl-sched__date { border-right: 0; padding-right: 0; }
	.hl-sched__btn { padding: 0 12px; }
	.hl-tabs__link { padding: 12px 12px; }
	.cb-sp_bt_row { grid-template-columns: 1fr auto; }
	.cb-sp_bt_row_date { grid-column: 1 / -1; color: var(--hl-muted); font-size: 12px; }
}
/* ---------- section head + schedule-style list (BIFF "Schedule", 10-10) ---------- */
.hl-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
.hl-sec-head h2 { margin: 0 !important; }
.hl-more { font-size: 14px; font-weight: 600; color: var(--hl-ink); text-decoration: none; white-space: nowrap; }
.hl-more:hover { text-decoration: underline; }
.hl-sched-row { display: flex; align-items: stretch; gap: 10px; color: inherit; text-decoration: none; }
.hl-sched { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px 14px; border: 1px solid var(--hl-line); border-radius: 4px; background: #fff; }
.hl-sched-row:hover .hl-sched { border-color: var(--hl-ink); }
.hl-sched__badge { flex: none; padding: 3px 10px; border-radius: 999px; background: var(--hl-ink); color: #fff; font-size: 12px; font-weight: 700; }
.hl-sched__date { flex: none; padding-right: 12px; border-right: 1px solid var(--hl-line); color: var(--hl-muted); font-size: 14px; }
.hl-sched__title { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 15px; }
.hl-sched__btn { flex: none; display: flex; align-items: center; padding: 0 22px; border-radius: 4px; background: var(--hl-ink); color: #fff; font-size: 14px; font-weight: 600; }
.hl-notices .hl-notice-item { padding: 24px 28px; border-bottom: 1px solid var(--hl-line); scroll-margin-top: 90px; }
.hl-notices .hl-notice-item h3 { margin: 10px 0 8px; font-size: 19px; font-weight: 700; }
.hl-notice-item__body { line-height: 1.7; color: #3d434f; }
.hl-notice-item:target { background: var(--hl-bg-soft); border-radius: 6px; }
.hl-notice-item__meta { display: flex; align-items: center; gap: 10px; }
.hl-notice-item__meta .hl-sched__date { border-right: 0; padding-right: 0; }
.cb-sp_nt_title { margin: 10px 0 8px; font-size: 19px; font-weight: 700; }
.hl-sched__loc { flex: none; max-width: 30%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--hl-muted); font-size: 14px; }
.hl-sched__end:not(:empty)::before { content: '– '; }
.hl-sched__end { color: var(--hl-muted); font-size: 14px; }
.hl-notice-item__title { margin: 10px 0 4px; font-size: 19px; font-weight: 700; }
.hl-notice-item__loc { margin: 0 0 8px; color: var(--hl-muted); font-size: 14px; }
@media (max-width: 600px) { .hl-sched__loc { display: none; } }
.hl-sched__tag { flex: none; display: flex; align-items: center; justify-content: center; min-width: 64px; padding: 0 14px; border-radius: 4px; background: var(--hl-ink); color: #fff; font-size: 13px; font-weight: 700; }
@media (max-width: 600px) { .hl-sched__tag { min-width: 0; padding: 0 10px; } }
@media (max-width: 600px) { .hl-notices .hl-notice-item { padding: 18px 16px; } }

/* ---------- full-bleed hero (BIFF program page style, 10-10) ---------- */
html:has(.cb-sp_hero), body:has(.cb-sp_hero) { overflow-x: clip; }
.cb-sp_hero {
	position: relative; display: flex; align-items: flex-end;
	width: 100vw; max-width: none; margin-left: calc(50% - 50vw); padding: 0;
	min-height: max(480px, calc(100svh - var(--hl-header-h, 61px))); /* fills the screen under the site header */
	background: #1b1d22; color: #fff; overflow: hidden;
}
body.admin-bar .cb-sp_hero { min-height: max(480px, calc(100svh - var(--hl-header-h, 61px) - 32px)); }
.cb-sp_hero:not(:has(.cb-sp_photo[src^="http"])) { min-height: 380px; }
.cb-sp_media { position: absolute; inset: 0; border-radius: 0; aspect-ratio: auto; background: #1b1d22; }
.cb-sp_photo { width: 100%; height: 100%; object-fit: cover; }
.cb-sp_hero::after {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background: linear-gradient(to top, rgba(0,0,0,.82) 0%, rgba(0,0,0,.45) 42%, rgba(0,0,0,.18) 100%);
}
.cb-sp_hero_text {
	position: relative; z-index: 1; box-sizing: border-box;
	width: 100%; max-width: var(--hl-container, 1750px); margin: 0 auto;
	padding: 0 var(--hl-gutter, 20px) 56px;
	display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 16px;
}
.cb-sp_hero_text > * { flex: 0 0 100%; }
.cb-sp_hero .cb-sp_dio {
	flex: 0 0 auto; order: 1; margin: 0 100% 14px 0; padding: 4px 11px; border-radius: 999px;
	background: #d7262f; color: #fff; font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none;
}
.cb-sp_hero .cb-sp_name { flex: 0 1 auto; order: 2; margin: 0; color: #fff; font-size: clamp(34px, 4.4vw, 60px); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
.cb-sp_hero .cb-sp_name_en { flex: 0 1 auto; order: 3; margin: 0; color: #fff; font-size: clamp(16px, 1.5vw, 22px); font-weight: 700; }
.cb-sp_hero .cb-sp_chips { order: 5; margin-top: 28px; gap: 10px; }
.cb-sp_hero .cb-sp_addr { order: 6; margin: 22px 0 0; color: rgba(255,255,255,.72); font-size: 17px; }
.cb-sp_hero .hl-chip {
	padding: 10px 16px; border: 1px solid rgba(255,255,255,.32); border-radius: 4px;
	background: rgba(0,0,0,.38); color: #fff; font-size: 14px; font-weight: 600;
}
.cb-sp_hero .hl-chip:hover { background: rgba(0,0,0,.6); border-color: rgba(255,255,255,.6); }
@media (max-width: 1024px) {
	.cb-sp_hero { gap: 0; padding: 0; }
	.cb-sp_hero_text { padding: 0 16px 36px; }
	.cb-sp_hero .cb-sp_addr { font-size: 15px; }
}
/* clergy inside the hero (10-10) */
.cb-sp_hero .hl-clergy-row { order: 4; margin: 22px 0 0; padding: 0; border-top: 0; gap: 12px 36px; }
.cb-sp_hero .hl-clergy-row .cb-sp_others_loop { gap: 12px 36px; }
.cb-sp_hero .hl-clergy-card__title { color: rgba(255,255,255,.66); font-size: 13px; font-weight: 600; }
.cb-sp_hero .hl-clergy-card__name { color: #fff; font-size: 19px; font-weight: 700; }
.cb-sp_hero .hl-clergy-card__photo { width: 48px; height: 48px; border: 2px solid rgba(255,255,255,.5); }

/* tabs: bigger, folder-tab buttons, BIFF-like gap under the hero (10-10) */
.hl-tabs { margin: 72px 0 44px; gap: 8px; border-bottom: 2px solid var(--hl-ink); }
body.admin-bar .hl-tabs { top: 32px; }
.hl-tabs__link {
	padding: 16px 38px; margin-bottom: 0; font-size: 18px; font-weight: 700; color: var(--hl-muted);
	background: var(--hl-bg-soft); border: 1px solid var(--hl-line); border-bottom: 0; border-radius: 8px 8px 0 0;
}
.hl-tabs__link:hover { color: var(--hl-ink); background: #eef0f3; }
body.hl-tab-home .hl-tabs__link--home,
body.hl-tab-bulletin .hl-tabs__link--bulletin,
body.hl-tab-board .hl-tabs__link--board { color: #fff; background: var(--hl-ink); border-color: var(--hl-ink); }
@media (max-width: 1024px) {
	.hl-tabs { margin: 40px 0 28px; gap: 4px; }
	.hl-tabs__link { padding: 12px 18px; font-size: 16px; }
	.cb-sp_hero .hl-clergy-card__name { font-size: 17px; }
}
/* compact hero on sub pages (bulletin / board / notices / events): the full-screen hero is only for 홈 (10-10) */
body:not(.hl-tab-home) .cb-sp_hero,
body.admin-bar:not(.hl-tab-home) .cb-sp_hero { min-height: clamp(360px, 44vh, 460px); }
body:not(.hl-tab-home) .cb-sp_hero_text { padding-top: 64px; padding-bottom: 40px; }
body:not(.hl-tab-home) .hl-tabs { margin-top: 48px; }
@media (max-width: 1024px) {
	body:not(.hl-tab-home) .cb-sp_hero,
	body.admin-bar:not(.hl-tab-home) .cb-sp_hero { min-height: 320px; }
	body:not(.hl-tab-home) .cb-sp_hero_text { padding-bottom: 28px; }
	body:not(.hl-tab-home) .hl-tabs { margin-top: 28px; }
}
/* sticky tabs: solid strip, and the right offset for the admin bar per screen size (10-10) */
.hl-tabs { padding-top: 10px; background: #fff; box-shadow: 0 -10px 0 #fff, 0 10px 0 #fff; }
@media (max-width: 782px) { body.admin-bar .hl-tabs { top: 46px; } }
@media (max-width: 600px) { body.admin-bar .hl-tabs { top: 0; } }
.cb-sp_loc .hl-map, .cb-sp_loc [data-type="hl-map"], .cb-sp_loc > * { width: 100%; max-width: none; }

/* nearby churches: a separate full-width band, clearly apart from this church (10-10) */
.cb-sp_near.hl-card {
	width: 100vw; max-width: none; box-sizing: border-box;
	margin: 120px 0 -72px calc(50% - 50vw);
	padding: 64px calc(50vw - 50%) 80px;
	background: #f2f3f5; border-top: 1px solid var(--hl-line);
}
.cb-sp_near.hl-card h2 { margin-bottom: 24px; }
.cb-sp_near_photo { aspect-ratio: 3 / 2; }
@media (max-width: 1024px) {
	.cb-sp_near.hl-card { margin: 72px 0 -56px calc(50% - 50vw); padding: 44px calc(50vw - 50%) 56px; }
	.cb-sp_near_name { font-size: 14px; }
}/* near church without a photo: keep the same photo slot so the grid lines up */
.cb-sp_near_loop .cb-collection-item:not(:has(img)) > *:first-child::before { content: ""; display: block; aspect-ratio: 3 / 2; margin-bottom: 0; border-radius: 10px; background: #dfe2e7; }

/* gallery + hero logo (10-10) */
.hl-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.hl-gallery__item img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.cb-sp_hero .hl-hero-logo { order: 0; flex: 0 0 auto; width: 72px; height: 72px; margin: 0 100% 18px 0; object-fit: contain; background: #fff; border-radius: 12px; padding: 6px; box-sizing: border-box; }
.cb-sp_hero .hl-hero-logo:not([src]), .cb-sp_hero .hl-hero-logo[src=""] { display: none; }
@media (max-width: 1024px) { .cb-sp_gallery { order: 4; } .hl-gallery { grid-template-columns: repeat(2, 1fr); } }

/* hero: English name below Korean name */
.cb-sp_hero .cb-sp_name_en { flex: 0 0 100%; margin: 6px 0 0; }
