/* 버전그래 스타일: 말씀 웹페이지 공통 스타일 */

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* 메인 화면 구성 요소 */
.title-section {
    text-align: center;
    padding: 2rem 0;
}

.title-section h1 {
    font-size: 2rem;
    font-weight: bold;
    color: #1f2937;
    margin: 0;
}

.tab-container {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tab-button {
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-button.active {
    background-color: white;
    color: #374151;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tab-button.inactive {
    background-color: #e2e8f0;
    color: #6b7280;
}

.tags-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tag-button {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 9999px;
    background-color: white;
    color: #374151;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag-button:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

.search-card {
    max-width: 475px;
    margin: 0 auto 2rem;
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 1rem;
}

.search-card form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-input {
    flex: 2;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
}

.version-select {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.search-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.search-button:hover {
    background-color: #2563eb;
}

.container {
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 1rem;
}

header {
    text-align: center;
    padding: 2rem 0;
}

header h1 {
    font-size: 2.5rem;
    font-weight: bold;
    color: #1f2937;
    margin: 0;
}

header {
    position: relative;
    background-color: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 1.5rem;
}

.lang-selector {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.lang-select {
    padding: 0.25rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.875rem;
}

.nav-menu {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.nav-link {
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease;
}

.nav-link.active {
    color: #3b82f6;
    border-bottom: 2px solid #3b82f6;
}

.nav-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

main {
    padding: 2rem 0;
}

/* 카드 그리드: 3개 카드 가로 배치 복구 */
.verse-cards-grid {
    display: flex;
    justify-content: space-around; /* 카드를 균등하게 배치 */
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap; /* 반응형에서 개행 허용 */
}

/* 말씀 카드: 버전 선택 카드 - 전체 너비로 표시 */
.verse-card {
    display: flex; /* Flex 컨테이너 */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    min-height: 200px;
    width: 100%; /* 전체 너비로 확장 */
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer; /* 클릭 가능 표시 */
}

.verse-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.verse-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}



.verse-content {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    position: relative;
    z-index: 3;
    transition: all 0.3s ease;
    filter: blur(2px);
    opacity: 0.3;
}

.verse-card.active .verse-content {
    filter: blur(0px);
    opacity: 1;
}

.verse-card.active::before,
.verse-card.active::after {
    opacity: 0;
}

.verse-reference {
    font-size: 0.875rem;
    color: #6b7280;
    position: relative;
    z-index: 3;
}

/* 상세 페이지 본문 컨테이너 */
.detail-content {
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 3rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}

/* 개별 성경 구절 카드 */
.verse-card {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
    position: relative;
    overflow: hidden; /* 오버레이를 카드 안으로 제한 */
}

.verse-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.verse-overlay i {
    font-size: 2rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    display: none; /* 아이콘 숨김 */
}

.verse-overlay span {
    color: #374151;
    font-weight: 500;
    font-size: 1.1rem;
}

.verse-card.active .verse-overlay {
    opacity: 0;
}

.verse-card .verse-text {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    text-align: justify;
    line-height: 1.8;
    transition: all 0.3s ease;
    filter: blur(6px); /* blur 효과 강력하게 */
    opacity: 0.1; /* 더 투명하게 */
    position: relative;
    z-index: 2;
}

.verse-card.active .verse-text {
    filter: blur(0px);
    opacity: 1;
}

.verse-card .reference {
    display: block;
    text-align: center;
    font-size: 1rem;
    color: #6b7280;
    font-weight: 500;
    font-style: normal; /* cite override */
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    filter: blur(6px);
    opacity: 0.1;
}

.verse-card.active .reference {
    filter: blur(0px);
    opacity: 1;
}

/* 애드센스 슬롯 */
.adsense-slot {
    margin: 2rem 0;
    text-align: center;
}

/* 목록으로 돌아가기 버튼 */
.back-button {
    display: inline-block;
    background-color: #3b82f6;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.back-button:hover {
    background-color: #2563eb;
}

/* 하단 구절 */
.footer-verse {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem;
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.footer-verse p {
    font-size: 1.125rem;
    color: #374151;
    margin-bottom: 1rem;
    font-style: italic;
}

.footer-verse cite {
    font-size: 1rem;
    color: #6b7280;
    font-weight: 500;
}

/* 고정 푸터: 하단 성경 구절을 고정 위치에 표시 */
.fixed-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #f8f9fa; /* 배경과 비슷 */
    color: #adb5bd; /* 흐릿한 회색 텍스트 */
    font-size: 0.8rem; /* 작은 글씨 */
    text-align: center;
    padding: 10px 0; /* 최소 여백 */
    z-index: 100; /* 다른 요소 위에 표시 */
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1); /* 상단 그림자 */
}

.fixed-footer p {
    margin: 0 0 0.5rem 0;
    font-style: italic;
}

.fixed-footer cite {
    font-weight: 500;
}

/* 반응형 디자인: 모바일에서는 카드들을 세로로 쌓음 */
@media (max-width: 768px) {
    .verse-cards-grid {
        flex-direction: column; /* 세로 배치 */
        align-items: center;
    }

    header h1 {
        font-size: 2rem;
    }

    .detail-content {
        padding: 2rem;
    }

    .verse-card {
        width: 100%;
        max-width: 400px; /* 최대 너비 제한 */
        margin-bottom: 1rem;
    }
}

/* 레이아웃 유연성 */
@media (max-width: 640px) {
    .container {
        padding: 0 0.75rem;
    }

    .detail-content {
        padding: 1.5rem;
    }
}
