/*
* 파일명: festival-style.css
* 위치: /assets/css/
* 기능: 축제 페이지 전용 스타일시트 (수동입력 전용)
* 작성일: 2025-08-21
* 최종수정: 2025-08-29
*
* === 스타일시트 개요 ===
*
* 이 CSS 파일은 수동 입력된 축제 정보를 표시하는
* 축제 페이지 전용 스타일시트입니다.
*
* 주요 특징:
* 1. 테마 독립적 스타일링
* 2. 완전한 반응형 레이아웃
* 3. 수동 입력 데이터에 최적화된 UI
* 4. 빠른 로딩과 부드러운 인터랙션
*/

/* 전역 box-sizing */
.kfi-festival-page-wrapper *,
.kfi-festival-page-wrapper *::before,
.kfi-festival-page-wrapper *::after {
    box-sizing: border-box;
}

/* ===================================
* 기본 변수 설정
* =================================== */
:root {
    --kfi-primary: #2c5aa0;
    --kfi-primary-hover: #1e3d6f;
    --kfi-secondary: #f8f9fa;
    --kfi-success: #28a745;
    --kfi-warning: #ffc107;
    --kfi-danger: #dc3545;
    --kfi-info: #17a2b8;
    --kfi-light: #f8f9fa;
    --kfi-dark: #343a40;
    --kfi-border: #dee2e6;
    --kfi-shadow: 0 2px 8px rgba(0,0,0,0.1);
    --kfi-radius: 8px;
}

/* ===================================
* 테마 무력화 (콘텐츠 영역만)
* =================================== */
body.kfi-festival-page .site-content,
body.kfi-festival-page .content-area,
body.kfi-festival-page .site-main {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

body.kfi-festival-page .inside-article {
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
}

/* ===================================
* 메인 페이지 레이아웃
* =================================== */

/* 메인 페이지 래퍼 */
.kfi-festival-page-wrapper {
    background: #f8f9fa;
    min-height: 100vh;
    padding-top: 20px;
}

/* 메인 페이지 헤더 - 수정 */
.kfi-page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 80px 20px 70px 20px;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
    max-width: 1400px;  /* 추가 */
    margin-left: auto;  /* 추가 */
    margin-right: auto; /* 추가 */
}

/* 배경 장식 효과 */
.kfi-page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    z-index: 0;
}

.kfi-page-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    z-index: 0;
}

.kfi-page-header > * {
    position: relative;
    z-index: 1;
}

/* 배지 스타일 */
.header-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.kfi-page-header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin: 0 0 20px 0;
    text-shadow: 0 2px 20px rgba(0,0,0,0.2);
    letter-spacing: -1px;
}

.kfi-page-description {
    font-size: 1.15rem;
    opacity: 0.95;
    margin: 0 auto 35px auto;
    max-width: 700px;
    line-height: 1.7;
    font-weight: 400;
}

/* 통계 표시 */
.header-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    display: block;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 500;
}

.stat-divider {
    font-size: 1.5rem;
    opacity: 0.4;
}

/* 반응형 */
@media (max-width: 768px) {
    .kfi-page-header {
        padding: 60px 20px 50px 20px;
    }
    
    .kfi-page-header h1 {
        font-size: 2rem;
    }
    
    .kfi-page-description {
        font-size: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .header-stats {
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .kfi-page-header h1 {
        font-size: 1.75rem;
    }
    
    .header-badge {
        font-size: 0.75rem;
        padding: 6px 16px;
    }
}

/* 메인 페이지 컨테이너 */
.kfi-main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    background: #f8f9fa;
}

.kfi-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    align-items: start;
}

.kfi-main-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    overflow: hidden;
}

.kfi-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ===================================
* 상세 페이지 레이아웃
* =================================== */

/* 상세 페이지 래퍼 */
body.kfi-festival-page .kfi-detail-wrapper {
    background: #f8f9fa !important;
    min-height: 100vh !important;
    padding-top: 40px !important;
    width: 100% !important;
    clear: both !important;
    margin-top: 0 !important;
}

/* 상세 페이지 컨테이너 */
body.kfi-festival-page .festival-detail-page {
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 40px 20px !important;
    background: #f8f9fa !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* 상세 페이지 그리드 레이아웃 */
body.kfi-festival-page .festival-detail-container {
    display: grid !important;
    grid-template-columns: 1fr 320px !important;
    gap: 40px !important;
    align-items: start !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 상세 페이지 메인 콘텐츠 */
body.kfi-festival-page .festival-detail-main {
    background: white !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05) !important;
    overflow: hidden !important;
    width: 100% !important;
    grid-column: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 상세 페이지 사이드바 */
body.kfi-festival-page .festival-detail-sidebar {
    width: 320px !important;
    grid-column: 2 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 25px !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ===================================
* 상세 페이지 섹션별 스타일
* =================================== */

/* 헤더 섹션 */
body.kfi-festival-page .festival-detail-header {
    padding: 40px 30px 30px 30px !important;
    border-bottom: 1px solid #eee !important;
    background: white !important;
    margin: 0 !important;
}

/* 콘텐츠 섹션 */
body.kfi-festival-page .festival-detail-content {
    padding: 30px !important;
    background: white !important;
    margin: 0 !important;
    margin-top: 25px !important;
}

/* 관련 축제 섹션 */
body.kfi-festival-page .festival-detail-related {
    padding: 30px !important;
    border-top: 1px solid #eee !important;
    background: white !important;
    margin: 0 !important;
    margin-top: 25px !important;
}

/* 상세 페이지 제목 스타일 */
body.kfi-festival-page .festival-detail-content h2,
body.kfi-festival-page .festival-detail-related h2 {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    margin: 0 0 25px 0 !important;
    color: #333 !important;
}

body.kfi-festival-page .festival-detail-content h2 {
    border-bottom: 2px solid #2c5aa0 !important;
    padding-bottom: 15px !important;
}

/* 메타 정보 스타일 */
body.kfi-festival-page .festival-detail-meta {
    margin-bottom: 30px !important;
}

body.kfi-festival-page .meta-row {
    margin-bottom: 15px !important;
}

/* 이미지 스타일 */
body.kfi-festival-page .festival-detail-image {
    float: left !important;
    width: 300px !important;
    margin-right: 40px !important;
    margin-bottom: 20px !important;
}

/* 액션 버튼 스타일 */
body.kfi-festival-page .festival-detail-actions {
    display: flex !important;
    gap: 20px !important;
    flex-wrap: wrap !important;
    clear: both !important;
    margin-top: 25px !important;
}

/* ===================================
* 상태 배지 스타일
* =================================== */
.festival-status.status-ongoing,
.festival-status-badge.status-ongoing {
    background: var(--kfi-success) !important;
    color: white !important;
}

.festival-status.status-upcoming,
.festival-status-badge.status-upcoming {
    background: var(--kfi-info) !important;
    color: white !important;
}

.festival-status.status-ended,
.festival-status-badge.status-ended {
    background: var(--kfi-danger) !important;
    color: white !important;
}

/* ===================================
* 위젯 스타일
* =================================== */
.kfi-widget,
body.kfi-festival-page .kfi-widget {
    background: white !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
    padding: 25px !important;
    border: 1px solid #e9ecef !important;
    margin: 0 0 25px 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.kfi-widget .widget-title,
body.kfi-festival-page .kfi-widget .widget-title {
    margin: 0 0 20px 0 !important;
    padding-bottom: 15px !important;
    border-bottom: 3px solid #2c5aa0 !important;
    color: #2c5aa0 !important;
    font-size: 1.2rem !important;
    font-weight: 600 !important;
}

/* ===================================
* 관련 축제 스타일
* =================================== */
body.kfi-festival-page .related-festivals {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
}

body.kfi-festival-page .related-festival-item {
    padding: 15px !important;
    background: #f8f9fa !important;
    border-radius: 8px !important;
    border-left: 4px solid #2c5aa0 !important;
}

body.kfi-festival-page .related-festival-item h4 {
    margin: 0 0 8px 0 !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
}

body.kfi-festival-page .related-festival-item h4 a {
    color: #333 !important;
    text-decoration: none !important;
}

body.kfi-festival-page .related-festival-item h4 a:hover {
    color: #2c5aa0 !important;
}

body.kfi-festival-page .related-festival-item p {
    margin: 0 !important;
    color: #6c757d !important;
    font-size: 0.9rem !important;
}

/* ===================================
* 검색 및 리스트 섹션
* =================================== */
.kfi-search-section {
    background: white;
    padding: 30px;
    border-bottom: 1px solid #eee;
    overflow: hidden;
}

.kfi-list-section {
    padding: 30px;
}

/* ===================================
* 축제 검색 폼 스타일
* =================================== */
.festival-search-container {
    background: white;
    padding: 0;
    margin: 0;
}

.festival-search-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--kfi-primary);
    margin: 0 0 25px 0;
    text-align: center;
}

.festival-search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    width: 100%;
}

.search-field-group {
    flex: 1 1 200px;
    min-width: 0;
}

.search-field-group label {
    display: block;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.search-field-group input,
.search-field-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: var(--kfi-radius);
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    box-sizing: border-box;
}

.festival-search-btn {
    flex: 0 0 auto;
    min-width: 120px;
    background: linear-gradient(135deg, var(--kfi-primary), var(--kfi-primary-hover));
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: var(--kfi-radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.festival-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.3);
}

/* ===================================
* 축제 리스트 스타일
* =================================== */
.festival-list-container {
    margin: 0;
}

.festival-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.festival-count {
    font-size: 1.1rem;
    color: #495057;
}

.festival-count strong {
    color: var(--kfi-primary);
    font-weight: 700;
}

.festival-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}

.festival-sort label {
    font-weight: 600;
    color: #495057;
}

.festival-sort select {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: var(--kfi-radius);
    background: white;
}

/* 축제 리스트 그리드 */
.festival-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 40px;
}

/* ===================================
* 축제 아이템 카드 스타일
* =================================== */
.festival-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 20px;
    min-height: 120px;
}

.festival-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.festival-item-content {
    display: flex;
    flex-direction: row;
    width: 100%;
    align-items: center;
    gap: 20px;
}

/* 축제 이미지 */
.festival-image {
    position: relative;
    width: 180px; 
    height: 120px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 6px;
}

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

.festival-item:hover .festival-image img {
    transform: scale(1.05);
}



/* 축제 정보 */
.festival-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.festival-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
}

.festival-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.festival-title a:hover {
    color: var(--kfi-primary);
}

.festival-subtitle {
    color: #6c757d;
    font-size: 0.85rem;
    margin: 0;
    font-style: italic;
}

/* 메타 정보 */
.festival-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 0;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #495057;
}

.meta-item i {
    width: 14px;
    color: var(--kfi-primary);
    flex-shrink: 0;
}

/* 축제 설명 - 목록용 */
.festival-list .festival-description {
    color: #6c757d;
    line-height: 1.4;
    margin: 0;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 축제 설명 - 상세페이지용 */
.festival-detail-page .festival-description,
.kfi-detail-wrapper .festival-description {
    color: #495057;
    line-height: 1.8;
    margin: 0;
    font-size: 1rem;
    display: block;
    overflow: visible;
    white-space: normal;
}

/* ===================================
* 버튼 스타일
* =================================== */
.festival-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
    margin-left: auto;
}

.festival-btn {
    padding: 8px 16px;
    border-radius: var(--kfi-radius);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.festival-btn.btn-primary {
    background: var(--kfi-primary);
    color: white;
}

.festival-btn.btn-primary:hover {
    background: var(--kfi-primary-hover);
    transform: translateY(-1px);
}

.festival-btn.btn-outline {
    background: transparent;
    color: var(--kfi-primary);
    border-color: var(--kfi-primary);
}

.festival-btn.btn-outline:hover {
    background: var(--kfi-primary);
    color: white;
}

.festival-btn.btn-secondary {
    background: #6c757d;
    color: white;
}

.festival-btn.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* ===================================
* 페이지네이션 스타일
* =================================== */
.kfi-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination-btn {
    padding: 10px 15px;
    border: 2px solid #dee2e6;
    background: white;
    color: #495057;
    text-decoration: none;
    border-radius: var(--kfi-radius);
    font-weight: 600;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    border-color: var(--kfi-primary);
    color: var(--kfi-primary);
}

.pagination-btn.active {
    background: var(--kfi-primary);
    border-color: var(--kfi-primary);
    color: white;
}

/* ===================================
* 검색 결과 없음 스타일
* =================================== */
.kfi-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.no-results-icon {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 20px;
}

.no-results-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: #495057;
}

.no-results-message {
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* ===================================
* 반응형 처리
* =================================== */
@media (max-width: 768px) {
    /* 메인 페이지 반응형 */
    .kfi-page-header {
        padding: 40px 15px;
    }
    
    .kfi-page-header h1 {
        font-size: 2rem;
    }
    
    .kfi-main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    background: #f8f9fa;
    box-sizing: border-box; /* 추가 */
    }

    .kfi-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    align-items: start;
    width: 100%; /* 추가 */
    box-sizing: border-box; /* 추가 */
    }
    
    .kfi-main-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    overflow: hidden;
    min-width: 0;
    }
    
    .kfi-search-section, 
    .kfi-list-section {
        padding: 20px;
    }
    
    .kfi-widget {
        padding: 20px;
    }
    
    /* 상세 페이지 반응형 */
    body.kfi-festival-page .kfi-detail-wrapper {
        padding-top: 30px !important;
    }
    
    body.kfi-festival-page .festival-detail-page {
        padding: 20px 15px !important;
    }
    
    body.kfi-festival-page .festival-detail-container {
        grid-template-columns: 1fr !important;
        gap: 25px !important;
    }
    
    body.kfi-festival-page .festival-detail-sidebar {
        width: 100% !important;
        grid-column: 1 !important;
        gap: 20px !important;
    }
    
    body.kfi-festival-page .festival-detail-header {
        padding: 25px 20px 20px 20px !important;
    }
    
    body.kfi-festival-page .festival-detail-content,
    body.kfi-festival-page .festival-detail-related {
        padding: 25px 20px !important;
        margin-top: 20px !important;
    }
    
    body.kfi-festival-page .festival-detail-image {
        float: none !important;
        width: 100% !important;
        margin-right: 0 !important;
        margin-bottom: 25px !important;
    }
    
    body.kfi-festival-page .festival-detail-actions {
        gap: 15px !important;
        margin-top: 20px !important;
    }
    
    /* 검색 폼 반응형 */
    .festival-search-form {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .festival-search-btn {
        justify-content: center;
    }
    
    /* 리스트 반응형 */
    .festival-list {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    .festival-list-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .festival-sort {
        justify-content: space-between;
    }
    
    /* 리스트형 모바일 대응 */
    .festival-item {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
        min-height: auto;
    }
    
    .festival-item-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .festival-image {
        width: 100%;
        height: 150px;
    }
    
    .festival-actions {
        justify-content: stretch;
        margin-left: 0;
    }
    
    .festival-actions .festival-btn {
        flex: 1;
        justify-content: center;
    }
    
    .kfi-pagination {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .pagination-btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

@media (max-width: 1024px) {
    .kfi-content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .festival-search-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-field-group {
        flex: 1 1 auto;
    }
    
    .festival-search-btn {
        width: 100%;
    }
}