/* ============================================
   축제 페이지 스타일 - themade.net
   Primary: #288ecc
   ============================================ */

/* 전체 컨테이너 */
.festival-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px;
}

.festival-wrap * { box-sizing: border-box; }

/* 목록 헤더 - 배경 없이 장식 그라데이션만 */
.festival-header {
    position: relative;
    overflow: hidden;
    padding: 15px 28px;
    margin-bottom: 24px;
    border-radius: 14px;
    border: 1px solid #e9ecef;
	background: #fafafa;
}
.festival-header::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(62,136,65,0.08) 0%, transparent 70%);
    border-radius: 50%;
}
.festival-header::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -20px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(40,142,204,0.06) 0%, transparent 70%);
    border-radius: 50%;
}
.festival-header h2 {
    color: #333;
    position: relative;
    z-index: 1;
}
.festival-header p {
    color: #888;
    position: relative;
    z-index: 1;
}

/* ---- 필터 영역 ---- */
.festival-filter {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid #e9ecef;
}
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.filter-row select,
.filter-row button {
    height: 40px;
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 0 12px;
    font-size: 14px;
    background: #fff;
    color: #333;
    cursor: pointer;
}
.filter-row select {
    min-width: 130px;
    flex: 1;
    max-width: 200px;
    appearance: auto;
}
.filter-row select:focus {
    border-color: #288ecc;
    outline: none;
    box-shadow: 0 0 0 2px rgba(40,142,204,0.15);
}
.filter-btn-search {
    background: #288ecc !important;
    color: #fff !important;
    border: none !important;
    padding: 0 24px !important;
    font-weight: 600;
    transition: background 0.2s;
}
.filter-btn-search:hover {
    background: #2078b0 !important;
}
.filter-btn-reset {
    background: #fff !important;
    color: #666 !important;
    border: 1px solid #ccc !important;
    padding: 0 16px !important;
}
.filter-btn-reset:hover {
    background: #f1f1f1 !important;
}

/* ---- 탭 전환 ---- */
.festival-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}
.festival-tab {
    padding: 10px 24px;
    font-size: 15px;
    font-weight: 600;
    color: #999;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}
.festival-tab:hover {
    color: #288ecc;
}
.festival-tab.active {
    color: #288ecc;
    border-bottom-color: #288ecc;
}

/* 결과 카운트 */
.festival-count {
    font-size: 14px;
    color: #888;
    margin-bottom: 16px;
}
.festival-count strong {
    color: #288ecc;
}

/* ---- 카드뷰 그리드 ---- */
.festival-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.festival-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #f0f0f0;
}
.festival-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.festival-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}
.festival-card-img {
    position: relative;
    width: 100%;
    padding-top: 66.66%; /* 3:2 비율 */
    overflow: hidden;
    background: #f0f0f0;
}
.festival-card-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.festival-card-img .no-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ccc;
    font-size: 13px;
}
/* 분류 뱃지 */
.festival-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(40,142,204,0.9);
    color: #fff;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
}
/* 진행 상태 뱃지 */
.festival-status {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
}
.status-ongoing {
    background: rgba(40,167,69,0.9);
    color: #fff;
}
.status-upcoming {
    background: rgba(255,193,7,0.9);
    color: #333;
}
.status-ended {
    background: rgba(108,117,125,0.8);
    color: #fff;
}

.festival-card-body {
    padding: 14px;
}
.festival-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin-bottom: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.festival-card-date {
    font-size: 13px;
    color: #288ecc;
    margin-bottom: 4px;
    font-weight: 500;
}
.festival-card-place {
    font-size: 12px;
    color: #999;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- 달력뷰 ---- */
.festival-calendar {
    display: none;
}
.festival-calendar.active {
    display: block;
}
.festival-grid-wrap.active {
    display: block;
}
.cal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 16px;
}
.cal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0;
    min-width: 160px;
    text-align: center;
}
.cal-nav {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #666;
    transition: all 0.2s;
}
.cal-nav:hover {
    background: #288ecc;
    color: #fff;
    border-color: #288ecc;
}
.cal-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.cal-table th {
    text-align: center;
    padding: 10px 4px;
    font-size: 13px;
    font-weight: 600;
    color: #888;
    border-bottom: 2px solid #e9ecef;
}
.cal-table th:first-child { color: #e74c3c; }
.cal-table th:last-child { color: #288ecc; }
.cal-table td {
    vertical-align: top;
    padding: 4px;
    border: 1px solid #f0f0f0;
    height: 100px;
    font-size: 12px;
}
.cal-table td .cal-day {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    padding: 2px 4px;
}
.cal-table td:first-child .cal-day { color: #e74c3c; }
.cal-table td:last-child .cal-day { color: #288ecc; }
.cal-table td.today {
    background: #f0f8ff;
}
.cal-table td.today .cal-day {
    background: #288ecc;
    color: #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cal-table td.empty {
    background: #fafafa;
}
.cal-event {
    display: block;
    padding: 2px 4px;
    margin-bottom: 2px;
    border-radius: 3px;
    font-size: 11px;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: #288ecc;
    line-height: 1.5;
}
.cal-event:hover {
    opacity: 0.85;
    color: #fff;
    text-decoration: none;
}
.cal-event.cat-EV010100 { background: #e74c3c; }
.cal-event.cat-EV010200 { background: #9b59b6; }
.cal-event.cat-EV010300 { background: #27ae60; }
.cal-event.cat-EV010400 { background: #e67e22; }
.cal-event.cat-EV010500 { background: #2ecc71; }
.cal-event.cat-EV010600 { background: #95a5a6; }
.cal-more {
    font-size: 11px;
    color: #288ecc;
    cursor: pointer;
    padding: 2px 4px;
}

/* ---- 페이지네이션 ---- */
.festival-pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 30px;
    padding-bottom: 20px;
}
.festival-pagination a,
.festival-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 14px;
    color: #666;
    text-decoration: none;
    transition: all 0.2s;
    padding: 0 8px;
}
.festival-pagination a:hover {
    border-color: #288ecc;
    color: #288ecc;
}
.festival-pagination span.current {
    background: #288ecc;
    color: #fff;
    border-color: #288ecc;
    font-weight: 600;
}

/* ---- 상세 페이지 ---- */
.festival-view {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 15px;
}
.festival-view-header {
    margin-bottom: 24px;
}
.festival-view-title {
    font-size: 26px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
}
.festival-view-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.festival-view-badges .badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}
.badge-category {
    background: #e8f4fb;
    color: #288ecc;
}
.badge-status-ongoing {
    background: #d4edda;
    color: #155724;
}
.badge-status-upcoming {
    background: #fff3cd;
    color: #856404;
}
.badge-grade {
    background: #f8d7da;
    color: #721c24;
}
.festival-view-img {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
    max-height: 500px;
}
.festival-view-img img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* 정보 테이블 */
.festival-info-table {
    width: 100%;
    border-top: 2px solid #288ecc;
    margin-bottom: 24px;
}
.festival-info-table tr {
    border-bottom: 1px solid #eee;
}
.festival-info-table th {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    background: #f8f9fa;
    width: 120px;
    vertical-align: top;
    white-space: nowrap;
}
.festival-info-table td {
    padding: 12px 16px;
    font-size: 14px;
    color: #333;
    line-height: 1.6;
}
.festival-info-table td a {
    color: #288ecc;
    text-decoration: none;
}
.festival-info-table td a:hover {
    text-decoration: underline;
}

/* 개요 */
.festival-overview {
    padding: 24px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 24px;
    line-height: 1.8;
    font-size: 15px;
    color: #444;
}

/* 목록으로 버튼 */
.festival-view-back {
    text-align: center;
    margin-top: 30px;
    padding-bottom: 20px;
}
.festival-view-back a {
    display: inline-block;
    padding: 10px 32px;
    background: #288ecc;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}
.festival-view-back a:hover {
    background: #2078b0;
}

/* ---- 반응형 ---- */
@media (max-width: 1024px) {
    .festival-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 768px) {
    .festival-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .filter-row {
        flex-direction: column;
    }
    .filter-row select {
        max-width: 100%;
        width: 100%;
    }
    .festival-header h2 {
        font-size: 22px;
    }
    .cal-table td {
        height: 70px;
    }
    .cal-event {
        font-size: 10px;
    }
    .festival-view-title {
        font-size: 20px;
    }
    .festival-info-table th {
        width: 90px;
        font-size: 13px;
    }
}
@media (max-width: 480px) {
    .festival-grid {
        grid-template-columns: 1fr;
    }
    .festival-tabs {
        justify-content: center;
    }
    .cal-table td {
        height: 50px;
        padding: 2px;
    }
    .cal-table td .cal-day {
        font-size: 11px;
    }
}
/* 상세 타이틀 - 연한 초록 그라데이션 */
.festival-view-header {
    background: linear-gradient(135deg, #00a291 0%, #046f63 100%);
    border-radius: 12px 12px 0 0;
    padding: 28px 28px 24px 32px;
    margin-bottom: 0;
}
.festival-view-title {
    color: #fff;
}
/* 분류 뱃지 */
.festival-view-badges .badge-category {
    background: rgba(255,255,255,0.9);
    color: #2e7d32;
    border: 1px solid rgba(255,255,255,0.5);
}
/* 진행중 */
.festival-view-badges .badge-status-ongoing {
    background: #ffeb3b;
    color: #333;
}
/* 예정 */
.festival-view-badges .badge-status-upcoming {
    background: rgba(255,255,255,0.85);
    color: #e65100;
}
/* 종료 */
.festival-view-badges .badge-status-ended {
    background: rgba(0,0,0,0.2);
    color: #fff;
}
/* 축제등급 */
.festival-view-badges .badge-grade {
    background: #fff176;
    color: #5d4037;
}
/* 사이드 메뉴 - 축제 초록 계열 */
/* 사이드 메뉴 - 강제 초록 적용 */
body #nt_side_menu .bg-primary,
body #nt_side_menu > .bg-primary {
    background: linear-gradient(135deg, #00a291 0%, #388e3c 100%) !important;
}

/* 사이드 위젯 박스 - 초록 테두리 */
.widget-sidebox-top {
    padding: 14px 16px;
    font-weight: bold;
    color: #000;
    font-size: 13px;
    background: #f0f8f1;
    border-bottom: none;
    border-top: 1px solid #046f63;
    border-left: 1px solid #046f63;
    border-right: 1px solid #046f63;
}
.widget-sidebox {
    margin-bottom: 16px;
}
/* 주소 복사 버튼 */
.btn-copy-addr {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 10px;
    font-size: 12px;
    color: #666;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    vertical-align: middle;
}
.btn-copy-addr:hover {
    background: #e9ecef;
    border-color: #288ecc;
    color: #288ecc;
}