/* 본문 글꼴: IBM Plex Sans KR (원래 사이트의 Noto Sans KR 대신) - @import 는 파일 맨 앞에 있어야 한다 */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+KR:wght@400;500;600;700&display=swap');

/* shared/theme.css - 세 사이트(협회 홈·교육원·관리자) 공통 색상/그림자/글꼴 토큰
   참빛 협회 데모: 숲 초록 + 금색 + 크림 바탕, 제목은 명조(Gowun Batang).
   색을 바꾸고 싶으면 이 파일만 고치면 세 사이트에 함께 반영된다. */

:root {
    /* 주색 숲 초록 (진함 → 밝음) */
    --brand-900: #12301f;
    --brand-700: #183f2f;
    --brand-600: #1f4d3a;   /* 기본 버튼/링크 (흰 글자와 대비 충분) */
    --brand-500: #2f6a51;
    --brand-400: #c9a227;   /* 금색 - 강조/장식용 */
    --brand-200: #d9e6dc;
    --brand-100: #ebf1ea;
    --brand-50:  #f6f3ea;

    /* 강조 금색 · 바탕 크림 */
    --gold-600: #a8841a;
    --gold-500: #c9a227;
    --gold-100: #f5ecd0;
    --cream: #faf7f0;

    --brand-gradient: linear-gradient(135deg, #1f4d3a 0%, #2f6a51 100%);
    --brand-gradient-deep: linear-gradient(135deg, #12301f 0%, #1f4d3a 60%, #2f6a51 100%);
    --brand-gradient-soft: linear-gradient(160deg, #faf7f0 0%, #eef2ea 100%);
    --gold-gradient: linear-gradient(135deg, #d4b043 0%, #b8921f 100%);
    --brand-shadow: 0 6px 16px rgba(31, 77, 58, 0.18);
    --brand-ring: 0 0 0 3px rgba(201, 162, 39, 0.28);

    /* 글자/선 */
    --ink: #1c2420;
    --ink-muted: #5f6b64;
    --line: #e6dfd0;

    --font-serif: 'Gowun Batang', 'Noto Serif KR', 'Batang', serif;
    --font-sans: 'IBM Plex Sans KR', 'Noto Sans KR', 'Malgun Gothic', sans-serif;

    --radius-lg: 12px;
    --radius-md: 8px;
    --radius-sm: 6px;
}

/* ── 참빛 데모 공통 모양 ── */
body { background-color: var(--cream); color: var(--ink); }
/* 본문 글꼴은 모든 곳에서 IBM Plex Sans KR (각 화면 CSS 가 Noto Sans KR 을 직접 적어 둔 곳까지) */
body, button, input, select, textarea, .lwh, .lang-switch { font-family: var(--font-sans) !important; }
h1, h2, h3, .hero-copy, .card-title, .about-title, .section-header h2, .tabs-title .tab,
.media-title, .series-title, .lecture-title, .course-title, .news-feature-text b, .home-stats b,
.navbar-brand h1, .site-title, .auth-header h1 { font-family: var(--font-serif) !important; }
h1, h2, h3,
.hero-title, .section-title, .page-title, .card-title {
    font-family: var(--font-serif);
    letter-spacing: -0.01em;
}
::selection { background: var(--gold-100); color: var(--brand-900); }
/* 로그인 · 가입 · 아이디 찾기 화면 (세 사이트 공통 .auth-card): 넓은 화면에서는 반으로 나눠
   왼쪽 짙은 초록 판(로고 · 명조 이름 · 금색 선 · 안내) / 오른쪽 입력 칸 */
@media (min-width: 900px) {
    .auth-page .auth-card {
        max-width: 980px !important;
        width: calc(100% - 64px) !important;
        display: grid;
        grid-template-columns: 5fr 6fr;
        border-radius: var(--radius-lg) !important;
        overflow: hidden;
        box-shadow: 0 30px 70px rgba(18, 48, 31, 0.18) !important;
        border: 1px solid var(--line);
    }
    .auth-page .auth-header {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        text-align: left;
        padding: 56px 44px !important;
        background:
            radial-gradient(circle at 85% 12%, rgba(201, 162, 39, 0.35), transparent 45%),
            var(--brand-gradient-deep) !important;
    }
    .auth-page .auth-header h1 {
        font-family: var(--font-serif);
        font-size: 34px !important;
        margin-top: 22px;
    }
    .auth-page .auth-header h1::after {
        content: '';
        display: block;
        width: 40px;
        height: 2px;
        margin: 18px 0 14px;
        background: var(--gold-500);
    }
    .auth-page .auth-header p { text-align: left; opacity: 0.85; }
    .auth-page .auth-body { padding: 44px 40px !important; }
}

/* 사이트 이름 옆 국기 3개는 데모에서 뺀다 (협회 홈 · 교육원 위 메뉴 · 교육원 로그인) */
.site-title::after,
.site-title:not(.is-subsite)::after,
.navbar-brand h1::after { content: none !important; display: none !important; }
/* 나라 탭 · 지부 현황 카드의 국기 그림도 뺀다 (나라 이름만) */
.lw-flag, .ms-flag, .sem-flag { display: none !important; }
.ms-country { grid-template-columns: minmax(0, 1fr) auto !important; }
html[data-site="pastor"] #site-title::after { background: none !important; filter: none !important; width: 0 !important; margin: 0 !important; }
@media (min-width: 900px) {
    html[data-site="pastor"] .auth-page .auth-header #site-title::after,
    .auth-page .auth-header h1::after {
        display: block !important;
        width: 40px !important;
        height: 2px !important;
        margin: 18px 0 14px !important;
        background: var(--gold-500) !important;
    }
}

/* 금색 강조: 첫 화면 큰 버튼 · 언어 버튼 */
.slide-btn { background: var(--gold-gradient) !important; color: #fff !important; border-color: transparent !important; }
.lang-switch .lang-btn.active { background: var(--gold-gradient); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: none;
    box-shadow: var(--brand-ring);
}

/* ── 번역이 적용되기 전에는 화면을 잠깐 가린다 ──
   HTML 에 적힌 기본 글자(한국어)가 번쩍 보였다가 스페인어로 바뀌지 않도록, i18n.js 가
   번역을 끝내고 <html class="i18n-ready"> 를 붙이면 보인다.
   (스크립트가 실패해도 1.2초 뒤에는 무조건 보이게 한다) */
html:not(.i18n-ready) body {
    opacity: 0;
    animation: i18nReveal 0s linear 1.2s forwards;
}

@keyframes i18nReveal {
    to { opacity: 1; }
}

body { transition: opacity 0.12s ease; }

/* ── 한국어/스페인어 전환 버튼 (세 사이트 공통 디자인 - 선교회 홈 상단과 같은 모양) ──
   <div class="lang-switch"> 지구본 svg + <button class="lang-btn" data-lang="ko">KO</button> + ES
   밝은 바탕용 기본값. 선교회 홈의 투명 상단바에서는 member/css/home.css 가 흰색으로 바꾼다. */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px 4px 3px 9px;
    border: 1.5px solid currentColor;
    border-radius: 999px;
    color: var(--brand-700);
    background: #fff;
    font-family: 'Noto Sans KR', 'Malgun Gothic', sans-serif;
    line-height: 1;
}

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

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

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

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

/* 신학원·관리자 위 메뉴 - 언어 버튼 왼쪽의 "선교회 홈" 집 버튼 (pastor/js/i18n.js) */
.nav-home-btn {
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    margin-right: 8px;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    color: var(--brand-700);
    background: #fff;
    transition: background 0.15s, color 0.15s;
}
.nav-home-btn:hover { background: var(--brand-gradient); color: #fff; border-color: transparent; }
.nav-home-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* 로그인·가입 화면처럼 페이지 오른쪽 위에 떠 있는 경우 */
.lang-switch-floating {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 10;
    box-shadow: 0 4px 14px rgba(22, 56, 41, 0.12);
}
