/*
Theme Name: 석불사 테마
Theme URI: https://example.com/seokbulsa-theme-info
Author: (본인 이름 또는 회사명)
Author URI: https://example.com/
Description: kakaopaytogether.com 스타일을 기반으로 제작된 석불사 전용 반응형 워드프레스 테마입니다.
Version: 1.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: responsive-layout, custom-menu, modern
Text Domain: seokbulsa
*/

/* ==================== 전역 스타일 및 변수 ==================== */
:root {
    --primary-color: #000000; /* 차분한 갈색 */
    --secondary-color: #C8B59E; /* 부드러운 갈색 */
    --bg-light-color: #F8F5F1;  /* 따뜻한 미색 배경 */
    --text-color: #333333;
    --text-light-color: #777777;
    --white-color: #FFFFFF;
    --border-radius: 16px;
    --font-family: 'Noto Sans KR', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    line-height: 1.7;
    background-color: var(--white-color);
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px; /* 콘텐츠 최대 너비를 조금 넓힘 */
    margin: 0 auto;
    padding: 0 40px; /* 좌우 여백 조정 */
}

.section {
    padding: 100px 0; /* 섹션 상하 여백 늘림 */
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 60px;
    font-weight: 700;
}

.bg-light {
    background-color: var(--bg-light-color);
}

/* ==================== 버튼 스타일 ==================== */
.btn-primary {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s ease;
}
.btn-primary:hover {
    background-color: #705536;
    transform: translateY(-2px);
}

.btn-secondary {
    display: inline-block;
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--secondary-color);
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
}
.btn-secondary:hover {
    background-color: var(--bg-light-color);
    border-color: var(--primary-color);
}


/* ==================== 헤더 ==================== */
.header {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    border-bottom: 1px solid #eee;
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

/* ▼▼▼▼▼▼▼▼▼▼ 헤더 정렬을 위한 핵심 코드 ▼▼▼▼▼▼▼▼▼▼ */
.header .container {
    max-width: none; /* 헤더의 container는 max-width 제한을 해제! */
    display: grid !important; /* !important 추가 */
    grid-template-columns: 1fr auto 1fr !important; /* !important 추가 */
    align-items: center;
    gap: 20px;
}

.logo {
    justify-self: start; /* 로고를 그리드 영역의 시작점(왼쪽)에 붙임 */
}

.main-nav {
    justify-self: center; /* 메뉴를 그리드 영역의 중앙에 위치시킴 */
}

.header-right-spacer {
    justify-self: end; /* 오른쪽 공간을 그리드 영역의 끝점(오른쪽)에 붙임 */
}
/* ▲▲▲▲▲▲▲▲▲▲ 코드 끝 ▲▲▲▲▲▲▲▲▲▲ */


.logo a {
    display: flex;
    align-items: center;
}
.logo img {
    height: 50px;
}

.header .main-nav .main-menu-list {
    display: flex;
    align-items: center;
    gap: 40px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.header .main-nav .main-menu-list .menu-item a {
    font-weight: 700;
    color: var(--text-color);
    transition: color 0.3s;
    font-size: 1.2rem;
}
.header .main-nav .main-menu-list .menu-item a:hover {
    color: var(--primary-color);
}
.main-nav .menu-item a.btn-primary-sm {
    background-color: var(--primary-color);
    color: var(--white-color) !important;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
}
.main-nav .menu-item a.btn-primary-sm:hover {
    background-color: #000000;
}

.header-right-spacer {
    justify-self: end;
}

.mobile-nav-toggle, .mobile-nav {
    display: none;
}


/* ==================== 히어로 섹션 ==================== */
.hero {
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    color: var(--white-color);
    position: relative;
    overflow: hidden;
}

.hero .container {
    max-width: none; /* 너비 제한 해제 */
    position: absolute !important;
    top: 65%;
    transform: translateY(-50%);
    padding-left: 150px;
    z-index: 1;
    margin: 0;
}

.hero-content {
    text-align: left;
    max-width: 600px;
}

/* ▼▼▼▼▼▼▼▼▼▼ 이 부분을 아래 코드로 교체합니다 ▼▼▼▼▼▼▼▼▼▼ */
.hero-video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
}

/* 선택자를 더 명확하게 수정하고, 이전 코드와 통합합니다. */
.hero-video-wrapper iframe {
    /* 화면 중앙 정렬 */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    /* 16:9 비율을 유지하며 화면을 꽉 채우는 핵심 코드 */
    width: 100vw;
    height: 56.25vw; /* height = width * 9 / 16 */
    min-width: 177.77vh; /* width = height * 16 / 9 */
    min-height: 100vh;
}
/* ▲▲▲▲▲▲▲▲▲▲ 여기까지 교체 ▲▲▲▲▲▲▲▲▲▲ */


.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.1), rgba(0,0,0,0.4));
    z-index: -1;
}

.hero-content h1 {
font-size: 46px;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 10px;
    font-weight: 500;
    letter-spacing: -5.5px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.hero-content p {
font-size: 24px;
    color: #fff;
    line-height: 1.5;
    margin-bottom: 25px;
    letter-spacing: -1px;
    text-shadow: 0 1px 5px rgba(0,0,0,0.3);
}

.hero .btn-primary {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.8);
    color: var(--white-color);
    font-weight: 500;
    padding: 12px 24px;
}
.hero .btn-primary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--white-color);
}


/* ==================== 소개 섹션 ==================== */
.intro .section-content {
    display: flex;
    align-items: center;
    gap: 80px;
}
.intro .text-content, .intro .image-content {
    flex: 1;
}
.intro h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 700;
}
.intro p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: var(--text-light-color);
}
.intro .image-content img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

/* ==================== 카드 그리드 (공용) ==================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.card {
    background-color: var(--white-color);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

/* 기도/법회 안내 카드 */
.program .card {
    text-align: center;
}
.program .card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}
.program .card p {
    color: var(--text-light-color);
    margin-bottom: 20px;
}
.program .card span {
    font-weight: 700;
}

/* 소식 카드 */
.news-card {
    padding: 0;
    overflow: hidden;
}
.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.news-content {
    padding: 25px;
}
.news-content h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}
.news-content p {
    font-size: 0.95rem;
    color: var(--text-light-color);
    margin-bottom: 15px;
}
.news-content .date {
    font-size: 0.8rem;
    color: var(--secondary-color);
    font-weight: 500;
}

/* ==================== 푸터 ==================== */
.footer {
    background-color: #2c2c2c;
    color: #a0a0a0;
    text-align: center;
    padding: 50px 0;
    font-size: 0.9rem;
}
.footer p {
    margin-bottom: 8px;
}
.footer .copyright {
    margin-top: 25px;
    color: #777;
    font-size: 0.8rem;
}

/* ==================== 반응형 (모바일) ==================== */
@media (max-width: 991px) {
    .header .container {
        grid-template-columns: auto 1fr auto; /* 모바일 그리드 변경 */
    }
    .header .main-nav, .header .header-right-spacer {
        display: none;
    }
    .mobile-nav-toggle {
        display: block;
        justify-self: end;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 1001;
    }
    .mobile-nav-toggle .bar {
        display: block;
        width: 25px;
        height: 3px;
        background-color: var(--text-color);
        margin: 5px 0;
        transition: all 0.3s ease-in-out;
    }

    .mobile-nav.active {
        display: block;
    }

    .mobile-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--white-color);
        padding-top: 100px;
        text-align: center;
        z-index: 999;
    }

    .mobile-nav .mobile-menu-list .menu-item {
        margin-bottom: 30px;
    }

    .mobile-nav .mobile-menu-list .menu-item a {
        font-size: 1.5rem;
        font-weight: 500;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    .section {
        padding: 80px 0;
    }
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 40px;
    }

    .hero {
        height: 80vh;
        min-height: 500px;
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .hero-content p {
        font-size: 1.1rem;
    }

    .intro .section-content {
        flex-direction: column;
        gap: 40px;
    }
    .intro .text-content {
        text-align: center;
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}


/* --- 행사소식 목록 (아카이브) 페이지 스타일 --- */

/* 페이지 전체 레이아웃 */
/* 페이지 전체 레이아웃 */
.archive .site-main {
    max-width: 800px;
    margin: 0 auto;
    padding: 10rem 2rem;
}

/* "행사/소식" 제목 헤더 */
.archive-header {
    margin-bottom: 3rem;
    padding: 0;
    border: 0;
}

/* "행사/소식" 제목 (h1.archive-title) 스타일 */
h1.archive-title {
    display: block;
    font-size: 26px;
    color: #000;
    font-weight: 600;
    text-align: center;
    border: 0;
    padding: 0;
    margin: 0;
}

/* 게시글 목록 컨테이너 */
.posts-list {
    border-top: 2px solid #333; /* 목록 상단에 진한 구분선 추가 */
}

/* 개별 글 아이템 (카드 형태) */
.post-item {
    display: flex; /* 내부 요소 정렬을 위해 flex 사용 */
    justify-content: space-between; /* 양쪽 끝으로 정렬 */
    align-items: center; /* 수직 중앙 정렬 */
    padding: 1.5rem 1rem; /* 카드 내부 여백 */
    border-bottom: 1px solid #eee; /* 카드 하단 구분선 */
    transition: background-color 0.3s ease;
}

.post-item:hover {
    background-color: #f9f9f9; /* 마우스 올리면 배경색 변경 */
}

/* 글 제목 */
.post-item .entry-title {
    margin: 0;
    font-size: 1.1rem; /* 폰트 크기 조정 */
    font-weight: 500; /* 폰트 두께 조정 */
}

.post-item .entry-title a {
    text-decoration: none;
    color: #333;
}

/* 글 작성일 */
.post-item .entry-meta {
    margin: 0;
    font-size: 0.9rem;
    color: #888;
    white-space: nowrap; /* 날짜가 줄바꿈되지 않도록 */
    margin-left: 1.5rem; /* 제목과 날짜 사이 간격 */
}


/* --- 페이지네이션 (페이지 번호) 스타일 --- */
.pagination {
    margin-top: 4rem;
    text-align: center;
}

.pagination .nav-links {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination .page-numbers {
    display: block;
    padding: 0.5em 1em;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #555;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.pagination .page-numbers:hover {
    background-color: #f5f5f5;
    color: #333;
}

/* 현재 페이지 번호 스타일 */
.pagination .page-numbers.current {
    background-color: #333;
    color: #fff;
    border-color: #333;
    font-weight: bold;
}


/* --- 불교 공부방 (그리드) 페이지 스타일 --- */

/* 불교 공부방 그리드 컨테이너 */
.study-room-grid {
    display: grid;
    /* 카드의 최소 너비는 280px, 공간이 남으면 1fr씩 나눠가짐 */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem; /* 카드 사이의 간격 */
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* 개별 카드 아이템 */
.study-card {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.study-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* 카드 썸네일 (대표 이미지) */
.study-card-thumbnail {
    display: block;
    line-height: 0; /* 이미지 아래 불필요한 공백 제거 */
}

.study-card-thumbnail img {
    width: 100%;
    height: 180px; /* 모든 이미지의 높이를 고정 */
    object-fit: cover; /* 이미지가 잘리더라도 비율을 유지하며 꽉 채움 */
}

/* 카드 콘텐츠 영역 (제목, 날짜) */
.study-card-content {
    padding: 1.2rem 1.5rem;
}

.study-card .entry-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.5;
}

.study-card .entry-title a {
    text-decoration: none;
    color: #333;
}

.study-card .entry-meta {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #888;
}