/* ----------------------------------------------------------
 * 축제 달력 목록 (list.skin FullCalendar + 우측 리스트)
 *---------------------------------------------------------- */

/* 상단 월간 캐러셀 */
.festival_monthly_wrap { margin-bottom: 40px; position: relative; min-height: 480px; padding: 0 50px; } /* 좌우 패딩 추가 */
.festival_monthly_wrap .monthly_title { font-size: 27px; font-weight: 800; color: #000; margin-bottom: 20px; font-family: 'font-B', sans-serif; display: flex; align-items: center; justify-content: center; margin-left: 0; } /* gap: 10px 제거하여 띄어쓰기 문제 해결 */
.festival_monthly_wrap .monthly_title span { color: #3c9040; }
.festival_monthly_wrap .swiper-container-monthly { padding: 10px 5px 30px; overflow: hidden; position: relative; } /* 다시 hidden으로 */
.festival_monthly_wrap .monthly_item { display: block; text-decoration: none; color: inherit; background: #fff; border: 1px solid #eee; border-radius: 15px; overflow: hidden; transition: all 0.3s ease; height: 100%; box-shadow: 0 5px 15px rgba(0,0,0,0.03); }
.festival_monthly_wrap .monthly_item:hover { transform: translateY(-5px); border-color: #3c9040; box-shadow: 0 10px 25px rgba(60, 144, 64, 0.1); }
.festival_monthly_wrap .monthly_thumb { width: 100%; aspect-ratio: 4/3; overflow: hidden; background: #f9f9f9; position: relative; }
.festival_monthly_wrap .monthly_thumb img { width: 100%; height: 100%; object-fit: cover; }
.festival_monthly_wrap .monthly_info { padding: 20px; }
.festival_monthly_wrap .monthly_subject { font-size: 17px; font-weight: 800; color: #000; margin-bottom: 12px; line-height: 1.4; font-family: 'font-B', sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.festival_monthly_wrap .monthly_meta { display: flex; flex-direction: column; gap: 6px; }
.festival_monthly_wrap .monthly_meta div { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: #666; line-height: 1.4; width: 100%; }
.festival_monthly_wrap .monthly_meta div span:not(.label) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.festival_monthly_wrap .monthly_meta .label { font-weight: 700; color: #3c9040; flex-shrink: 0; min-width: 30px; }
.festival_monthly_wrap .swiper-button-next, .festival_monthly_wrap .swiper-button-prev { width: 40px; height: 40px; background: #fff; border: 1px solid #eee; border-radius: 50%; color: #3c9040; box-shadow: 0 3px 10px rgba(0,0,0,0.1); top: 50%; transform: translateY(-50%); margin-top: 15px; z-index: 10; }
.festival_monthly_wrap .swiper-button-prev { left: 0; } /* wrap의 패딩 덕분에 바깥에 위치함 */
.festival_monthly_wrap .swiper-button-next { right: 0; } /* wrap의 패딩 덕분에 바깥에 위치함 */
.festival_monthly_wrap .swiper-button-prev:after { content: '❮'; font-size: 20px; color: #3c9040; font-weight: bold; }
.festival_monthly_wrap .swiper-button-next:after { content: '❯'; font-size: 20px; color: #3c9040; font-weight: bold; }
.festival_monthly_wrap .swiper-pagination-bullet-active { background: #3c9040; }
.festival_monthly_wrap .swiper-pagination { bottom: 0; }
.festival_monthly_wrap .festival_cal_empty { padding: 150px 0; width: 100%; text-align: center; margin-left: -50px; width: calc(100% + 100px); } /* 데이터 없을 때 높이 확보 및 중앙 정렬 */

/* 달력 뷰 래퍼 */
.festival_cal_wrap {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr; /* 50:50 대비 좌 +10% / 우 -10% */
    gap: 20px;
    margin: 40px 0 60px;
    align-items: flex-start;
    font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", sans-serif;
    align-items:stretch;
}
.festival_cal_left,
.festival_cal_right {
    height:100%;
}
.festival_cal_left {
    min-width: 0;
    background: #fff;
    padding: 0;
}
.festival_cal_right {
    min-width: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 15px;
    padding: 20px 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
margin-top:66px; height:calc(100% - 66px); overflow:hidden; display:flex; flex-direction:column;
}
.festival_cal_date_title { flex:0 0 auto; }
.festival_cal_list {
    flex:1 1 auto;
    min-height:0;
    max-height:100%;
    overflow-y:auto;
    display:flex;
    flex-direction:column;
    gap:15px;
    padding:4px 10px 4px 0;
}

/* FullCalendar PPT 스타일 커스텀 */
.festival_cal_left .fc { border: none; }
.festival_cal_left .fc-theme-standard td,
.festival_cal_left .fc-theme-standard th { border: 1px solid #eee !important; }
.festival_cal_left .fc-theme-standard .fc-scrollgrid {
    border: 1px solid #d6d6d6 !important; /* 달력 바깥 테두리 진하게 */
    border-radius: 15px;
    overflow: hidden;
}
.festival_cal_left .fc-theme-standard td,
.festival_cal_left .fc-theme-standard th { border: 1px solid #eee !important; }
.festival_cal_left .fc-theme-standard .fc-scrollgrid-section-header th { border-top: 0 !important; }
.festival_cal_left .fc-theme-standard .fc-scrollgrid-section-body td { border-bottom: 0 !important; }
.festival_cal_left .fc-theme-standard .fc-scrollgrid-section-body td:first-child { border-left: 0 !important; }
.festival_cal_left .fc-theme-standard .fc-scrollgrid-section-body td:last-child { border-right: 0 !important; }

/* 헤더: 이전달 2026.03 다음달 */
.festival_cal_left .fc-header-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px !important;
    padding: 0 10px;
}
.festival_cal_left .fc-toolbar-title {
    font-size: 32px !important; /* 타이틀 크기 확대 */
    font-weight: 800 !important;
    color: #000;
}
.festival_cal_left .fc-button {
    background: transparent !important;
    border: 1px solid #ddd !important;
    border-radius: 50% !important;
    width: 40px;
    height: 40px;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333 !important;
    box-shadow: none !important;
    position: relative;
    overflow: visible !important;
}
.festival_cal_left .fc-button:hover { background: #f9f9f9 !important; }
.festival_cal_left .fc-prev-button::after { content: '←'; font-size: 20px; }
.festival_cal_left .fc-next-button::after { content: '→'; font-size: 20px; }
.festival_cal_left .fc-prev-button::before {
    content: '이전달';
    position: absolute;
    left: 48px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #999;
    white-space: nowrap;
}
.festival_cal_left .fc-next-button::before {
    content: '다음달';
    position: absolute;
    right: 48px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #999;
    white-space: nowrap;
}
.festival_cal_left .fc-icon { display: none; }

/* 요일 헤더 */
.festival_cal_left .fc-col-header-cell { padding: 15px 0; background: #f1f3f5; }
.festival_cal_left .fc-col-header-cell-cushion { font-size: 17px; font-weight: 600; color: #333; }
.festival_cal_left .fc-day-sun .fc-col-header-cell-cushion { color: #e53935; }
.festival_cal_left .fc-day-sat .fc-col-header-cell-cushion { color: #1e88e5; }

/* 날짜 셀 */
.festival_cal_left .fc-daygrid-day { height: 100px !important; } /* 셀 높이 확대 */
.festival_cal_left .fc-daygrid-day { cursor: pointer; }
.festival_cal_left .fc-daygrid-day-top { flex-direction: row; justify-content: flex-start; padding-top: 10px; padding-left: 10px; }
.festival_cal_left .fc-daygrid-day-number { font-size: 16px; font-weight: 500; color: #333; padding: 0; }
.festival_cal_left .fc-day-sun .fc-daygrid-day-number { color: #e53935; }
.festival_cal_left .fc-day-sat .fc-daygrid-day-number { color: #1e88e5; }

/* 오늘 날짜 (TODAY 캡슐) */
.festival_cal_left .fc-day-today { background: transparent !important; }
.festival_cal_left .fc-day-today .fc-daygrid-day-top::after {
    content: 'TODAY';
    display: block;
    position: absolute;
    top: 12px;
    right: 10px;
    font-size: 10px;
    color: #279e6b;
    border: 1px solid #279e6b;
    border-radius: 12px;
    padding: 1px 6px;
    font-weight: 700;
    z-index: 1;
}

/* 선택된 날짜 (초록색 배경) */
.festival_cal_left .fc-day-selected-custom { background: #3c9040 !important; }
.festival_cal_left .fc-day-selected-custom .fc-daygrid-day-number { color: #fff !important; }
.festival_cal_left .fc-day-selected-custom .fc-daygrid-day-top::after { color: #fff !important; border-color: #fff !important; }
.festival_cal_left .fc-day-selected-custom .summary-item { color: #fff !important; opacity: 1 !important; }
.festival_cal_left .fc-day-selected-custom .summary-item.festival .dot { background: #fff !important; }
.festival_cal_left .fc-day-selected-custom .summary-item.event .dot { background: #fff !important; }

/* 마우스 호버 시 날짜 강조 스타일 (연한 초록) - 선택된 날짜보다 우선순위 높게 설정 */
.festival_cal_left .fc-day-hover-custom { background: #e8f5e9 !important; transition: background 0.2s; }
.festival_cal_left .fc-day-hover-custom .fc-daygrid-day-number { color: #279e6b !important; font-weight: 700; }
.festival_cal_left .fc-day-hover-custom .fc-daygrid-day-top::after { color: #279e6b !important; border-color: #279e6b !important; }
.festival_cal_left .fc-day-hover-custom .summary-item { color: #279e6b !important; opacity: 1 !important; }
.festival_cal_left .fc-day-hover-custom .summary-item.festival .dot { background: #e53935 !important; }
.festival_cal_left .fc-day-hover-custom .summary-item.event .dot { background: #007bff !important; }

/* 이벤트 점 숨기기 */
.festival_cal_left .fc-daygrid-event-harness { display: none; }
.festival_cal_left .fc-daygrid-day-events { display: none; }

/* 날짜별 요약 스타일 */
.fc-day-summary {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 5px;
    padding: 0 10px;
    align-items: center; /* 중앙 정렬 유지 */
}
.summary-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px; /* 11px -> 12px (1pt 증가) */
    color: #666;
    white-space: nowrap;
}
.summary-item .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}
.summary-item.festival .dot { background: #e53935; } /* 축제: 빨간색 */
.summary-item.event .dot { background: #007bff; }    /* 행사: 파란색 */

/* 선택된 날짜 내 텍스트 색상 보정 */
.fc-day-selected-custom .summary-item { color: #fff; opacity: 0.9; }
.fc-day-selected-custom .summary-item.festival .dot { background: #fff; }
.fc-day-selected-custom .summary-item.event .dot { background: #fff; }

/* 우측 리스트 스타일 */
.festival_cal_tabs {
    display: flex;
    gap: 0;
    margin: -20px -15px 20px -15px; /* 부모 패딩 상쇄하여 박스 상단에 밀착 */
    border-bottom: 1px solid #eee;
}
.cal_tab_btn {
    flex: 1;
    padding: 15px 0;
    border: none;
    border-right: 1px solid #eee;
    background: #f9f9f9;
    font-size: 15px;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    transition: all 0.2s;
}
.cal_tab_btn:first-child { border-radius: 15px 0 0 0; }
.cal_tab_btn:last-child { border-right: none; border-radius: 0 15px 0 0; }
.cal_tab_btn:hover { background: #f1f1f1; color: #666; }
.cal_tab_btn.active {
    background: #3c9040;
    color: #fff;
}

.festival_cal_date_title {
    font-size: 22px;
    font-weight: 800;
    color: #000;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'font-B', sans-serif;
}
/* .festival_cal_date_title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #eee;
    margin-left: 15px;
} */


/* 스크롤바 커스텀 */
.festival_cal_list::-webkit-scrollbar { width: 5px; }
.festival_cal_list::-webkit-scrollbar-thumb { background: #eee; border-radius: 10px; }
.festival_cal_list::-webkit-scrollbar-track { background: transparent; }

.festival_cal_item {
    display: flex;
    gap: 20px;
    padding: 15px;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    background: #fff;
}
.festival_cal_item:hover {
    border-color: #279e6b;
    box-shadow: 0 5px 15px rgba(39, 158, 107, 0.08);
    transform: translateY(-2px);
}

.festival_cal_item_thumb {
    flex: 0 0 100px;
    height: 130px;
    border-radius: 8px;
    overflow: hidden;
    background: #f9f9f9;
}
.festival_cal_item_thumb img { width: 100%; height: 100%; object-fit: cover; }

.festival_cal_item_body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.festival_cal_item_title {
    font-size: 18px;
    font-weight: 800;
    color: #000;
    margin-bottom: 12px;
    line-height: 1.4;
    font-family: 'font-B', sans-serif;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.festival_cal_item_meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
    color: #666;
}
.festival_cal_item_meta div { display: flex; align-items: center; gap: 8px; }
.festival_cal_item_meta i {
    width: 22px;
    height: 22px;
    background: rgba(0,0,0,0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #888;
    flex-shrink: 0;
}
.festival_cal_item_meta span.label { font-weight: 700; color: #333; width: 35px; flex-shrink: 0; }

.festival_cal_empty { text-align: center; padding: 100px 20px; color: #999; font-size: 16px; font-weight: 500; }

/* 반응형 */
@media (max-width: 1100px) {
    .festival_cal_wrap { grid-template-columns: 1fr; align-items: stretch; }
    .festival_cal_left { width: 100%; max-width: 600px; margin: 0 auto; }
    .festival_cal_right { width: 100%; max-width: none; }
}

@media (max-width: 768px) {
    .festival_cal_left .fc-daygrid-day { height: 80px !important; }
    .festival_cal_left .fc-daygrid-day-top { padding-top: 5px; padding-left: 5px; }
    .festival_cal_left .fc-daygrid-day-number { font-size: 14px; }
    
    /* 모바일 오늘 날짜 스타일: TODAY 캡슐 대신 숫자 배경 강조 */
    .festival_cal_left .fc-day-today .fc-daygrid-day-top::after { display: none !important; } 
    
    /* 숫자와 요약을 감싸는 부모(FullCalendar 기본 a태그) 설정 */
    .festival_cal_left .fc-daygrid-day-number {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 0 !important;
        background: transparent !important; /* 바깥쪽 원 제거 */
    }

    .festival_cal_left .fc-day-today .fc-date-text {
        background: #279e6b;
        color: #fff !important;
        width: 22px;
        height: 22px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        font-weight: 700;
    }
    
    .fc-day-summary { margin-top: 3px; gap: 1px; padding: 0 2px; align-items: flex-start; width: 100%; }
    .summary-item { font-size: 10px; gap: 3px; justify-content: flex-start; }
    .summary-item .dot { width: 4px; height: 4px; }

    .festival_cal_right { height:auto; overflow:visible; display:block; }
    .festival_cal_list { max-height:none; overflow:visible; padding:0; }
}