/* MEDIA (YOUTH) — soft watercolor welcome, Pretendard only */

.template-youth {
  --md-cream: #faf5ee;
  --md-cream-2: #f4ead9;
  --md-sage: #8a9a7b;
  --md-sage-deep: #5f7057;
  --md-sage-light: #b4c1a1;
  --md-rose: #d4a5a5;
  --md-rose-deep: #b57f7f;
  --md-rose-blush: #e8c9c1;
  --md-brown: #6b4e3d;
  --md-brown-deep: #4a3527;
  --md-ink: #3d3226;
  --md-muted: #8a7c6b;
  --md-rule: #e3d5b8;
  --md-accent: color-mix(in srgb, var(--cs-primary) 55%, var(--md-rose-deep));
  --cs-ink: var(--md-ink);
  --cs-muted: var(--md-muted);
  --cs-line: var(--md-rule);
  --cs-soft: var(--md-cream-2);
  --cs-surface: var(--md-cream);
  --cs-shadow: 0 18px 40px rgba(107, 78, 61, 0.1);
  color: var(--md-ink);
  background: var(--md-cream);
  font-family: Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

.template-youth,
.template-youth h1,
.template-youth h2,
.template-youth h3,
.template-youth h4,
.template-youth a {
  font-family: Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  color: inherit;
}

.md-shell { min-height: 100vh; display: flex; flex-direction: column; position: relative; overflow-x: clip; }
.md-wrap { width: min(1280px, calc(100% - 48px)); margin-inline: auto; position: relative; z-index: 1; }
.md-main { flex: 1; position: relative; }
.md-blob {
  position: absolute; pointer-events: none; border-radius: 50%; filter: blur(48px); opacity: 0.45; z-index: 0;
}
.md-b1 {
  width: 480px; height: 480px; top: -80px; right: -80px;
  background: radial-gradient(circle at 30% 30%, var(--md-rose-blush) 0%, transparent 65%);
}
.md-b2 {
  width: 520px; height: 520px; top: 40%; left: -120px;
  background: radial-gradient(circle at 60% 40%, var(--md-sage-light) 0%, transparent 60%); opacity: 0.35;
}

.md-topbar { padding: 14px 0; font-size: 13px; color: var(--md-muted); letter-spacing: 0.08em; }
.md-topbar-inner { display: flex; justify-content: space-between; gap: 12px; }

.md-mast { padding: 8px 0 18px; }
.md-mast-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.md-brand {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-decoration: none; color: var(--md-brown-deep);
}
.md-brand img { width: 48px; height: 48px; border-radius: 50%; object-fit: contain; background: transparent; }
.md-brand strong {
  font-size: clamp(1.7rem, 3.5vw, 2.5rem); font-weight: 700; letter-spacing: 0.08em;
}
.md-mast-tag { margin: 0; font-size: 1rem; color: var(--md-sage-deep); letter-spacing: 0.04em; }

.md-nav {
  padding: 12px 0 28px; position: sticky; top: 0; z-index: 40;
  background: linear-gradient(180deg, var(--md-cream) 70%, rgba(250,245,238,0));
  backdrop-filter: blur(6px);
}
.md-menu-btn {
  display: none; margin: 0 auto 10px; border-radius: 999px;
  background: var(--md-sage); color: #fff; border: 0;
}
.md-menu-btn span { background: #fff; }
.md-nav-links {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 4px;
  background: rgba(255,255,255,.72) !important; border: 1px solid var(--md-rule);
  border-radius: 999px; padding: 6px !important; max-width: fit-content; margin: 0 auto;
  box-shadow: 0 6px 24px rgba(107,78,61,.06); position: static !important;
}
.md-nav-links .cs-nav-head { display: none; }
.md-nav-links a {
  display: block; padding: 10px 22px !important; border-radius: 999px !important;
  font-size: 14px; letter-spacing: 0.08em; color: var(--md-ink) !important;
  text-decoration: none; background: transparent !important; font-weight: 500;
}
.md-nav-links a.is-active {
  background: var(--md-sage) !important; color: var(--md-cream) !important;
}
.md-nav-links a:hover { color: var(--md-rose-deep) !important; }
.md-nav-links a.is-active:hover { color: var(--md-cream) !important; }
.md-nav-links .cs-nav-item { position: relative; }
.md-nav-links .cs-nav-sub {
  background: #fff;
  border-color: var(--md-rule);
  border-radius: 0;
  left: 50%;
  transform: translateX(-50%);
}
.md-nav-links .cs-nav-sub a {
  border-radius: 0 !important;
  text-align: center;
}
.md-nav-links .cs-nav-sub a.is-active {
  background: var(--md-sage) !important;
  color: var(--md-cream) !important;
}

.md-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: 10px 22px; border-radius: 999px; border: 1px solid var(--md-sage);
  color: var(--md-sage-deep); background: transparent; text-decoration: none;
  font-weight: 700; font-size: 14px; letter-spacing: 0.08em; transition: all .2s;
}
.md-btn:hover { background: var(--md-sage); color: var(--md-cream); }
.md-btn-solid {
  background: var(--md-accent); border-color: var(--md-accent); color: #fff;
}
.md-btn-solid:hover { filter: brightness(0.95); color: #fff; }
.md-text-link {
  color: var(--md-sage-deep); text-decoration: none; font-weight: 600; font-size: 0.95rem;
}
.md-text-link:hover { color: var(--md-rose-deep); }

.md-hero {
  position: relative;
  width: 100%;
  min-width: 100%;
  max-width: none;
  margin: 8px 0 0;
  height: clamp(300px, 42vw, 620px);
  min-height: 300px;
  display: grid;
  place-items: end stretch;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
}
.md-hero.no-image { color: var(--md-brown-deep); }
.md-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.md-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  filter: sepia(0.08) saturate(0.95);
}
.md-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(74, 52, 40, 0.22) 0%, rgba(74, 52, 40, 0.68) 100%);
}
.md-hero-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, var(--md-rose-blush), var(--md-sage-light));
}
.md-hero-content {
  position: relative;
  z-index: 2;
  padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px);
  max-width: 760px;
  justify-self: start;
}
.md-hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 22px;
  font-size: 13px; color: var(--md-sage-deep); letter-spacing: 0.12em;
  background: rgba(138,154,123,.12); padding: 6px 16px; border-radius: 999px;
}
.md-hero.has-image .md-hero-eyebrow {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}
.md-hero-eyebrow::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--md-sage);
}
.md-hero.has-image .md-hero-eyebrow::before { background: #fff; }
.md-hero-title {
  margin: 0 0 18px; font-weight: 600; font-size: clamp(1.9rem, 4.2vw, 3rem);
  line-height: 1.3; letter-spacing: -0.02em; color: var(--md-brown-deep); word-break: keep-all;
}
.md-hero.has-image .md-hero-title { color: #fff; text-shadow: 0 2px 16px rgba(0,0,0,.28); }
.md-hero-verse {
  margin: 0 0 28px; font-size: 1.15rem; color: var(--md-sage-deep); line-height: 1.55;
}
.md-hero.has-image .md-hero-verse { color: rgba(255, 255, 255, 0.9); }
.md-hero-meta {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  padding: 20px 22px; background: rgba(255,255,255,.62); border: 1px solid var(--md-rule);
  border-radius: 20px; box-shadow: 0 8px 24px rgba(107,78,61,.06); margin-bottom: 22px;
}
.md-hero.has-image .md-hero-meta {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: none;
  backdrop-filter: blur(6px);
}
.md-hero-meta dt {
  font-size: 11px; color: var(--md-muted); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 4px;
}
.md-hero.has-image .md-hero-meta dt { color: rgba(255, 255, 255, 0.7); }
.md-hero-meta dd { margin: 0; font-weight: 700; font-size: 1.05rem; color: var(--md-brown-deep); }
.md-hero.has-image .md-hero-meta dd { color: #fff; }
.md-time { font-size: 1.35rem !important; color: var(--md-rose-deep) !important; font-weight: 600 !important; }
.md-hero.has-image .md-time { color: #fff !important; }
.md-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.md-hero.has-image .md-btn {
  border-color: rgba(255, 255, 255, 0.75);
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}
.md-hero.has-image .md-btn-solid {
  background: #fff;
  color: var(--md-brown-deep);
  border-color: #fff;
}

.md-section { padding: 56px 0; position: relative; }
.md-sec-hd { text-align: center; margin-bottom: 36px; }
.md-sec-hd-left { text-align: left; margin-bottom: 24px; }
.md-sec-hd-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  margin-bottom: 36px;
}
.md-sec-hd-row h2 { margin-bottom: 0; }
.md-sec-hd-row .md-text-link {
  flex-shrink: 0;
  white-space: nowrap;
  margin-bottom: 4px;
}
.md-sm-tag {
  margin: 0 0 8px; font-size: 13px; color: var(--md-sage-deep); letter-spacing: 0.18em; text-transform: uppercase;
}
.md-sec-hd h2 {
  margin: 0 0 10px; font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700;
  color: var(--md-brown-deep); letter-spacing: -0.01em;
}

.md-sermon-feature-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
}
.md-word-card { text-decoration: none; color: inherit; display: block; }
.md-word-media {
  display: block; position: relative; aspect-ratio: 16/10; border-radius: 22px; overflow: hidden;
  background: var(--md-cream-2); box-shadow: var(--cs-shadow);
}
.md-word-media img { width: 100%; height: 100%; object-fit: cover; }
.md-word-media.is-ph {
  background: linear-gradient(145deg, var(--md-sage-light), var(--md-rose-blush));
}
.md-word-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(40,32,24,0) 18%, rgba(40,32,24,.55) 52%, rgba(32,25,18,.92) 100%);
}
.md-word-cap {
  position: absolute; left: 16px; right: 16px; bottom: 16px; color: #fff; display: grid; gap: 4px;
}
.md-word-cap em { font-style: normal; font-size: 12px; opacity: 0.85; }
.md-word-cap strong { font-size: 1.05rem; word-break: keep-all; text-shadow: 0 1px 8px rgba(0,0,0,.45); }
.md-word-cap span { font-size: 12px; opacity: 0.8; }

.md-worship-grid {
  display: grid;
  gap: 16px;
  justify-content: center;
  justify-items: stretch;
}
.md-worship-grid[data-count="1"] { grid-template-columns: minmax(0, 260px); }
.md-worship-grid[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 260px)); }
.md-worship-grid[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 260px)); }
.md-worship-grid[data-count="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.md-service-card {
  background: rgba(255,255,255,.65); border: 1px solid rgba(227,213,184,.6);
  border-radius: 24px; padding: 26px 18px 22px; text-align: center;
  transition: transform .25s, box-shadow .25s;
}
.md-service-card:hover {
  transform: translateY(-4px); box-shadow: var(--cs-shadow); border-color: var(--md-rose-blush);
}
.md-ico {
  width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 50%;
  background: var(--md-cream-2); display: grid; place-items: center; color: var(--md-sage-deep);
}
.md-service-card:nth-child(2) .md-ico { background: var(--md-rose-blush); color: var(--md-rose-deep); }
.md-service-card .md-name { font-weight: 700; font-size: 1.05rem; color: var(--md-brown-deep); margin-bottom: 12px; }
.md-service-card .md-time { font-size: 1.7rem; color: var(--md-rose-deep); font-weight: 600; line-height: 1; }
.md-service-card .md-day { font-size: 0.95rem; color: var(--md-sage-deep); margin-top: 10px; }
.md-service-card .md-place {
  font-size: 13px; color: var(--md-muted); margin-top: 14px; padding-top: 12px;
  border-top: 1px dashed var(--md-rule);
}

.md-split-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; }
.md-sermon {
  display: grid; grid-template-columns: 78px 1fr auto; gap: 16px; align-items: center;
  padding: 16px 18px; margin-bottom: 10px; background: rgba(255,255,255,.55);
  border: 1px solid rgba(227,213,184,.5); border-radius: 18px; text-decoration: none; color: inherit;
  transition: transform .2s, background .2s;
}
.md-sermon:hover { background: rgba(255,255,255,.9); transform: translateX(3px); border-color: var(--md-rose-blush); }
.md-d {
  text-align: center; padding: 10px 4px; background: var(--md-cream-2); border-radius: 12px;
}
.md-d b { display: block; font-size: 1.35rem; font-weight: 600; color: var(--md-brown-deep); line-height: 1; }
.md-d span { display: block; font-size: 11px; color: var(--md-sage-deep); letter-spacing: 0.1em; text-transform: uppercase; margin-top: 4px; }
.md-info h5 { margin: 0 0 4px; font-size: 1.05rem; font-weight: 700; color: var(--md-brown-deep); line-height: 1.4; }
.md-info small { font-size: 13px; color: var(--md-muted); }
.md-info small b { color: var(--md-sage-deep); font-weight: 500; margin-right: 6px; }
.md-arw { color: var(--md-rose-deep); font-size: 1.2rem; }

.md-notice-frame {
  background: rgba(255,255,255,.62); border: 1px solid rgba(227,213,184,.5);
  border-radius: 22px; padding: 24px 26px; position: relative; overflow: hidden;
}
.md-notice-hd {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding-bottom: 14px; border-bottom: 1px dashed var(--md-rule); margin-bottom: 8px;
}
.md-notice-hd h4 { margin: 0; font-size: 1.15rem; font-weight: 700; color: var(--md-brown-deep); }
.md-notice-hd a { color: var(--md-sage-deep); text-decoration: none; font-weight: 600; }
.md-notice {
  padding: 12px 0; border-bottom: 1px dashed var(--md-rule);
  display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start;
}
.md-notice:last-child { border-bottom: 0; }
.md-tag {
  font-size: 11px; padding: 5px 10px; border-radius: 999px; background: var(--md-cream-2);
  color: var(--md-brown); letter-spacing: 0.08em; font-weight: 700; white-space: nowrap;
}
.md-tag.hot { background: var(--md-rose-deep); color: #fff; }
.md-t { font-size: 0.95rem; line-height: 1.5; }
.md-t a { color: inherit; text-decoration: none; }
.md-t time { display: block; font-size: 13px; color: var(--md-muted); margin-top: 4px; }
.md-empty { padding: 20px; color: var(--md-muted); text-align: center; }

.md-letter {
  background: linear-gradient(180deg, transparent, rgba(232,201,193,.14) 40%, rgba(180,193,161,.1));
}
.md-letter-grid { display: grid; grid-template-columns: .9fr 1.25fr; gap: 48px; align-items: center; }
.md-frame {
  aspect-ratio: 4/5; border-radius: 50% 50% 40% 40% / 40% 40% 30% 30%; overflow: hidden;
  background: var(--md-cream-2); box-shadow: 0 20px 50px rgba(107,78,61,.12);
}
.md-frame img { width: 100%; height: 100%; object-fit: cover; filter: sepia(0.08); }
.md-quote { margin: 0 0 16px; font-size: 1.25rem; color: var(--md-rose-deep); line-height: 1.45; }
.md-letter-body h3 {
  margin: 0 0 18px; font-size: clamp(1.4rem, 2.8vw, 1.9rem); font-weight: 700;
  color: var(--md-brown-deep); line-height: 1.4; word-break: keep-all;
}
.md-letter-body p { margin: 0 0 14px; line-height: 1.85; white-space: pre-line; }
.md-letter-sig {
  margin-top: 24px; padding-top: 18px; border-top: 1px dashed var(--md-rule);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
}
.md-sig-name { font-weight: 700; font-size: 1.1rem; color: var(--md-brown-deep); letter-spacing: 0.06em; }
.md-sig-name small { display: block; font-weight: 400; font-size: 13px; color: var(--md-muted); margin-top: 4px; }

.md-gal-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.md-gal-item {
  position: relative; overflow: hidden; background: var(--md-cream-2); aspect-ratio: 1;
  border-radius: 24px; text-decoration: none; color: #fff; transition: transform .3s;
  box-shadow: var(--cs-shadow);
}
.md-gal-item img { width: 100%; height: 100%; object-fit: cover; filter: sepia(0.08) saturate(0.9); transition: transform .5s; }
.md-gal-item:hover { transform: translateY(-3px); }
.md-gal-item:hover img { transform: scale(1.04); }
.md-gal-cap {
  position: absolute; left: 16px; bottom: 18px; font-size: 0.95rem; font-weight: 600;
  text-shadow: 0 2px 10px rgba(0,0,0,.35); max-width: calc(100% - 32px);
}

.md-loc-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 40px; align-items: center; }
.md-loc-info dl { margin: 0; }
.md-loc-info dl > div {
  display: grid; grid-template-columns: 72px 1fr; gap: 14px; padding: 14px 0;
  border-bottom: 1px dashed var(--md-rule); align-items: baseline;
}
.md-loc-info dt { font-size: 0.95rem; color: var(--md-sage-deep); font-weight: 600; }
.md-loc-info dd { margin: 0; font-size: 1rem; line-height: 1.55; }
.md-loc-info dd b { display: block; font-weight: 700; color: var(--md-brown-deep); margin-bottom: 2px; }
.md-loc-info a { color: inherit; }
.md-loc-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.md-loc-map { min-height: 260px; border-radius: 24px; overflow: hidden; box-shadow: var(--cs-shadow); }
.md-loc-map .cs-map-canvas { min-height: 280px; border-radius: 24px; }

.md-footer {
  background: var(--md-brown-deep); color: #f4ebe4; padding: 48px 0 36px; margin-top: 12px; text-align: center;
}
.md-foot-inner strong { display: block; font-size: 1.25rem; letter-spacing: 0.08em; margin-bottom: 10px; }
.md-foot-logo {
  width: 52px; height: 52px; border-radius: 50%; object-fit: contain;
  background: transparent; margin-bottom: 12px;
}
.md-foot-inner p { margin: 6px 0; color: rgba(244,235,228,.78); font-size: 0.95rem; }
.md-foot-inner a { color: #fff; }
.md-copy { margin-top: 18px !important; font-size: 13px !important; }

.md-page { width: min(960px, calc(100% - 48px)); margin: 0 auto; padding: 24px 0 56px; position: relative; z-index: 1; }
.md-page-title { text-align: center; padding: 28px 0 16px; }
.md-kicker { margin: 0; color: var(--md-sage-deep); letter-spacing: 0.14em; text-transform: uppercase; font-size: 12px; font-weight: 600; }
.md-page-title h1 { margin: 8px 0 12px; color: var(--md-brown-deep); }
.md-page-boards .md-page-title {
  text-align: left;
  padding: 18px 0 14px;
  border-bottom: 1px solid var(--theme-line, var(--cs-line, #e6eaf0));
  margin-bottom: 18px;
}
.md-page-boards .md-page-title h1 {
  margin: 0;
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
}
.md-page-about .md-page-title {
  text-align: left;
  padding: 18px 0 14px;
  border-bottom: 1px solid var(--theme-line, var(--cs-line, #e6eaf0));
  margin-bottom: 22px;
}
.md-page-about .md-page-title h1 {
  margin: 0;
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
}
.md-back { color: var(--md-muted); text-decoration: none; font-weight: 600; font-size: 14px; }
.template-youth .md-page .cs-main { width: 100%; }
.template-youth .md-page .cs-panel,
.template-youth .md-page .cs-home-block,
.template-youth .md-page .cs-sermon-card,
.template-youth .md-page .cs-album-card,
.template-youth .md-page .cs-contact-card {
  background: rgba(255,255,255,.7); border: 1px solid rgba(227,213,184,.6);
  border-radius: 22px; color: var(--md-ink); box-shadow: none;
}
.template-youth .md-page .cs-btn {
  border-radius: 999px; background: var(--md-accent); color: #fff;
}
.template-youth .md-page .cs-btn-ghost {
  background: transparent; color: var(--md-sage-deep); border-color: var(--md-sage);
}
.template-youth .md-page .cs-empty-card {
  background: rgba(255,255,255,.5); color: var(--md-muted); border-style: dashed;
}

@media (max-width: 1024px) {
  .md-letter-grid, .md-split-grid, .md-loc-grid { grid-template-columns: 1fr; }
  .md-hero {
    height: clamp(300px, 68vw, 520px);
  }
  .md-sermon-feature-grid { grid-template-columns: 1fr; }
  .md-worship-grid[data-count],
  .md-gal-grid { grid-template-columns: 1fr 1fr; }
  .md-gal-item { border-radius: 24px; aspect-ratio: 1; }
}

@media (max-width: 768px) {
  .md-wrap, .md-page { width: calc(100% - 32px); }
  .md-menu-btn { display: block; }
  .template-youth .md-nav-links {
    display: none; position: fixed !important; inset: 0 !important; z-index: 50;
    background: var(--md-cream) !important; border-radius: 0; max-width: none;
    flex-direction: column; padding: 28px 22px !important; overflow-y: auto;
  }
  .template-youth.nav-open .md-nav-links { display: flex !important; }
  .template-youth .md-nav-links .cs-nav-head { display: flex; margin-bottom: 16px; }
  .md-hero-meta { grid-template-columns: 1fr; }
  .md-worship-grid[data-count],
  .md-gal-grid { grid-template-columns: 1fr; }
  .md-sermon { grid-template-columns: 68px 1fr; }
  .md-arw { display: none; }
}
