/* ========================================
   축제 정보 사이트 스타일 (style.css)
   - 월별 탭 포함
   - 이미지 없는 축제 플레이스홀더 포함
======================================== */

/* ========================================
   1. 기본 설정
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ========================================
   2. 헤더
======================================== */
.header {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: #fff;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo a {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
}

.tagline {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 4px;
}

/* ========================================
   3. 메인 컨텐츠
======================================== */
.main {
    padding: 20px 0 40px;
}

/* ========================================
   4. 버튼
======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #43a047, #5cb860);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-secondary {
    background: #fff;
    color: #666;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

/* ========================================
   5. 월별 탭 네비게이션
======================================== */
.month-tabs-section {
    margin-bottom: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 12px 0;
}

.month-tabs-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
}

/* 스크롤 버튼 */
.month-scroll-btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: 1px solid #e0e0e0;
    background: #fff;
    border-radius: 50%;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.month-scroll-btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
    color: #333;
}

.month-scroll-btn:active {
    transform: scale(0.95);
}

/* 탭 컨테이너 */
.month-tabs-container {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}

.month-tabs-container::-webkit-scrollbar {
    display: none;
}

/* 탭 목록 */
.month-tabs {
    display: flex;
    gap: 8px;
    padding: 4px 0;
    min-width: max-content;
}

/* 개별 탭 */
.month-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 12px;
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 70px;
    position: relative;
}

.month-tab:hover {
    background: #e8f5e9;
    border-color: #81c784;
    color: #2e7d32;
}

.month-tab.active {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    border-color: #4caf50;
    color: #fff;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.month-label {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
}

.month-year {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 2px;
}

.month-tab.active .month-year {
    opacity: 0.9;
}

/* 이번달 뱃지 */
.month-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ff5722;
    color: #fff;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(255, 87, 34, 0.3);
}

.month-tab.active .month-badge {
    background: #fff;
    color: #4caf50;
}

/* ========================================
   6. 검색 섹션
======================================== */
.search-section {
    background: #fff;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.search-form {
    width: 100%;
}

.search-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.search-field label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #666;
}

.search-field input {
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-field input:focus {
    outline: none;
    border-color: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.search-field-main {
    flex: 1;
}

.search-field-main input {
    width: 100%;
}

.search-button-field {
    display: flex;
    gap: 8px;
    flex-direction: row;
}

.search-button-field .btn {
    padding: 12px 20px;
    white-space: nowrap;
}

/* ========================================
   7. 결과 섹션
======================================== */
.results-section {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.results-header h2 {
    font-size: 1.25rem;
    color: #333;
    margin: 0;
}

.results-count {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.results-count strong {
    color: #4caf50;
    font-weight: 600;
}

.search-keyword {
    background: #fff3e0;
    color: #e65100;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-left: 8px;
}

/* ========================================
   8. 축제 그룹 (진행중/예정)
======================================== */
.festival-group {
    margin-bottom: 30px;
}

.group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    color: #333;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: #f8f9fa;
    border-radius: 8px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-dot.ongoing {
    background: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

.status-dot.upcoming {
    background: #2196f3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
}

/* ========================================
   9. 축제 리스트
======================================== */
.festival-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.festival-item {
    list-style: none;
}

.festival-card {
    display: block;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.2s ease;
    height: 100%;
}

.festival-card:hover {
    border-color: #4caf50;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

/* ========================================
   10. 축제 이미지 & 플레이스홀더
======================================== */
.festival-image {
    position: relative;
    height: 180px;
    background: #f5f5f5;
    overflow: hidden;
}

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

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

/* 이미지 없는 경우 플레이스홀더 */
.no-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 3.5rem;
    color: #fff;
    position: relative;
    overflow: hidden;
}

/* 카테고리별 그라데이션 배경 */
.no-image.cat-festival {
    background: linear-gradient(135deg, #ff6b6b, #feca57);
}

.no-image.cat-concert {
    background: linear-gradient(135deg, #a55eea, #8854d0);
}

.no-image.cat-exhibition {
    background: linear-gradient(135deg, #26de81, #20bf6b);
}

.no-image.cat-traditional {
    background: linear-gradient(135deg, #fd9644, #fa8231);
}

.no-image.cat-food {
    background: linear-gradient(135deg, #fc5c65, #eb3b5a);
}

.no-image.cat-nature {
    background: linear-gradient(135deg, #45aaf2, #2d98da);
}

.no-image.cat-sports {
    background: linear-gradient(135deg, #2bcbba, #0fb9b1);
}

.no-image.cat-default {
    background: linear-gradient(135deg, #a5b1c2, #778ca3);
}

/* 플레이스홀더 패턴 */
.no-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.15) 0%, transparent 50%);
    pointer-events: none;
}

/* 플레이스홀더 아이콘 */
.no-image .placeholder-icon {
    font-size: 3rem;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.no-image .placeholder-text {
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0.9;
    text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

/* 축제 상태 뱃지 */
.festival-status {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    z-index: 1;
}

.festival-status.ongoing {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
}

.festival-status.upcoming {
    background: linear-gradient(135deg, #2196f3, #42a5f5);
}

.festival-status.ended {
    background: #9e9e9e;
}

/* ========================================
   11. 축제 정보
======================================== */
.festival-info {
    padding: 16px;
}

.festival-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.festival-date,
.festival-location {
    font-size: 0.85rem;
    color: #666;
    margin: 4px 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.festival-location {
    color: #888;
}

/* ========================================
   12. 결과 없음
======================================== */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-results p {
    font-size: 1.1rem;
    margin: 8px 0;
}

.no-results-hint {
    font-size: 0.9rem;
    color: #999;
}

/* ========================================
   13. 광고 컨테이너
======================================== */
.ad-container {
    margin: 20px 0;
}

.ad-top,
.ad-bottom {
    background: #fafafa;
    padding: 10px 0;
}

.ad-middle {
    padding: 16px;
    background: #fafafa;
    border-radius: 8px;
    margin: 20px 0;
}

.ad-inline {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    border-radius: 12px;
}

.ad-item {
    grid-column: 1 / -1;
}

/* ========================================
   14. 페이지네이션
======================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
}

.page-numbers {
    display: flex;
    gap: 4px;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    color: #555;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.page-link:hover {
    background: #f5f5f5;
    border-color: #4caf50;
    color: #4caf50;
}

.page-link.active {
    background: #4caf50;
    border-color: #4caf50;
    color: #fff;
}

/* ========================================
   15. 푸터
======================================== */
.footer {
    background: #333;
    color: #aaa;
    padding: 30px 0;
    text-align: center;
    font-size: 0.9rem;
}

.footer-info {
    font-size: 0.8rem;
    margin-top: 8px;
    opacity: 0.7;
}

/* ========================================
   16. 상세 페이지
======================================== */
.breadcrumb {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
}

.breadcrumb a {
    color: #4caf50;
}

.breadcrumb .separator {
    margin: 0 8px;
    color: #ccc;
}

.festival-detail {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.detail-header {
    padding: 24px;
    border-bottom: 1px solid #eee;
}

.detail-title {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 12px;
}

.detail-meta {
    color: #666;
    font-size: 0.95rem;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 24px;
}

.detail-image-section img,
.detail-image {
    width: 100%;
    border-radius: 8px;
}

.detail-no-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
    border-radius: 8px;
    color: #aaa;
}

.detail-no-image span {
    font-size: 4rem;
    margin-bottom: 10px;
}

.info-list {
    margin: 0;
}

.info-item {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

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

.info-item dt {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.info-item dd {
    color: #666;
    margin: 0;
    line-height: 1.6;
}

.detail-footer {
    padding: 20px 24px;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.map-link {
    color: #4caf50;
    font-weight: 500;
}

/* ========================================
   17. 반응형 - 태블릿 (1024px 이하)
   ※ 모바일 스타일은 mobile.css 참조
======================================== */
@media (max-width: 1024px) {
    .detail-content {
        grid-template-columns: 1fr;
    }

    .pagination {
        flex-wrap: wrap;
    }

    .pagination .page-numbers {
        order: 2;
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }
}
