:root {
    --primary-color: #0056b3;
    /* Blue from the church sign */
    --primary-dark: #003d82;
    --accent-color: #f0ad4e;
    --text-color: #333;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --max-width: 1200px;
    --header-height: 70px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    word-break: keep-all;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

/* Header */
.header {
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-list {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-weight: 700;
    color: var(--text-color);
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px 0;
    transition: var(--transition);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: var(--white);
    min-width: 150px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-link {
    display: block;
    padding: 10px 20px;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
    text-align: center;
}

.dropdown-link:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

/* Hero Section */
.hero-wrapper {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.hero-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/church_main_final.jpg');
    background-size: cover;
    background-position: center;
    z-index: -1;
    will-change: transform;
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

.hero {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

/* Remove old overlay since it's in hero-bg now */
.hero-overlay {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

/* Sections General */
.section {
    padding: 80px 0;
    background-color: var(--white);
    /* Ensure sections have background to cover fixed hero */
    position: relative;
    /* Ensure stacking context */
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.section-desc {
    color: var(--text-light);
    font-size: 1.1rem;
}

.bg-light {
    background-color: var(--bg-light);
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.about-card {
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.about-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.icon-box {
    font-size: 3rem;
    margin-bottom: 20px;
}

.about-card h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* Worship Section */
.worship-table-wrapper {
    overflow-x: auto;
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 20px;
}

.worship-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.worship-table th,
.worship-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.worship-table th {
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: 500;
}

.worship-table tr:last-child td {
    border-bottom: none;
}

.worship-table tr:hover {
    background-color: #f8f9fa;
}

/* Location Section */
.location-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.map-placeholder {
    height: 400px;
    background-color: #eee;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
}

.map-mockup {
    text-align: center;
}

.info-item {
    margin-bottom: 30px;
}

.info-item h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

/* Footer */
.footer {
    background-color: #222;
    color: #fff;
    padding: 40px 0;
    text-align: center;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.copyright {
    color: #888;
    font-size: 0.9rem;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* History Section */
.history-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 24px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn.active,
.tab-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

.history-content-wrapper {
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    min-height: 300px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

.history-list {
    list-style: none;
    position: relative;
    padding-left: 30px;
}

.history-list::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: #eee;
}

.history-list li {
    position: relative;
    margin-bottom: 30px;
}

.history-list li::before {
    content: '';
    position: absolute;
    left: -34px;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid var(--white);
    box-shadow: 0 0 0 2px var(--primary-color);
}

.history-list .year {
    display: block;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.history-list .content {
    color: var(--text-color);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-break {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-break {
        display: block;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: clamp(0.8rem, 3.8vw, 1.1rem);
        white-space: nowrap;
    }

    .mobile-menu-btn {
        display: block;
        z-index: 1001;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--white);
        padding: 80px 20px;
        transition: var(--transition);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .nav.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 20px;
    }

    .location-content {
        grid-template-columns: 1fr;
    }

    .map-placeholder {
        height: 300px;
    }

    .worship-table {
        min-width: 100%;
        font-size: 0.9rem;
    }
    .worship-table th,
    .worship-table td {
        padding: 10px 5px;
        word-break: keep-all;
    }
}