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

:root {
    --primary-color: #1a3a52;
    --secondary-color: #c9a961;
    --accent-color: #8b7355;
    --text-dark: #2c2c2c;
    --text-light: #666666;
    --bg-light: #f8f6f3;
    --bg-white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =================================
   Typography
================================= */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Noto Serif KR', serif;
    font-weight: 700;
    line-height: 1.3;
    color: var(--primary-color);
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.125rem; }

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* =================================
   Header
================================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), #2a4a62);
    box-shadow: var(--shadow-md);
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
}

.logo h1 {
    font-size: 1.5rem;
    color: var(--bg-white);
    margin-bottom: 0.125rem;
}

.logo .subtitle {
    font-size: 0.75rem;
    color: var(--secondary-color);
    font-style: italic;
    letter-spacing: 0.05em;
}

/* Menu Toggle Button */
.menu-toggle {
    width: 32px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--bg-white);
    border-radius: 3px;
    transition: var(--transition);
    position: absolute;
}

.menu-toggle span:nth-child(1) { top: 0; }
.menu-toggle span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.menu-toggle span:nth-child(3) { bottom: 0; }

.menu-toggle.active span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* =================================
   Navigation Menu
================================= */
.nav-menu {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: var(--bg-white);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease-in-out;
    z-index: 999;
    overflow-y: auto;
}

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

.nav-menu ul {
    list-style: none;
    padding-top: 80px;
}

.nav-menu > ul > li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-menu a {
    display: flex;
    align-items: center;
    padding: 1.25rem 1.5rem;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
    background: linear-gradient(90deg, var(--bg-light), transparent);
    color: var(--primary-color);
}

.nav-menu a i {
    margin-right: 0.75rem;
    font-size: 1.125rem;
    color: var(--secondary-color);
}

/* Submenu */
.has-submenu {
    position: relative;
}

.submenu-toggle {
    justify-content: space-between;
}

.submenu-toggle .arrow {
    margin-left: auto;
    margin-right: 0;
    transition: transform 0.3s;
}

.has-submenu.active .arrow {
    transform: rotate(180deg);
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: var(--bg-light);
}

.has-submenu.active .submenu {
    max-height: 300px;
}

.submenu a {
    padding-left: 3rem;
    font-size: 0.9rem;
}

/* =================================
   Main Content
================================= */
.main-content {
    margin-top: 68px;
    min-height: calc(100vh - 68px);
}

.container {
    max-width: 100%;
    padding: 2rem 1.25rem;
    margin: 0 auto;
}

/* =================================
   Hero Section
================================= */
.hero {
    position: relative;
    height: 450px;
    overflow: hidden;
}

.hero-slider {
    height: 100%;
    position: relative;
}

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

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

.hero-text {
    position: absolute;
    bottom: 3rem;
    left: 1.5rem;
    right: 1.5rem;
    color: var(--bg-white);
    z-index: 10;
}

.hero-text h2 {
    font-size: 2rem;
    color: var(--bg-white);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease-out;
}

.hero-text p {
    font-size: 1.125rem;
    color: var(--bg-white);
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease-out 0.3s both;
}

/* =================================
   Welcome Section
================================= */
.welcome {
    background: var(--bg-white);
    text-align: center;
    padding: 3rem 0;
}

.welcome h2 {
    color: var(--primary-color);
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.welcome h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.church-info img {
    max-width: 200px;
    height: auto;
    margin: 2rem auto;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
}

/* =================================
   Worship Times Section
================================= */
.worship-times {
    background: linear-gradient(135deg, var(--bg-light), var(--bg-white));
    padding: 3rem 0;
}

.worship-grid {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
}

.worship-card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.worship-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

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

.worship-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-white);
    font-size: 1.5rem;
}

.worship-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.worship-card .time {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.worship-card .desc {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.btn-more {
    display: inline-block;
    padding: 0.625rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), #2a4a62);
    color: var(--bg-white);
    border-radius: 25px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
}

.btn-more:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

/* =================================
   Quick Links Section
================================= */
.quick-links {
    padding: 2rem 0;
    background: var(--bg-white);
}

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

.quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 0.5rem;
    background: var(--bg-light);
    border-radius: 12px;
    transition: var(--transition);
}

.quick-link:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--bg-white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.quick-link i {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
    transition: var(--transition);
}

.quick-link:hover i {
    color: var(--bg-white);
}

.quick-link span {
    font-size: 0.875rem;
    font-weight: 500;
}

/* =================================
   Footer
================================= */
.footer {
    background: linear-gradient(135deg, var(--primary-color), #1a2838);
    color: var(--bg-white);
    padding: 2.5rem 0 1rem;
}

.footer-content {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer h3 {
    color: var(--bg-white);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer .address {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.footer .address i {
    color: var(--secondary-color);
    margin-right: 0.5rem;
}

.footer .sub-address {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

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

.footer-contact i {
    color: var(--secondary-color);
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
}

.social-links {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--bg-white);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

.copyright {
    text-align: center;
    padding-top: 1rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* =================================
   Page Specific Styles
================================= */

/* Worship Pages */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), #2a4a62);
    padding: 2rem 1.25rem;
    color: var(--bg-white);
    text-align: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    color: var(--bg-white);
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--secondary-color);
    font-size: 1rem;
}

.sermon-list {
    padding: 1.5rem 0;
}

.sermon-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-left: 4px solid var(--secondary-color);
}

.sermon-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}

.sermon-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.sermon-meta i {
    color: var(--secondary-color);
}

.sermon-title {
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.sermon-scripture {
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 1rem;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    margin-top: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

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

/* Bulletin Page */
.bulletin-list {
    padding: 1.5rem 0;
}

.bulletin-item {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.bulletin-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.bulletin-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-white);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.bulletin-info {
    flex: 1;
}

.bulletin-date {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.bulletin-title {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.125rem;
}

.download-btn {
    padding: 0.5rem 1rem;
    background: var(--secondary-color);
    color: var(--bg-white);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Location Page */
.map-container {
    width: 100%;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}

.map-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.location-info {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow-md);
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.info-item i {
    font-size: 1.25rem;
    color: var(--secondary-color);
    width: 30px;
    text-align: center;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.info-item h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.info-item p {
    margin-bottom: 0;
}

.transport-options {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

.transport-card {
    background: var(--bg-light);
    border-radius: 10px;
    padding: 1.25rem;
    transition: var(--transition);
}

.transport-card h4 {
    color: var(--primary-color);
    font-size: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.transport-card h4 i {
    color: var(--secondary-color);
}

.transport-card p {
    font-size: 0.9rem;
    line-height: 1.6;
}

/* =================================
   Utility Classes
================================= */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* =================================
   Media Queries
================================= */
@media (min-width: 768px) {
    .container {
        max-width: 750px;
        padding: 3rem 2rem;
    }

    .worship-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .hero {
        height: 500px;
    }

    .hero-text h2 {
        font-size: 2.5rem;
    }
}