* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c5282;
    --secondary-color: #3182ce;
    --accent-color: #4299e1;
    --text-dark: #2d3748;
    --text-light: #718096;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.18);
    --transition: none;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    padding: 0.75rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    flex-direction: column;
    gap: 0;
    text-decoration: none;
    cursor: pointer;
    font-family: 'Pretendard', sans-serif;
    letter-spacing: -0.03em;
}

.logo:hover {
    color: var(--secondary-color);
}

.logo-sub {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0.3px;
    margin-top: -1px;
}

.nav {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.nav a {
    color: var(--text-dark);
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav a:hover,
.nav a.active {
    color: var(--secondary-color);
    background: rgba(49, 130, 206, 0.1);
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    transition: var(--transition);
    align-self: center;
}

.mobile-menu-toggle:hover {
    background: var(--bg-light);
}

.mobile-menu-toggle .hamburger {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--text-dark);
    border-radius: 1px;
    position: relative;
    transition: var(--transition);
    margin: 0 auto;
}

.mobile-menu-toggle .hamburger::before,
.mobile-menu-toggle .hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 24px;
    height: 2.5px;
    background: var(--text-dark);
    border-radius: 1px;
    transition: var(--transition);
}

.mobile-menu-toggle .hamburger::before {
    top: -8px;
}

.mobile-menu-toggle .hamburger::after {
    top: 8px;
}

.header .mobile-nav {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-white);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

.header .mobile-nav.active {
    display: block;
}

.header .mobile-nav a {
    display: block;
    color: var(--text-dark);
    text-decoration: none;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--bg-light);
    transition: var(--transition);
    font-weight: 500;
    text-align: center;
}

.header .mobile-nav a:last-child {
    border-bottom: none;
}

.header .mobile-nav a:hover {
    background: var(--bg-light);
    color: var(--secondary-color);
}

/* Main Content */
.main {
    margin-top: 60px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 120px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.hero.hero-ready {
    opacity: 1;
}

.hero-overlay {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 1;
}

/* 밝은 오버레이 옵션 */
.hero-overlay.hero-overlay-light,
.page-header-overlay.hero-overlay-light {
    background: rgba(255, 255, 255, 0.5);
}

/* 검정 글씨 옵션 */
.hero-content.text-dark,
.page-header .container.text-dark {
    color: #1a202c;
}

.hero-content.text-dark h1,
.hero-content.text-dark p,
.page-header .container.text-dark h1,
.page-header .container.text-dark p {
    color: #1a202c;
}

.hero::before {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 3;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.hero-content p {
    font-size: 1.3rem;
    font-weight: 400;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 80px 0 60px;
    text-align: center;
    margin-top: 60px;
    position: relative;
    overflow: hidden;
}

.page-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 1;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Sections */
.section {
    padding: 80px 0;
    background: var(--bg-light);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 700;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Cards */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.card {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    opacity: 0;
}

.card:hover {
    border-color: rgba(49, 130, 206, 0.3);
    background: #fafbfc;
}

.card-icon {
    display: none;
}

.card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* Schedule */
.schedule-item {
    padding: 2rem;
    margin-bottom: 1.5rem;
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.schedule-item:hover {
    border-color: rgba(49, 130, 206, 0.3);
    background: #fafbfc;
}

.schedule-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.schedule-header h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin: 0;
}

.schedule-time {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.95rem;
    background: rgba(49, 130, 206, 0.1);
    padding: 0.4rem 1rem;
    border-radius: 20px;
}

.schedule-desc {
    color: var(--text-light);
    margin: 0;
}

/* Ministry */
.ministry-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.ministry-item {
    padding: 1.5rem;
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.ministry-item:hover {
    border-color: rgba(49, 130, 206, 0.3);
    background: #fafbfc;
}

.ministry-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.ministry-header h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin: 0;
}

.ministry-target {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.85rem;
    background: rgba(49, 130, 206, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    white-space: nowrap;
}

.ministry-desc {
    color: var(--text-light);
    margin: 0 0 0.75rem 0;
    font-size: 0.95rem;
}

.ministry-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.ministry-info span {
    background: var(--bg-light);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
}

/* Contact */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.contact-item:hover {
    border-color: rgba(49, 130, 206, 0.3);
    background: #fafbfc;
}

.contact-icon {
    font-size: 2rem;
    color: var(--secondary-color);
    background: rgba(49, 130, 206, 0.1);
    padding: 1.2rem;
    border-radius: 12px;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-item h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.contact-item p {
    color: var(--text-light);
    font-weight: 500;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 3rem;
}

@media (max-width: 1200px) {
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    cursor: pointer;
    background: var(--bg-light);
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item:hover {
    border-color: rgba(49, 130, 206, 0.3);
}

.gallery-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
    padding: 1.5rem;
    opacity: 0;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Media (YouTube) */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.video-item {
    background: var(--bg-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.video-item:hover {
    border-color: rgba(49, 130, 206, 0.3);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-info {
    padding: 1.5rem;
}

.video-info h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.video-info p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.video-thumbnail-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-play-btn {
    position: absolute;
    width: 70px;
    height: 70px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    padding-left: 5px;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e3a5f 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.footer p {
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

/* Animations - simplified for performance */
.fade-in {
    opacity: 1;
}

.fade-in.visible,
.gallery-preview-item.fade-in,
.gallery-item.fade-in,
.video-item.fade-in {
    opacity: 1;
}

/* Smooth scrolling disabled for performance */

/* Mobile Optimizations */
@media (max-width: 768px) {
    .nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero {
        padding: 60px 0 50px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .contact-info {
        grid-template-columns: 1fr;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .card {
        padding: 1.5rem;
    }

    .contact-item {
        flex-direction: column;
        text-align: center;
    }
}

/* Gallery Preview (Home Page) */
.gallery-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 3rem;
}

.gallery-preview-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    cursor: pointer;
    background: var(--bg-light);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4/3;
}

.gallery-preview-item:hover {
    border-color: rgba(49, 130, 206, 0.3);
}

/* 9개만 표시 (3x3) */
.gallery-preview-item:nth-child(n+10) {
    display: none;
}

.gallery-preview-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.gallery-preview-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
    color: white;
    padding: 1.2rem;
    opacity: 0;
}

.gallery-preview-item:hover .gallery-preview-overlay {
    opacity: 1;
}

.gallery-preview-overlay h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.gallery-preview-overlay p {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Featured Video Section */
.featured-video {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

.featured-video-main {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.featured-video-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.video-list-item {
    display: flex;
    gap: 1rem;
    background: var(--bg-white);
    padding: 0.8rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-decoration: none;
    cursor: pointer;
}

.video-list-item:hover {
    background: #f8fafc;
}

.video-thumbnail {
    position: relative;
    width: 140px;
    min-width: 140px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-light);
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--secondary-color);
    padding-left: 3px;
    transition: var(--transition);
}

.video-list-item:hover .play-icon {
    background: var(--secondary-color);
    color: white;
}

.video-list-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.video-list-info h4 {
    color: var(--primary-color);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-list-info p {
    color: var(--text-light);
    font-size: 0.85rem;
}

/* Button More */
.btn-more {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(49, 130, 206, 0.3);
    transition: var(--transition);
}

.btn-more:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

/* Mobile Optimizations for new sections */
@media (max-width: 1024px) {
    .gallery-preview {
        grid-template-columns: repeat(3, 1fr);
    }

    .featured-video {
        grid-template-columns: 1fr;
    }

    .video-list-item {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .gallery-preview {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .gallery-preview-item {
        border-radius: 8px;
    }

    /* 모바일에서도 9개 표시 (3x3) */
    .gallery-preview-item:nth-child(n+10) {
        display: none;
    }

    .gallery-preview-overlay {
        padding: 0.8rem;
    }

    .gallery-preview-overlay h4 {
        font-size: 0.85rem;
    }

    .gallery-preview-overlay p {
        font-size: 0.75rem;
    }

    .featured-video {
        grid-template-columns: 1fr;
    }

    .featured-video-list {
        flex-direction: row;
        overflow-x: auto;
        gap: 0.8rem;
        padding-bottom: 1rem;
    }

    .video-list-item {
        flex-direction: column;
        min-width: 200px;
        padding: 0.8rem;
    }

    .video-thumbnail {
        width: 100%;
        height: 110px;
    }

    .video-list-info h4 {
        font-size: 0.9rem;
    }

    .btn-more {
        padding: 0.9rem 2rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .gallery-preview {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.3rem;
    }

    .gallery-preview-item {
        border-radius: 6px;
    }

    .gallery-preview-overlay {
        padding: 0.6rem;
    }

    .gallery-preview-overlay h4 {
        font-size: 0.75rem;
    }

    .gallery-preview-overlay p {
        font-size: 0.65rem;
    }

    .video-list-item {
        min-width: 180px;
    }
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    opacity: 0.8;
    transition: var(--transition);
    z-index: 10001;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 2rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    opacity: 0.8;
    transition: var(--transition);
    border-radius: 8px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: calc(85vh - 80px);
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    margin-top: 1.5rem;
    text-align: center;
    color: white;
}

.lightbox-caption h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.lightbox-caption p {
    font-size: 1rem;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .lightbox-prev,
    .lightbox-next {
        padding: 0.8rem 1rem;
        font-size: 1.5rem;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        top: 10px;
        right: 15px;
        font-size: 2.5rem;
    }
}
