/* 기본 리셋 및 변수 설정 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4A5835;
    --secondary-color: #6B7C4D;
    --dark-olive: #212011;
    --light-beige: #F5F5E8;
    --white: #FFFFFF;
    --text-dark: #333333;
    --text-light: #666666;
    --shadow: rgba(74, 88, 53, 0.1);
}

body {
    font-family: 'Noto Serif KR', serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

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

/* 네비게이션 바 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px var(--shadow);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 2px;
}

.nav-logo {
    height: 35px;
    width: auto;
    object-fit: contain;
    max-width: 35px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 400;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-menu a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 3px 0;
    transition: 0.3s;
}

/* 히어로 섹션 */
.hero {
    height: 100vh;
    background: linear-gradient(135deg, #4A5835 0%, #6B7C4D 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.05" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    animation: wave 10s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
}

.hero-content {
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 10px;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    opacity: 0.95;
}

.hero-description {
    font-size: 1.1rem;
    opacity: 0.9;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--secondary-color);
}

/* 절 소개 섹션 */
.about {
    background: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.about-text p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--text-light);
}

.about-image, .greeting-image {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow);
}

.image-placeholder {
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.image-placeholder p:last-child {
    font-size: 1rem;
    margin-top: 1rem;
    color: var(--text-light);
}

/* 주지스님 인사말 섹션 */
.greeting {
    background: var(--light-beige);
}

.greeting-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.greeting-text h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.greeting-message {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--dark-olive);
}

.greeting-text p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--text-light);
}

.greeting-signature {
    margin-top: 2rem;
    text-align: right;
    font-style: italic;
    color: var(--primary-color);
}

/* 법회 안내 섹션 */
.programs {
    background: var(--white);
}

.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.program-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px var(--shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.program-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(74, 88, 53, 0.2);
}

.program-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.program-card h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.program-time {
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.program-desc {
    color: var(--text-light);
    line-height: 1.6;
}

/* 갤러리 섹션 */
.gallery {
    background: var(--light-beige);
}

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

.gallery-item {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px var(--shadow);
    transition: transform 0.3s ease;
    cursor: pointer;
}

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

.gallery-item .image-placeholder {
    height: 350px;
}

/* 오시는 길 섹션 */
.location {
    background: var(--white);
}

.location-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.location-info h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    margin-top: 1.5rem;
}

.location-info h3:first-child {
    margin-top: 0;
}

.location-info p {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.location-info ul {
    list-style: none;
    padding-left: 0;
}

.location-info ul li {
    color: var(--text-light);
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.location-info ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
}

.location-map {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px var(--shadow);
    height: 400px;
    line-height: 0;
    padding: 0;
    margin: 0;
}

#map {
    display: block;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

/* 푸터 */
.footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    width: 40px;
    height: auto;
    margin-bottom: 1rem;
    object-fit: contain;
    max-height: 40px;
}

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #D4C5A0;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        gap: 0;
    }

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

    .nav-menu li {
        margin: 1rem 0;
    }

    .nav-brand {
        font-size: 1.3rem;
    }

    .nav-logo {
        height: 30px;
        max-width: 30px;
    }

    .hero-title {
        font-size: 2.5rem;
        letter-spacing: 5px;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .about-content,
    .greeting-content,
    .location-content {
        grid-template-columns: 1fr;
    }

    .greeting-content {
        grid-template-columns: 1fr;
    }

    .greeting-image {
        order: -1;
    }

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

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

    .section-title {
        font-size: 2rem;
    }

    section {
        padding: 3rem 0;
    }
}

@media (max-width: 480px) {
    .nav-brand {
        font-size: 1.1rem;
    }

    .nav-logo {
        height: 28px;
        max-width: 28px;
    }

    .footer-logo {
        width: 35px;
        max-height: 35px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .container {
        padding: 0 15px;
    }
}

/* 스크롤 애니메이션 */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 맨 위로 가기 버튼 */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--dark-olive);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(33, 32, 17, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: #353425;
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(33, 32, 17, 0.7);
}

.scroll-to-top:active {
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}

