/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #7c2d12;      /* Deep Buddhist Red/Brown */
    --primary-light: #9a3412;
    --gold-accent: #d97706;        /* Warm Temple Gold */
    --gold-light: #fef3c7;
    --nature-green: #2d4a3e;      /* Calm Mountain Forest Green */
    --bg-light: #fdfbf7;          /* Soft Off-White/Hanji tone */
    --card-bg: #ffffff;
    --text-dark: #27272a;
    --text-muted: #52525b;
    --text-light: #f4f4f5;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.7;
    word-break: keep-all;
}

h1, h2, h3, h4, .logo-text, .hero-title {
    font-family: 'Gowun Batang', 'Noto Serif KR', serif;
}

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

/* Header & Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(253, 251, 247, 0.92);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(217, 119, 6, 0.15);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.98);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--primary-color);
}

.logo-symbol {
    font-size: 1.5rem;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 700;
}

.logo-text .sub-text {
    font-size: 0.95rem;
    color: var(--gold-accent);
    margin-left: 4px;
    font-weight: 400;
}

.nav-menu {
    display: flex;
    gap: 28px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s ease;
    position: relative;
    padding: 4px 0;
}

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

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

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

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #2b1f1d 0%, #4a2c20 50%, #2a3c32 100%);
    color: var(--text-light);
    padding: 120px 20px 80px;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.6) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    animation: fadeIn 1.2s ease-out;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #fef3c7;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: 12px;
    margin-bottom: 24px;
    text-shadow: 0 4px 12px rgba(0,0,0,0.4);
    color: #ffffff;
}

.hero-desc {
    font-size: 1.25rem;
    color: #e4e4e7;
    margin-bottom: 36px;
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--gold-accent);
    color: #ffffff;
    border: 2px solid var(--gold-accent);
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.4);
}

.btn-primary:hover {
    background-color: #b45309;
    border-color: #b45309;
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid rgba(255,255,255,0.7);
}

.btn-outline:hover {
    background-color: rgba(255,255,255,0.15);
    border-color: #ffffff;
    transform: translateY(-2px);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
}

.mouse {
    width: 24px;
    height: 40px;
    border: 2px solid rgba(255,255,255,0.7);
    border-radius: 12px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background-color: var(--gold-accent);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 1.5s infinite;
}

@keyframes scroll {
    0% { opacity: 1; top: 6px; }
    100% { opacity: 0; top: 22px; }
}

/* Info Strip */
.info-strip {
    background-color: var(--primary-color);
    color: white;
    padding: 30px 0;
    margin-top: -30px;
    position: relative;
    z-index: 10;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.strip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.strip-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px;
}

.strip-icon {
    font-size: 2rem;
    color: var(--gold-accent);
}

.strip-text h4 {
    font-size: 1.1rem;
    margin-bottom: 4px;
    color: #fef3c7;
}

.strip-text p {
    font-size: 0.95rem;
    color: #f4f4f5;
}

/* Section Common */
.section {
    padding: 100px 0;
}

.section-title {
    margin-bottom: 50px;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--gold-light);
    color: var(--gold-accent);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.badge-light {
    background-color: rgba(255,255,255,0.2);
    color: #ffffff;
}

.section-title h2 {
    font-size: 2.4rem;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.section-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.title-line {
    width: 60px;
    height: 3px;
    background-color: var(--gold-accent);
    margin: 16px auto 0;
    border-radius: 2px;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-img-box {
    display: flex;
    justify-content: center;
}

.main-img-card {
    width: 100%;
    max-width: 500px;
    height: 360px;
    background: linear-gradient(135deg, #4a2c20 0%, #2d4a3e 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.main-img-card.photo-card {
    background: none;
    border: 4px solid #ffffff;
}

.about-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: calc(var(--radius-lg) - 4px);
    transition: transform 0.5s ease;
}

.main-img-card:hover .about-photo {
    transform: scale(1.03);
}

.main-img-card::before {
    content: '';
    position: absolute;
    inset: 12px;
    border: 1px dashed rgba(217, 119, 6, 0.4);
    border-radius: 16px;
}

.temple-illustration {
    text-align: center;
    color: var(--gold-light);
}

.roof-shape {
    width: 120px;
    height: 4px;
    background: var(--gold-accent);
    margin: 0 auto 16px;
    border-radius: 2px;
    box-shadow: 0 0 15px var(--gold-accent);
}

.temple-icon {
    font-size: 6rem;
    color: #fef3c7;
}

.about-heading {
    font-size: 1.6rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1.4;
}

.about-text {
    color: var(--text-muted);
    margin-bottom: 16px;
    font-size: 1.05rem;
}

.about-features {
    list-style: none;
    margin-top: 24px;
}

.about-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.about-features i {
    color: var(--gold-accent);
}

/* Scenery Section */
.scenery-section {
    background-color: #f4efe6;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.gallery-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.gallery-icon-wrap,
.gallery-img-wrap {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3.5rem;
    overflow: hidden;
}

.gallery-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-card:hover .gallery-photo {
    transform: scale(1.06);
}

.bg-1 { background: linear-gradient(135deg, #7c2d12 0%, #9a3412 100%); }
.bg-2 { background: linear-gradient(135deg, #2d4a3e 0%, #1e3a2b 100%); }
.bg-3 { background: linear-gradient(135deg, #d97706 0%, #b45309 100%); }
.bg-4 { background: linear-gradient(135deg, #451a03 0%, #78350f 100%); }

.gallery-info {
    padding: 24px;
}

.gallery-info h3 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.gallery-info p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Program Section */
.program-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.program-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 36px 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    transition: all 0.3s ease;
}

.program-card:hover {
    border-color: var(--gold-accent);
    box-shadow: var(--shadow-md);
}

.card-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: var(--gold-accent);
    color: white;
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.program-icon {
    font-size: 2rem;
    color: var(--primary-color);
}

.card-header h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
}

.card-desc {
    color: var(--text-muted);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.program-list {
    list-style: none;
    border-top: 1px solid #f4f4f5;
    padding-top: 16px;
}

.program-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dark);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.program-list i {
    color: var(--gold-accent);
}

/* Worship Section */
.worship-section {
    background-color: var(--nature-green);
    color: white;
}

.worship-box {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
    align-items: center;
}

.worship-left h2 {
    font-size: 2.2rem;
    color: #ffffff;
    margin-bottom: 16px;
}

.worship-left p {
    color: #e4e4e7;
    margin-bottom: 30px;
    font-size: 1.05rem;
}

.call-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--gold-accent);
    color: white;
    padding: 14px 28px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.call-btn:hover {
    background-color: #b45309;
}

.worship-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.schedule-item {
    background-color: rgba(255,255,255,0.08);
    padding: 20px 24px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 20px;
    border-left: 4px solid var(--gold-accent);
}

.time-badge {
    background-color: rgba(255,255,255,0.15);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.time-badge.highlight {
    background-color: var(--gold-accent);
    color: white;
}

.schedule-info h4 {
    font-size: 1.15rem;
    color: #ffffff;
    margin-bottom: 2px;
}

.schedule-info p {
    font-size: 0.9rem;
    color: #d4d4d8;
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.info-card-box {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.info-row {
    display: flex;
    gap: 20px;
    background: var(--card-bg);
    padding: 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.icon-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--gold-light);
    color: var(--gold-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.info-detail h3 {
    font-size: 1.15rem;
    color: var(--primary-color);
    margin-bottom: 6px;
}

.address-text, .phone-number {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.copy-btn, .tel-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.copy-btn {
    border: 1px solid #d4d4d8;
    background: #ffffff;
    color: var(--text-dark);
}

.copy-btn:hover {
    background: #f4f4f5;
    border-color: #a1a1aa;
}

.tel-link {
    background-color: var(--primary-color);
    color: white;
}

.tel-link:hover {
    background-color: var(--primary-light);
}

.map-placeholder-box {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    border-radius: var(--radius-md);
    padding: 40px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 2px dashed #9ca3af;
}

.map-pin-icon {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.map-inner h3 {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.map-addr {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.map-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.map-btn {
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
}

.map-btn.naver {
    background-color: #03c75a;
}

.map-btn.kakao {
    background-color: #fee500;
    color: #191919;
}

/* Footer */
.footer {
    background-color: #18181b;
    color: #a1a1aa;
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid #27272a;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.footer-logo-text {
    font-size: 1.25rem;
    color: #ffffff;
    font-weight: 700;
    font-family: 'Gowun Batang', serif;
}

.footer-info {
    font-size: 0.9rem;
    line-height: 1.8;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: rgba(39, 39, 42, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 0.9rem;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
    z-index: 2000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Modal Popup Styles */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #ffffff;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlideUp 0.3s ease-out;
}

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

.modal-header {
    background-color: var(--primary-color);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Pretendard', sans-serif;
    color: #fef3c7;
}

.modal-close-icon {
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.modal-close-icon:hover {
    opacity: 1;
}

.modal-body.popup-text-body {
    padding: 20px;
    background-color: #fdfbf7;
    text-align: left;
}

.notice-card-paper {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-sm);
    padding: 24px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.notice-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 20px;
    font-family: 'Gowun Batang', 'Noto Serif KR', serif;
    font-weight: 700;
    border-bottom: 2px solid var(--gold-accent);
    padding-bottom: 12px;
}

.notice-intro, .notice-desc {
    font-size: 0.98rem;
    line-height: 1.7;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.notice-table-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 24px 0;
}

@media (max-width: 520px) {
    .notice-table-grid {
        grid-template-columns: 1fr;
    }
}

.table-box {
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 16px;
    background-color: #fafaf9;
}

.box-title {
    font-size: 1.1rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 12px;
    font-weight: 700;
}

.box-list {
    list-style: none;
    font-size: 0.9rem;
}

.box-list li {
    margin-bottom: 8px;
    color: #3f3f46;
    line-height: 1.5;
}

.box-list li strong {
    color: var(--text-dark);
}

.sub-date {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.notice-contact-info {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px dashed #d4d4d8;
    text-align: center;
    font-size: 0.95rem;
}

.notice-contact-info .addr {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.notice-contact-info .tel {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.notice-contact-info .bank {
    font-weight: 600;
    color: #1e3a8a;
    margin-bottom: 12px;
    background-color: #eff6ff;
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
}

.notice-contact-info .abbot {
    font-family: 'Gowun Batang', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    text-align: right;
    margin-top: 12px;
}

.modal-footer {
    padding: 14px 20px;
    background-color: #ffffff;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.dont-show-today {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}

.dont-show-today input {
    accent-color: var(--gold-accent);
    cursor: pointer;
}

.modal-btn-close {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.modal-btn-close:hover {
    background-color: var(--primary-light);
}

/* Responsive Media Queries */
@media (max-width: 992px) {
    .about-grid, .worship-box, .contact-grid {
        grid-template-columns: 1fr;
    }
    .hero-title {
        font-size: 3rem;
        letter-spacing: 6px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-md);
        clip-path: circle(0% at 100% 0);
        transition: clip-path 0.4s ease-in-out;
    }

    .nav-menu.active {
        clip-path: circle(140% at 100% 0);
    }

    .mobile-toggle {
        display: block;
    }

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

    .section {
        padding: 60px 0;
    }

    .schedule-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
