/* member/css/home.css - 성도용 홈 (에콰도르 생명의말씀선교회)
   색상은 ../../shared/theme.css 의 브랜드 토큰(신학원과 공통, 밝은 파랑)을 쓴다.
   상단 배경 사진: member/images/hero.jpg 파일만 넣으면 자동으로 적용된다 (.hero.has-photo). */

:root {
    --content-width: 1460px;
    font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
    color: var(--ink);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--brand-50);
}

a { color: inherit; text-decoration: none; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

[hidden] { display: none !important; }

svg { display: block; }

/* ── 상단 아이콘 바 ─────────────────────────────── */
.topbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    color: #fff;
    transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}

.topbar.scrolled {
    background: rgba(255, 255, 255, 0.96);
    color: var(--brand-700);
    box-shadow: 0 1px 0 var(--line), 0 6px 20px rgba(26, 68, 50, 0.06);
    backdrop-filter: blur(6px);
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 로고 - 신학원과 같은 투명 PNG(shared/logo.png) */
.logo-badge {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
}

.logo-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.icon-btn,
.avatar-btn {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
}

.icon-btn:hover,
.avatar-btn:hover { background: rgba(255, 255, 255, 0.18); }

/* 위쪽 메일 버튼(쪽지)의 안 읽은 수 */
#topbar-messages { position: relative; }
.topbar-badge {
    position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box;
    display: grid; place-items: center; border-radius: 999px; background: #d64545; color: #fff;
    font-size: 11.5px; font-style: normal; font-weight: 800; font-family: 'Noto Sans KR', sans-serif; line-height: 1;
}
.topbar.scrolled .icon-btn:hover,
.topbar.scrolled .avatar-btn:hover { background: var(--brand-100); }

.icon-btn svg,
.avatar-btn svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.avatar-btn {
    border: 1.6px solid currentColor;
    width: 40px;
    height: 40px;
}

.avatar-btn.signed-in {
    background: #fff;
    border-color: #fff;
    color: var(--brand-600);
    font-weight: 700;
    font-size: 16px;
}

.topbar.scrolled .avatar-btn.signed-in {
    background: var(--brand-gradient);
    border-color: transparent;
    color: #fff;
}

/* 한국어/스페인어 전환 */
/* 기본 모양은 shared/theme.css - 여기서는 투명 상단바용으로 흰색 처리 */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 4px;
    padding: 3px 4px 3px 9px;
    border: 1.5px solid currentColor;
    border-radius: 999px;
    color: inherit;
    background: transparent;
}

.lang-switch svg {
    width: 18px;
    height: 18px;
    margin-right: 3px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
}

.lang-switch .lang-btn {
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 9px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    opacity: 0.75;
}

.lang-switch .lang-btn:hover { opacity: 1; }

.lang-switch .lang-btn.active {
    opacity: 1;
    background: #fff;
    color: var(--brand-700);
}

.topbar.scrolled .lang-switch .lang-btn.active {
    background: var(--brand-gradient);
    color: #fff;
}

.account { position: relative; }

.account-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 210px;
    background: #fff;
    color: var(--ink);
    border-radius: var(--radius-md);
    box-shadow: 0 14px 34px rgba(22, 56, 41, 0.2);
    padding: 8px;
}

.account-menu a,
.account-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border-radius: 8px;
    border: none;
    background: none;
    font: inherit;
    font-size: 14px;
    color: inherit;
    cursor: pointer;
}

.account-menu a:hover,
.account-menu button:hover { background: var(--brand-50); color: var(--brand-700); }
.account-menu a[hidden] { display: none; }

.account-name {
    margin: 4px 12px 8px;
    font-size: 13px;
    color: var(--ink-muted);
}

.account-name b { color: var(--brand-700); }

/* 관리자 사이트 이동 (관리자에게만 보임) */
.account-menu a.admin-link,
.drawer a.admin-link {
    color: var(--brand-700);
    background: var(--brand-50);
    font-weight: 700;
}
.account-menu button.menu-profile-btn { color: var(--brand-700); font-weight: 700; margin-bottom: 4px; }

/* 사람 아이콘 = 프로필 사진 (home.js setAvatar) */
.avatar-btn.has-photo { padding: 0; overflow: hidden; }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }

/* 내 정보 수정 창 (js/profile.js) */
.pf-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; background: rgba(11, 25, 19, 0.5); }
.pf-modal[hidden] { display: none; }
.pf-box { width: min(640px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; border-radius: var(--radius-md); background: #fff; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); overflow: hidden; color: var(--ink); }
.pf-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.pf-head h2 { margin: 0; font-size: 19px; color: var(--brand-900); }
.pf-x { border: none; background: none; font-size: 28px; line-height: 1; color: var(--ink-muted); cursor: pointer; }
.pf-body { padding: 18px 22px; overflow-y: auto; display: grid; gap: 14px; }
.pf-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); }
.pf-photo { display: flex; align-items: center; gap: 16px; }
.pf-avatar {
    flex-shrink: 0; width: 84px; height: 84px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
    background: var(--brand-gradient); color: #fff; font-size: 32px; font-weight: 900;
}
.pf-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-photo-btns { display: grid; gap: 8px; font-size: 14px; }
.pf-photo-btns div { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
/* 이름: 스페인어 / 한국어 (profile.js) */
.pf-names { margin: 0; padding: 10px 14px 14px; border: 1px solid var(--line, #e5ede5); border-radius: 10px; }
.pf-names legend { padding: 0 6px; font-size: 13.5px; font-weight: 900; color: var(--brand-700, #1f4d3a); }
.pf-hint { margin-top: -4px; font-size: 12.5px; color: var(--ink-muted, #667085); }
.pf-field { display: grid; gap: 6px; font-size: 14px; font-weight: 700; }
.pf-field[hidden] { display: none; }
.pf-field input, .pf-field select {
    width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
    font: inherit; font-size: 15px; font-weight: 400; color: var(--ink); background: #fff;
}
.pf-field input:disabled { background: #faf8f3; color: var(--ink-muted); }
.pf-field input:focus, .pf-field select:focus { outline: none; border-color: var(--brand-600); box-shadow: var(--brand-ring); }
.pf-btn {
    padding: 9px 18px; border: 1px solid var(--brand-200); border-radius: 999px; background: #fff;
    font: inherit; font-size: 14px; font-weight: 700; color: var(--brand-700); cursor: pointer;
}
.pf-btn[hidden] { display: none; }
.pf-btn:disabled { opacity: 0.6; cursor: wait; }
.pf-primary { border-color: transparent; background: var(--brand-gradient); color: #fff; }
.pf-danger { color: #d64545; border-color: #f3c4c4; }

/* ── 히어로 (밝은 파랑) ──────────────────────────── */
.hero {
    position: relative;
    min-height: 570px;
    color: #fff;
    background:
        radial-gradient(ellipse at 15% 0%, rgba(255, 255, 255, 0.28), transparent 55%),
        radial-gradient(ellipse at 90% 100%, rgba(201, 162, 39, 0.55), transparent 60%),
        var(--brand-gradient-deep);
    display: flex;
    overflow: hidden;
}

/* 상단 배경 사진 - member/images/hero.jpg 를 넣으면 home.js 가 확인하고 자동으로 켠다.
   글씨가 잘 보이도록 사진 위에 파란 반투명 막을 한 겹 덮는다. (사진이 없으면 위 그라데이션 그대로) */
.hero.has-photo {
    background:
        linear-gradient(180deg, rgba(22, 56, 41, 0.55) 0%, rgba(26, 68, 50, 0.28) 45%, rgba(22, 56, 41, 0.5) 100%),
        url('../images/hero.jpg') center / cover no-repeat,
        var(--brand-gradient-deep);
}

/* 아래쪽을 본문 배경색으로 부드럽게 이어준다 */
.hero::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 70px;
    background: linear-gradient(180deg, transparent, rgba(246, 243, 234, 0.18));
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 80px 16px 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-head {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.site-title {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -0.5px;
    white-space: nowrap;
    text-shadow: 0 2px 14px rgba(22, 56, 41, 0.35);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* 이름 왼쪽 로고 (신학원과 같은 로고) - 흰 동그라미 위에 */
.site-title .logo-badge {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
}

/* 이름 오른쪽 위 - 작은 국기 3개: 에콰도르 · 베네수엘라 · 도미니카 공화국 (흰 테두리 + 옅은 그림자, 연결된 사이트 이름에는 안 붙임)
   --fw · --fh = 국기 한 개 크기, --fg = 국기 사이 */
.site-title:not(.is-subsite)::after {
    --fw: 27px; --fh: 18px; --fg: 5px;
    content: '';
    flex-shrink: 0;
    align-self: flex-start;
    width: calc(var(--fw) * 3 + var(--fg) * 2);
    height: var(--fh);
    margin: 2px 0 0 -2px;
    background:
        url('https://flagcdn.com/w80/ec.png') 0 0 / var(--fw) var(--fh) no-repeat,
        url('https://flagcdn.com/w80/ve.png') calc(var(--fw) + var(--fg)) 0 / var(--fw) var(--fh) no-repeat,
        url('https://flagcdn.com/w80/do.png') 100% 0 / var(--fw) var(--fh) no-repeat;
    filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.95)) drop-shadow(0 3px 6px rgba(22, 56, 41, 0.35));
}

.main-nav {
    display: flex;
    gap: 32px;
}

.main-nav a {
    font-size: 17px;
    font-weight: 700;
    white-space: nowrap;
    text-shadow: 0 2px 10px rgba(22, 56, 41, 0.3);
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    transform: scaleX(0);
    transition: transform 0.2s;
}

.main-nav a:hover::after { transform: scaleX(1); }

.hero-copy {
    margin: 120px 0 0;
    font-family: 'Gowun Batang', 'Nanum Myeongjo', serif;
    font-weight: 700;
    font-size: 34px;
    line-height: 1.3;
    text-align: center;
    letter-spacing: 1px;
    text-shadow: 0 2px 16px rgba(22, 56, 41, 0.4);
}

.hero-search {
    margin-top: 64px;
    width: min(630px, 100%);
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 999px;
    padding: 4px 8px 4px 22px;
    box-shadow: 0 10px 30px rgba(22, 56, 41, 0.25);
}

.hero-search:focus-within { box-shadow: 0 10px 30px rgba(22, 56, 41, 0.25), 0 0 0 4px rgba(255, 255, 255, 0.45); }

.hero-search input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    font: inherit;
    font-size: 15px;
    padding: 11px 0;
    color: var(--ink);
    background: transparent;
}

.hero-search input::-webkit-search-cancel-button { display: none; }

.hero-search button {
    border: none;
    background: none;
    color: var(--brand-600);
    cursor: pointer;
    padding: 8px;
}

.hero-search button svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
}

/* ── 본문 ───────────────────────────────────────── */
.content {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 50px 16px 60px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 470px;
    gap: 26px;
    align-items: start;
}

/* 배너 슬라이드 */
.carousel {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 967 / 600;
    background: var(--brand-700);
    box-shadow: 0 14px 34px -14px rgba(22, 56, 41, 0.45);
}

.slides,
.slide {
    position: absolute;
    inset: 0;
}

.slide {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s, visibility 0.6s;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 6% 5%;
}

.slide.is-active {
    opacity: 1;
    visibility: visible;
}

/* 사진 대신 쓰는 파란 계열 그라데이션 */
.slide-1 {
    background:
        radial-gradient(circle at 34% 32%, rgba(255, 255, 255, 0.95) 0%, rgba(230, 237, 230, 0.75) 12%, rgba(201, 162, 39, 0.35) 32%, rgba(31, 77, 58, 0) 58%),
        linear-gradient(180deg, #1a4432 0%, #1f4d3a 40%, #317e5b 72%, #d9e6dc 100%);
}

.slide-2 {
    background:
        radial-gradient(circle at 78% 22%, rgba(255, 255, 255, 0.35), transparent 42%),
        linear-gradient(135deg, #1a4432 0%, #b8921f 60%, #e4c672 100%);
}

/* 수양회 메뉴의 최근 사진 · 유튜브 그림이 있으면 그 사진 (home-feed.js paintRetreatSlide) */
.slide-2.has-photo { background-size: cover; background-position: center; background-repeat: no-repeat; }

.slide-3 {
    background:
        radial-gradient(circle at 18% 82%, rgba(201, 162, 39, 0.45), transparent 48%),
        linear-gradient(135deg, #163829 0%, #1f4d3a 60%, #2f6a51 100%);
}

.slide-text {
    max-width: 640px;
    text-align: right;
    color: #fff;
    text-shadow: 0 2px 14px rgba(22, 56, 41, 0.35);
}

.slide-kicker {
    margin: 0;
    font-size: clamp(20px, 3.4vw, 42px);
    font-weight: 300;
    line-height: 1.15;
    color: rgba(255, 255, 255, 0.92);
}

.slide-text h2 {
    margin: 0;
    font-size: clamp(24px, 4.3vw, 52px);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -1px;
}

.slide-verse {
    margin: 22px 0 0;
    font-size: clamp(13px, 1.15vw, 15px);   /* 태블릿에서 11px · 출처 9px 로 너무 작았다 (2026-10-31) */
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.92);
}

.slide-verse small { font-size: 0.92em; }

.slide-foot {
    margin-top: 28px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.slide-sign {
    font-family: 'Gowun Batang', Georgia, serif;
    font-style: italic;
    font-size: clamp(13px, 1.7vw, 22px);
    color: rgba(255, 255, 255, 0.88);
}

.slide-btn {
    background: #fff;
    color: var(--brand-700);
    font-weight: 700;
    font-size: clamp(12px, 1.3vw, 16px);
    padding: 8px 18px;
    border-radius: 999px;
    white-space: nowrap;
    text-shadow: none;
    box-shadow: 0 6px 16px rgba(22, 56, 41, 0.2);
    transition: transform 0.2s;
}

.slide-btn:hover { transform: translateY(-2px); }

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 70px;
    border: none;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background 0.2s;
}

.carousel-nav:hover { background: rgba(255, 255, 255, 0.32); }
.carousel-nav.prev { left: 0; border-radius: 0 10px 10px 0; }
.carousel-nav.next { right: 0; border-radius: 10px 0 0 10px; }

.carousel-nav svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.carousel-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 16px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.carousel-dots button {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    border: none;
    padding: 0;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: width 0.2s;
}

.carousel-dots button[aria-selected="true"] {
    width: 26px;
    background: #fff;
}

/* 오른쪽 열 */
.side {
    display: grid;
    gap: 26px;
}

.card {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
    padding: 30px 24px;
    box-shadow: 0 4px 16px -8px rgba(22, 56, 41, 0.12);
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 26px 8px;
    align-content: start;   /* 줄이 카드 높이만큼 벌어지지 않게 */
}

.app {
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 10px;
    font-size: 13.5px;
    color: var(--ink);
    text-align: center;
}

/* 버튼 이름 - 스페인어처럼 길면 여러 줄이 되어도 가운데로 (예전엔 왼쪽으로 쏠렸음) */
.app > span:last-child {
    width: 100%;
    line-height: 1.3;
    overflow-wrap: break-word;
    hyphens: auto;
}
html[lang="es"] .app { font-size: 12.5px; }

.app-icon {
    width: 62px;
    height: 62px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 31px;
    font-weight: 900;
    font-family: 'Arial Black', 'Noto Sans KR', sans-serif;
    transition: transform 0.15s, box-shadow 0.15s;
}

.app:hover .app-icon {
    transform: translateY(-3px);
    box-shadow: var(--brand-shadow);
}

.app-filled {
    background: var(--brand-gradient);
    color: #fff;
}

.app-white {
    background: #fff;
    border: 1px solid var(--brand-200);
    box-shadow: 0 2px 8px rgba(22, 56, 41, 0.06);
}

/* 목회자·관리자 전용 바로가기 (신학원 / 관리자 사이트) */
.app-staff {
    background: var(--brand-gradient-deep);
    color: #fff;
}

.app-staff svg {
    width: 50%;
    height: 50%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 버튼 줄 (js/site-apps.js) - 선교회 홈으로 / 쪽지 */
.app-home img { width: 62%; height: 62%; object-fit: contain; }
.app-icon { position: relative; }
.app-msg svg { width: 48%; height: 48%; fill: none; stroke: var(--brand-600); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* 우리 교회 (site-apps.js mychurch) */
.app-church { background: linear-gradient(135deg, #163829, #1f4d3a) !important; border-color: transparent !important; }
.app-church svg { width: 52%; height: 52%; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app-badge {
    position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; box-sizing: border-box;
    display: grid; place-items: center; border-radius: 999px; border: 2px solid #fff;
    background: #d64545; color: #fff; font-size: 12.5px; font-style: normal; font-weight: 800; font-family: 'Noto Sans KR', sans-serif;
}
.app-badge[hidden] { display: none; }
.app[hidden] { display: none; }

/* 연결된 사이트(깨사모·교회학교 …) 홈 화면의 버튼 줄 - 가로로 넓게 */
.site-apps-card { margin-bottom: 22px; padding: 22px 18px; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }

.app-admin { background: linear-gradient(135deg, #163829, #1a4432); }
.app-network { background: linear-gradient(135deg, #0f766e, #14b8a6); }
.app-retreat { background: linear-gradient(135deg, #b54708, #f79009); }
/* 자료실 (site-apps.js · shared/site-row.js) */
.app-library { background: linear-gradient(135deg, #b64b61, #e1a4b0); color: #fff; }
.app-pc { background: linear-gradient(135deg, #334155, #64748b); color: #fff; }
.app-pc svg, .app-library svg { width: 50%; height: 50%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tone-1 { color: var(--brand-600); }
.tone-2 { color: var(--brand-900); }
.tone-3 { color: var(--brand-400); }

.card-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 19px;
    font-weight: 900;
    color: var(--brand-900);
    margin-bottom: 20px;
}

.card-title svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.content-tile {
    aspect-ratio: 1 / 1.15;
    border-radius: 10px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 22%;
    text-align: center;
    color: #fff;
    font-family: 'Gowun Batang', serif;
    font-size: 14px;
    line-height: 1.3;
    transition: transform 0.15s, box-shadow 0.15s;
}

.content-tile b { font-size: 19px; }
.content-tile:hover { transform: translateY(-3px); box-shadow: var(--brand-shadow); }
.tile-a { background: linear-gradient(180deg, #1f4d3a, #c9a227); }
.tile-b { background: linear-gradient(180deg, #2f6a51, #e4c672); }
.tile-c { background: linear-gradient(180deg, #163829, #1f4d3a); }

/* 콘텐츠 카드 아래 연재물 링크 */
.content-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.content-links a {
    padding: 6px 13px;
    border: 1px solid var(--brand-200);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: var(--brand-700);
    background: var(--brand-50);
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.content-links a:hover {
    background: var(--brand-gradient);
    border-color: transparent;
    color: #fff;
    transform: translateY(-1px);
}

/* ── 아래 섹션들 ─────────────────────────────────── */
.home-rows {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 16px 60px;
    display: grid;
    gap: 26px;
}

.home-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 470px;
    gap: 26px;
    align-items: start;
}

.stack { display: grid; gap: 26px; }

.card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.card-head .card-title { margin-bottom: 0; }
.card-head-stack { flex-direction: column; align-items: flex-start; gap: 4px; }

.card-sub { font-size: 13px; color: var(--ink-muted); }

.more-link {
    font-size: 13px;
    font-weight: 700;
    color: var(--brand-600);
}

.more-link:hover { text-decoration: underline; }

/* 탭 (알약 모양) */
.tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }
.tabs-wrap { flex-wrap: wrap; margin-bottom: 18px; }

.tab {
    flex-shrink: 0;
    padding: 6px 12px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--ink-muted);
    font: inherit;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.tab:hover { color: var(--brand-700); background: var(--brand-50); }

.tab.active {
    background: var(--brand-gradient);
    color: #fff;
}

.tab-live { color: #e5484d; display: inline-flex; align-items: center; gap: 5px; }
.tab-live i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #e5484d;
    animation: livePulse 1.6s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* 큰 제목처럼 쓰는 탭 (주일설교 / 수요설교) */
.tabs-title .tab {
    padding: 4px 4px;
    margin-right: 14px;
    border-radius: 0;
    font-size: 19px;
    font-weight: 900;
    color: var(--ink-muted);
    background: none;
    border-bottom: 3px solid transparent;
}

.tabs-title .tab.active {
    color: var(--brand-900);
    background: none;
    border-bottom-color: var(--brand-600);
}

/* 성경강연회 - 강사 */
.speakers {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    padding: 16px 12px;
    border-radius: var(--radius-md);
    background: var(--brand-50);
}

.speaker {
    display: grid;
    justify-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
}

.speaker-photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 38%, #fff 0 22%, transparent 23%),
        radial-gradient(ellipse at 50% 100%, #fff 0 42%, transparent 43%),
        var(--brand-gradient);
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(22, 56, 41, 0.18);
    transition: transform 0.2s;
}

.speaker:hover .speaker-photo { transform: translateY(-3px); }

/* 성경강연회 - 시리즈 */
.series-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px 14px;
    margin-top: 20px;
}

.series-card { display: grid; gap: 8px; }

.series-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 10px 14px;
    color: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
}

.series-thumb small {
    font-family: 'Gowun Batang', Georgia, serif;
    font-style: italic;
    font-size: 13px;
    opacity: 0.9;
}

.series-thumb b {
    font-size: 44px;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 2px 10px rgba(22, 56, 41, 0.35);
}

.series-card:hover .series-thumb { transform: translateY(-3px); box-shadow: var(--brand-shadow); }

.st-1 { background: linear-gradient(135deg, #1a4432, #317e5b); }
.st-2 { background: linear-gradient(135deg, #1f4d3a, #e4c672); }
.st-3 { background: linear-gradient(135deg, #163829, #b8921f); }
.st-4 { background: linear-gradient(135deg, #2f6a51, #d9e6dc); }
.st-5 { background: linear-gradient(135deg, #1a4432, #c9a227); }
.st-6 { background: linear-gradient(135deg, #163829, #2f6a51); }

.series-title {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--ink);
}

.card-foot {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 999px;
    background: var(--brand-gradient);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(31, 77, 58, 0.25);
    transition: transform 0.2s;
}

.pill-btn:hover { transform: translateY(-2px); }

.pill-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

/* 궁금해요 */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.faq-card {
    display: grid;
    align-content: space-between;
    gap: 10px;
    min-height: 128px;
    padding: 16px;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    transition: transform 0.2s, box-shadow 0.2s;
}

.faq-card b {
    font-family: 'Gowun Batang', Georgia, serif;
    font-size: 26px;
    line-height: 1;
    opacity: 0.85;
}

.faq-card:hover { transform: translateY(-3px); box-shadow: var(--brand-shadow); }
.fq-1 { background: linear-gradient(160deg, #1f4d3a, #c9a227); }
.fq-2 { background: linear-gradient(160deg, #163829, #1f4d3a); }
.fq-3 { background: linear-gradient(160deg, #2f6a51, #e4c672); }
.fq-4 { background: linear-gradient(160deg, #1a4432, #317e5b); }

/* 설교 / 선교회 소식 */
.media-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.media-card { display: grid; gap: 7px; align-content: start; }

.media-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
}

.media-thumb svg {
    width: 40px;
    height: 40px;
    padding: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    fill: #fff;
}

.media-card:hover .media-thumb { transform: translateY(-3px); box-shadow: var(--brand-shadow); }
.mt-1 { background: linear-gradient(135deg, #2e7d5b, #8bc34a); }
.mt-2 { background: linear-gradient(135deg, #8a5a1f, #d9a441); }
.mt-3 { background: linear-gradient(135deg, #3b6e2f, #a5c94a); }
.mt-4 { background: linear-gradient(135deg, #7a4b1e, #c98d3a); }

.news-thumb { place-items: end start; padding: 10px 12px; align-content: end; }
.news-thumb b { font-size: 40px; font-weight: 900; line-height: 1; }
.news-thumb small { font-size: 12px; opacity: 0.9; }
.nt-1 { background: linear-gradient(135deg, #b6717f, #cfa9b1); }
.nt-2 { background: linear-gradient(135deg, #1f4d3a, #e4c672); }
.nt-3 { background: linear-gradient(135deg, #163829, #2f6a51); }
.nt-4 { background: linear-gradient(135deg, #ae7c86, #e2cbd0); }

.media-title {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--ink);
}

.media-card time { font-size: 12px; color: #e5484d; font-weight: 600; }

/* 바이블레터 */
.letter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.letter-card {
    aspect-ratio: 3 / 4.6;
    border-radius: 8px;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 6px;
    color: #fff;
    font-family: 'Gowun Batang', serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    transition: transform 0.2s, box-shadow 0.2s;
}

.letter-card b { font-size: 34px; line-height: 1; }
.letter-card:hover { transform: translateY(-3px); box-shadow: var(--brand-shadow); }
.lc-1 { background: linear-gradient(180deg, #e4c672, #1f4d3a); }
.lc-2 { background: linear-gradient(180deg, #f4a3a8, #c2185b); }
.lc-3 { background: linear-gradient(180deg, #ebf1ea, #2f6a51); color: #163829; }
.lc-4 { background: linear-gradient(180deg, #d9e6dc, #1a4432); }
.lc-5 { background: linear-gradient(180deg, #c8e6c9, #2e7d5b); }
.lc-6 { background: linear-gradient(180deg, #ffd6d6, #e5484d); }

.site-footer {
    background: #fff;
    border-top: 1px solid var(--line);
    text-align: center;
    color: var(--ink-muted);
    font-size: 13px;
    padding: 28px 16px 32px;
}

.site-footer a { color: var(--brand-600); font-weight: 600; }

/* SNS 링크 */
.social-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 22px;
    margin-bottom: 16px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ink);
    font-weight: 600;
    transition: color 0.2s;
}

.social-links a:hover { color: var(--brand-600); }

.social-links svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 전체 메뉴 (햄버거) - 왼쪽에서 부드럽게 미끄러져 나오고, 뒤 배경은 서서히 어두워진다 */
.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(22, 56, 41, 0.35);
    backdrop-filter: blur(2px);
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

.drawer-backdrop.open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.35s ease, visibility 0s;
}

.drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(320px, 85vw);
    background: #fff;
    z-index: 100;
    padding: 64px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    box-shadow: 4px 0 30px rgba(22, 56, 41, 0.2);
    transform: translateX(-104%);
    visibility: hidden;
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.42s;
}

.drawer.open {
    transform: none;
    visibility: visible;
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s;
}

/* 메뉴 항목이 살짝 늦게 차례로 나타난다 */
.drawer > a,
.drawer > hr {
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s, color 0.2s;
}

.drawer.open > a,
.drawer.open > hr {
    opacity: 1;
    transform: none;
}

.drawer.open > :nth-child(2) { transition-delay: 0.08s, 0.08s, 0s, 0s; }
.drawer.open > :nth-child(3) { transition-delay: 0.11s, 0.11s, 0s, 0s; }
.drawer.open > :nth-child(4) { transition-delay: 0.14s, 0.14s, 0s, 0s; }
.drawer.open > :nth-child(5) { transition-delay: 0.17s, 0.17s, 0s, 0s; }
.drawer.open > :nth-child(6) { transition-delay: 0.2s, 0.2s, 0s, 0s; }
.drawer.open > :nth-child(7) { transition-delay: 0.23s, 0.23s, 0s, 0s; }
.drawer.open > :nth-child(8) { transition-delay: 0.26s, 0.26s, 0s, 0s; }
.drawer.open > :nth-child(n+9) { transition-delay: 0.29s, 0.29s, 0s, 0s; }

/* 계정 메뉴도 툭 튀어나오지 않게 */
.account-menu:not([hidden]) {
    animation: menuPop 0.18s ease-out;
    transform-origin: top right;
}

@keyframes menuPop {
    from { opacity: 0; transform: translateY(-6px) scale(0.97); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .drawer, .drawer-backdrop, .drawer > a, .drawer > hr { transition: none !important; }
    .account-menu:not([hidden]) { animation: none; }
}

.drawer a {
    padding: 11px 8px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
}

.drawer a:hover { background: var(--brand-50); color: var(--brand-700); }

.drawer hr {
    border: none;
    border-top: 1px solid var(--line);
    margin: 10px 0;
}

.drawer-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--brand-700);
}

/* ── 반응형 ─────────────────────────────────────── */
/* 스페인어는 메뉴 이름이 길어서 조금 작게 */
/* 이름이 "… Ecuador" 로 길어져서 메뉴가 들어갈 자리가 모자라면 메뉴는 햄버거(☰)로만 */
html[lang="es"] .main-nav { gap: 15px; }
html[lang="es"] .main-nav a { font-size: 14px; }
html[lang="es"] .site-title { font-size: 28px; }

@media (max-width: 1440px) {
    html[lang="es"] .site-title { font-size: 26px; }
}

@media (max-width: 1200px) {
    .main-nav { display: none; }
    .hero-head { justify-content: center; }
}

@media (max-width: 1700px) {
    html[lang="es"] .main-nav { display: none; }
    html[lang="es"] .hero-head { justify-content: center; }
}
@media (max-width: 1280px) {
    .main-nav { gap: 28px; }
    .main-nav a { font-size: 16px; }
    .content { grid-template-columns: minmax(0, 1fr) 400px; }
    .home-row { grid-template-columns: minmax(0, 1fr) 400px; }
    .speakers { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 14px; }
}

@media (max-width: 1024px) {
    .main-nav { display: none; }
    .hero-head { justify-content: center; }
    .content { grid-template-columns: minmax(0, 1fr); }
    .side { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
    .home-row { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .home-rows { gap: 20px; }
    .speakers { grid-template-columns: repeat(7, minmax(0, 1fr)); }
    .letter-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}



@media (prefers-reduced-motion: reduce) {
    .slide { transition: none; }
}


/* ── 로그인해야 보는 메뉴 - 작은 자물쇠 (access.js) ── */
.lock-mark {
    display: inline-block;
    width: 0.8em; height: 0.8em; margin-left: 4px; vertical-align: -1px; flex-shrink: 0;
    fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: 0.7;
}
.main-nav a .lock-mark { width: 12px; height: 12px; }
.card-title .lock-mark { width: 15px; height: 15px; opacity: 0.55; }
.quick-links .app { position: relative; }
.quick-links .app > .lock-mark {
    position: absolute; top: -4px; right: calc(50% - 38px); width: 20px; height: 20px; margin: 0; padding: 3px; box-sizing: border-box;
    border-radius: 50%; background: #fff; color: var(--brand-700); opacity: 1; box-shadow: 0 2px 6px rgba(22, 56, 41, 0.25);
}

/* 선교회소개 - 로그인 안 했을 때 교회·전도인 자리 안내 */
.about-login-note {
    max-width: 640px; margin: 8px auto 0; padding: 30px 24px; text-align: center;
    border: 1px dashed var(--brand-200, #d0ded0); border-radius: 10px; background: var(--brand-50, #fbf9f4);
}
.about-login-note > .lock-mark { width: 34px; height: 34px; margin: 0 0 6px; color: var(--brand-600, #1f4d3a); opacity: 1; }
.about-login-note h2 { margin: 0 0 8px; font-size: 21px; font-weight: 900; color: var(--brand-900, #163829); }
.about-login-note p { margin: 0 0 18px; color: var(--ink-muted, #5b6b80); line-height: 1.6; }
.about-login-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.about-login-btn {
    display: inline-block; padding: 11px 26px; border-radius: 999px; font-weight: 800;
    background: var(--brand-gradient, #1f4d3a); color: #fff; border: 1px solid transparent;
}
.about-login-btn.is-ghost { background: #fff; color: var(--brand-700, #19412f); border-color: var(--brand-200, #d0ded0); }

/* ── 보기 방식 버튼 (목록 / 큰 아이콘 / 작은 아이콘) - js/view-toggle.js ── */
.lw-view-toggle { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--brand-50); }
.lw-view-toggle[hidden] { display: none; }
.lw-view-toggle button {
    display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 0; border-radius: 8px;
    background: transparent; color: var(--ink-muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.lw-view-toggle button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lw-view-toggle button.is-active { background: #fff; color: var(--brand-700); box-shadow: 0 2px 6px rgba(22, 56, 41, 0.15); }
.lw-view-toggle button:hover { color: var(--brand-700); }
/* 연결된 사이트(깨사모 · 교회학교 …) - 맨 위 이름과 같은 큰 제목은 숨김 (site-apps.js) */
.is-subsite-page .hero .about-title { display: none; }

/* 연결된 사이트 햄버거 메뉴 맨 아래: 선교회 홈으로 (site-apps.js) */
.drawer .drawer-mission { display: flex; align-items: center; gap: 10px; }
.drawer .drawer-mission img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }

/* 홈 카드의 실제 글 (js/home-feed.js) */
.has-img { background-size: cover; background-position: center; }
.series-thumb.has-img, .media-thumb.has-img { place-items: center; justify-content: center; align-items: center; }
.series-thumb .feed-play svg, .media-thumb.has-img svg { width: 40px; height: 40px; padding: 8px; border-radius: 50%; background: rgba(0, 0, 0, 0.45); fill: #fff; }
.series-thumb .feed-play { display: grid; }
.series-title, .media-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.faq-card span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.letter-card.has-img { position: relative; overflow: hidden; }
.letter-card.has-img::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.65)); }
.letter-card.has-img span { position: relative; }
.home-feed-note { grid-column: 1 / -1; margin: 0; padding: 22px 12px; border: 1px dashed var(--brand-200); border-radius: 8px; text-align: center; font-size: 14px; color: var(--ink-muted, #6b7785); background: var(--brand-50); }
.home-feed-note a { margin-left: 8px; font-weight: 700; color: var(--brand-600); }
#home-contents { display: grid; gap: 6px; }
#home-contents:empty { display: none; }
#home-contents a { display: block; padding: 8px 14px; border-radius: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#home-contents.is-note { display: block; }
/* 궁금해요 = 목록 (예전 자료 칸 자리) */
#home-faq.faq-links { display: grid; gap: 6px; }
#home-faq.faq-links a { display: block; padding: 8px 14px; border-radius: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#home-faq.faq-links a b { color: var(--brand-600); font-weight: 900; }
#home-faq.faq-links.is-note { display: block; }

/* 홈 성경강연회 칸: 강사 + 강연 영상 7개 + 모두 보기 (js/home-feed.js) */
.home-sem-speaker { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.home-sem-speaker:empty { display: none; }
.home-sem-speaker img { border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08); }
.home-sem-speaker span { display: grid; }
.home-sem-speaker b { font-size: 15px; color: var(--brand-900); }
.home-sem-speaker small { font-size: 12.5px; color: var(--ink-muted, #6b7785); }
#home-seminar { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 14px; }
.series-more .series-thumb { flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; }
.series-more .series-thumb b { font-size: 34px; }

/* 연결된 사이트(깨사모 · 교회학교 …): 탭은 위 메뉴 줄 + 햄버거(☰)로만 - 제목 아래 둥근 탭 버튼은 숨김
   메뉴가 짧으므로 선교회 메뉴보다 좁은 화면까지 위 메뉴 줄을 보여준다 (860px 이하 = 햄버거) */
html.is-subsite-page #section-subs, html.is-subsite-page #share-tabs { display: none; }
/* 깨사모 안의 자료실(section.html?s=resources): 자료실의 작은 탭(찬양 · 찬양 문서 · 성경 …)은 위 메뉴에 없으니 그대로 보인다 */
html.is-subsite-page.is-kk-resources #section-subs { display: flex; }
@media (min-width: 861px) and (max-width: 1700px) {
    html.is-subsite-page .main-nav { display: flex; }
    html.is-subsite-page .hero-head { justify-content: space-between; }
}

/* 홈 설교 칸: 탭 4개(주일·수요·질의응답·조각말씀) - 좁으면 옆으로 밀어서 */
#home-sermon-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
#home-sermon-tabs::-webkit-scrollbar { display: none; }
#home-sermon-tabs .tab { flex-shrink: 0; white-space: nowrap; }
.card.sermons .card-head { flex-wrap: wrap; row-gap: 6px; }

/* 홈: 왼쪽 열 · 오른쪽 열을 따로 쌓는다 - 양쪽 끝을 맞추지 않고 위아래 간격 · 가운데 간격만 같게 (index.html .home-cols) */
.home-col { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.home-col > * { margin: 0; }
/* 태블릿·휴대폰: 한 줄로 - 배너 → 버튼 줄 → 성경강연회 → 설교 → 궁금해요 → 선교회 소식 → 콘텐츠 → 바이블레터 */
@media (max-width: 1024px) {
    .home-cols { display: flex; flex-direction: column; align-items: stretch; gap: 20px; }
    .home-col { display: contents; }
    .home-cols .carousel { order: 1; }
    .home-cols .quick-links { order: 2; }
    .home-cols .seminar { order: 3; }
    .home-cols .sermons { order: 4; }
    .home-cols .faq { order: 5; }
    .home-cols .news { order: 6; }
    .home-cols .retreat-news { order: 6; }
    .home-cols .contents { order: 7; }
    .home-cols .letters { order: 8; }
}

/* 상단 배경 사진 - 탭(메뉴)마다 다르게 (home.js 가 .hero 에 data-hero="탭" 과 --hero-img 를 넣는다)
   탭마다: --hero-pos 사진의 어느 부분을 보여줄지, --hero-t1/--hero-t2 사진 위에 덮는 색 (글씨가 잘 보이게)
   탭 전용 사진을 member/images/hero-<탭>.jpg 로 넣으면 그 사진이 쓰인다 */
.hero.has-photo {
    background:
        linear-gradient(180deg, var(--hero-t1, rgba(22, 56, 41, 0.55)) 0%, var(--hero-t2, rgba(26, 68, 50, 0.28)) 45%, var(--hero-t1, rgba(22, 56, 41, 0.5)) 100%),
        var(--hero-img, url('../images/hero.jpg')) var(--hero-pos, center) / cover no-repeat,
        var(--brand-gradient-deep);
}
.hero[data-hero="seminar"]      { --hero-pos: 50% 42%; --hero-t1: rgba(11, 29, 21, 0.66);   --hero-t2: rgba(23, 56, 42, 0.32); }
.hero[data-hero="sermons"]      { --hero-pos: 50% 18%; --hero-t1: rgba(70, 38, 6, 0.62);   --hero-t2: rgba(150, 95, 25, 0.28); }
.hero[data-hero="faq"]          { --hero-pos: 30% 55%; --hero-t1: rgba(12, 32, 23, 0.62);   --hero-t2: rgba(16, 140, 150, 0.28); }
.hero[data-hero="mission"]      { --hero-pos: 4% 55%;  --hero-t1: rgba(10, 70, 40, 0.6);   --hero-t2: rgba(40, 140, 80, 0.26); }
.hero[data-hero="retreat"]      { --hero-pos: 96% 55%; --hero-t1: rgba(110, 50, 10, 0.55); --hero-t2: rgba(230, 140, 40, 0.22); }
.hero[data-hero="resources"],
.hero[data-hero="contents"]     { --hero-pos: 50% 85%; --hero-t1: rgba(86, 44, 52, 0.62); --hero-t2: rgba(176, 104, 118, 0.28); }
.hero[data-hero="about"]        { --hero-pos: 70% 50%; --hero-t1: rgba(22, 56, 41, 0.6);  --hero-t2: rgba(26, 68, 50, 0.3); }
.hero[data-hero="kkaesamo"]     { --hero-pos: 50% 40%; --hero-t1: rgba(120, 20, 60, 0.55); --hero-t2: rgba(200, 60, 110, 0.25); }
.hero[data-hero="churchschool"] { --hero-pos: 50% 45%; --hero-t1: rgba(150, 70, 0, 0.55);  --hero-t2: rgba(240, 150, 30, 0.25); }
.hero[data-hero="lightoflife"]  { --hero-pos: 85% 30%; --hero-t1: rgba(120, 70, 0, 0.58);  --hero-t2: rgba(240, 180, 60, 0.25); }
.hero[data-hero="invitation"]   { --hero-pos: 20% 35%; --hero-t1: rgba(5, 80, 75, 0.6);    --hero-t2: rgba(40, 180, 160, 0.25); }
.hero[data-hero="bibleletter"]  { --hero-pos: 60% 25%; --hero-t1: rgba(110, 10, 50, 0.58); --hero-t2: rgba(220, 80, 130, 0.25); }
.hero[data-hero="messages"]     { --hero-pos: 50% 70%; --hero-t1: rgba(19, 28, 24, 0.66);  --hero-t2: rgba(40, 56, 49, 0.32); }
.hero[data-hero="network"]      { --hero-pos: 40% 60%; --hero-t1: rgba(13, 26, 20, 0.66);  --hero-t2: rgba(30, 54, 43, 0.3); }

/* 상단 사진 색 필터 빼기 (2026-10-23, 사용자 요청 - 색이 이상해 보임)
   탭마다 덮던 파랑 · 초록 · 주황 … 색을 모두 없애고, 흰 글씨가 읽히도록 아주 옅은 검은 그림자만 (사진 색은 그대로)
   탭마다 사진의 다른 부분을 보여주는 것(--hero-pos)은 그대로 둔다 */
.hero.has-photo[data-hero] { --hero-t1: rgba(0, 0, 0, 0.32); --hero-t2: rgba(0, 0, 0, 0.06); }
/* 탭 전용 사진(member/images/hero-<탭>.jpg)은 사진의 가운데를 (위의 --hero-pos 는 예전 파노라마 한 장을 탭마다 다르게 자르던 것) */
.hero.own-photo[data-hero] { --hero-pos: center; }

/* 상단 배경 영상 (home.js HERO_VIDEO - 세계선교) : 소리 없이 반복, 사진 위 · 글자 아래, 화면을 꽉 채우게(16:9 를 잘라서) */
.hero.has-video > .hero-video { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; container-type: size; opacity: 0; transition: opacity 1.2s ease; }
.hero.has-video > .hero-video.is-on { opacity: 1; }
/* 영상 안에 검은 띠(영화처럼 넓은 화면 2.4:1)가 들어 있어도 위아래 빈 자리 없이 꽉 차도록, 2.4:1 기준으로 크게 (가장자리는 잘림) */
.hero-video iframe { position: absolute; top: 50%; left: 50%; width: max(100cqw, 240cqh); height: max(56.25cqw, 135cqh); transform: translate(-50%, -50%); border: 0; }
.hero-video::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0.32) 0%, rgba(0, 0, 0, 0.06) 45%, rgba(0, 0, 0, 0.32) 100%); }
.hero.has-video > .hero-inner { position: relative; z-index: 2; }
.hero.has-video::after { z-index: 1; }

/* 사이트에 올린 배경 영상 파일 (member/videos/hero-<탭>.mp4) - 칸을 꽉 채우게 (가장자리는 잘림) */
.hero-video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; pointer-events: none; }

/* 수양회 배너 (2026-10-29): 글자 없이 사진만, 사진 어디를 눌러도 수양회 탭 (index.html .slide-link) */
.slide-2 { padding: 0 !important; }
.slide-2 .slide-link { position: absolute; inset: 0; z-index: 1; display: block; border-radius: inherit; cursor: pointer; }
.slide-2 .slide-link:focus-visible { outline: 3px solid #fff; outline-offset: -6px; }
