/* member/css/home.css - 성도용 홈 (생명의말씀선교회)
   색상은 ../../shared/theme.css 의 브랜드 토큰(신학원과 공통, 밝은 파랑)을 쓴다.
   사진을 쓰고 싶으면 member/images/ 에 넣고 .hero 의 background 맨 앞에
   url('../images/hero.jpg') center / cover no-repeat, 를 추가하면 된다. */

: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(11, 92, 173, 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;
    filter: drop-shadow(0 3px 8px rgba(10, 61, 115, 0.3));
}

.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.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;
}

/* 한국어/스페인어 전환 */
.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;
}

.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(11, 61, 115, 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-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;
}

/* ── 히어로 (밝은 파랑) ──────────────────────────── */
.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(19, 181, 234, 0.55), transparent 60%),
        var(--brand-gradient-deep);
    display: flex;
    overflow: hidden;
}

/* 아래쪽을 본문 배경색으로 부드럽게 이어준다 */
.hero::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 70px;
    background: linear-gradient(180deg, transparent, rgba(243, 249, 254, 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: 38px;
    font-weight: 900;
    letter-spacing: -0.5px;
    white-space: nowrap;
    text-shadow: 0 2px 14px rgba(10, 61, 115, 0.35);
}

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

.main-nav a {
    font-size: 20px;
    font-weight: 700;
    white-space: nowrap;
    text-shadow: 0 2px 10px rgba(10, 61, 115, 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: 40px;
    line-height: 1.25;
    text-align: center;
    letter-spacing: 1px;
    text-shadow: 0 2px 16px rgba(10, 61, 115, 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(10, 61, 115, 0.25);
}

.hero-search:focus-within { box-shadow: 0 10px 30px rgba(10, 61, 115, 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: 17px;
    padding: 12px 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(11, 61, 115, 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(214, 238, 253, 0.75) 12%, rgba(19, 181, 234, 0.35) 32%, rgba(21, 112, 204, 0) 58%),
        linear-gradient(180deg, #0b5cad 0%, #1570cc 40%, #3ea6ea 72%, #bfe0fa 100%);
}

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

.slide-3 {
    background:
        radial-gradient(circle at 18% 82%, rgba(19, 181, 234, 0.45), transparent 48%),
        linear-gradient(135deg, #0a3d73 0%, #1570cc 60%, #2a8be0 100%);
}

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

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

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

.slide-verse {
    margin: 22px 0 0;
    font-size: clamp(11px, 1.3vw, 16px);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.92);
}

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

.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(14px, 2vw, 26px);
    color: rgba(255, 255, 255, 0.88);
}

.slide-btn {
    background: #fff;
    color: var(--brand-700);
    font-weight: 700;
    font-size: clamp(13px, 1.5vw, 19px);
    padding: 8px 18px;
    border-radius: 999px;
    white-space: nowrap;
    text-shadow: none;
    box-shadow: 0 6px 16px rgba(10, 61, 115, 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(11, 61, 115, 0.12);
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 26px 8px;
}

.app {
    display: grid;
    justify-items: center;
    gap: 12px;
    font-size: 15px;
    color: var(--ink);
}

.app-icon {
    width: 70px;
    height: 70px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-size: 36px;
    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(11, 61, 115, 0.06);
}

.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: 21px;
    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: 15px;
    line-height: 1.3;
    transition: transform 0.15s, box-shadow 0.15s;
}

.content-tile b { font-size: 22px; }
.content-tile:hover { transform: translateY(-3px); box-shadow: var(--brand-shadow); }
.tile-a { background: linear-gradient(180deg, #1570cc, #13b5ea); }
.tile-b { background: linear-gradient(180deg, #2a8be0, #8fd3f4); }
.tile-c { background: linear-gradient(180deg, #0a3d73, #1570cc); }

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

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

/* 전체 메뉴 (햄버거) */
.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 61, 115, 0.35);
    z-index: 90;
}

.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(10, 61, 115, 0.2);
    border-top: 4px solid transparent;
    border-image: var(--brand-gradient) 1;
}

.drawer a {
    padding: 12px 8px;
    font-size: 17px;
    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);
}

/* ── 반응형 ─────────────────────────────────────── */
/* 스페인어는 메뉴 이름이 길어서 조금 작게 */
html[lang="es"] .main-nav { gap: 30px; }
html[lang="es"] .main-nav a { font-size: 17px; }
html[lang="es"] .site-title { font-size: 32px; }

@media (max-width: 1440px) {
    html[lang="es"] .main-nav { gap: 20px; }
    html[lang="es"] .main-nav a { font-size: 15px; }
    html[lang="es"] .site-title { font-size: 28px; }
}

@media (max-width: 1180px) {
    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: 18px; }
    .content { grid-template-columns: minmax(0, 1fr) 400px; }
}

@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; }
}

@media (max-width: 720px) {
    .topbar { padding: 10px 8px; }
    .topbar-left,
    .topbar-right { gap: 2px; }
    .logo-badge { width: 40px; height: 40px; margin-right: 4px; }
    .hero { min-height: 480px; }
    .hero-inner { padding-top: 76px; }
    .site-title { font-size: 26px; }
    .hero-copy { margin-top: 70px; font-size: 30px; }
    .hero-search { margin-top: 40px; }
    .content { padding-top: 24px; }
    .carousel { aspect-ratio: 4 / 3.4; }
    .slide { padding: 10% 7% 14%; }
    .slide-verse { display: none; }
    .side { grid-template-columns: minmax(0, 1fr); }
    .quick-links { gap: 20px 4px; }
    .content-grid { gap: 12px; }
    .app { font-size: 13px; }
    .app-icon { width: 58px; height: 58px; font-size: 30px; border-radius: 15px; }
}

@media (max-width: 420px) {
    .lang-switch svg { display: none; }
    .lang-switch { padding-left: 4px; }
    .topbar-right .icon-btn:first-child { display: none; }
}

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