/*
Theme Name: SGSKC 선한목자교회
Template: twentytwentyfive
Description: 싱가포르 선한목자교회 사이트 테마 (Twenty Twenty-Five 자식 테마)
Version: 1.0.4
Text Domain: sgskc
*/

/* Korean wraps between words, never inside a word */
body { word-break: keep-all; overflow-wrap: break-word; }

/* Same page width whether or not the page scrolls: always reserve the scrollbar's space */
html { scrollbar-gutter: stable; }
@supports not (scrollbar-gutter: stable) { html { overflow-y: scroll; } }
/* slim, warm scrollbar to match the theme */
html { scrollbar-width: thin; scrollbar-color: #C9C2AE transparent; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-thumb { background: #C9C2AE; border-radius: 10px; border: 2px solid var(--wp--preset--color--base); }
::-webkit-scrollbar-thumb:hover { background: var(--wp--preset--color--muted); }
::-webkit-scrollbar-track { background: transparent; }

/* header: stays on top while scrolling. Sticky must sit on WordPress's template-part wrapper
   (<header class="wp-block-template-part">), which is as tall as the header itself. */
header.wp-block-template-part:has(.sgskc-header) { position: sticky; top: 0; z-index: 50; }
.admin-bar header.wp-block-template-part:has(.sgskc-header) { top: 32px; }
@media (max-width: 782px) { .admin-bar header.wp-block-template-part:has(.sgskc-header) { top: 46px; } }
.sgskc-header { border-bottom: 1px solid var(--wp--preset--color--line); }
.sgskc-header .wp-block-site-title a { color: var(--wp--preset--color--primary); text-decoration: none; }
.sgskc-logo img { width: 160px; height: auto; display: block; }
@media (max-width: 781px) { .sgskc-logo img { width: 128px; } }
.sgskc-header .wp-block-navigation a { text-decoration: none; }
/* desktop dropdowns only (not inside the phone menu overlay) */
.sgskc-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__submenu-container { border-radius: 10px; border: 1px solid var(--wp--preset--color--line) !important; padding: 0.4rem 0; box-shadow: 0 10px 30px rgba(52, 70, 20, 0.10); }
.sgskc-nav-cta > a { background: var(--wp--preset--color--primary); color: #fff !important; padding: 0.45em 1.1em; border-radius: 999px; }
.sgskc-nav-cta > a:hover { background: var(--wp--preset--color--accent); }

/* ---- header: frosted white, soft shadow once scrolled ---- */
/* frosted glass only on desktop: backdrop-filter makes the header the containing block of position:fixed children,
   which would trap the phone menu overlay inside the 70px header */
.sgskc-header { transition: box-shadow 0.25s ease, border-color 0.25s ease; }
@media (min-width: 1024px) { .sgskc-header { background-color: rgba(255, 255, 255, 0.92) !important; backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px); } }
.sgskc-header.is-scrolled { box-shadow: 0 8px 28px rgba(52, 70, 20, 0.09); border-bottom-color: transparent; }

/* ---- below 1024px (phones, tablets, landscape): hamburger menu instead of a two-line bar ---- */
@media (min-width: 600px) and (max-width: 1023px) {
  .sgskc-header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex !important; }
  .sgskc-header .wp-block-navigation__responsive-container:not(.is-menu-open) { display: none !important; }
}

/* ---- desktop menu ---- */
@media (min-width: 1024px) {
  .sgskc-header .wp-block-navigation__container { gap: 2rem !important; align-items: center; }
  .sgskc-header .wp-block-navigation__container > .wp-block-navigation-item > a {
    position: relative; padding: 0.55rem 0; font-size: 0.98rem; font-weight: 600; letter-spacing: -0.01em;
    color: var(--wp--preset--color--contrast); transition: color 0.2s ease;
  }
  /* green underline grows from the centre on hover / current section */
  .sgskc-header .wp-block-navigation__container > .wp-block-navigation-item:not(.sgskc-nav-cta) > a::after {
    content: ""; position: absolute; left: 50%; right: 50%; bottom: 0; height: 2px; border-radius: 2px;
    background: var(--wp--preset--color--brand); transition: left 0.25s ease, right 0.25s ease;
  }
  .sgskc-header .wp-block-navigation__container > .wp-block-navigation-item:not(.sgskc-nav-cta):hover > a::after,
  .sgskc-header .wp-block-navigation__container > .wp-block-navigation-item:not(.sgskc-nav-cta):focus-within > a::after,
  .sgskc-header .wp-block-navigation__container > .current-menu-item > a::after,
  .sgskc-header .wp-block-navigation__container > .wp-block-navigation-item:has(.current-menu-item) > a::after { left: 0; right: 0; }
  .sgskc-header .wp-block-navigation__container > .wp-block-navigation-item:not(.sgskc-nav-cta):hover > a,
  .sgskc-header .wp-block-navigation__container > .current-menu-item > a,
  .sgskc-header .wp-block-navigation__container > .wp-block-navigation-item:has(.current-menu-item) > a { color: var(--wp--preset--color--primary); }
  .sgskc-header .wp-block-navigation__submenu-icon { width: 0.6em; height: 0.6em; margin-left: 0.3em; opacity: 0.45; transition: transform 0.25s ease, opacity 0.2s; }
  .sgskc-header .has-child:hover > .wp-block-navigation__submenu-icon { transform: rotate(180deg); opacity: 0.8; }

  /* dropdown card: rises in gently */
  .sgskc-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__submenu-container {
    min-width: 210px !important; padding: 0.5rem !important; margin-top: 0.6rem;
    background: #fff !important; border: 1px solid var(--wp--preset--color--line) !important; border-radius: 14px;
    box-shadow: 0 18px 44px rgba(52, 70, 20, 0.13) !important;
    transform: translateY(6px); transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }
  .sgskc-header .has-child:hover > .wp-block-navigation__submenu-container,
  .sgskc-header .has-child:focus-within > .wp-block-navigation__submenu-container { transform: translateY(0); }
  /* invisible bridge so the card doesn't close while the mouse travels down to it */
  .sgskc-header .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__submenu-container::before {
    content: ""; position: absolute; left: 0; right: 0; top: -0.8rem; height: 0.8rem;
  }
  .sgskc-header .wp-block-navigation__submenu-container .wp-block-navigation-item a {
    padding: 0.55rem 0.85rem !important; border-radius: 9px; font-size: 0.94rem; font-weight: 500;
    color: var(--wp--preset--color--contrast); transition: background 0.15s ease, color 0.15s ease;
  }
  .sgskc-header .wp-block-navigation__submenu-container .wp-block-navigation-item a:hover,
  .sgskc-header .wp-block-navigation__submenu-container .current-menu-item > a { background: var(--wp--preset--color--base-2); color: var(--wp--preset--color--primary); }

  /* call-to-action pill */
  .sgskc-header .wp-block-navigation__container > .wp-block-navigation-item.sgskc-nav-cta > a { padding: 0.6em 1.35em; font-size: 0.94rem; white-space: nowrap; color: #fff; box-shadow: 0 4px 14px rgba(74, 110, 18, 0.25); transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease; }
  .sgskc-header .wp-block-navigation__container > .wp-block-navigation-item.sgskc-nav-cta > a:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(192, 138, 46, 0.3); }
}

/* album card without photos (lost on the old server) */
.sgskc-nophoto { margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.35rem;
  border-radius: 12px; color: #B9B19C; background: repeating-linear-gradient(135deg, #F3EEDF 0 12px, #F7F3E8 12px 24px); }
.sgskc-nophoto span { font-size: 0.8rem; color: var(--wp--preset--color--muted); }

/* ---- photo viewer (modal) ---- */
.sgskc-lb { position: fixed; inset: 0; z-index: 1000; display: grid; grid-template-columns: 64px 1fr 64px; align-items: center;
  background: rgba(20, 24, 14, 0.92); animation: sgskc-lb-in 0.2s ease; }
.sgskc-lb[hidden] { display: none; }
@keyframes sgskc-lb-in { from { opacity: 0; } to { opacity: 1; } }
.sgskc-lb-fig { grid-column: 2; margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; height: 100dvh; padding: 3.5rem 0 2.5rem; box-sizing: border-box; }
.sgskc-lb-fig img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.sgskc-lb-fig figcaption { margin-top: 0.8rem; color: rgba(255, 255, 255, 0.75); font-size: 0.9rem; }
.sgskc-lb button { border: 0; background: rgba(255, 255, 255, 0.12); color: #fff; cursor: pointer; border-radius: 50%; display: grid; place-items: center; transition: background 0.15s; }
.sgskc-lb button:hover { background: rgba(255, 255, 255, 0.25); }
.sgskc-lb-prev, .sgskc-lb-next { width: 48px; height: 48px; font-size: 2rem; line-height: 1; justify-self: center; }
.sgskc-lb-prev { grid-column: 1; grid-row: 1; }
.sgskc-lb-next { grid-column: 3; grid-row: 1; }
.sgskc-lb.single .sgskc-lb-prev, .sgskc-lb.single .sgskc-lb-next { visibility: hidden; }
.sgskc-lb-close { position: absolute; top: 0.9rem; right: 0.9rem; width: 44px; height: 44px; font-size: 1.8rem; }
html.sgskc-lb-open { overflow: hidden; }
.sgskc-content a[href$=".webp"], .sgskc-content a[href$=".jpg"], .sgskc-content a[href$=".png"] { cursor: zoom-in; }
@media (max-width: 600px) {
  .sgskc-lb { grid-template-columns: 0 1fr 0; }
  .sgskc-lb-prev, .sgskc-lb-next { position: absolute; bottom: 1.2rem; width: 44px; height: 44px; }
  .sgskc-lb-prev { left: calc(50% - 56px); }
  .sgskc-lb-next { left: calc(50% + 12px); }
  .sgskc-lb-fig { padding: 3.5rem 0.5rem 5rem; }
}

/* ---- back to top ---- */
.sgskc-totop {
  position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 60; width: 48px; height: 48px; border: 0; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; color: #fff; background: var(--wp--preset--color--primary);
  box-shadow: 0 8px 22px rgba(52, 70, 20, 0.28);
  opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s, background 0.2s ease;
}
.sgskc-totop.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.sgskc-totop:hover { background: var(--wp--preset--color--accent); }
.sgskc-totop:focus-visible { outline: 3px solid var(--wp--preset--color--accent); outline-offset: 3px; }
@media (max-width: 781px) { .sgskc-totop { right: 1rem; bottom: 1rem; width: 44px; height: 44px; } }

/* phone menu overlay: left-aligned groups, sub-items two per row, visit button at the bottom */
.sgskc-header .wp-block-navigation__responsive-container.is-menu-open { padding: 1.25rem 1.5rem 2rem; background: var(--wp--preset--color--base) !important; }
.sgskc-header .is-menu-open .wp-block-navigation__responsive-container-content { align-items: stretch !important; padding-top: 2.75rem !important; }
.sgskc-header .is-menu-open .wp-block-navigation__container { align-items: stretch !important; gap: 0 !important; width: 100%; }
.sgskc-header .is-menu-open .wp-block-navigation-item { align-items: flex-start !important; width: 100%; }
.sgskc-header .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item { padding: 0.9rem 0; border-bottom: 1px solid var(--wp--preset--color--line); }
.sgskc-header .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item > a { font-size: 1.15rem; font-weight: 700; color: var(--wp--preset--color--primary); }
.sgskc-header .is-menu-open .wp-block-navigation__submenu-container {
  display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.15rem 1rem;
  width: 100% !important; min-width: 0 !important; box-sizing: border-box; padding: 0.55rem 0 0 !important; border: 0 !important; box-shadow: none !important; background: transparent !important;
}
.sgskc-header .is-menu-open .wp-block-navigation__submenu-container > .wp-block-navigation-item { width: auto; min-width: 0; }
.sgskc-header .is-menu-open .wp-block-navigation__submenu-container a { padding: 0.35rem 0 !important; font-size: 0.98rem; font-weight: 500; color: var(--wp--preset--color--contrast); }
.sgskc-header .is-menu-open .wp-block-navigation__submenu-icon { display: none; }
.sgskc-header .is-menu-open .sgskc-nav-cta { border-bottom: 0 !important; padding-top: 1.4rem !important; }
.sgskc-header .is-menu-open .sgskc-nav-cta > a { display: block; width: 100%; text-align: center; padding: 0.85em 1em; font-size: 1.05rem; color: #fff !important; }
.sgskc-header .is-menu-open .wp-block-navigation__responsive-container-close { top: 1.25rem; right: 1.25rem; }
.sgskc-header .wp-block-navigation a:focus:not(:focus-visible) { outline: none; }

/* front-page hero: 3 slides cross-fade slowly (7s each) with a gentle zoom */
.sgskc-hero { position: relative; overflow: hidden; min-height: 72vh; display: flex; align-items: center; background: #2a3320 center / cover no-repeat; color: #fff; margin: 0 !important; max-width: none !important; }
.sgskc-slides img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.sgskc-slides.slides-1 img { opacity: 1; }
.sgskc-slides.slides-3 img { animation: sgskc-slide 21s ease-in-out infinite; }
.sgskc-slides.slides-3 img:nth-child(2) { animation-delay: 7s; }
.sgskc-slides.slides-3 img:nth-child(3) { animation-delay: 14s; }
@keyframes sgskc-slide {
  0% { opacity: 0; transform: scale(1.02); }
  8% { opacity: 1; }
  33% { opacity: 1; }
  42% { opacity: 0; transform: scale(1.10); }
  100% { opacity: 0; transform: scale(1.10); }
}
@media (prefers-reduced-motion: reduce) {
  .sgskc-slides img { animation: none !important; }
  .sgskc-slides img:first-child { opacity: 1; }
}
.sgskc-hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(30, 38, 16, 0.78) 0%, rgba(30, 38, 16, 0.5) 45%, rgba(30, 38, 16, 0.08) 100%); }
.sgskc-hero { padding-left: var(--wp--style--root--padding-left); padding-right: var(--wp--style--root--padding-right); }
.sgskc-hero-inner { position: relative; z-index: 1; width: 100%; max-width: 1160px; margin: 0 auto; padding: 4rem 0; box-sizing: border-box; }
.sgskc-hero-kicker { margin: 0 0 1rem; font-size: 0.9rem; font-weight: 600; letter-spacing: 0.2em; }
.sgskc-hero-title { margin: 0; color: #fff; font-size: clamp(2.25rem, 5vw, 3.5rem); line-height: 1.3; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.25); }
.sgskc-hero-lead { margin: 1.25rem 0 0; font-size: 1.3rem; max-width: 36rem; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3); }
.sgskc-hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.sgskc-btn { display: inline-block; padding: 0.75em 1.6em; border-radius: 999px; font-weight: 600; font-size: 0.95rem; text-decoration: none; transition: background 0.2s, color 0.2s; }
.sgskc-btn-gold { background: var(--wp--preset--color--accent); color: #fff !important; }
.sgskc-btn-gold:hover { background: var(--wp--preset--color--primary); }
.sgskc-btn-line { border: 1.5px solid #fff; color: #fff !important; }
.sgskc-btn-line:hover { background: #fff; color: var(--wp--preset--color--primary) !important; }
@media (max-width: 781px) {
  .sgskc-hero { min-height: 64vh; }
  .sgskc-hero-shade { background: linear-gradient(180deg, rgba(30, 38, 16, 0.35) 0%, rgba(30, 38, 16, 0.75) 100%); }
  .sgskc-hero-lead { font-size: 1.05rem; }
}

/* ---- inner-page title band: breadcrumb › English label › title › description ---- */
.sgskc-pagehead {
  position: relative; overflow: hidden; margin: 0 !important; max-width: none !important;
  background: linear-gradient(180deg, var(--wp--preset--color--base-2) 0%, var(--wp--preset--color--base) 100%);
  border-bottom: 1px solid var(--wp--preset--color--line);
}
.sgskc-pagehead::before { /* soft leaf-green glow, top right */
  content: ""; position: absolute; width: 520px; height: 520px; right: -140px; top: -260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 147, 22, 0.16) 0%, rgba(99, 147, 22, 0) 70%); pointer-events: none;
}
.sgskc-pagehead::after { /* thin gold accent under the band */
  content: ""; position: absolute; left: 0; bottom: -1px; width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--wp--preset--color--brand) 0, var(--wp--preset--color--brand) 72px, transparent 72px);
  max-width: 1160px; left: 50%; transform: translateX(-50%); width: calc(100% - var(--wp--style--root--padding-left) - var(--wp--style--root--padding-right));
}
.sgskc-pagehead { padding-left: var(--wp--style--root--padding-left); padding-right: var(--wp--style--root--padding-right); }
/* text on the left, breadcrumb on the right (bottom-aligned with the last line) */
.sgskc-pagehead-inner {
  position: relative; max-width: 1160px; margin: 0 auto; padding: 2.2rem 0 2.1rem; box-sizing: border-box;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 2rem;
}
.sgskc-pagehead-inner > :not(.sgskc-crumbs) { grid-column: 1; }
.sgskc-crumbs {
  grid-column: 2; grid-row: 1 / span 4; align-self: end; justify-content: flex-end;
  display: flex; flex-wrap: nowrap; align-items: center; gap: 0.45rem; white-space: nowrap;
  font-size: 0.85rem; color: var(--wp--preset--color--muted); padding-bottom: 0.15rem;
}
.sgskc-crumbs a { color: var(--wp--preset--color--muted); text-decoration: none; }
.sgskc-crumbs a:hover { color: var(--wp--preset--color--primary); }
.sgskc-crumbs a:last-child { color: var(--wp--preset--color--contrast); font-weight: 600; }
.sgskc-crumbs .sep { opacity: 0.5; }
.sgskc-pagehead-label { margin: 0; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.22em; color: var(--wp--preset--color--brand); }
.sgskc-pagehead-title { margin: 0.45rem 0 0; font-size: clamp(1.65rem, 2.8vw, 2.25rem); font-weight: 700; line-height: 1.35; letter-spacing: -0.025em; color: var(--wp--preset--color--contrast); }
.sgskc-pagehead-desc { margin: 0.6rem 0 0; font-size: 1rem; color: var(--wp--preset--color--muted); max-width: 46rem; }
.sgskc-pagehead-meta { margin: 0.6rem 0 0; font-size: 0.92rem; color: var(--wp--preset--color--muted); }
.sgskc-pagehead.is-single .sgskc-pagehead-title { font-size: clamp(1.45rem, 2.4vw, 1.95rem); max-width: 54rem; }
@media (max-width: 781px) {
  /* phone: one column, breadcrumb as a small line under the text */
  .sgskc-pagehead-inner { display: flex; flex-direction: column; padding: 1.6rem 0 1.5rem; }
  .sgskc-crumbs { order: 9; align-self: flex-start; margin-top: 0.9rem; justify-content: flex-start; flex-wrap: wrap; white-space: normal; font-size: 0.8rem; padding-bottom: 0; }

}

/* ---- 전체 메뉴 (sitemap) ---- */
.sgskc-sm-stats { list-style: none; margin: 0 0 2.25rem; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.sgskc-sm-stats li { background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 16px; padding: 1.1rem 1.25rem; }
.sgskc-sm-stats strong { display: block; font-size: 1.55rem; font-weight: 800; letter-spacing: -0.02em; color: var(--wp--preset--color--primary); }
.sgskc-sm-stats span { font-size: 0.88rem; color: var(--wp--preset--color--muted); }
.sgskc-sm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
.sgskc-sm-card { background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 18px; padding: 1.4rem 1.4rem 1rem; transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s; }
.sgskc-sm-card:hover { transform: translateY(-3px); border-color: #d9d0b8; box-shadow: 0 16px 36px rgba(52, 70, 20, 0.10); }
.sgskc-sm-head { display: flex; align-items: center; gap: 0.85rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--wp--preset--color--line); }
.sgskc-sm-icon { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: var(--wp--preset--color--primary); background: linear-gradient(135deg, #EEF3E3, #F6EFDD); }
.sgskc-sm-en { margin: 0; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.2em; color: var(--wp--preset--color--brand); }
.sgskc-sm-head h2 { margin: 0.1rem 0 0; font-size: 1.2rem; }
.sgskc-sm-links { list-style: none; margin: 0.5rem 0 0; padding: 0; }
.sgskc-sm-links li { padding: 0.15rem 0; }
.sgskc-sm-links a { display: flex; align-items: center; gap: 0.5rem; padding: 0.55rem 0.6rem; margin: 0 -0.6rem; border-radius: 10px; text-decoration: none; color: var(--wp--preset--color--contrast); font-weight: 500; transition: background 0.15s ease, color 0.15s ease; }
.sgskc-sm-links a:hover { background: var(--wp--preset--color--base-2); color: var(--wp--preset--color--primary); }
.sgskc-sm-links .name { flex: 1 1 auto; }
.sgskc-sm-links .count { font-size: 0.78rem; font-weight: 700; color: var(--wp--preset--color--primary); background: #EEF3E3; border-radius: 999px; padding: 0.1rem 0.55rem; }
.sgskc-sm-links .arrow { opacity: 0; transform: translateX(-4px); transition: opacity 0.15s, transform 0.15s; color: var(--wp--preset--color--accent); }
.sgskc-sm-links a:hover .arrow { opacity: 1; transform: none; }
.sgskc-sm-links .date { display: block; margin-top: -0.2rem; padding-bottom: 0.25rem; font-size: 0.78rem; color: var(--wp--preset--color--muted); }
.sgskc-sm-feeds { margin-top: 2.25rem; font-size: 0.88rem; color: var(--wp--preset--color--muted); }
.sgskc-sm-feeds a { color: var(--wp--preset--color--primary); }
@media (max-width: 781px) { .sgskc-sm-stats { grid-template-columns: repeat(2, 1fr); } .sgskc-sm-stats strong { font-size: 1.25rem; } }

/* worship times strip */
.wp-block-columns.sgskc-time-grid { display: grid !important; grid-template-columns: repeat(4, 1fr); gap: 1rem !important; }
.sgskc-time-grid > .wp-block-column { border-left: 3px solid var(--wp--preset--color--brand); padding-left: 1rem; }
@media (max-width: 781px) { .wp-block-columns.sgskc-time-grid { grid-template-columns: repeat(2, 1fr); row-gap: 1.4rem !important; } }
.sgskc-time-label { margin: 0; color: var(--wp--preset--color--muted); font-size: 0.9rem; font-weight: 600; }
.sgskc-time { margin: 0.15rem 0 0; font-size: 1.2rem; font-weight: 700; color: var(--wp--preset--color--primary); }

/* cards on the front page */
.sgskc-card { background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 18px; padding: 1.75rem; }
.sgskc-card h2 { margin: 0; }
.sgskc-card .wp-block-post-featured-image img { box-shadow: 0 6px 24px rgba(52, 70, 20, 0.12); }
.sgskc-card .wp-block-embed { margin: 1rem 0 0; }

/* title + date lists (notices, boards) */
.sgskc-list .wp-block-post-template > li { padding: 0.85rem 0; border-bottom: 1px solid var(--wp--preset--color--line); margin: 0; }
.sgskc-list .wp-block-post-title { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 auto; min-width: 0; }
.sgskc-list .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--contrast); }
.sgskc-list .wp-block-post-title a:hover { color: var(--wp--preset--color--accent); }
.sgskc-list .wp-block-post-date { flex: none; }
.sgskc-board .wp-block-post-template > li:first-child { border-top: 2px solid var(--wp--preset--color--primary); }

/* text boards (공지·자유게시판 etc.): title, two-line preview, date, small photo on the right */
.sgskc-board-rich .wp-block-post-template { border-top: 2px solid var(--wp--preset--color--primary); }
.sgskc-board-rich .wp-block-post-template > li { margin: 0; padding: 1.35rem 0.25rem; border-bottom: 1px solid var(--wp--preset--color--line); transition: background 0.2s ease; }
.sgskc-board-rich .wp-block-post-template > li:hover { background: rgba(243, 238, 223, 0.55); }
.sgskc-row-text { flex: 1 1 auto; min-width: 0; }
.sgskc-row-title { margin: 0 !important; font-size: 1.12rem !important; font-weight: 700; line-height: 1.45; }
.sgskc-row-title a { color: var(--wp--preset--color--contrast); text-decoration: none; }
.sgskc-row-title a:hover { color: var(--wp--preset--color--primary); }
.sgskc-row-excerpt { margin: 0.4rem 0 0 !important; }
.sgskc-row-excerpt .wp-block-post-excerpt__excerpt { margin: 0; font-size: 0.95rem; line-height: 1.65; color: var(--wp--preset--color--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sgskc-row-excerpt .wp-block-post-excerpt__more-text { display: none; }
.sgskc-row-date { margin-top: 0.55rem !important; font-size: 0.82rem !important; }
.sgskc-row-thumb { flex: none; margin: 0 !important; overflow: hidden; background: var(--wp--preset--color--base-2); }
.sgskc-row-thumb img { width: 132px; height: 96px; object-fit: cover; }
@media (max-width: 600px) { .sgskc-row-thumb, .sgskc-row-thumb img { width: 88px !important; height: 66px !important; } .sgskc-row-title { font-size: 1.02rem !important; } }

/* ---- 주보 gallery ---- */
.sgskc-bl-latest { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 2rem; align-items: center;
  background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 20px; padding: 1.5rem; box-shadow: 0 10px 30px rgba(52, 70, 20, 0.07); }
.sgskc-bl-latest-img { display: block; border-radius: 12px; overflow: hidden; background: var(--wp--preset--color--base-2); }
.sgskc-bl-latest-img img { display: block; width: 100%; height: auto; transition: transform 0.4s ease; }
.sgskc-bl-latest-img:hover img { transform: scale(1.02); }
.sgskc-bl-kicker { margin: 0; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.22em; color: var(--wp--preset--color--brand); }
.sgskc-bl-latest-info h2 { margin: 0.3rem 0 0; font-size: 1.6rem; }
.sgskc-bl-date { margin: 0.6rem 0 0; font-size: 1.15rem; font-weight: 700; color: var(--wp--preset--color--primary); }
.sgskc-bl-date span { font-weight: 500; color: var(--wp--preset--color--muted); }
.sgskc-bl-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.4rem; }
.sgskc-btn-solid { background: var(--wp--preset--color--primary); color: #fff !important; }
.sgskc-btn-solid:hover { background: var(--wp--preset--color--accent); }
.sgskc-btn-outline { border: 1.5px solid var(--wp--preset--color--primary); color: var(--wp--preset--color--primary) !important; }
.sgskc-btn-outline:hover { background: var(--wp--preset--color--primary); color: #fff !important; }
.sgskc-bl-more { display: inline-block; margin-top: 1rem; font-size: 0.9rem; color: var(--wp--preset--color--muted); text-decoration: none; }
.sgskc-bl-more:hover { color: var(--wp--preset--color--primary); }
.sgskc-bl-years { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 2.5rem 0 1.4rem; padding-bottom: 1rem; border-bottom: 1px solid var(--wp--preset--color--line); }
.sgskc-bl-years a { padding: 0.4rem 0.95rem; border-radius: 999px; font-size: 0.92rem; font-weight: 600; text-decoration: none;
  color: var(--wp--preset--color--contrast); background: #fff; border: 1px solid var(--wp--preset--color--line); transition: all 0.15s ease; }
.sgskc-bl-years a:hover { border-color: var(--wp--preset--color--brand); color: var(--wp--preset--color--primary); }
.sgskc-bl-years a[aria-current] { background: var(--wp--preset--color--primary); border-color: var(--wp--preset--color--primary); color: #fff; }
.sgskc-bl-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.25rem 1rem; }
.sgskc-bl-grid a { display: block; text-decoration: none; color: var(--wp--preset--color--contrast); }
.sgskc-bl-grid .thumb { display: block; aspect-ratio: 7 / 5; border-radius: 12px; overflow: hidden; background: var(--wp--preset--color--base-2);
  border: 1px solid var(--wp--preset--color--line); transition: box-shadow 0.2s ease, transform 0.2s ease; }
.sgskc-bl-grid .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; }
.sgskc-bl-grid a:hover .thumb { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(52, 70, 20, 0.12); }
.sgskc-bl-grid .nothumb { display: grid; place-items: center; height: 100%; color: var(--wp--preset--color--muted); font-weight: 700; }
.sgskc-bl-grid .when { display: block; margin-top: 0.55rem; font-weight: 700; }
.sgskc-bl-grid .year { font-size: 0.82rem; color: var(--wp--preset--color--muted); }
.sgskc-bl-empty { color: var(--wp--preset--color--muted); }
@media (max-width: 781px) {
  .sgskc-bl-latest { grid-template-columns: 1fr; gap: 1.2rem; padding: 1rem; }
  .sgskc-bl-grid { grid-template-columns: repeat(2, 1fr); }
}

/* photo grids */
.sgskc-album-grid .wp-block-post-title { margin: 0.5rem 0 0; }
.sgskc-album-grid .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--contrast); }
.sgskc-album-grid .wp-block-post-featured-image { margin: 0; overflow: hidden; border-radius: 12px; background: var(--wp--preset--color--base-2); }
.sgskc-album-grid .wp-block-post-featured-image img { transition: transform 0.4s ease; }
.sgskc-album-grid .wp-block-post-featured-image:hover img { transform: scale(1.04); }

/* map */
.sgskc-map { position: relative; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; border: 1px solid var(--wp--preset--color--line); }
.sgskc-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@supports not (aspect-ratio: 1) { .sgskc-map { height: 0; padding-top: 75%; } }   /* older in-app WebViews */
/* KakaoTalk in-app browser: stored map image instead of the iframe (functions.php) */
.sgskc-map-static { position: absolute; inset: 0; display: block; }
.sgskc-map-static img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sgskc-map-static span { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); white-space: nowrap;
  padding: .55em 1.1em; border-radius: 999px; background: var(--wp--preset--color--primary); color: #fff; font-size: .9rem; font-weight: 600;
  box-shadow: 0 4px 14px rgba(0,0,0,.18); }

/* post bodies migrated from the old site */
.sgskc-kicker a { font-size: 0.9rem; font-weight: 700; color: var(--wp--preset--color--accent); text-decoration: none; }
.sgskc-content img { max-width: 100%; height: auto; border-radius: 10px; }
.sgskc-content .xe-body { overflow-wrap: anywhere; }
.sgskc-content .xe-body table { max-width: 100%; display: block; overflow-x: auto; }
.sgskc-content .xe-body iframe { max-width: 100%; }
.sgskc-content .xe-body iframe[src*="youtube"] { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.sgskc-content .wp-block-gallery { gap: 0.6rem; }

/* pages */
.sgskc-signature { margin-top: 2.5rem; text-align: right; color: var(--wp--preset--color--muted); }
/* ---- 교회 연혁 timeline: centre line, year badges, cards alternating left/right (phone: line on the left) ---- */
.sgskc-timeline { --tl-gap: 2.6rem; position: relative; max-width: 1040px; margin: 0 auto; padding: 0.5rem 0 1rem; }
.sgskc-timeline::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; transform: translateX(-50%);
  background: linear-gradient(180deg, transparent 0, var(--wp--preset--color--line) 2rem, var(--wp--preset--color--line) calc(100% - 2rem), transparent 100%); }
.sgskc-timeline .sgskc-tl-year { position: relative; z-index: 1; display: table; margin: 2.4rem auto 1.4rem !important; padding: 0.35rem 1.2rem;
  font-size: 1.05rem; font-weight: 800; letter-spacing: 0.04em; color: #fff !important; background: var(--wp--preset--color--primary);
  border-radius: 999px; box-shadow: 0 0 0 6px var(--wp--preset--color--base), 0 6px 18px rgba(52, 70, 20, 0.18); }
.sgskc-timeline .sgskc-tl-year:first-child { margin-top: 0.5rem !important; }
.sgskc-history { list-style: none; margin: 0; padding: 0; }
.sgskc-history li { position: relative; box-sizing: border-box; width: calc(50% - var(--tl-gap)); margin: 0 0 1rem; padding: 0.85rem 1.15rem;
  background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 14px; box-shadow: 0 4px 14px rgba(52, 70, 20, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease; }
.sgskc-history li:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(52, 70, 20, 0.10); }
.sgskc-history li:nth-child(odd) { margin-right: auto; }
.sgskc-history li:nth-child(even) { margin-left: auto; }
/* zig-zag: each card starts beside the previous one instead of below it */
@media (min-width: 782px) { .sgskc-history li + li { margin-top: -2.4rem; } }
/* dot on the centre line + short connector to the card */
.sgskc-history li::before { content: ""; position: absolute; top: 1.15rem; width: 12px; height: 12px; border-radius: 50%;
  background: var(--wp--preset--color--brand); box-shadow: 0 0 0 4px var(--wp--preset--color--base); }
.sgskc-history li::after { content: ""; position: absolute; top: calc(1.15rem + 5px); height: 2px; width: calc(var(--tl-gap) - 6px); background: var(--wp--preset--color--line); }
.sgskc-history li:nth-child(odd)::before { right: calc(-1 * var(--tl-gap) - 6px); }
.sgskc-history li:nth-child(odd)::after { right: calc(-1 * var(--tl-gap)); }
.sgskc-history li:nth-child(even)::before { left: calc(-1 * var(--tl-gap) - 6px); }
.sgskc-history li:nth-child(even)::after { left: calc(-1 * var(--tl-gap)); }
.sgskc-history .tl-date { display: block; font-size: 0.86rem; font-weight: 700; color: var(--wp--preset--color--primary); letter-spacing: -0.01em; }
.sgskc-history .tl-text { display: block; margin-top: 0.2rem; line-height: 1.6; }
@media (max-width: 781px) {
  .sgskc-timeline { --tl-gap: 1.6rem; padding-left: 0.4rem; }
  .sgskc-timeline::before { left: 0.4rem; transform: none; }
  .sgskc-timeline .sgskc-tl-year { margin: 2rem 0 1rem -0.4rem !important; }
  .sgskc-history li, .sgskc-history li:nth-child(odd), .sgskc-history li:nth-child(even) { width: auto; margin: 0 0 0.8rem var(--tl-gap); }
  .sgskc-history li:nth-child(odd)::before, .sgskc-history li:nth-child(even)::before { left: calc(-1 * var(--tl-gap) - 5px); right: auto; }
  .sgskc-history li:nth-child(odd)::after, .sgskc-history li:nth-child(even)::after { left: calc(-1 * var(--tl-gap) + 6px); right: auto; width: calc(var(--tl-gap) - 6px); }
}
.sgskc-content h3 { margin-top: 2.2rem; color: var(--wp--preset--color--primary); }
.sgskc-table table { border-collapse: collapse; width: 100%; }
.sgskc-table th { background: var(--wp--preset--color--primary); color: #fff; text-align: center; }
.sgskc-table td, .sgskc-table th { border: 1px solid var(--wp--preset--color--line); padding: 0.75rem 1rem; }

/* contact forms */
.wpcf7 label { display: block; font-weight: 600; margin-bottom: 1rem; }
.wpcf7 input:not([type=submit]), .wpcf7 textarea { width: 100%; box-sizing: border-box; margin-top: 0.35rem; padding: 0.75rem 0.9rem; border: 1px solid var(--wp--preset--color--line); border-radius: 10px; font: inherit; font-weight: 400; background: #fff; }
.wpcf7 input:focus, .wpcf7 textarea:focus { outline: 2px solid var(--wp--preset--color--accent); border-color: transparent; }
.wpcf7 input[type=submit] { background: var(--wp--preset--color--primary); color: #fff; border: 0; border-radius: 999px; padding: 0.8rem 2rem; font: inherit; font-weight: 600; cursor: pointer; }
.wpcf7 input[type=submit]:hover { background: var(--wp--preset--color--accent); }

@media (max-width: 781px) {
  .sgskc-card { padding: 1.25rem; }
  .sgskc-time { font-size: 1.05rem; }
}
