/* 기본 리셋 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Malgun Gothic', '맑은 고딕', '돋움', Dotum, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
    background-image: url('배경.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('배경.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    opacity: 0.15;
    z-index: -1;
    filter: brightness(2.5) blur(10px);
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.85);
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 보조 헤더바 */
.top-header {
    background-color: rgba(248, 248, 248, 0.98);
    border-bottom: 1px solid #e5e5e5;
    height: 36px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1001;
    pointer-events: auto;
}

.top-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-header-left {
    flex: 1;
}

.top-header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.top-header-link {
    color: #666;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s;
    padding: 0.2rem 0.5rem;
    font-weight: 400;
}

.top-header-link:hover {
    color: #0066cc;
}

.top-header-divider {
    color: #ccc;
    font-size: 0.9rem;
    margin: 0 0.5rem;
}

/* 헤더 및 네비게이션 */
header {
    background-color: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
}

.logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 50px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    transition: transform 0.3s;
}

.logo a:hover .logo-img {
    transform: scale(1.05);
}

/* 네비게이션 메뉴 컨테이너 */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
    position: relative;
    width: 100%;
    padding: 0;
    margin: 0;
}

/* 데스크톱에서 모바일 전용 메뉴 항목 숨기기 */
.nav-menu > li.mobile-menu-close,
.nav-menu > li.mobile-auth-menu {
    display: none;
}

/* 햄버거 메뉴 버튼 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 3001;
    position: relative;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: #333;
    border-radius: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

/* 모바일 메뉴 오버레이 */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
    visibility: visible;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s;
    padding: 0.8rem 1.2rem;
    display: block;
    white-space: nowrap;
    position: relative;
}

.nav-menu > li > a:hover {
    color: #0066cc;
    background-color: transparent;
}

.nav-menu > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: #0066cc;
    transition: width 0.3s;
}

.nav-menu > li > a:hover::after {
    width: 70%;
}

/* 통합 메가메뉴 컨테이너 */
.mega-menu-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background-color: #fff;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    margin: 0;
    padding: 2rem 0;
    max-height: 0;
    overflow: hidden;
    border-top: 1px solid #e0e0e0;
}

.mega-menu-container.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    max-height: 500px;
}

.mega-menu-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.mega-menu-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 4rem;
    padding: 2.5rem 0;
}

.mega-menu-left {
    flex: 0 0 auto;
    min-width: 250px;
}

.mega-menu-right {
    flex: 1;
    display: flex;
    align-items: center;
    padding-left: 2rem;
    border-left: 1px solid #e8ecf1;
}

.mega-menu-title {
    font-size: 16px;
    color: #0066cc;
    font-weight: 600;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #0066cc;
    white-space: nowrap;
}

.mega-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mega-menu-list li {
    margin: 0;
    position: relative;
    padding-left: 1.25rem;
}

.mega-menu-list li::before {
    content: '○';
    position: absolute;
    left: 0;
    top: 0.5rem;
    color: #0066cc;
    font-size: 0.6rem;
    line-height: 1;
}

.mega-menu-list li a {
    display: block;
    padding: 0.5rem 0;
    color: #555;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s;
    white-space: nowrap;
    line-height: 1.5;
}

.mega-menu-list li a:hover {
    color: #0066cc;
    padding-left: 0.5rem;
}

.mega-menu-description {
    color: #666;
    font-size: 1rem;
    line-height: 1.8;
    padding: 1rem 0;
}

.mega-menu-description h3 {
    color: #0066cc;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.mega-menu-description p {
    margin-bottom: 0.75rem;
}

/* 서브메뉴 */
.submenu {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: rgba(0, 0, 0, 0.1);
}

.has-submenu.active .submenu {
    display: block;
}

.submenu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.submenu a {
    display: block;
    padding: 0.75rem 1rem 0.75rem 3rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.submenu a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
    padding-left: 3.5rem;
}

/* 메인 비주얼 섹션 */
.main-visual-section {
    background-color: transparent;
    padding: 20px 0 10px 0;
    position: relative;
    z-index: 1;
}

.main-visual-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-visual-slider {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

.slider-wrapper {
    position: relative;
    width: 100%;
    height: 420px;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 슬라이드 텍스트 오버레이 */
.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.2) 50%, transparent 100%);
    display: flex;
    align-items: center;
    z-index: 2;
}

.slide-text {
    max-width: 600px;
    padding: 40px 60px;
    color: #fff;
}

.slide-text h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.slide-text p {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 25px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    opacity: 0.95;
}

.slide-text .slide-btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #4a8c4a;
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.slide-text .slide-btn:hover {
    background-color: #3a7a3a;
}

/* 모바일 슬라이드 텍스트 */
@media (max-width: 768px) {
    .slide-text {
        padding: 20px;
        max-width: 100%;
    }
    
    .slide-text h2 {
        font-size: 22px;
        margin-bottom: 10px;
    }
    
    .slide-text p {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .slide-text .slide-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .slider-wrapper {
        height: 280px;
    }
}

.main-visual-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    padding: 30px 20px 20px;
    color: #fff;
    z-index: 2;
}

.main-visual-overlay p {
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.slider-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    z-index: 3;
    pointer-events: none;
}

.slider-prev,
.slider-next {
    background-color: rgba(255, 255, 255, 0.7);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 0;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.slider-prev:hover,
.slider-next:hover {
    background-color: rgba(255, 255, 255, 0.9);
    transform: scale(1.1);
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 0;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background-color: #fff;
    transform: scale(1.2);
}

/* 하단 정보 블록 섹션 */
.info-blocks-section {
    background-color: transparent;
    padding: 30px 0 50px 0;
    position: relative;
    z-index: 1;
    margin-top: -20px;
}

.info-blocks-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.info-block {
    min-height: 280px;
    background-color: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 0;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s;
}

.info-block:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.info-block-content {
    padding: 25px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.info-block h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #004a8f;
    padding-bottom: 12px;
    border-bottom: 2px solid #004a8f;
    letter-spacing: -0.5px;
}

/* 담임목사님의 금주의 말씀 */
.pastor-message {
    background-color: #fff;
    border-top: 4px solid #004a8f;
}

.pastor-message h3 {
    color: #004a8f;
}

.message-content {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    flex: 1;
}

.message-text {
    margin-bottom: 15px;
}

.message-text h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 0;
    line-height: 1.4;
}

.message-text p {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

.youtube-live-box {
    width: 100%;
    position: relative;
    padding-top: 56.25%; /* 16:9 비율 */
    background-color: #000;
    border: 1px solid #e0e0e0;
    overflow: hidden; /* 컨테이너를 벗어나는 내용 숨김 */
}

#online-worship-iframe-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* 컨테이너를 벗어나는 내용 숨김 */
}

#online-worship-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    object-fit: contain; /* 비율 유지하며 컨테이너에 맞춤 */
}

/* 예배시간 */
.worship-time {
    background-color: #fff;
    border-top: 4px solid #004a8f;
}

.worship-time h3 {
    color: #004a8f;
}

.worship-content {
    margin-bottom: 20px;
    flex: 1;
}

.worship-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.worship-list li {
    padding: 12px 0;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    align-items: center;
    gap: 10px;
}

.worship-list li:last-child {
    border-bottom: none;
}

.worship-day {
    font-size: 13px;
    color: #004a8f;
    font-weight: 600;
    min-width: 50px;
}

.worship-time-text {
    font-size: 13px;
    color: #333;
    font-weight: 500;
    min-width: 80px;
}

.worship-name {
    font-size: 13px;
    color: #666;
    flex: 1;
}

/* 교회주보 */
.church-bulletin {
    background-color: #fff;
    border-top: 4px solid #004a8f;
}

.church-bulletin h3 {
    color: #004a8f;
}

.bulletin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    position: relative;
}

.bulletin-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #004a8f;
    margin: 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #004a8f;
    flex: 1;
}

.more-link {
    font-size: 12px;
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
    margin-left: 10px;
    padding-bottom: 12px;
    border-bottom: 2px solid transparent;
}

.more-link:hover {
    color: #004a8f;
    text-decoration: underline;
}

.bulletin-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}

.bulletin-list li {
    padding: 10px 0;
    border-bottom: 1px solid #e8e8e8;
    position: relative;
    padding-left: 12px;
}

.bulletin-list li:last-child {
    border-bottom: none;
}

.bulletin-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #004a8f;
    font-size: 11px;
}

.bulletin-list li a {
    font-size: 13px;
    color: #555;
    text-decoration: none;
    transition: color 0.3s;
    display: block;
    line-height: 1.5;
}

.bulletin-list li a:hover {
    color: #004a8f;
}

.bulletin-list li:hover {
    background-color: #f5f5f5;
}

.bulletin-date {
    display: inline-block;
    background: #4a8c4a;
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    margin-right: 10px;
    min-width: 80px;
    text-align: center;
}

.bulletin-title {
    font-size: 13px;
    color: #333;
}

/* 정보 블록 버튼 */
.info-block-btn {
    display: inline-block;
    padding: 8px 18px;
    background-color: #004a8f;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-radius: 0;
    transition: all 0.3s;
    text-align: center;
    margin-top: auto;
    border: 1px solid #004a8f;
}

.info-block-btn:hover {
    background-color: #0052a3;
    border-color: #0052a3;
    color: #fff;
}

/* 섹션 공통 스타일 */
section {
    padding: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 32px;
    color: #333;
    font-weight: 700;
    margin-bottom: 15px;
}

.section-header p {
    font-size: 16px;
    color: #666;
}

.section-footer {
    text-align: center;
    margin-top: 40px;
}

.btn-more {
    display: inline-block;
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s;
}

.btn-more:hover {
    color: #0052a3;
    transform: translateX(5px);
}

/* 교회 소개 섹션 */
.intro-section {
    background-color: #fff;
}

.intro-content {
    display: flex;
    gap: 50px;
    align-items: center;
}

.intro-text {
    flex: 1;
}

.intro-text p {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 25px;
}

.intro-image {
    flex: 1;
}

.intro-image img {
    width: 100%;
    height: auto;
    border-radius: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 예배 안내 섹션 */
.service-section {
    background-color: #f8f9fa;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

.service-card {
    background: #fff;
    padding: 30px 20px;
    border-radius: 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.15);
}

.service-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 20px;
    color: #333;
    font-weight: 600;
    margin-bottom: 15px;
}

.service-card p {
    font-size: 14px;
    color: #666;
    margin: 8px 0;
}

.service-location {
    color: #0066cc !important;
    font-weight: 500;
}

/* 사역 소개 섹션 */
.ministry-section {
    background-color: #fff;
}

.ministry-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.ministry-card {
    background: #f8f9fa;
    padding: 35px;
    border-radius: 0;
    border-left: 3px solid #0066cc;
    transition: all 0.3s;
}

.ministry-card:hover {
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.ministry-card h3 {
    font-size: 22px;
    color: #333;
    font-weight: 600;
    margin-bottom: 20px;
}

.ministry-card ul {
    list-style: none;
    padding: 0;
    margin-bottom: 25px;
}

.ministry-card ul li {
    font-size: 15px;
    color: #555;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.ministry-card ul li:last-child {
    border-bottom: none;
}

/* 공지사항 섹션 */
.notice-section {
    background-color: #f8f9fa;
}

.notice-list {
    background: #fff;
    border-radius: 0;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.notice-item {
    display: flex;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}

.notice-item:last-child {
    border-bottom: none;
}

.notice-date {
    font-size: 14px;
    color: #999;
    min-width: 100px;
    margin-right: 30px;
}

.notice-title {
    font-size: 16px;
    color: #333;
    text-decoration: none;
    flex: 1;
    transition: color 0.3s;
}

.notice-title:hover {
    color: #0066cc;
}

/* 갤러리 섹션 */
.gallery-section {
    background-color: #fff;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    aspect-ratio: 3/2;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: #fff;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay p {
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

/* 오시는길 섹션 */
.location-section {
    background-color: #f8f9fa;
}

.location-content {
    display: flex;
    gap: 50px;
}

.location-info {
    flex: 1;
}

.info-item {
    margin-bottom: 30px;
}

.info-item h3 {
    font-size: 18px;
    color: #333;
    font-weight: 600;
    margin-bottom: 12px;
}

.info-item p {
    font-size: 15px;
    color: #555;
    line-height: 1.8;
    margin: 5px 0;
}

.location-map {
    flex: 1;
}

.map-placeholder {
    width: 100%;
    height: 400px;
    background: #e0e0e0;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 16px;
}

/* 푸터 */
footer {
    background-color: rgba(51, 51, 51, 0.95);
    border-top: 1px solid #555;
    padding: 30px 0 20px 0;
    margin-top: 50px;
    color: #fff;
    position: relative;
    z-index: 1;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 15px;
}

.footer-info-top p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    margin: 3px 0;
    line-height: 1.4;
}

.footer-info-top p:first-child {
    font-weight: 600;
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 15px;
}

.footer-info-bottom p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    line-height: 1.5;
}

/* 팝업 레이어 */
.popup-layer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 20px;
}

.popup-layer.active {
    display: flex;
}

.popup-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 0;
    max-width: 500px;
    width: 90%;
    position: relative;
}

/* 개인정보 처리방침 팝업 */
.privacy-popup-content {
    background-color: #fff;
    padding: 40px;
    border-radius: 0;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-top: 4px solid #004a8f;
}

.privacy-popup-header {
    border-bottom: 2px solid #004a8f;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.privacy-popup-header h2 {
    font-size: 24px;
    color: #004a8f;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
}

.privacy-popup-body {
    max-height: calc(90vh - 150px);
    overflow-y: auto;
    padding-right: 10px;
}

.privacy-popup-body::-webkit-scrollbar {
    width: 8px;
}

.privacy-popup-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.privacy-popup-body::-webkit-scrollbar-thumb {
    background: #004a8f;
    border-radius: 0;
}

.privacy-popup-body::-webkit-scrollbar-thumb:hover {
    background: #003a70;
}

.privacy-popup-body h3 {
    font-size: 16px;
    color: #004a8f;
    font-weight: 700;
    margin-top: 25px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.privacy-popup-body h3:first-child {
    margin-top: 0;
}

.privacy-popup-body p {
    font-size: 14px;
    color: #555;
    line-height: 1.8;
    margin-bottom: 15px;
}

.privacy-popup-body ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.privacy-popup-body li {
    font-size: 14px;
    color: #555;
    line-height: 1.8;
    margin-bottom: 8px;
}

.privacy-popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    cursor: pointer;
    color: #999;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    transition: all 0.3s;
    background-color: #f5f5f5;
}

.privacy-popup-close:hover {
    color: #333;
    background-color: #e0e0e0;
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #999;
}

.popup-close:hover {
    color: #333;
}

.popup-body h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

.popup-body p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* 사이트맵 팝업 */
.sitemap-popup-content {
    background-color: #fff;
    padding: 40px;
    border-radius: 0;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-top: 4px solid #004a8f;
}

.sitemap-popup-header {
    border-bottom: 2px solid #004a8f;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.sitemap-popup-header h2 {
    font-size: 24px;
    color: #004a8f;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
}

.sitemap-popup-body {
    max-height: calc(90vh - 150px);
    overflow-y: auto;
    padding-right: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.sitemap-popup-body::-webkit-scrollbar {
    width: 8px;
}

.sitemap-popup-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.sitemap-popup-body::-webkit-scrollbar-thumb {
    background: #004a8f;
    border-radius: 0;
}

.sitemap-popup-body::-webkit-scrollbar-thumb:hover {
    background: #003a70;
}

.sitemap-section {
    margin-bottom: 20px;
}

.sitemap-section h3 {
    font-size: 16px;
    color: #004a8f;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.sitemap-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sitemap-section li {
    margin-bottom: 10px;
}

.sitemap-section a {
    color: #555;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
    display: block;
    padding: 5px 0;
}

.sitemap-section a:hover {
    color: #004a8f;
    text-decoration: underline;
}

.sitemap-popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    cursor: pointer;
    color: #999;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    transition: all 0.3s;
    background-color: #f5f5f5;
}

.sitemap-popup-close:hover {
    color: #333;
    background-color: #e0e0e0;
}

@media (max-width: 768px) {
    .privacy-popup-content,
    .sitemap-popup-content {
        padding: 25px 20px;
        max-width: 95%;
    }
    
    .privacy-popup-header h2,
    .sitemap-popup-header h2 {
        font-size: 20px;
    }
    
    .privacy-popup-body h3,
    .sitemap-section h3 {
        font-size: 15px;
    }
    
    .privacy-popup-body p,
    .privacy-popup-body li {
        font-size: 13px;
    }
    
    .sitemap-popup-body {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* 서브페이지 스타일 */
.sub-visual {
    position: relative;
    padding: 80px 0;
    min-height: 200px;
    border-bottom: none;
    color: #fff;
    overflow: hidden;
    display: flex;
    align-items: center;
}

/* 서브비주얼 배경 이미지 (흐리게) */
.sub-visual::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('elim-church-bg.jpg');
    background-size: cover;
    background-position: center;
    filter: blur(3px);
    transform: scale(1.1);
    z-index: 0;
}

/* 서브비주얼 어두운 오버레이 */
.sub-visual::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.sub-visual-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

.sub-visual-left {
    text-align: center;
}

.sub-visual-left h2 {
    font-size: 32px;
    color: #fff;
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.3;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.sub-visual-left p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* 서브비주얼 오른쪽 이미지 숨기기 */
.sub-visual-right {
    display: none;
}

.main-content {
    background-color: #fff;
    padding: 0;
    min-height: 500px;
    margin-top: 30px;
}

.content-wrapper {
    display: flex;
    gap: 0;
    align-items: stretch;
}

/* 새로운 사이드바 스타일 - 이미지 참고 */
.sidebar {
    flex: 0 0 200px;
    background-color: #3d3d3d;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
}

.sidebar h3 {
    font-size: 18px;
    color: #fff;
    margin: 0;
    font-weight: 600;
    padding: 20px 25px;
    background-color: #4a8c4a;
    border-bottom: none;
}

.side-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.side-menu li {
    margin-bottom: 0;
    border-bottom: 1px solid #4a4a4a;
}

.side-menu li:last-child {
    border-bottom: none;
}

.side-menu li a {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    border-radius: 0;
    position: relative;
}

.side-menu li a:hover {
    background-color: #4a4a4a;
    color: #fff;
}

.side-menu li.active a {
    background-color: transparent;
    color: #fff;
}

.side-menu li.active a::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background-color: #5a9e5a;
    border-radius: 50%;
}

/* 사이드바 다중 섹션 (ministry 페이지 등) */
.sidebar h3 + .side-menu + h3 {
    margin-top: 0;
    padding-top: 0;
    border-top: 1px solid #4a4a4a;
}

.content-area {
    flex: 1;
    padding: 30px 40px;
    background-color: #fff;
    min-width: 0; /* flexbox에서 텍스트 오버플로우 방지 */
}

/* PC에서 content-area가 더 넓게 보이도록 */
@media (min-width: 769px) {
    .content-area {
        min-width: 600px; /* 최소 너비 보장 */
    }
}

/* 콘텐츠 헤더 (제목 + 경로) */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
    margin-bottom: 25px;
}

.content-header h2 {
    font-size: 22px;
    color: #333;
    font-weight: 600;
    margin: 0;
    padding: 0;
    border: none;
}

.content-header .breadcrumb {
    font-size: 12px;
    color: #888;
}

.content-header .breadcrumb a {
    color: #666;
    text-decoration: none;
}

.content-header .breadcrumb a:hover {
    color: #c94a4a;
}

.content-section {
    background-color: #fff;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
}

.content-section h2 {
    font-size: 22px;
    color: #333;
    margin-bottom: 20px;
    font-weight: 600;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.content-section h3 {
    font-size: 18px;
    color: #333;
    margin: 30px 0 15px 0;
    font-weight: 600;
    padding-left: 12px;
    border-left: 3px solid #4a8c4a;
}

/* 서브페이지 배경 제거 */
body.sub-page::before,
body.sub-page::after {
    display: none;
}

body.sub-page {
    background-image: none;
    background-color: #fff;
}

.content-section p {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 15px;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    border-top: 2px solid #333;
}

.info-table thead {
    background-color: #f8f8f8;
}

.info-table th,
.info-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
    font-size: 13px;
}

.info-table th {
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #ddd;
}

.info-table td {
    color: #555;
}

.info-table td:nth-child(2) {
    text-align: left;
}

.info-table tbody tr:hover {
    background-color: #fafafa;
}

.info-table .post-title {
    color: #333;
    text-decoration: none;
}

.info-table .post-title:hover {
    color: #c94a4a;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.history-table td {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
}

.history-table .year {
    font-weight: 600;
    color: #0066cc;
    width: 150px;
}

.org-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.org-list li {
    padding: 10px 0;
    padding-left: 20px;
    position: relative;
    font-size: 14px;
    color: #666;
}

.org-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #0066cc;
    font-weight: bold;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 0;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary {
    background-color: #0066cc;
    color: #fff;
}

.btn-primary:hover {
    background-color: #0052a3;
}

.btn-secondary {
    background-color: #fff;
    color: #0066cc;
    border: 1px solid #0066cc;
}

.btn-secondary:hover {
    background-color: #f0f7fc;
}

.sub-footer {
    background-color: rgba(51, 51, 51, 0.95);
    border-top: 1px solid #555;
    padding: 30px 0 20px 0;
    margin-top: 50px;
    color: #fff;
    position: relative;
    z-index: 1;
}

.sub-footer .footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 15px;
}

.sub-footer .footer-info-top p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    margin: 3px 0;
    line-height: 1.4;
}

.sub-footer .footer-info-top p:first-child {
    font-weight: 600;
    color: #fff;
}

.sub-footer .footer-bottom {
    text-align: center;
    padding-top: 15px;
}

.sub-footer .footer-info-bottom p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    line-height: 1.5;
}

/* 반응형 */
@media (max-width: 768px) {
    .sub-visual-inner {
        flex-direction: column;
    }

    .content-wrapper {
        flex-direction: column;
    }

    .sidebar {
        flex: 1;
        width: 100%;
    }
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        height: 100vh;
        background-color: #2a2a2a;
        flex-direction: column;
        padding: 0;
        transition: right 0.3s ease;
        z-index: 999;
        overflow-y: auto;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu > li > a {
        color: #fff;
        padding: 1rem 1.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu > li.mobile-menu-close,
    .nav-menu > li.mobile-auth-menu {
        display: block;
    }

    .mobile-close-btn {
        background: none;
        border: none;
        color: #fff;
        font-size: 32px;
        cursor: pointer;
        padding: 1rem 1.5rem;
        width: 100%;
        text-align: right;
        line-height: 1;
    }

    .mobile-auth-link {
        color: #fff !important;
        text-decoration: none;
        font-size: 0.9rem;
    }

    .mobile-auth-divider {
        color: rgba(255, 255, 255, 0.5);
        margin: 0 0.5rem;
    }

    .main-visual-overlay p {
        font-size: 18px;
        padding: 30px 15px 20px;
    }

    .info-blocks-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .message-content {
        flex-direction: column;
    }

    .message-image {
        margin-left: 0;
        margin-top: 15px;
    }

    .worship-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .worship-icon {
        margin-left: 0;
        margin-top: 15px;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
    }

    /* 새로운 섹션 반응형 */
    .intro-content {
        flex-direction: column;
    }

    .service-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .ministry-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .location-content {
        flex-direction: column;
    }

    .map-placeholder {
        height: 300px;
    }

    .section-header h2 {
        font-size: 24px;
    }

    section {
        padding: 40px 0;
    }
}

@media (max-width: 480px) {
    .service-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .notice-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .notice-date {
        margin-bottom: 10px;
    }
}

/* 관리자 링크 스타일 */
.admin-link {
    color: rgba(0, 0, 0, 0.2);
    text-decoration: none;
    font-size: 11px;
    margin-left: 10px;
    transition: color 0.3s;
}

.admin-link:hover {
    color: rgba(0, 0, 0, 0.4);
}

/* 게시판 스타일 */
/* ===== 2014년대 클래식 게시판 스타일 ===== */

/* 게시판 헤더 */
.board-header-classic {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    margin-bottom: 0;
    border-bottom: 2px solid #333;
}

.board-total {
    font-size: 12px;
    color: #666;
}

.board-total strong {
    color: #c00;
    font-weight: bold;
}

/* 글쓰기 버튼 - 회색 작은 버튼 */
.btn-write-classic {
    padding: 5px 12px;
    background: #666;
    color: #fff;
    border: 1px solid #555;
    font-size: 12px;
    cursor: pointer;
    border-radius: 2px;
}

.btn-write-classic:hover {
    background: #555;
}

/* 클래식 테이블 */
.board-table-classic {
    width: 100%;
    border-collapse: collapse;
    border-top: 2px solid #333;
    font-size: 12px;
}

.board-table-classic thead th {
    padding: 10px 5px;
    background: #f7f7f7;
    border-bottom: 1px solid #ddd;
    font-weight: normal;
    color: #333;
    text-align: center;
}

.board-table-classic tbody td {
    padding: 10px 5px;
    border-bottom: 1px solid #e5e5e5;
    text-align: center;
    color: #555;
}

.board-table-classic tbody td:nth-child(2) {
    text-align: left;
    padding-left: 10px;
}

.board-table-classic tbody tr:hover {
    background: #fafafa;
}

.board-table-classic .post-link {
    color: #333;
    text-decoration: none;
}

.board-table-classic .post-link:hover {
    text-decoration: underline;
    color: #0066cc;
}

.board-table-classic .empty-msg {
    text-align: center !important;
    padding: 50px 0 !important;
    color: #999;
}

/* 클래식 페이지네이션 */
.board-pagination-classic {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #ddd;
    margin-top: 0;
}

.board-pagination-classic .pagination {
    display: inline-flex;
    gap: 3px;
}

.board-pagination-classic .page-link,
.board-pagination-classic .page-current {
    display: inline-block;
    min-width: 24px;
    padding: 4px 8px;
    font-size: 11px;
    text-decoration: none;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
}

.board-pagination-classic .page-link:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.board-pagination-classic .page-current {
    background: #333;
    color: #fff;
    border-color: #333;
    font-weight: bold;
}

/* 게시글 상세보기 - 클래식 */
.board-view-classic {
    width: 100%;
    border-collapse: collapse;
    border-top: 2px solid #333;
    font-size: 13px;
    margin-bottom: 15px;
}

.board-view-classic th,
.board-view-classic td {
    border-bottom: 1px solid #ddd;
    padding: 10px;
}

.board-view-classic .view-title {
    font-size: 16px;
    font-weight: bold;
    text-align: left;
    padding: 15px;
    background: #f9f9f9;
}

.board-view-classic .view-info th {
    width: 80px;
    background: #f5f5f5;
    text-align: center;
    font-weight: normal;
    color: #666;
    font-size: 12px;
}

.board-view-classic .view-info td {
    background: #fff;
    font-size: 12px;
    color: #333;
}

.board-view-classic .view-content {
    padding: 30px 15px;
    min-height: 250px;
    line-height: 1.8;
    vertical-align: top;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 버튼 영역 - 클래식 */
.board-btn-area-classic {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-top: 1px solid #ddd;
}

.btn-classic {
    padding: 6px 15px;
    background: #f5f5f5;
    border: 1px solid #ccc;
    color: #333;
    font-size: 12px;
    cursor: pointer;
    border-radius: 2px;
}

.btn-classic:hover {
    background: #eee;
    border-color: #bbb;
}

.btn-classic.btn-submit {
    background: #666;
    color: #fff;
    border-color: #555;
}

.btn-classic.btn-submit:hover {
    background: #555;
}

.btn-classic.btn-delete {
    background: #fff;
    color: #c00;
    border-color: #c00;
}

.btn-classic.btn-delete:hover {
    background: #c00;
    color: #fff;
}

/* 댓글 - 클래식 */
.board-comments-classic {
    margin-top: 30px;
    border-top: 2px solid #333;
}

.comments-title {
    padding: 10px;
    background: #f7f7f7;
    font-size: 13px;
    font-weight: bold;
    border-bottom: 1px solid #ddd;
}

.comments-title span {
    color: #c00;
}

.board-comments-classic .comment-item {
    padding: 12px;
    border-bottom: 1px solid #eee;
    font-size: 12px;
}

.board-comments-classic .comment-meta {
    color: #999;
    margin-bottom: 5px;
    font-size: 11px;
}

.board-comments-classic .comment-content {
    color: #333;
    line-height: 1.6;
}

.comment-form-classic {
    padding: 15px;
    background: #f9f9f9;
    border-top: 1px solid #ddd;
}

.comment-form-classic textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    font-size: 12px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 10px;
}

.comment-form-classic textarea:focus {
    outline: none;
    border-color: #999;
}

/* 글쓰기 폼 - 2014년대 클래식 스타일 */
.write-form-classic {
    border: 1px solid #ccc;
    background: #fff;
}

.write-form-title {
    padding: 12px 15px;
    background: linear-gradient(to bottom, #f8f8f8 0%, #eee 100%);
    border-bottom: 1px solid #ccc;
}

.write-form-title h3 {
    margin: 0;
    padding: 0;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    border: none;
}

.write-table-classic {
    width: 100%;
    border-collapse: collapse;
}

.write-table-classic th {
    width: 100px;
    padding: 12px 15px;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    text-align: left;
    font-size: 12px;
    font-weight: normal;
    color: #555;
    vertical-align: top;
}

.write-table-classic td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.input-classic {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    font-size: 13px;
    font-family: inherit;
    box-sizing: border-box;
}

.input-classic:focus {
    outline: none;
    border-color: #999;
    background: #fffef5;
}

.textarea-classic {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    font-size: 13px;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    box-sizing: border-box;
}

.textarea-classic:focus {
    outline: none;
    border-color: #999;
    background: #fffef5;
}

.write-btn-area-classic {
    padding: 15px;
    background: #f5f5f5;
    border-top: 1px solid #ddd;
    text-align: center;
}

.write-btn-area-classic .btn-classic {
    margin: 0 3px;
    min-width: 80px;
}

/* 기본 게시판 테이블 (하위 호환용) */
.board-table {
    width: 100%;
    margin-bottom: 30px;
}

.board-pagination {
    text-align: center;
    margin-top: 30px;
}

/* 상세보기 액션 버튼 */
.board-detail-actions {
    display: flex;
    gap: 5px;
}

/* 기본 폼 요소 (하위 호환용) */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    font-size: 14px;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .board-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .board-detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .board-detail-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .board-table {
        font-size: 12px;
    }

    .board-table th,
    .board-table td {
        padding: 8px 5px;
    }

    .pagination {
        flex-wrap: wrap;
    }
}

/* ============================== */
/* 온라인설교영상 페이지 스타일 */
/* ============================== */
.sermon-main-video {
    margin-bottom: 30px;
}

.sermon-video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 비율 */
    background: #000;
    border: 1px solid #ddd;
    overflow: hidden; /* 컨테이너를 벗어나는 내용 숨김 */
}

.sermon-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.sermon-video-info {
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-top: none;
}

.sermon-video-info h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #333;
}

.sermon-video-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.sermon-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #333;
}

.sermon-list-header h4 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.youtube-channel-link {
    color: #c00;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
}

.youtube-channel-link:hover {
    text-decoration: underline;
}

.sermon-video-list {
    width: 100%;
    margin-top: 20px;
}

/* PC에서 최근 설교 영상 테이블을 더 넓게 표시 */
@media (min-width: 769px) {
    .sermon-video-list {
        max-width: 100%;
        overflow-x: visible;
    }
    
    .sermon-video-list .board-table-classic {
        width: 100%;
        font-size: 15px;
        table-layout: auto; /* 자동 너비 조정 */
    }
    
    .sermon-video-list .board-table-classic thead th {
        padding: 14px 20px;
        white-space: nowrap;
        font-size: 15px;
    }
    
    .sermon-video-list .board-table-classic thead th:first-child {
        width: 120px; /* 썸네일 */
    }
    
    .sermon-video-list .board-table-classic thead th:nth-child(2) {
        width: 140px; /* 업로드 날짜 */
    }
    
    .sermon-video-list .board-table-classic thead th:last-child {
        width: 180px; /* 채널명 */
    }
    
    .sermon-video-list .board-table-classic tbody td {
        padding: 14px 20px;
        font-size: 14px;
        vertical-align: middle; /* 썸네일과 텍스트 중앙 정렬 */
    }
    
    .sermon-video-list .board-table-classic tbody td:first-child {
        padding: 8px; /* 썸네일 셀 패딩 */
        text-align: center;
    }
    
    .sermon-video-list .board-table-classic tbody td:first-child img {
        transition: transform 0.2s, box-shadow 0.2s;
    }
    
    .sermon-video-list .board-table-classic tbody tr:hover td:first-child img {
        transform: scale(1.05);
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }
    
    .sermon-video-list .board-table-classic tbody td:nth-child(3) {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* 큰 화면에서 더 넓게 */
@media (min-width: 1200px) {
    .sermon-video-list .board-table-classic {
        font-size: 16px;
    }
    
    .sermon-video-list .board-table-classic thead th {
        padding: 16px 25px;
        font-size: 16px;
    }
    
    .sermon-video-list .board-table-classic tbody td {
        padding: 16px 25px;
        font-size: 15px;
    }
}

.sermon-item {
    background: #fff;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.2s;
}

.sermon-item:hover {
    border-color: #4a8c4a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sermon-thumb {
    position: relative;
    padding-top: 56.25%;
    background: #000;
    overflow: hidden;
}

.sermon-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    opacity: 0;
    transition: opacity 0.2s;
}

.sermon-item:hover .play-overlay {
    opacity: 1;
}

.sermon-info {
    padding: 15px;
}

.sermon-info h5 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

.sermon-info p {
    margin: 0;
    font-size: 12px;
    color: #666;
}

.sermon-notice {
    grid-column: 1 / -1;
    padding: 20px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    text-align: center;
}

.sermon-notice p {
    margin: 0;
    color: #666;
}

.sermon-notice a {
    color: #c00;
    font-weight: bold;
}

/* ============================== */
/* 담임목사 인사말 스타일 */
/* ============================== */
.pastor-greeting {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-top: 20px;
}

.pastor-photo-area {
    flex-shrink: 0;
}

.pastor-photo {
    width: 220px;
    height: auto;
    border: 3px solid #4a8c4a;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.pastor-message {
    flex: 1;
}

.pastor-message h3 {
    color: #4a8c4a;
    font-size: 24px;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #4a8c4a;
}

.pastor-message p {
    font-size: 15px;
    line-height: 1.9;
    color: #444;
    margin-bottom: 15px;
}

.pastor-sign {
    margin-top: 30px !important;
    text-align: right;
    font-weight: 600;
    color: #333 !important;
    font-size: 16px !important;
}

@media (max-width: 768px) {
    .pastor-greeting {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .pastor-photo {
        width: 180px;
    }
    
    .pastor-message h3 {
        font-size: 20px;
    }
    
    .pastor-message p {
        font-size: 14px;
        text-align: left;
    }
    
    .pastor-sign {
        text-align: center;
    }
}

/* ============================== */
/* 모바일 반응형 개선 */
/* ============================== */

/* 모바일 햄버거 메뉴 개선 */
@media (max-width: 768px) {
    /* 햄버거 버튼 더 크게 */
    .mobile-menu-toggle {
        display: flex !important;
        width: 40px;
        height: 40px;
        padding: 8px;
    }
    
    .mobile-menu-toggle span {
        height: 3px;
        background-color: #333;
    }
    
    /* 메뉴 열렸을 때 햄버거 X로 변환 */
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px);
    }
    
    /* 모바일 메뉴 스타일 개선 */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background-color: #2a2a2a;
        flex-direction: column;
        justify-content: flex-start;
        padding: 0;
        z-index: 3000;
        overflow-y: auto;
        transition: right 0.3s ease-in-out;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    /* 모바일 메뉴 닫기 버튼 */
    .nav-menu > li.mobile-menu-close {
        display: block;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .mobile-close-btn {
        background: none;
        border: none;
        color: #fff;
        font-size: 36px;
        cursor: pointer;
        padding: 15px 20px;
        width: 100%;
        text-align: right;
        line-height: 1;
    }
    
    /* 모바일 인증 메뉴 */
    .nav-menu > li.mobile-auth-menu {
        display: block;
        padding: 15px 20px;
        background: rgba(0,0,0,0.2);
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .mobile-auth-link {
        color: #fff !important;
        text-decoration: none;
        font-size: 14px;
    }
    
    .mobile-auth-divider {
        color: rgba(255,255,255,0.3);
        margin: 0 10px;
    }
    
    /* 모바일 메뉴 항목 */
    .nav-menu > li {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .nav-menu > li > a {
        display: block;
        padding: 18px 20px;
        color: #fff !important;
        font-size: 16px;
        text-decoration: none;
    }
    
    .nav-menu > li > a:hover,
    .nav-menu > li > a:active {
        background-color: rgba(255,255,255,0.1);
    }
    
    /* 모바일 서브메뉴 */
    .nav-menu .submenu {
        display: none;
        position: static;
        background: rgba(0,0,0,0.3);
        padding: 0;
        min-width: auto;
        box-shadow: none;
    }
    
    .nav-menu .submenu.open {
        display: block;
    }
    
    .nav-menu .submenu li {
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    
    .nav-menu .submenu li:last-child {
        border-bottom: none;
    }
    
    .nav-menu .submenu li a {
        display: block;
        padding: 14px 20px 14px 35px;
        color: rgba(255,255,255,0.8) !important;
        font-size: 14px;
        text-decoration: none;
    }
    
    .nav-menu .submenu li a:hover,
    .nav-menu .submenu li a:active {
        background-color: rgba(255,255,255,0.05);
        color: #fff !important;
    }
    
    /* 서브메뉴 화살표 표시 */
    .nav-menu > li.has-submenu > a::after {
        content: '▼';
        float: right;
        font-size: 10px;
        transition: transform 0.2s;
    }
    
    .nav-menu > li.has-submenu.open > a::after {
        transform: rotate(180deg);
    }
    
    /* 오버레이 */
    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0,0,0,0.6);
        z-index: 2999;
    }
    
    .mobile-menu-overlay.active {
        display: block;
    }
    
    /* 메가메뉴 숨기기 */
    .mega-menu-container {
        display: none !important;
    }
    
    /* 헤더 고정 */
    header {
        position: sticky;
        top: 0;
        z-index: 1000;
        background: #fff;
    }
    
    /* 보조 헤더 숨기기 (모바일) */
    .top-header {
        display: none;
    }
    
    /* 네비게이션 바 */
    nav {
        padding: 10px 15px;
    }
    
    /* 로고 크기 조정 */
    .logo-img {
        max-height: 45px;
    }
    
    /* 서브 비주얼 - 모바일 */
    .sub-visual {
        min-height: 120px;
        padding: 40px 15px;
    }
    
    .sub-visual h2 {
        font-size: 20px;
    }
    
    .sub-visual-inner {
        padding: 0;
    }
    
    .sub-visual-left h2 {
        font-size: 22px;
        margin-bottom: 8px;
    }
    
    .sub-visual-left p {
        font-size: 14px;
        line-height: 1.5;
    }
    
    /* 컨텐츠 래퍼 - 모바일 (양옆 꽉 차게) */
    .content-wrapper {
        flex-direction: column;
        padding: 0;
        gap: 0;
    }
    
    /* 사이드바 모바일 - 전체 너비 */
    .sidebar {
        width: 100%;
        margin-bottom: 0;
        flex: none;
    }
    
    .sidebar h3 {
        padding: 15px;
        font-size: 16px;
    }
    
    .side-menu li a {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    /* 메인 컨텐츠 - 모바일 (전체 너비) */
    .main-content {
        padding: 20px 15px;
        margin-top: 0;
        width: 100%;
    }
    
    .content-section {
        padding: 0;
    }
    
    .content-header {
        padding: 15px 0;
        margin-bottom: 15px;
    }
    
    .content-header h3 {
        font-size: 18px;
    }
    
    /* 컨텐츠 영역 - 모바일 */
    .content-area {
        padding: 20px 15px;
    }
    
    /* 정보 블록 그리드 */
    .info-blocks-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .info-block {
        min-height: auto;
    }
    
    /* 설교 영상 페이지 */
    .sermon-video-info h4 {
        font-size: 16px;
    }
    
    .sermon-list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .sermon-video-list {
        width: 100%;
    }
    
    .sermon-video-list .board-table-classic {
        font-size: 12px;
    }
    
    .sermon-video-list .board-table-classic thead th,
    .sermon-video-list .board-table-classic tbody td {
        padding: 8px 5px;
    }
    
    .sermon-video-list .board-table-classic tbody td:first-child {
        padding: 5px;
    }
    
    .sermon-video-list .board-table-classic tbody td:first-child img {
        width: 80px;
        height: 45px;
    }
    
    /* 푸터 */
    footer {
        padding: 20px 15px;
    }
    
    .footer-info-top p,
    .footer-info-bottom p {
        font-size: 12px;
        text-align: center;
    }
    
    /* 팝업 */
    .sitemap-popup-content,
    .privacy-popup-content {
        width: 95%;
        padding: 20px 15px;
    }
    
    .sitemap-popup-body {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    /* 서브페이지 전체 너비 적용 */
    .sub-page .container,
    .main-content .container {
        padding: 0;
        max-width: 100%;
        width: 100%;
    }
    
    .sub-page main,
    .main-content {
        padding: 0;
        width: 100%;
    }
    
    /* 서브페이지 메인컨텐츠 패딩 제거 */
    .sub-page .main-content {
        padding: 0;
        margin: 0;
    }
    
    /* 게시판 모바일 */
    .board-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .board-table {
        min-width: 500px;
    }
    
    /* 갤러리 모바일 */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0;
    }
    
    /* 공지사항 모바일 */
    .notice-list {
        padding: 0;
    }
    
    .notice-item {
        padding: 15px 0;
    }
    
    /* 게시글 작성 폼 모바일 */
    .classic-form-table th,
    .classic-form-table td {
        display: block;
        width: 100%;
    }
    
    .classic-form-table th {
        border-right: none;
        border-bottom: none;
        padding: 10px 15px 5px;
    }
    
    .classic-form-table td {
        padding: 5px 15px 10px;
    }
    
    .classic-form-table input[type="text"],
    .classic-form-table textarea {
        width: 100% !important;
    }
}

/* 더 작은 화면 */
@media (max-width: 480px) {
    .nav-menu {
        width: 100%;
        max-width: none;
    }
    
    .sitemap-popup-body {
        grid-template-columns: 1fr;
    }
    
    .bulletin-date {
        display: block;
        margin-bottom: 5px;
    }
    
    .bulletin-title {
        display: block;
    }
    
    /* 서브비주얼 더 작은 화면 */
    .sub-visual {
        padding: 25px 10px;
    }
    
    .sub-visual-left h2 {
        font-size: 18px;
    }
    
    .sub-visual-left p {
        font-size: 12px;
    }
    
    /* 컨텐츠 영역 더 작은 화면 */
    .main-content {
        padding: 15px 10px;
    }
    
    .content-area {
        padding: 15px 10px;
    }
    
    .sidebar h3 {
        padding: 12px 10px;
        font-size: 15px;
    }
    
    .side-menu li a {
        padding: 10px;
        font-size: 13px;
    }
    
    /* 갤러리 1열 */
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    /* 게시판 테이블 */
    .board-table {
        font-size: 11px;
    }
    
    .board-table th,
    .board-table td {
        padding: 8px 5px;
    }
}
