/* 
 * MainPage Maker - HC Joyn Style
 * Based on joyn-main-page design with dynamic content support
 */

:root {
    /* Colors */
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #60a5fa;
    --secondary-color: #f59e0b;
    --secondary-dark: #d97706;
    
    --text-dark: #1f2937;
    --text-medium: #6b7280;
    --text-light: #9ca3af;
    --text-white: #ffffff;
    
    --bg-white: #ffffff;
    --bg-light: #f3f4f6;
    --bg-dark: #111827;
    
    --border-color: #e5e7eb;
    
    /* Spacing */
    --container-width: 1280px;
    --section-padding: 80px 0;
    
    /* Typography */
    --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
    --font-kr: 'Noto Sans KR', system-ui, sans-serif;
    
    /* Font Sizes - PWA 지원 */
    --font-size-base: 16px; /* 기본 폰트 크기 */
    --font-size-scale: 1; /* 폰트 크기 배율 (PWA에서 자동 조정) */
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Reset & Base Styles */
.mainpage-wrapper {
    width: 100%;
    min-height: 100vh;
    background: var(--bg-white);
    font-family: var(--font-primary);
    color: var(--text-dark);
    line-height: 1.6;
    font-size: calc(var(--font-size-base) * var(--font-size-scale));
    font-weight: 500; /* 기본 폰트 두께 증가 */
}

.mainpage-container {
    max-width: var(--container-width);
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 0;
    isolation: isolate;
}


.mainpage-section {
    padding: var(--section-padding);
    position: relative;
    z-index: 0;
    isolation: isolate;
}

/* 공지사항 섹션은 상단 패딩을 줄임 */
.mainpage-section.mainpage-notice {
    padding-top: 20px !important;
    padding-bottom: 40px !important;
}

.mainpage-section-alt {
    background-color: var(--bg-light);
}

/* 섹션 헤더 레이아웃 - 타이틀과 설명 세로 배치 */
.section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.section-header.center {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.mainpage-section-title {
    font-size: calc(2.25rem * var(--font-size-scale));
    font-family: var(--font-kr);
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    margin: 0 0 12px 0;
    line-height: 1.3;
    width: 100%;
}

.mainpage-section-description {
    font-size: calc(1.125rem * var(--font-size-scale));
    font-family: var(--font-kr);
    font-weight: 500;
    color: var(--text-medium);
    text-align: center;
    margin: 0 auto 32px auto;
    line-height: 1.6;
    max-width: 800px;
    padding: 0 20px;
}

.section-title {
    font-size: 2.25rem;
    font-family: var(--font-kr);
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    margin: 0 0 12px 0;
    line-height: 1.3;
    width: 100%;
}

.mainpage-section-desc {
    color: var(--text-medium);
    font-size: 1.125rem;
    text-align: center;
    margin-bottom: 50px;
    width: 100%;
    margin-top: 0;
}

.section-desc {
    color: var(--text-medium);
    font-size: 1.125rem;
    text-align: center;
    margin-bottom: 50px;
    width: 100%;
    margin-top: 0;
}

.mainpage-section-more {
    text-align: center;
    margin-top: 40px;
}

.mainpage-more-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.mainpage-more-link:hover {
    color: var(--primary-dark);
}

.mainpage-more-link::after {
    content: '→';
    transition: transform 0.3s ease;
}

.mainpage-more-link:hover::after {
    transform: translateX(4px);
}

/* ========================================
   Hero Section
   ======================================== */

.mainpage-hero {
	position: relative;
	width: 100%;
	min-height: 70vh;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
	padding: 100px 20px;
}

.mainpage-hero-content {
	text-align: center;
	max-width: 800px;
	margin: 0 auto;
}

.mainpage-hero-title {
	font-size: clamp(2.5rem, 5vw, 4rem);
	font-weight: 300;
	line-height: 1.2;
	color: #1a1a1a;
	margin: 0 0 24px 0;
	letter-spacing: -0.02em;
}

.mainpage-hero-subtitle-highlight {
	font-size: clamp(1.75rem, 4vw, 2.5rem);
	font-weight: 300;
	line-height: 1.5;
	color: #1a1a1a;
	margin: 0 0 8px 0;
	max-width: 800px;
	margin-left: auto;
	margin-right: auto;
	margin-bottom: 8px;
	white-space: normal;
}

.mainpage-hero-subtitle {
	font-size: clamp(1.125rem, 2vw, 1.5rem);
	font-weight: 400;
	line-height: 1.6;
	color: #666666;
	margin: 0 0 48px 0;
	max-width: 600px;
	margin-left: auto;
	margin-right: auto;
	margin-bottom: 48px;
	white-space: normal;
}

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

/* Buttons */
.mainpage-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 32px;
	font-size: 1rem;
	font-weight: 500;
	text-decoration: none;
	border-radius: 8px;
	transition: all 0.3s ease;
	border: 2px solid transparent;
	cursor: pointer;
	letter-spacing: 0.01em;
}

.mainpage-btn-primary {
	background: #1a1a1a;
	color: #ffffff;
	border-color: #1a1a1a;
}

.mainpage-btn-primary:hover {
	background: #333333;
	border-color: #333333;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mainpage-btn-secondary {
	background: #ffffff;
	color: #1a1a1a;
	border-color: #1a1a1a;
}

.mainpage-btn-secondary:hover {
	background: #f8f9fa;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mainpage-btn-outline {
	background: transparent;
	color: #1a1a1a;
	border-color: #d0d0d0;
}

.mainpage-btn-outline:hover {
	background: #f8f9fa;
	border-color: #1a1a1a;
	transform: translateY(-2px);
    color: #333333;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.mainpage-btn-lg {
    padding: 14px 32px;
    font-size: 1rem;
}

.mainpage-btn i {
    margin-right: 8px;
    font-size: 1em;
    color: #333333;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.mainpage-btn-outline i {
    color: #333333;
}

/* Hero 광고 영역 */
.mainpage-hero-ad {
    position: relative;
    height: 100%;
    min-height: 400px;
}

.hero-ad-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.hero-ad-card {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-ad-link:hover .hero-ad-card {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
}

.hero-ad-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.85) 0%, rgba(79, 70, 229, 0.85) 100%);
    z-index: 1;
}

.hero-ad-content {
    position: relative;
    z-index: 2;
    padding: 40px;
    text-align: center;
    color: white;
    width: 100%;
}

.hero-ad-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    color: white;
    opacity: 0.95;
}

.hero-ad-icon i {
    display: block;
    font-size: 5rem;
}

.hero-ad-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: white;
    line-height: 1.3;
}

.hero-ad-text {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
}

/* 반응형 */
@media (max-width: 1024px) {
    .mainpage-hero-layout {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }
    
    .mainpage-hero-title {
        font-size: 3rem !important;
    }
    
    .mainpage-hero-ad {
        min-height: 300px;
    }
    
    .hero-ad-card {
        min-height: 300px;
    }
    
    .hero-ad-content {
        padding: 30px;
    }
    
    .hero-ad-icon {
        font-size: 3rem;
        margin-bottom: 16px;
    }
    
    .hero-ad-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
	.mainpage-hero {
		min-height: 60vh;
		padding: 60px 20px;
	}

	.mainpage-hero-subtitle-highlight {
		font-size: clamp(1.5rem, 3vw, 2rem);
	}

	.mainpage-hero-buttons {
		flex-direction: column;
		width: 100%;
	}

	.mainpage-btn {
		width: 100%;
		max-width: 300px;
	}

	.mainpage-section {
		padding: 60px 20px;
	}

	.mainpage-worship-grid,
	.mainpage-sermon-grid,
	.mainpage-broadcast-grid,
	.mainpage-lecture-grid,
	.mainpage-contact-grid {
		grid-template-columns: 1fr;
		gap: 24px;
	}
	
	.mainpage-broadcast-videos {
		grid-template-columns: repeat(3, 1fr);
		gap: 16px;
	}
	
	.broadcast-play-button {
		width: 60px;
		height: 60px;
	}
	
	.broadcast-play-button svg {
		width: 24px;
		height: 24px;
	}
	
	.youtube-modal-content {
		width: 95%;
	}

	.mainpage-event-item {
		flex-direction: column;
		gap: 16px;
	}

	.mainpage-event-date {
		flex-direction: row;
		justify-content: flex-start;
		min-width: auto;
	}

	.mainpage-gallery-grid {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
		gap: 12px;
	}

	.mainpage-library-item {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
	}

	.mainpage-library-icon {
		width: 40px;
		height: 40px;
	}

	.mainpage-notice-link {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}

	.mainpage-notice-date {
		min-width: auto;
	}
    
    .mainpage-hero-ad {
        min-height: 250px;
    }
    
    .hero-ad-card {
        min-height: 250px;
    }
    
    .hero-ad-content {
        padding: 24px;
    }
    
    .hero-ad-icon {
        font-size: 3.5rem;
        margin-bottom: 12px;
    }
    
    .hero-ad-icon i {
        font-size: 3.5rem;
    }
    
    .hero-ad-title {
        font-size: 1.25rem;
        margin-bottom: 12px;
    }
    
    .hero-ad-text {
        font-size: 0.9375rem;
    }
}

/* ========================================
   Notice Section
   ======================================== */

/* 공지사항 단순 리스트 스타일 */
.mainpage-notice-simple-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 50px;
}

.notice-board-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notice-board-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.notice-item-simple {
    margin: 0;
    padding: 0;
}

.notice-link-simple {
    display: block;
    color: var(--text-medium);
    text-decoration: none;
    font-size: 0.9375rem;
    line-height: 1.6;
    padding: 4px 0;
    transition: color 0.2s ease;
}

.notice-link-simple::before {
    content: '•';
    margin-right: 8px;
    color: var(--text-light);
}

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

.mainpage-notice-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mainpage-notice-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s ease;
}

.mainpage-notice-item:first-child {
    border-top: 1px solid var(--border-color);
}

.mainpage-notice-item:hover {
    background: var(--bg-light);
}

.mainpage-notice-link {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: var(--text-dark);
    flex: 1;
}

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

.mainpage-notice-date {
    font-size: 0.875rem;
    color: var(--text-medium);
    min-width: 90px;
    flex-shrink: 0;
}

.mainpage-notice-title {
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 1.6;
    flex: 1;
}

/* ========================================
   HelpDesk Title
   ======================================== */

.mainpage-helpdesk-title {
    color: #3b82f6 !important;
    font-weight: 700;
}

/* ========================================
   HelpDesk Cards (3개 게시판 카드 형태)
   ======================================== */

.mainpage-helpdesk-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 30px;
}

.helpdesk-board-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.helpdesk-board-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.helpdesk-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

.helpdesk-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.helpdesk-card-title i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.helpdesk-card-title h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
}

.helpdesk-card-more {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.875rem;
    color: var(--text-medium);
    text-decoration: none;
    transition: all 0.3s ease;
}

.helpdesk-card-more:hover {
    color: var(--primary-color);
    gap: 8px;
}

.helpdesk-card-more i {
    font-size: 1rem;
}

.helpdesk-card-body {
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.helpdesk-card-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.helpdesk-card-item {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s ease;
}

.helpdesk-card-item:last-child {
    border-bottom: none;
}

.helpdesk-card-item:hover {
    background: #f8fafc;
}

.helpdesk-card-link {
    display: block;
    padding: 16px 24px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.2s ease;
}

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

.helpdesk-card-empty {
    padding: 40px 24px;
    text-align: center;
    color: var(--text-medium);
    font-size: 0.9375rem;
    margin: 0;
}

.helpdesk-pin-badge {
    color: var(--primary-color);
    font-size: 1rem;
    flex-shrink: 0;
}

.helpdesk-category-badge,
.helpdesk-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.helpdesk-category-badge.category-guide {
    background: #e0f2fe;
    color: #0369a1;
}

.helpdesk-category-badge.category-tip {
    background: #fef3c7;
    color: #92400e;
}

.helpdesk-category-badge.category-news {
    background: #fce7f3;
    color: #9f1239;
}

.helpdesk-category-badge.category-tutorial {
    background: #d1fae5;
    color: #065f46;
}

.helpdesk-status-badge.status-pending {
    background: #f3f4f6;
    color: #6b7280;
}

.helpdesk-status-badge.status-answered {
    background: #dbeafe;
    color: #1e40af;
}

.helpdesk-status-badge.status-solved {
    background: #d1fae5;
    color: #065f46;
}

.helpdesk-category-badge.category-guide {
    background: #e0f2fe;
    color: #0369a1;
}

.helpdesk-category-badge.category-tip {
    background: #fef3c7;
    color: #92400e;
}

.helpdesk-category-badge.category-news {
    background: #fce7f3;
    color: #9f1239;
}

.helpdesk-category-badge.category-tutorial {
    background: #d1fae5;
    color: #065f46;
}

.helpdesk-status-badge.status-pending {
    background: #f3f4f6;
    color: #6b7280;
}

.helpdesk-status-badge.status-answered {
    background: #dbeafe;
    color: #1e40af;
}

.helpdesk-status-badge.status-solved {
    background: #d1fae5;
    color: #065f46;
}

.helpdesk-item-title {
    flex: 1;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.6;
    min-width: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.helpdesk-item-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8125rem;
    color: var(--text-medium);
    flex-shrink: 0;
    margin-top: 4px;
    width: 100%;
}

.helpdesk-item-date {
    white-space: nowrap;
}

.helpdesk-item-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.helpdesk-item-views,
.helpdesk-item-likes {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.helpdesk-item-views i,
.helpdesk-item-likes i {
    font-size: 0.8125rem;
}

/* 모바일 반응형 */
@media (max-width: 1024px) {
    .mainpage-helpdesk-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    /* 공지사항 섹션 모바일 패딩 조정 */
    .mainpage-section.mainpage-notice {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    
    /* 공지사항 섹션 내부 컨테이너 패딩 제거 */
    .mainpage-section.mainpage-notice .mainpage-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .mainpage-helpdesk-cards {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-left: 0;
        margin-right: 0;
    }
    
    .helpdesk-board-card {
        margin-left: 0;
        margin-right: 0;
        border-radius: 12px;
    }
    
    .helpdesk-card-header {
        padding: 16px 18px;
    }
    
    .helpdesk-card-title h3 {
        font-size: 1.125rem;
    }
    
    .helpdesk-card-link {
        padding: 14px 18px;
    }
}

/* ========================================
   Broadcast Section
   ======================================== */

.mainpage-broadcast {
    background: linear-gradient(135deg, #fc5c23 0%, #e63946 50%, #fc5c23 100%);
    color: white;
    border-radius: 20px;
    padding: 40px;
    margin: 40px auto;
    max-width: var(--container-width);
    position: relative;
    overflow: hidden;
}

/* 장식적인 배경 요소 */
.mainpage-broadcast::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    filter: blur(60px);
    animation: float 20s ease-in-out infinite;
}

.mainpage-broadcast::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    filter: blur(50px);
    animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(30px, -30px) scale(1.1);
    }
}

/* 내부 컨테이너에 z-index 추가 */
.mainpage-broadcast .mainpage-container {
    position: relative;
    z-index: 1;
}

.mainpage-broadcast .mainpage-section-title {
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.mainpage-broadcast .mainpage-section-description {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.15);
}

.mainpage-broadcast .mainpage-more-link {
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
}

.mainpage-broadcast .mainpage-more-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
}

/* 유튜브 영상 그리드 - 3x2 동일 크기 */
.mainpage-broadcast-videos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.mainpage-broadcast-video-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #000;
    aspect-ratio: 16 / 9;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.mainpage-broadcast-video-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.2), 0 0 20px rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.broadcast-video-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 비율 */
    overflow: hidden;
    background: #000;
}

.broadcast-video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.mainpage-broadcast-video-item:hover .broadcast-video-thumbnail img {
    transform: scale(1.05);
}

.broadcast-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.mainpage-broadcast-video-item:hover .broadcast-video-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.broadcast-play-button {
    background: transparent;
    border: none;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.broadcast-play-button:hover {
    transform: scale(1.1);
}

.broadcast-play-button svg {
    width: 64px;
    height: 64px;
    fill: rgba(255, 255, 255, 0.9);
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
    transition: all 0.3s ease;
    margin-left: 4px; /* 재생 아이콘 중앙 정렬 */
}

.broadcast-play-button:hover svg {
    fill: rgba(255, 255, 255, 1);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.7));
}

/* 유튜브 팝업 모달 */
.mainpage-youtube-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.youtube-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.youtube-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    z-index: 1;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.youtube-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    color: white;
    transition: all 0.3s ease;
    padding: 0;
}

.youtube-modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: rotate(90deg);
}

.youtube-modal-iframe-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 비율 */
    height: 0;
    overflow: hidden;
}

.youtube-modal-iframe-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* 모바일에서 방송 섹션 패딩 조정 - 공지사항과 동일하게 통합됨 */

.mainpage-broadcast .section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.mainpage-broadcast .mainpage-section-title {
    color: white;
    width: 100%;
    margin-bottom: 12px;
}

.mainpage-broadcast .mainpage-section-desc {
    color: rgba(255, 255, 255, 0.8);
    width: 100%;
    margin-top: 0;
}

.broadcast-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    position: relative;
    z-index: 0;
    isolation: isolate;
}

.player-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    background-color: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    z-index: 1;
    isolation: isolate;
    contain: layout style paint;
}

.player-placeholder-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.player-placeholder-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.player-placeholder-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    z-index: 3;
    display: block;
    pointer-events: auto;
}

/* 방송 섹션 내부 요소들 */
.mainpage-broadcast * {
    pointer-events: auto;
}

/* player-wrapper 내부 링크만 클릭 가능하도록 - contain으로 격리 */
.player-wrapper {
    contain: layout style paint;
    position: relative;
}

.player-wrapper .player-placeholder-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
}

/* 다른 섹션들이 방송 섹션 링크에 가려지지 않도록 높은 z-index 부여 */

.mainpage-notice {
    position: relative;
    z-index: 100;
    padding-top: 20px !important;
    margin-top: 0 !important;
}

.mainpage-lecture {
    position: relative;
    z-index: 100;
}

.mainpage-library {
    position: relative;
    z-index: 100;
    background: white;
}

/* 자료실 카테고리 그리드 - 6개씩 2줄 */
.mainpage-library-categories {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.mainpage-library-category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: white;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: var(--shadow-sm);
    min-height: 140px;
}

.mainpage-library-category-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.library-category-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.mainpage-library-category-item:hover .library-category-icon {
    transform: scale(1.1);
    color: var(--primary-dark);
}

.library-category-name {
    font-size: 0.9375rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.4;
    word-break: keep-all;
}

.mainpage-community {
    position: relative;
    z-index: 100;
}

.mainpage-event {
    position: relative;
    z-index: 100;
}

.mainpage-gallery {
    position: relative;
    z-index: 100;
}

.mainpage-support {
    position: relative;
    z-index: 100;
}

.mainpage-contact {
    position: relative;
    z-index: 100;
}

.mainpage-app-download {
    position: relative;
    z-index: 100;
}

.mainpage-footer {
    position: relative;
    z-index: 1;
}

/* ========================================
   About Section
   ======================================== */

.mainpage-about {
    position: relative;
    z-index: 100;
    background: white;
    padding: 80px 0;
}

.mainpage-about-hero {
    text-align: center;
    margin-bottom: 80px;
}

.mainpage-about-main-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 24px 0;
    line-height: 1.3;
}

.mainpage-about-main-desc {
    font-size: 1.125rem;
    color: var(--text-medium);
    line-height: 1.7;
    margin: 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.mainpage-about-section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 40px 0;
    text-align: center;
}

/* 우리가 존재하는 이유 */
.mainpage-about-why {
    margin-bottom: 80px;
}

.mainpage-about-why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.mainpage-about-why-item {
    background: var(--bg-light);
    padding: 32px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.mainpage-about-why-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.mainpage-about-why-item-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 16px 0;
}

.mainpage-about-why-item-desc {
    font-size: 0.9375rem;
    color: var(--text-medium);
    line-height: 1.7;
    margin: 0;
}

/* 우리가 하는 일 */
.mainpage-about-what {
    margin-bottom: 80px;
    background: var(--bg-light);
    padding: 60px 40px;
    border-radius: 16px;
}

.mainpage-about-what-desc {
    font-size: 1.0625rem;
    color: var(--text-dark);
    line-height: 1.8;
    margin: 0 0 32px 0;
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.mainpage-about-what-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.mainpage-about-what-list li {
    font-size: 1rem;
    color: var(--text-dark);
    padding: 12px 0;
    padding-left: 24px;
    position: relative;
}

.mainpage-about-what-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 700;
}

/* 제작자에게 주는 기회 */
.mainpage-about-creator {
    margin-bottom: 80px;
}

.mainpage-about-creator-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.mainpage-about-creator-item {
    background: white;
    border: 2px solid var(--border-color);
    padding: 32px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.mainpage-about-creator-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.mainpage-about-creator-item-title {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 16px 0;
}

.mainpage-about-creator-item-desc {
    font-size: 0.9375rem;
    color: var(--text-medium);
    line-height: 1.7;
    margin: 0;
}

/* 함께해요 */
.mainpage-about-together {
    margin-bottom: 80px;
}

.mainpage-about-together-desc {
    font-size: 1.0625rem;
    color: var(--text-medium);
    text-align: center;
    margin: 0 0 40px 0;
    line-height: 1.7;
}

.mainpage-about-together-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.mainpage-about-together-item {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 40px 32px;
    border-radius: 12px;
    color: white;
    text-align: center;
    transition: all 0.3s ease;
}

.mainpage-about-together-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.mainpage-about-together-item-title {
    font-size: 1.375rem;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: white;
}

.mainpage-about-together-item-desc {
    font-size: 0.9375rem;
    line-height: 1.7;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
}

/* 투자와 후원 기회 */
.mainpage-about-support {
    background: var(--bg-light);
    padding: 60px 40px;
    border-radius: 16px;
}

.mainpage-about-support-desc {
    font-size: 1.0625rem;
    color: var(--text-medium);
    text-align: center;
    margin: 0 0 50px 0;
    line-height: 1.7;
}

.mainpage-about-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.mainpage-about-stat-item {
    text-align: center;
    background: white;
    padding: 32px 24px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.mainpage-about-stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 12px 0;
    line-height: 1;
}

.mainpage-about-stat-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 8px 0;
}

.mainpage-about-stat-desc {
    font-size: 0.875rem;
    color: var(--text-medium);
    margin: 0;
}

.mainpage-about-support-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 800px;
    margin: 0 auto;
}

.mainpage-about-support-type {
    text-align: center;
    background: white;
    padding: 32px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.mainpage-about-support-type-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 8px 0;
}

.mainpage-about-support-type-subtitle {
    font-size: 0.9375rem;
    color: var(--text-medium);
    margin: 0;
}

.mainpage-about-support-bank {
    grid-column: 1 / -1;
    text-align: center;
    background: white;
    padding: 32px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.mainpage-about-support-bank-info {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 12px 0;
}

.mainpage-about-support-phone {
    font-size: 1rem;
    color: var(--text-medium);
    margin: 0;
}

/* 반응형 디자인 */
@media (max-width: 1024px) {
    .mainpage-about-why-grid,
    .mainpage-about-creator-grid,
    .mainpage-about-together-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mainpage-about-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mainpage-about {
        padding: 60px 0;
    }
    
    .mainpage-about-hero {
        margin-bottom: 60px;
    }
    
    .mainpage-about-main-title {
        font-size: 2rem;
    }
    
    .mainpage-about-main-desc {
        font-size: 1rem;
    }
    
    .mainpage-about-section-title {
        font-size: 1.75rem;
        margin-bottom: 30px;
    }
    
    .mainpage-about-why,
    .mainpage-about-what,
    .mainpage-about-creator,
    .mainpage-about-together {
        margin-bottom: 60px;
    }
    
    .mainpage-about-why-grid,
    .mainpage-about-creator-grid,
    .mainpage-about-together-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .mainpage-about-what {
        padding: 40px 24px;
    }
    
    .mainpage-about-what-list {
        grid-template-columns: 1fr;
    }
    
    .mainpage-about-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .mainpage-about-support-info {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .mainpage-about-support-bank {
        grid-column: 1;
    }
}

@media (max-width: 480px) {
    .mainpage-about-main-title {
        font-size: 1.75rem;
    }
    
    .mainpage-about-section-title {
        font-size: 1.5rem;
    }
    
    .mainpage-about-stats {
        grid-template-columns: 1fr;
    }
    
    .mainpage-about-stat-value {
        font-size: 2rem;
    }
}

.player-placeholder-link:hover ~ .player-placeholder-image img,
.player-wrapper:hover .player-placeholder-image img {
    transform: scale(1.05);
}

.player-placeholder-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    z-index: 2;
    pointer-events: none;
}

.player-placeholder-link .player-placeholder-overlay {
    pointer-events: auto;
}

.player-placeholder-link:hover .player-placeholder-overlay {
    background: rgba(0, 0, 0, 0.6);
}

.play-button {
    font-size: 5rem;
    color: white;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.player-placeholder-link:hover .play-button {
    transform: scale(1.1);
}

.player-placeholder-text {
    text-align: center;
    color: white;
}

.player-placeholder-text h3 {
    font-size: 1.5rem;
    margin: 0 0 8px 0;
    font-weight: 600;
}

.player-placeholder-text p {
    font-size: 1rem;
    margin: 0;
    opacity: 0.9;
}

.broadcast-schedule {
    border-left: 1px solid rgba(255,255,255,0.1);
    padding-left: 40px;
    position: relative;
    z-index: 1;
}

.schedule-title {
    margin-bottom: 20px;
    font-size: 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
}

.schedule-list {
    margin-bottom: 30px;
    list-style: none;
    padding: 0;
}

.schedule-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 18px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.schedule-item:last-child {
    border-bottom: none;
}

.schedule-time-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 100px;
    flex-shrink: 0;
}

.schedule-time-info .date {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 4px;
}

.schedule-time-info .time {
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    font-size: 0.9375rem;
}

.schedule-time-info .time-separator {
    color: rgba(255,255,255,0.5);
    margin: 0 4px;
    font-size: 0.875rem;
}

.schedule-time-info .time.end {
    color: rgba(255,255,255,0.7);
    font-weight: 400;
}

.program-info {
    flex: 1;
}

.program-title {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: white;
    font-size: 1rem;
    line-height: 1.4;
}

.program-description {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.5;
    margin: 0;
}

.schedule-empty {
    padding: 40px 20px;
    text-align: center;
    color: rgba(255,255,255,0.6);
}

.schedule-empty p {
    margin: 0 0 8px 0;
    font-size: 1rem;
}

.schedule-empty-desc {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.5);
}

.badge.live {
    background-color: #ef4444;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.mainpage-broadcast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.mainpage-broadcast-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.mainpage-broadcast-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.mainpage-broadcast-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f0f0f0;
}

.mainpage-broadcast-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.mainpage-broadcast-item:hover .mainpage-broadcast-thumbnail img {
    transform: scale(1.05);
}

.mainpage-broadcast-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: all 0.3s ease;
}

.mainpage-broadcast-play-icon i {
    font-size: 2.5rem;
}

.mainpage-broadcast-item:hover .mainpage-broadcast-play-icon {
    background: rgba(0, 0, 0, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

.mainpage-broadcast-content {
    padding: 20px;
}

.mainpage-broadcast-title {
    font-size: 1.125rem;
    font-weight: 500;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.mainpage-broadcast-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.mainpage-broadcast-title a:hover {
    color: var(--primary-color);
}

.mainpage-broadcast-meta {
    display: flex;
    gap: 12px;
    font-size: 0.875rem;
    color: var(--text-medium);
}

/* ========================================
   Lecture/Education Section
   ======================================== */

.mainpage-lecture-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.mainpage-lecture-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.mainpage-lecture-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.mainpage-lecture-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #e5e7eb;
    position: relative;
}

.mainpage-lecture-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.mainpage-lecture-item:hover .mainpage-lecture-thumbnail img {
    transform: scale(1.05);
}

.course-thumb .badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.mainpage-lecture-content {
    padding: 24px;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-medium);
    margin-bottom: 10px;
}

.rating {
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 4px;
}

.mainpage-lecture-title {
    font-size: 1.125rem;
    font-weight: 500;
    margin: 0 0 16px 0;
    color: var(--text-dark);
    line-height: 1.4;
}

.mainpage-lecture-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.mainpage-lecture-title a:hover {
    color: var(--primary-color);
}

.mainpage-lecture-meta {
    display: flex;
    gap: 12px;
    font-size: 0.875rem;
    color: var(--text-medium);
    margin-bottom: 12px;
}

.mainpage-lecture-excerpt {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-medium);
    margin: 0;
}

/* 강의 섹션 CTA 박스 */
.mainpage-lecture-cta {
    margin-top: 60px;
    background: linear-gradient(135deg, #4a90e2 0%, #2d55b0 100%);
    border-radius: 15px;
    padding: 40px 50px;
    box-shadow: 0 4px 15px rgba(45, 85, 176, 0.2);
}

.mainpage-lecture-cta-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.mainpage-lecture-cta-text {
    flex: 1;
}

.mainpage-lecture-cta-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.mainpage-lecture-cta-description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    line-height: 1.6;
}

.mainpage-lecture-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    background: white;
    color: #2d55b0;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mainpage-lecture-cta-button:hover {
    background: #f8f9fa;
    color: #1e3f8f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 모바일 반응형 */
@media screen and (max-width: 768px) {
    .mainpage-lecture-cta {
        padding: 30px 24px;
        margin-top: 40px;
    }
    
    .mainpage-lecture-cta-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }
    
    .mainpage-lecture-cta-title {
        font-size: 1.5rem;
    }
    
    .mainpage-lecture-cta-description {
        font-size: 0.9375rem;
    }
    
    .mainpage-lecture-cta-button {
        width: 100%;
        padding: 12px 24px;
    }
}

.instructor {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.instructor .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #d1d5db;
}

.instructor span {
    font-size: 0.875rem;
    color: var(--text-medium);
}

.cta-banner {
    margin-top: 60px;
    background: linear-gradient(to right, var(--primary-color), #4f46e5);
    border-radius: 16px;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
}

.cta-content h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.cta-banner .mainpage-btn {
    background: white;
    color: var(--primary-color);
}

.cta-banner .mainpage-btn:hover {
    background: #f8fafc;
    color: var(--primary-dark);
}

/* ========================================
   Library/Resources Section
   ======================================== */

.resource-categories {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.res-cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 30px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    flex: 0 0 calc(16.666% - 17px); /* 가로 6개씩 배치 (100% / 6 - gap 조정) */
    max-width: calc(16.666% - 17px);
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.res-cat-item:hover {
    border-color: var(--border-color);
    background-color: #f8f9fa;
    color: var(--text-dark);
}

.res-cat-item i {
    font-size: 24px;
    color: var(--text-dark);
}

.res-cat-icon {
    font-size: 32px;
    line-height: 1;
    display: block;
}

.res-cat-name {
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    color: var(--text-dark);
}

/* 태블릿 화면에서 가로 4개씩 배치 */
@media (min-width: 769px) and (max-width: 1024px) {
    .res-cat-item {
        flex: 0 0 calc((100% - 60px) / 4); /* 가로 4개씩 배치 (gap 20px * 3개 = 60px) */
        max-width: calc((100% - 60px) / 4);
    }
}

/* 모바일에서 자료실 아이콘 한 줄에 4개씩 3줄로 배치 */
@media (max-width: 768px) {
    .resource-categories {
        gap: 12px;
        margin-bottom: 30px;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .res-cat-item {
        flex: 0 0 calc(25% - 9px); /* 가로 4개씩 배치 (gap 12px * 3개 = 36px, 36px / 4 = 9px) */
        max-width: calc(25% - 9px);
        min-width: 0;
        padding: 12px 8px;
        gap: 6px;
        border-radius: 8px;
        box-sizing: border-box;
    }
    
    .res-cat-item i {
        font-size: 20px;
    }
    
    .res-cat-icon {
        font-size: 24px;
    }
    
    .res-cat-name {
        font-size: 0.65rem;
        line-height: 1.3;
    }
}

@media (max-width: 480px) {
    .resource-categories {
        gap: 8px;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .res-cat-item {
        flex: 0 0 calc(25% - 6px); /* 가로 4개씩 배치 (gap 8px * 3개 = 24px, 24px / 4 = 6px) */
        max-width: calc(25% - 6px);
        padding: 10px 6px;
        gap: 5px;
        box-sizing: border-box;
    }
    
    .res-cat-item i {
        font-size: 18px;
    }
    
    .res-cat-icon {
        font-size: 22px;
    }
    
    .res-cat-name {
        font-size: 0.6rem;
    }
}

.mainpage-library-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mainpage-library-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.mainpage-library-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.res-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.res-icon.doc { background-color: #e0f2fe; color: #0284c7; }
.res-icon.ppt { background-color: #ffedd5; color: #ea580c; }
.res-icon.pdf { background-color: #fee2e2; color: #dc2626; }
.res-icon.zip { background-color: #f3e8ff; color: #7e22ce; }

.mainpage-library-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
    color: var(--text-dark);
    flex-shrink: 0;
}

.mainpage-library-content {
    flex: 1;
}

.mainpage-library-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mainpage-library-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.mainpage-library-title a:hover {
    color: var(--primary-color);
}

.mainpage-library-meta {
    font-size: 0.75rem;
    color: var(--text-medium);
    display: flex;
    gap: 12px;
}

.btn-download {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-medium);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-download:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ========================================
   Event Section
   ======================================== */

.mainpage-event-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mainpage-event-item {
    display: flex;
    gap: 24px;
    background: white;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.mainpage-event-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.mainpage-event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    padding: 12px;
    background: var(--bg-light);
    border-radius: 8px;
    flex-shrink: 0;
}

.mainpage-event-date-text {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.2;
}

.mainpage-event-time {
    font-size: 0.75rem;
    color: var(--text-medium);
    margin-top: 4px;
}

.mainpage-event-content {
    flex: 1;
}

.mainpage-event-title {
    font-size: 1.125rem;
    font-weight: 500;
    margin: 0 0 8px 0;
}

.mainpage-event-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.mainpage-event-title a:hover {
    color: var(--primary-color);
}

.mainpage-event-excerpt {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-medium);
    margin: 0;
}

/* ========================================
   Gallery Section
   ======================================== */

.mainpage-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.mainpage-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 4 / 3;
    background: #f0f0f0;
}

.mainpage-gallery-link {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.mainpage-gallery-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.mainpage-gallery-item:hover .mainpage-gallery-link img {
    transform: scale(1.1);
}

/* ========================================
   Community Section
   ======================================== */

.mainpage-community {
    background: var(--bg-dark);
    color: white;
    border-radius: 24px;
    padding: 60px;
}

.mainpage-community .mainpage-section-title {
    color: white;
}

.comm-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
}

.comm-desc {
    color: #9ca3af;
    margin-bottom: 40px;
    font-size: 1.125rem;
    line-height: 1.6;
}

.points-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 30px;
    margin-top: 20px;
}

.point-circle {
    width: 120px;
    height: 120px;
    position: relative;
    flex-shrink: 0;
}

.circular-chart {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 100%;
}

.circle-bg {
    fill: none;
    stroke: rgba(255,255,255,0.1);
    stroke-width: 2.5;
}

.circle {
    fill: none;
    stroke: var(--secondary-color);
    stroke-width: 2.5;
    stroke-linecap: round;
    animation: progress 1s ease-out forwards;
}

@keyframes progress {
    0% {
        stroke-dasharray: 0 100;
    }
}

.percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.percentage .label {
    display: block;
    font-size: 0.75rem;
    color: #9ca3af;
}

.percentage .value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.point-stats {
    flex: 1;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.875rem;
}

.stat-item .stat-value {
    font-weight: 600;
    color: var(--secondary-color);
}

.comm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.comm-header h3 {
    font-size: 1.25rem;
    margin: 0;
}

.comm-header .view-all {
    color: white;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ranking-list {
    background: white;
    border-radius: 16px;
    padding: 20px;
    color: var(--text-dark);
    list-style: none;
    margin: 0 0 30px 0;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--bg-light);
}

.ranking-item:last-child {
    border-bottom: none;
}

.rank {
    width: 24px;
    font-weight: 700;
    text-align: center;
    margin-right: 16px;
}

.rank.first { color: #eab308; }
.rank.second { color: #94a3b8; }
.rank.third { color: #b45309; }

.user-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar.sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e5e7eb;
}

.username {
    font-weight: 500;
}

.points {
    font-weight: 600;
    color: var(--primary-color);
}

.church-search-box {
    margin-top: 30px;
}

.church-search-box h3 {
    margin-bottom: 16px;
    font-size: 1.125rem;
    color: white;
}

.church-search-box p {
    color: #9ca3af;
    margin-bottom: 12px;
    font-size: 0.9em;
}

.search-input-group {
    display: flex;
}

.search-input-group input {
    flex: 1;
    padding: 12px 20px;
    border-radius: 8px 0 0 8px;
    border: none;
    font-size: 1rem;
}

.search-input-group button {
    padding: 0 24px;
    background: var(--primary-color);
    border: none;
    border-radius: 0 8px 8px 0;
    color: white;
    cursor: pointer;
    font-size: 1.125rem;
}

/* ========================================
   Support Section
   ======================================== */

.notice-box, .faq-box {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
}

.box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.box-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.125rem;
    margin: 0;
}

.box-header .more {
    font-size: 1.5rem;
    color: var(--text-medium);
    text-decoration: none;
}

.simple-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.simple-list li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.simple-list a {
    display: flex;
    gap: 8px;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    color: var(--text-dark);
    transition: color 0.3s ease;
}

.simple-list a:hover {
    color: var(--primary-color);
}

.simple-list .cat {
    color: var(--primary-color);
    font-weight: 600;
}

.simple-list .text {
    overflow: hidden;
    text-overflow: ellipsis;
}

.simple-list .date {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-left: 10px;
}

.support-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.support-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: var(--bg-light);
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.support-item:hover {
    background: #e0f2fe;
    color: var(--primary-color);
}

.support-item i {
    font-size: 24px;
}

.contact-number {
    text-align: center;
    background: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
}

.contact-number span {
    display: block;
    font-size: 0.875rem;
    color: var(--text-medium);
    margin-bottom: 4px;
}

.contact-number strong {
    font-size: 1.5rem;
    color: var(--text-dark);
}

/* Contact Section - HC Mission Style */
.mainpage-contact-main-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 24px 0;
    text-align: center;
}

.mainpage-contact-description {
    font-size: 1.125rem;
    color: var(--text-medium);
    text-align: center;
    margin: 0 0 60px 0;
    line-height: 1.7;
}

.mainpage-contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: start;
}

.mainpage-contact-info {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.mainpage-contact-info-item {
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
}

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

.mainpage-contact-info-label {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 16px 0;
}

.mainpage-contact-info-value {
    font-size: 1rem;
    color: var(--text-medium);
    margin: 0;
    line-height: 1.8;
}

.mainpage-contact-info-value a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.mainpage-contact-info-value a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.mainpage-contact-address-en {
    display: block;
    margin-top: 8px;
    font-size: 0.9375rem;
    color: var(--text-light);
}

.mainpage-contact-form {
    background: var(--bg-light);
    padding: 40px;
    border-radius: 12px;
}

.mainpage-contact-form-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 32px 0;
}

.mainpage-contact-form-wrapper {
    width: 100%;
}

.mainpage-contact-form-wrapper {
    width: 100%;
}

.mainpage-contact-form-field {
    margin-bottom: 24px;
}

.mainpage-contact-form-label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.mainpage-contact-form-label .required {
    color: #dc3232;
    margin-left: 4px;
}

.mainpage-contact-form-input,
.mainpage-contact-form-textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.mainpage-contact-form-input:focus,
.mainpage-contact-form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.mainpage-contact-form-textarea {
    resize: vertical;
    min-height: 120px;
}

.mainpage-contact-form-submit {
    width: 100%;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: var(--primary-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mainpage-contact-form-submit:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.mainpage-contact-form-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.mainpage-contact-form-message {
    padding: 16px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.mainpage-contact-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.mainpage-contact-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 반응형 디자인 */
@media (max-width: 1024px) {
    .mainpage-contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .mainpage-contact-main-title {
        font-size: 2rem;
    }
    
    .mainpage-contact-description {
        font-size: 1rem;
        margin-bottom: 40px;
    }
    
    .mainpage-contact-info {
        gap: 30px;
    }
    
    .mainpage-contact-info-item {
        padding-bottom: 30px;
    }
    
    .mainpage-contact-form {
        padding: 30px 24px;
    }
    
    .mainpage-contact-form-title {
        font-size: 1.25rem;
        margin-bottom: 24px;
    }
}

@media (max-width: 480px) {
    .mainpage-contact-main-title {
        font-size: 1.75rem;
    }
    
    .mainpage-contact-form {
        padding: 24px 16px;
    }
}

/* ========================================
   Footer Section
   ======================================== */

.hc-footer {
    background: #F1F1F1;
    padding: 80px 0 40px;
    border-top: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
}

/* 아스트라 테마 맨위로가기 버튼이 푸터 위에 표시되도록 */
#ast-scroll-top,
.ast-scroll-to-top-right,
.ast-scroll-to-top-left {
    z-index: 999999 !important;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 3fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand .logo-text {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    margin-bottom: 16px;
    display: block;
}

.footer-brand p {
    color: var(--text-medium);
    margin-top: 16px;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    gap: 60px;
}

.link-group h4 {
    margin-bottom: 20px;
    color: var(--text-dark);
    font-size: 1rem;
    font-weight: 600;
}

.link-group a {
    display: block;
    color: var(--text-medium);
    margin-bottom: 10px;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.social-icons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-medium);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: var(--primary-color);
    color: white;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
    color: var(--text-medium);
    font-size: 0.875rem;
}

.family-sites select {
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-dark);
}

/* ========================================
   App Download Section
   ======================================== */

.mainpage-app-download {
    padding: 60px 20px;
    text-align: center;
}

.mainpage-app-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.mainpage-app-subtitle {
    font-size: 1rem;
    color: var(--text-medium);
    margin-bottom: 32px;
}

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

.mainpage-app-download-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.2s ease;
    cursor: pointer;
    min-width: 160px;
}

.mainpage-app-download-btn:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mainpage-app-download-btn i {
    font-size: 32px;
}

.mainpage-app-btn-text {
    font-size: 1rem;
    font-weight: 500;
}

.mainpage-app-btn-desc {
    font-size: 0.875rem;
    color: var(--text-medium);
}

.mainpage-app-android i {
    color: #22c55e;
}

.mainpage-app-ios i {
    color: #1f2937;
}

.mainpage-app-guide {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 48px;
}

.mainpage-app-guide-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    min-width: 280px;
    max-width: 320px;
}

.mainpage-app-guide-icon {
    font-size: 24px;
    color: var(--text-medium);
    flex-shrink: 0;
}

.mainpage-app-guide-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.mainpage-app-guide-text strong {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
}

.mainpage-app-guide-text span {
    font-size: 0.8125rem;
    color: var(--text-medium);
    line-height: 1.4;
}

/* ========================================
   Page & Shortcode Content
   ======================================== */

.mainpage-page-content,
.mainpage-shortcode-content {
    max-width: 900px;
    margin: 0 auto;
}

.mainpage-page-content p,
.mainpage-shortcode-content p {
    margin-bottom: 1.5em;
    line-height: 1.8;
}

.mainpage-page-content h2,
.mainpage-page-content h3,
.mainpage-shortcode-content h2,
.mainpage-shortcode-content h3 {
    margin-top: 2em;
    margin-bottom: 1em;
    font-weight: 500;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 1024px) {
    .mainpage-container {
        padding: 0 30px;
    }
    
    .mainpage-hero {
        padding: 0 !important;
        padding-bottom: 120px !important;
    }
    
    .mainpage-hero .mainpage-container {
        padding: 80px 30px 0 !important;
    }
    
    .mainpage-hero-title {
        font-size: 2.5rem;
    }
    
    .mainpage-hero-buttons {
        justify-content: center;
    }
    
    .broadcast-layout {
        grid-template-columns: 1fr;
    }
    
    .broadcast-schedule {
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.1);
        padding-left: 0;
        padding-top: 40px;
    }
    
    /* 모바일에서 숏츠 비율 조정 */
    body.joyn-shorts-mode-active .player-wrapper {
        padding-bottom: 140% !important;
    }
    
    .mainpage-lecture-grid, .mainpage-broadcast-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .comm-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-top {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
	/* 모바일 기본 폰트 크기 16px로 설정 */
	.mainpage-wrapper {
		font-size: 16px !important;
		font-weight: 600; /* 모바일에서 더 두껍게 */
	}
	
	/* 모든 텍스트 요소에 기본 폰트 두께 적용 */
	.mainpage-wrapper * {
		font-weight: inherit;
	}
	
	/* 작은 폰트 크기들을 16px 기준으로 조정 */
	.mainpage-wrapper p,
	.mainpage-wrapper span,
	.mainpage-wrapper div,
	.mainpage-wrapper a,
	.mainpage-wrapper li,
	.mainpage-wrapper td {
		font-size: 16px !important;
		font-weight: 600 !important;
	}
	
	/* 제목들은 더 크게 유지하되 두껍게 */
	.mainpage-wrapper h1,
	.mainpage-wrapper h2,
	.mainpage-wrapper h3,
	.mainpage-wrapper h4,
	.mainpage-wrapper h5,
	.mainpage-wrapper h6 {
		font-weight: 700 !important;
	}
	
	.mainpage-hero {
		min-height: 60vh;
		padding: 60px 20px;
	}

	.mainpage-hero-subtitle-highlight {
		font-size: clamp(1.5rem, 3vw, 2rem);
		font-weight: 700 !important;
	}

	.mainpage-hero-buttons {
		flex-direction: column;
		width: 100%;
	}

	.mainpage-btn {
		width: 100%;
		max-width: 300px;
		font-weight: 600 !important;
	}

    .mainpage-section {
        padding: 60px 20px;
    }
    
    /* 공지사항 섹션은 별도 패딩 적용 */
    .mainpage-section.mainpage-notice {
        padding: 40px 16px !important;
    }
    
    /* 공지사항 섹션 내부 컨테이너 패딩 제거 */
    .mainpage-section.mainpage-notice .mainpage-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* 강의 섹션 모바일 패딩 조정 - 공지사항과 동일 */
    .mainpage-section.mainpage-lecture {
        padding: 40px 16px !important;
    }
    
    /* 강의 섹션 내부 컨테이너 패딩 조정 */
    .mainpage-section.mainpage-lecture .mainpage-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* 방송 섹션 모바일 패딩 조정 - 공지사항과 동일 */
    .mainpage-broadcast {
        padding: 30px 16px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* 방송 섹션 내부 컨테이너 패딩 조정 */
    .mainpage-broadcast .mainpage-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .mainpage-section-title {
        font-size: 1.75rem;
    }
    
    .mainpage-section-description {
        font-size: 16px !important;
        font-weight: 600 !important;
        margin-bottom: 24px;
    }

    .mainpage-lecture-grid,
    .mainpage-broadcast-grid,
    .mainpage-gallery-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .mainpage-library-categories {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
    
    .mainpage-library-category-item {
        min-height: 120px;
        padding: 20px 12px;
    }
    
    .library-category-icon {
        font-size: 2rem;
        margin-bottom: 10px;
    }
    
    .library-category-name {
        font-size: 16px !important;
        font-weight: 600 !important;
    }
    
    .mainpage-notice-simple-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
    
    .mainpage-broadcast-videos {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    /* 모바일에서 5번째, 6번째 영상 숨기기 */
    .mainpage-broadcast-video-item.broadcast-video-item-5,
    .mainpage-broadcast-video-item.broadcast-video-item-6 {
        display: none;
    }

    .mainpage-event-item {
        flex-direction: column;
        gap: 16px;
    }

    .mainpage-event-date {
        flex-direction: row;
        justify-content: flex-start;
        min-width: auto;
    }

    .mainpage-library-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .mainpage-notice-link {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .mainpage-notice-date {
        min-width: auto;
    }
    
    /* 모바일에서 정보 게시판만 표시 */
    .mainpage-notice-simple-list {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .mainpage-notice-simple-list .notice-board-section:first-child,
    .mainpage-notice-simple-list .notice-board-section:last-child {
        display: none;
    }
    
    .mainpage-notice-simple-list .notice-board-section:nth-child(2) {
        display: flex;
    }
    
    .footer-top {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-brand .logo-text {
        font-size: 1.875rem; /* 모바일에서도 크게 유지 */
    }
    
    .footer-links {
        flex-direction: column;
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .cta-banner {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 30px 20px;
    }
    
    .comm-grid {
        padding: 40px 20px;
    }
    
    /* 모바일에서 숏츠 비율 조정 */
    body.joyn-shorts-mode-active .player-wrapper {
        padding-bottom: 140% !important;
    }
    
    .mainpage-app-download {
        padding: 40px 20px;
    }

    .mainpage-app-download-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .mainpage-app-download-btn {
        width: 100%;
        min-width: auto;
    }

    .mainpage-app-guide {
        margin-top: 32px;
        gap: 12px;
    }

    .mainpage-app-guide-item {
        width: 100%;
        min-width: auto;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
	/* 작은 화면에서도 16px 유지 */
	.mainpage-wrapper {
		font-size: 16px !important;
		font-weight: 600 !important;
	}
	
	.mainpage-wrapper p,
	.mainpage-wrapper span,
	.mainpage-wrapper div,
	.mainpage-wrapper a,
	.mainpage-wrapper li,
	.mainpage-wrapper td {
		font-size: 16px !important;
		font-weight: 600 !important;
	}
	
	.mainpage-hero-title {
		font-size: 2rem;
		font-weight: 700 !important;
	}

	.mainpage-hero-subtitle-highlight {
		font-size: 1.5rem;
		font-weight: 700 !important;
	}
	
	.mainpage-library-categories {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}
	
	.mainpage-library-category-item {
		min-height: 100px;
		padding: 16px 8px;
	}
	
	.library-category-icon {
		font-size: 1.75rem;
		margin-bottom: 8px;
	}
	
	.library-category-name {
		font-size: 16px !important;
		font-weight: 600 !important;
	}
	
	.mainpage-notice-simple-list {
		grid-template-columns: 1fr;
		gap: 24px;
	}
	
	/* 모바일에서 정보 게시판만 표시 */
	.mainpage-notice-simple-list .notice-board-section:first-child,
	.mainpage-notice-simple-list .notice-board-section:last-child {
		display: none;
	}
	
	.mainpage-notice-simple-list .notice-board-section:nth-child(2) {
		display: flex;
	}

	.mainpage-hero-subtitle {
		font-size: 1.125rem;
	}

    .mainpage-section-title {
        font-size: 1.5rem;
    }
    
    .mainpage-section-description {
        font-size: 0.9375rem;
        margin-bottom: 20px;
        padding: 0 16px;
    }
    
    .mainpage-broadcast-videos {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    /* 모바일에서 5번째, 6번째 영상 숨기기 */
    .mainpage-broadcast-video-item.broadcast-video-item-5,
    .mainpage-broadcast-video-item.broadcast-video-item-6 {
        display: none;
    }
    
    .broadcast-play-button {
        width: 60px;
        height: 60px;
    }
    
    .broadcast-play-button svg {
        width: 48px;
        height: 48px;
    }
    
    /* 작은 모바일에서 섹션 헤더 레이아웃 확실히 조정 */
    .section-header {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .section-header .section-title,
    .section-header .mainpage-section-title {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .section-header .section-desc,
    .section-header .mainpage-section-desc {
        width: 100%;
        margin-top: 0;
        margin-bottom: 24px;
        font-size: 0.875rem;
    }
    
    /* 방송 섹션 헤더도 동일하게 적용 */
    .mainpage-broadcast .section-header {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .mainpage-broadcast .section-header .mainpage-section-title {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .mainpage-broadcast .section-header .mainpage-section-desc {
        width: 100%;
        margin-top: 0;
        margin-bottom: 24px;
        font-size: 0.875rem;
    }

    .mainpage-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* 작은 모바일에서 공지사항 섹션 패딩 */
    .mainpage-section.mainpage-notice {
        padding: 30px 12px !important;
    }
    
    .mainpage-helpdesk-cards {
        gap: 12px;
    }
    
    .helpdesk-card-header {
        padding: 14px 16px;
    }
    
    .helpdesk-card-link {
        padding: 12px 16px;
    }
    
    /* 작은 모바일에서 방송 섹션 패딩 - 공지사항과 동일 */
    .mainpage-broadcast {
        padding: 30px 12px !important;
    }
    
    /* 작은 모바일에서 강의 섹션 패딩 - 공지사항과 동일 */
    .mainpage-section.mainpage-lecture {
        padding: 30px 12px !important;
    }
    
    .mainpage-lecture-grid {
        gap: 12px;
    }
    
    /* 작은 모바일에서 재생 아이콘 크기 조정 */
    .play-button {
        font-size: 4rem;
    }
    
    .play-button i {
        font-size: 4rem;
    }
    
    .mainpage-broadcast-play-icon {
        width: 64px;
        height: 64px;
    }
    
    .mainpage-broadcast-play-icon i {
        font-size: 1.75rem;
    }
    
    /* 작은 모바일에서 푸터 로고 텍스트 크기 조정 */
    .footer-brand .logo-text {
        font-size: 1.75rem; /* 작은 모바일에서도 크게 유지 */
    }
}
