/* 필터링 영역 */
.calendar-filters {
    margin-bottom: 60px;
}

.filter-section {
    margin-bottom: 10px;
}

.filter-section:last-of-type {
    margin-bottom: 0;
}

.filter-title {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
    display: none;
}

/* 시설 리스트 */
.facility-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.facility-item {
    padding: 10px 1.23%;
    background: #fff;
    border:1px solid #959595;
    border-radius: 0px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--color);
}

button.facility-item {
    font: inherit;
    line-height: inherit;
    text-align: center;
}

.facility-item:hover {
    border-color: #000000;
    color: #000000;
    transform: translateY(-1px);
}

.facility-item.active,
.facility-item.active:hover {
    background: #000000;
    border-color: #000000;
    color: white;
    transform: none;
}

/* 398px 이하에서 active 항목 텍스트를 좌우/상하 중앙 정렬 */
@media (max-width: 398px) {
    .facility-item.active {
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
}

/* 카테고리 리스트 */
.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

button.category-item {
    font: inherit;
    line-height: inherit;
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    text-align: left;
}

.category-item:focus-visible {
    outline: 2px solid #000;
    outline-offset: 2px;
}

.category-item:hover {
    border-color: var(--color);
    transform: translateY(-1px);
}

.category-item.active {
    background: transparent;
    border-color: none;
    color: white;
}

.category-item.active .legend-text {
    color: var(--color);
}

/* 분야 리스트 */
.field-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.field-item {
    display: flex;
    align-items: center;
    gap: 3px;
    /* padding: 8px 16px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 20px; */
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.field-item:hover {
    border-color: var(--color);
    transform: translateY(-1px);
}

.field-item.active {
    background: transparent;
}

.field-item.active .legend-text {
    color: var(--color);
}

/* 범례 동그라미 */
.legend-circle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.all-category, .all-field {
    background: #ffffff;
}

.legend-text {
    font-size: 14px;
    font-weight: 500;
    color: #333333;
}

/* 필터 액션 */
.filter-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.btn-reset {
    padding:5px 20px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-reset:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.btn-reset:active {
    transform: translateY(0);
}

/* 캘린더 컨트롤 */
.calendar-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 4rem;
    border-top: 1px solid #eeee;
    border-bottom: 1px solid #eeee;
    padding: 20px;
}

.calendar-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-btn {
    background: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
}

.nav-btn:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    transform: translateY(-2px);
}

.current-date {
    font-size:1.6rem;
    font-weight: 600;
    min-width: 350px;
    text-align: center;
}

.view-tabs {
    display: flex;
    gap: 0rem;
    width: 100%;
    justify-content: center;
}

.view-tab {
    padding: 15px 50px;
    background: white;
    border: 1px solid var(--color);
    border-radius: 0px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;    
    color: var(--color);
    margin-left: -1px;
}

.view-tab:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.view-tab.active {
    background: var(--color);
    color: white;
}

.view-tab.calendar-link {
    position: absolute;
    right: 5%;
    border-radius: 25px;    
    color: var(--color) !important;
    background: #fff;
}

/* .view-tab:first-child {
    border-radius: 20px 0px 0px 20px;
}
.view-tab:last-child {
    border-radius: 0px 20px 20px 0px;
} */

/* 검색 및 필터 */
.search-filter-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter-btn {
    padding: 0.6rem 1rem;
    background: white;
    border: 1px solid #e5e5e5;
    /* border-radius: var(--border-radius); */
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.filter-btn:hover {
    border-color: var(--color);
    color: var(--color);
}

.filter-btn.active {
    background: var(--color);
    border-color: var(--color);
    color: white;
    padding: 0.6rem 1rem;
}

.search-box {
    display: flex;
    gap: 0.5rem;
}

.search-input {
    padding: 0.6rem 1rem;
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    width: 250px;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(27, 148, 211, 0.1);
}

.search-btn {
    padding: 0.6rem 1rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.search-btn:hover {
    background: var(--primary-color);
    transform: translateY(-1px);
}

/* 이벤트 컨테이너 */
.events-container {
    overflow: hidden;
}

.events-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0px;
}

.events-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.events-count {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 600;
}


/* 빈 상태 */
.no-events {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.no-events i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-events h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.no-events p {
    font-size: 1rem;
    line-height: 1.6;
}

/* 이벤트 상세 모달 */
.event-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--light-gray);
}

.modal-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
}

.close-btn:hover {
    background: var(--light-gray);
    color: var(--text-primary);
}

.modal-body {
    margin-bottom: 1.5rem;
}

.event-detail-item {
    display: flex;
    margin-bottom: 1rem;
}

.event-detail-label {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 100px;
    margin-right: 1rem;
}

.event-detail-value {
    color: var(--text-secondary);
    flex: 1;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--light-gray);
}

.btn-primary {
    padding: 0.8rem 1.5rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.btn-primary:hover {
    background: var(--primary-color);
    transform: translateY(-1px);
}

.btn-secondary {
    padding: 0.8rem 1.5rem;
    background: white;
    color: var(--text-secondary);
    border: 2px solid var(--light-gray);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.btn-secondary:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}
.btn-detail {
    padding: 10px 30px;
    background: #ffffff;
    color: var(--color);
    border-radius: 30px;
    border: 1px solid #747474;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: auto;
}
.btn-detail:hover {
    background: var(--color);
    color: #ffffff;
}


/* 반응형 디자인 */
@media (max-width: 1024px) {
    .view-tabs { justify-content: flex-start; padding: 10px 20px !important;   padding: 0px !important;}    
}
@media (max-width: 768px) {    
    .calendar-full-container { padding-top: 60px !important;}
    .view-tab {
        padding: 0.6rem 3%;
        font-size: 0.9rem;
    }
    .view-tab.calendar-link  { border-radius: 0px;   }

    .facility-list, .category-list, .field-list {
        justify-content: flex-start; gap: 6px;
    }
    .facility-item {padding: 8px 10px;}
    .facility-item, .category-item, .field-item {
        font-size: 13px;  width: 48%; text-align: center;
    }
    .category-item{width: auto; margin-right: 10px;}
    .filter-actions {
        justify-content: center;
    }
    .btn-reset {
        width: 100%;
        margin-top: 20px;
    }
    
    /* 캘린더 툴바 모바일 - 가독성 개선 */
    .fc-header-toolbar {
        padding: 8px 6px !important;
        margin-bottom: 10px !important;
        background: #fff !important;
        border-bottom: 1px solid #e5e7eb !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.08) !important;
    }
    
    .fc-toolbar {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
        padding: 8px 4px !important;
        align-items: center !important;
        justify-content: center !important;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        width: 100% !important;
        box-sizing: border-box !important;
        z-index: 100 !important;
        background: #fff !important;
    }
    
    /* 날짜 제목을 위에 배치 - 전체 너비 사용 */
    .fc-toolbar-chunk:nth-child(2) {
        order: 1 !important;
        width: 100% !important;
        flex-basis: 100% !important;
        justify-content: center !important;
        margin-bottom: 6px !important;
        flex-shrink: 0 !important;
    }
    
    /* 버튼들을 아래에 가로로 일자 배치 */
    .fc-toolbar-chunk:first-child,
    .fc-toolbar-chunk:last-child {
        order: 2 !important;
        width: auto !important;
        flex-basis: auto !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
    }
    
    .fc-toolbar-chunk {
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
        flex-shrink: 0 !important;
        min-width: 0 !important;
        position: relative !important;
        z-index: 10 !important;
    }
    
    .fc-button-group {
        display: flex !important;
        gap: 3px !important;
    }
    
    /* 버튼 크기 및 가독성 개선 */
    .fc-button, .fc .fc-button-primary {
        padding: 7px 9px !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        min-height: 38px !important;
        min-width: 38px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 5px !important;
        transition: all 0.2s ease !important;
        color: #374151 !important;
        background: #f9fafb !important;
        border: 1px solid #d1d5db !important;
        box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
    }
    
    .fc-button:hover, .fc .fc-button-primary:hover {
        background: #f3f4f6 !important;
        border-color: #9ca3af !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    }
    
    .fc-button:active, .fc .fc-button-primary:active {
        background: #e5e7eb !important;
        transform: scale(0.98) !important;
    }
    
    .fc-icon {
        font-size: 0.95em !important;
        color: #374151 !important;
        font-weight: 600 !important;
    }
    
    .fc-prev-button,
    .fc-next-button {
        padding: 7px 7px !important;
        min-width: 36px !important;
    }
    
    .fc-today-button {
        padding: 7px 11px !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        min-height: 38px !important;
        white-space: nowrap !important;
    }
    
    .fc-toolbar-title {
        font-size: 17px !important;
        font-weight: 700 !important;
        margin: 0 !important;
        white-space: nowrap !important;
        flex: none !important;
        text-align: center !important;
        width: 100% !important;
        overflow: visible !important;
        text-overflow: clip !important;
        color: #111827 !important;
        letter-spacing: -0.01em !important;
        z-index: 30 !important;
        position: relative !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        line-height: 1.4 !important;
        text-shadow: none !important;
        padding: 4px 0 !important;
    }
    
    .fc-dayGridMonth-button {
        padding: 7px 13px !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        min-height: 38px !important;
        white-space: nowrap !important;
    }
    
    .fc-button-active, .fc .fc-button-primary.fc-button-active {
        background: #3b82f6 !important;
        border-color: #3b82f6 !important;
        color: #fff !important;
        box-shadow: 0 2px 4px rgba(59,130,246,0.3) !important;
    }
    
    .fc-button-active .fc-icon,
    .fc .fc-button-primary.fc-button-active .fc-icon {
        color: #fff !important;
    }
    
    /* 날짜 제목이 다른 요소에 가려지지 않도록 */
    .fc-toolbar-title::before {
        content: '';
        position: absolute;
        left: -5px;
        right: -5px;
        top: -2px;
        bottom: -2px;
        background: #fff;
        z-index: -1;
    }
    
    /* 캘린더 페이지에서 퀵메뉴 닫기 버튼을 캘린더 상단에 고정 */
    /* :has() 선택자 지원 브라우저용 */
    body:has(.calendar-full-container) .quick-menu-close,
    body:has(.calendar-full-container) #page-wrapper .quick-menu-close {
        position: fixed !important;
        top: 60px !important; /* 캘린더 상단 위치 */
        right: 10px !important;
        left: auto !important;
        width: 40px !important;
        height: 40px !important;
        z-index: 1000 !important;
        background: #c5c5c5 !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
        transform: none !important;
        margin-top: 0 !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* 퀵메뉴가 열려있을 때도 캘린더 페이지에서는 상단 고정 유지 */
    body:has(.calendar-full-container) .quick-menu-fixed:not(.hidden) ~ .quick-menu-close,
    body:has(.calendar-full-container) .quick-menu-fixed:not(.hidden) + .quick-menu-close {
        top: 60px !important;
    }
    
    /* :has() 미지원 브라우저를 위한 대체 방법 - 캘린더 컨테이너와 형제 관계일 때 */
    .calendar-full-container ~ .quick-menu-close,
    #page-wrapper:has(.calendar-full-container) .quick-menu-close {
        position: fixed !important;
        top: 60px !important;
        right: 10px !important;
        left: auto !important;
        width: 40px !important;
        height: 40px !important;
        z-index: 1000 !important;
        background: #c5c5c5 !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
        transform: none !important;
        margin-top: 0 !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .calendar-controls {
        flex-direction: column;
        gap: 0.5rem;
        padding: 10px 0px;
        margin-bottom: 2rem;
    }
    .calendar-nav {gap: 0.2rem;}
    .current-date {min-width: auto; font-size: 1.0rem;}
    
    .search-filter-section {
        flex-direction: column;
        gap: 1rem;
        padding: 0rem;
    }
    
    .filter-group {
        flex-wrap: wrap;
    }

    .filter-btn {  padding: 0.6rem 0.5rem;}
    
    .search-box {
        width: 100%;
    }
    
    .search-input {
        width: 100%;
    }
    
    .events-container {
        padding: 0rem;
    }
    
    .events-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .events-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .event-card {
        margin-bottom: 1rem;
    }    
    
    /* 내용이 없으면 info-item 숨김 */
    .info-item:has(span:empty) {
        display: none;
    }
    .info-item span:empty {
        display: none;
    }
    
    
    .event-title {
        font-size: 1.1rem;
    }
    
    .event-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-detail {
        margin-right: 0;
        width: 100%;
    }
    
    .btn-bookmark {
        align-self: center;
    }
    
    /* FullCalendar 버튼 크기 더 작게 조정 */
    .fc-button, .fc .fc-button-primary {
        padding: 4px 8px !important;
        font-size: 11px !important;
        min-height: 28px !important;
    }
    
    .fc-icon {
        font-size: 0.7em !important;
    }
    
    .fc-today-button {
        padding: 4px 8px !important;
        font-size: 11px !important;
    }
    
    .fc-button-group {
        gap: 3px !important;
    }
    
    .fc-toolbar-title {
        font-size: 20px !important;
    }
    
    /* 더보기 링크 모바일 스타일 */
    .fc-daygrid-more-link,
    .fc-more-link {
        padding: 3px 8px !important;
        font-size: 11px !important;
        margin-top: 3px !important;
        width: 100% !important;
        text-align: center !important;
    }
}

@media (max-width: 480px) {
    .view-tabs {
        flex-wrap: wrap;
    }
    
    .events-title {
        font-size: 1.3rem;
    }
    
    .events-count {
        font-size: 0.9rem;
    }
    
    .modal-content {
        padding: 1rem;
        width: 95%;
    }
    
    .event-detail-item {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .event-detail-label {
        min-width: auto;
        margin-right: 0;
    }
    
    /* FullCalendar 버튼 크기 매우 작게 조정 (480px 이하) */
    .fc-button, .fc .fc-button-primary {
        padding: 3px 6px !important;
        font-size: 10px !important;
        min-height: 24px !important;
    }
    
    .fc-icon {
        font-size: 0.65em !important;
    }
    
    .fc-today-button {
        padding: 3px 6px !important;
        font-size: 10px !important;
    }
    
    .fc-button-group {
        gap: 2px !important;
    }
    
    .fc-toolbar-title {
        font-size: 18px !important;
    }
    
    .fc-toolbar-chunk {
        gap: 4px !important;
    }
    
    /* 더보기 링크 작은 화면 스타일 */
    .fc-daygrid-more-link,
    .fc-more-link {
        padding: 2px 6px !important;
        font-size: 10px !important;
        margin-top: 2px !important;
    }
}

/* 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.events-container {
    animation: fadeIn 0.5s ease-out;
}

.event-card {
    animation: fadeIn 0.3s ease-out;
}

/* 로딩 상태 */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--light-gray);
    border-radius: 50%;
    border-top-color: var(--secondary-color);
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 캘린더 전체 스타일 */
.calendar-full-container {
    padding-top: 70px;
 }
 
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 2px solid #f0f0f0;
}

.calendar-title {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin: 0;
}


.fc-theme-standard .fc-scrollgrid {border-top: solid 1px var(--color) !important;}

/* 웹접근성: scrollgrid 레이아웃 table→div 변환 후에도 동일하게 표시 */
.fc .fc-scrollgrid {
    display: table;
    width: 100%;
    border-collapse: collapse;
}
.fc .fc-scrollgrid > div {
    display: table-row-group;
}
.fc .fc-scrollgrid-section {
    display: table-row;
}
.fc .fc-scrollgrid-section > div {
    display: table-cell;
    vertical-align: top;
}

.fc-theme-standard th.fc-col-header-cell {
    border-top: solid 1px var(--color) !important;
}
.fc-theme-standard th .fc-scrollgrid-sync-inner {padding: 10px 0px;}

.fc .fc-daygrid-day-frame {min-height: 150px !important;}

.fc .fc-day-other .fc-daygrid-day-top {
    opacity: 1;
}

.fc .fc-daygrid-day.fc-day-other:not(.fc-day-today) {
    background: #f5f5f5 !important;
}

.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky > * {
    top: 0px;
    border-top-width: 1px;
}
/* FullCalendar  */        
.fc-toolbar-title {
    font-size: 30px !important;
    font-weight: bold !important;
}

.fc-button, .fc .fc-button-primary {
    background: #6b7280 !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 8px 16px !important;
    font-weight: 500 !important;
    color: white !important;
}

.fc-button:hover {
    background: var(--color3) !important;
}

.fc-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25) !important;
}

/* WCAG 1.4.1: 활성/비활성을 색만으로 구분하지 않음 (문구) */
.fc-button:disabled,
.fc .fc-button-primary:disabled {
    opacity: 1 !important;
    background: #838a92 !important;
    color: #ffffff !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    text-decoration: none !important;
}

.fc-today-button:disabled::after {
    content: ' (현재)';
    font-weight: 400;
    font-size: 0.9em;
}

.fc-button-primary:not(:disabled).fc-button-active {
    background: var(--color) !important;
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
}

.fc-daygrid-day-number {
    color: #333 !important;
    font-weight: 500 !important;
}

.fc-day-today {
    background: #e3f2fd !important;
}

/* 오늘 날짜 — td 외곽선 + 좌측 상단 '오늘' 라벨 */
.fc-daygrid-day.fc-day-today {
    position: relative;
    outline: 2px solid #1976d2;
    outline-offset: -2px;
}

.fc-daygrid-day.fc-day-today::before {
    content: '오늘';
    position: absolute;
    top: 8px;
    left: 10px;
    z-index: 2;
    font-size: 12px;
    font-weight: 700;
    color: #1565c0;
    line-height: 1;
    pointer-events: none;
}

/* 토요일과 일요일 색상 */
.fc-day-sat .fc-daygrid-day-number {
    color: #0066cc !important; /* 파란색 */
}

.fc-day-sun .fc-daygrid-day-number {
    color: #cc0000 !important; /* 빨간색 */
}

/* 요일 헤더 색상 */
.fc-col-header-cell.fc-day-sat a {
    color: #0066cc !important; /* 파란색 */
}

.fc-col-header-cell.fc-day-sun a {
    color: #cc0000 !important; /* 빨간색 */
}

.fc .fc-button-group {
    display: inline-flex;
    position: relative;
    vertical-align: middle;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

/* 이벤트 스타일 */
.fc-event {
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    color: #333 !important;
    display: flex;
    overflow: visible !important;
    min-height: auto !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid #e5e7eb !important;
}

.fc-list-event {align-items: center;}        
.fc-list-event .fc-theme-standard td {border: none !important;;}

.fc-event-title {
    font-weight: 500 !important;
    line-height: 1.2 !important;
    color: var(--color) !important;
    padding: 0px !important;
    height: auto !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    text-overflow: ellipsis !important;
    word-wrap: break-word !important;
}

.fc-event-title.fc-sticky {
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    text-overflow: ellipsis !important;
    word-wrap: break-word !important;
}

.fc .fc-daygrid-day-events {
    margin-top: 0px;
    padding: 10px;
}

/* 하루의 이벤트 목록 하단 영역 - 상단 보더 제거 */
.fc-daygrid-day-bottom {
    border-top: none !important;
}

/* 카테고리별 동그라미 아이콘과 텍스트 */
.fc-event::before {
    content: '';
    display: inline-block;
    width: 16px;
    min-width: 16px;
    height: 16px;
    min-height: 16px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
    text-align: center;
    line-height: 16px;
    font-size: 10px;
    font-weight: bold;
    color: white;
}

/* 중복 카테고리용 추가 동그라미는 JavaScript로 처리 */

.fc-event-selected, .fc-event:focus {
   box-shadow: none !important;
}

.fc-event:focus a {    background: #fff !important;
    border: none !important;}

/* 이벤트 카테고리별 동그라미 색상과 텍스트 */
.event-performance::before {
    background: #b50000 !important;
    content: '공' !important;
}

.event-exhibition::before {
    background: #0b5f58 !important;
    content: '전' !important;
}

.event-festival::before {
    background: #b04a00 !important;
    content: '축' !important;
}

.event-education::before {
    background: #1565c0 !important;
    content: '교' !important;
}

.event-event::before {
    background: #4f3fbf !important;
    content: '행' !important;
}

.event-orchestra::before {
    background: #7a4f24 !important;
    content: '시' !important;
}

.event-region::before {
  background: #7a3d8f !important;
  content: '지' !important;
}

.event-experience::before {
  background: #e67e22 !important;
  content: '체' !important;
}

/* 분야 동그라미 스타일 */
.field-circle {
    display: inline-block !important;
    width: 16px !important;
    min-width: 16px !important;
    height: 16px !important;
    min-height: 16px !important;
    border-radius: 50% !important;
    margin-top: -2px !important;
    margin-right: 4px !important;
    vertical-align: middle !important;
    text-align: center !important;
    line-height: 16px !important;
    font-size: 10px !important;
    font-weight: bold !important;
    color: white !important;
}

/* 중복 카테고리는 JavaScript로 동적 처리 */

/* 이벤트 카드 스타일 */
.event-category-container {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.event-field {
    display: inline-block;
    padding: 4px 12px;
    background: #feede2;
    color: #8f3900;
    border-radius: 0px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* 빈 event-field 숨기기 */
.event-field:empty {
    display: none !important;
}

/* 빈 텍스트만 있는 경우도 숨김 */
.event-field:has(span:empty) {
    display: none !important;
}

/* 이벤트 호버 효과 */
.fc-event:hover {
    color: var(--color) !important;
    transform: scale(1) !important;
    transition: all 0.2s ease !important;
}
.fc-event:hover .fc-event-title {
    color: var(--color2) !important;
}
.fc-daygrid-event {white-space: normal !important; word-break: normal;}

/* 더보기 링크 스타일 */
.fc-daygrid-more-link,
.fc-more-link {
    display: inline-block !important;
    padding: 4px 10px !important;
    margin-top: 4px !important;
    background: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 4px !important;
    color: var(--color) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    line-height: 1.4 !important;
}

.fc-daygrid-more-link:hover,
.fc-more-link:hover {
    background: var(--color) !important;
    border-color: var(--color) !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.fc-daygrid-more-link:focus,
.fc-more-link:focus {
    outline: 2px solid var(--color) !important;
    outline-offset: 2px !important;
}

/* 이벤트 상세 팝업 모달 */
.event-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.event-detail-content {
    background: white;
    border-radius: 10px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    top: 50px;
    overflow: hidden;
}

.event-detail-thumbnail {
    width: 100%;
    height: 400px;
    background: linear-gradient(176deg, #dfdfdf 0%, #000000 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: bold;
    position: relative;
    overflow: hidden;
}

.event-detail-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.event-detail-thumbnail .thumbnail-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.event-detail-thumbnail .thumbnail-placeholder i {
    font-size: 24px;
    margin-bottom: 10px;
    opacity: 0.8;
}

.event-detail-body {
    padding: 30px;
}

.event-detail-close {
    position: absolute;
    top: 15px;
    right: 20px;
    z-index: 10;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #333;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.event-detail-close:hover {
    color: #111;
    background: #fff;
}

.event-detail-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    padding-right: 30px;
}

.event-detail-info {
    margin-bottom: 25px;
}

.event-detail-info p {
    margin: 8px 0;
    color: #666;
    font-size: 14px;
}

.event-detail-info strong {
    color: #333;
    font-weight: 600;
    min-width: 60px;
    display: inline-block;
}

.event-detail-actions {
    text-align: center;
}

/* 모바일: 이벤트 상세 모달 top 축소, 썸네일 높이 300px */
@media (max-width: 768px) {
    .event-detail-content {
        top: 12px;
    }
    .event-detail-thumbnail {
        height: 300px;
    }
}

/* 375px 이하: event-detail-body 글씨·높이 축소, 썸네일 250px */
@media (max-width: 375px) {
    .event-detail-thumbnail {
        height: 250px;
    }
    .event-detail-body {
        padding: 14px 16px;
    }
    .event-detail-title {
        font-size: 15px;
        margin-bottom: 10px;
        padding-right: 26px;
    }
    .event-detail-info {
        margin-bottom: 12px;
    }
    .event-detail-info p {
        margin: 4px 0;
        font-size: 12px;
    }
    .event-detail-info strong {
        min-width: 48px;
        font-size: 12px;
    }
    .event-detail-close {
        font-size: 20px;
        top: 10px;
        right: 12px;
    }
}

/* 이벤트 범례 스타일 */
.event-legend {
    margin-top: 30px;
}

.legend-items {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.legend-item {
    display: flex;
    gap: 5px;
    align-items: center;
}

.legend-circle {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
    text-shadow: 0 1px 1px rgb(0 0 0 / 22%);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 20%), 0 1px 2px rgb(0 0 0 / 12%);
    flex-shrink: 0;
    position: relative;
}

.legend-circle::before {
    display: flex;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
}

/* 범례 동그라미별 색상과 텍스트 */
.legend-circle.event-performance {
    background: #b50000;
}

.legend-circle.event-performance::before {
    content: '공';
}

.legend-circle.event-exhibition {
    background: #0b5f58;
}

.legend-circle.event-exhibition::before {
    content: '전';
}

.legend-circle.event-festival {
    background: #b04a00;
}

.legend-circle.event-festival::before {
    content: '축';
}

.legend-circle.event-education {
    background: #1565c0;
}

.legend-circle.event-education::before {
    content: '교';
}

.legend-circle.event-event {
    background: #4f3fbf;
}

.legend-circle.event-event::before {
    content: '행';
}

.legend-circle.event-orchestra {
    background: #7a4f24;
}

.legend-circle.event-orchestra::before {
    content: '시';
}

.legend-circle.event-region {
    background: #7a3d8f;
}

.legend-circle.event-region::before {
    content: '지';
}

.legend-circle.event-planning {
    background: #9c27b0;
}

.legend-circle.event-planning::before {
    content: '기';
}

.legend-circle.event-rental {
    background: #ff9800;
}

.legend-circle.event-rental::before {
    content: '대';
}

.legend-circle.event-troupe {
    background: #795548;
}

.legend-circle.event-troupe::before {
    content: '예';
}

.fc-timegrid-event {
  max-width: 100% !important;
  width: 100% !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}



 /* 반응형 */
 /* 1022px 이상부터의 월단위 캘린더 스타일만 사용, 작은 화면에서도 월단위 캘린더가 보여지는데 가로스크롤이 되도록 */
 @media (max-width: 1024px) {
     .calendar-header {
         flex-direction: column;
         gap: 15px;
         text-align: center;
     }
     
     .calendar-title {
         font-size: 24px;
     }             
     
     .fc-toolbar-chunk {
         display: flex !important;
         justify-content: center !important;
     }
     
     /* FullCalendar 버튼 크기 조정 */
     .fc-button, .fc .fc-button-primary {
         padding: 6px 12px !important;
         font-size: 12px !important;
     }
     
     .fc-icon {
         font-size: 1.5em !important;
     }
     
     .fc-today-button {
         padding: 6px 10px !important;
         font-size: 12px !important;
     }
     
     /* 전체 캘린더 가로 스크롤 - 작은 화면에서도 월단위 캘린더가 보이도록 */     
     .calendar-full-container .calendar-wrapper {
         width: 100%;
         overflow-x: auto;
         padding-top: 10px;
         -webkit-overflow-scrolling: touch;
         position: relative;
         padding-top: 100px;
     }
     
     #calendar {
         min-width: 1000px;
         width: 100%;
     }
     
     /* 범례 반응형 */
     .legend-items {
         gap: 15px;
     }
     
     .legend-item {
         gap: 6px;
     }
     
     .legend-circle {
         width: 14px;
         height: 14px;
         font-size: 9px;
     }
     
     .legend-text {
         font-size: 13px;
     }
     .fc .fc-daygrid-event-harness{font-size: 13px !important; margin-bottom: 5px;}
 }

 /* 작은 화면에서 달력 크기 조정 및 주간 뷰 */
 /* 1021px 이하, 500px 이하부터 캘린더 fc-view-harness fc-view-harness-passive 부분의 스타일을 주석처리 (나중에 바뀔수도 있으니) */
 /*
 @media (max-width: 1021px) {
     .calendar-full-container .calendar-wrapper {
         width: 100%;
         overflow-x: visible;
         padding-top: 10px;
     }
     
     #calendar {
         min-width: 100% !important;
         width: 100% !important;
     }
     
     FullCalendar 크기 조정
     .fc {
         font-size: 12px !important;
     }
     
     .fc-toolbar {
         flex-direction: column;
         gap: 10px;
     }
     
     .fc-toolbar-title {
         font-size: 18px !important;
     }
     
     .fc-button {
         padding: 6px 10px !important;
         font-size: 12px !important;
     }
     
     .fc-daygrid-day {
         min-height: 60px !important;
     }
     
     .fc-daygrid-day-frame {
         min-height: 60px !important;
     }
     
     주간 뷰일 때 높이 조정
     .fc-timeGridWeek-view .fc-timegrid-body {
         max-height: 500px !important;
     }
     
     .fc-dayGridWeek-view .fc-daygrid-body {
         max-height: 400px !important;
     }
 }
 */

 /* 500px 이하 모바일 레이아웃 - 세로 배치 */
 /* 1021px 이하, 500px 이하부터 캘린더 fc-view-harness fc-view-harness-passive 부분의 스타일을 주석처리 (나중에 바뀔수도 있으니) */
 /*
 @media (max-width: 500px) {
     .calendar-full-container .calendar-wrapper {
         width: 100% !important;
         overflow-x: visible !important;
     }
     
     #calendar {
         width: 100% !important;
         min-width: 100% !important;
     }
     
     요일 헤더 숨기기
     .fc .fc-col-header {
         display: none !important;
     }
     
     달력 그리드를 세로로 배치
     .fc .fc-daygrid-body {
         display: flex !important;
         flex-direction: column !important;
     }
     
     각 날짜 셀을 테이블 행처럼 배치
     .fc .fc-daygrid-day {
         display: flex !important;
         flex-direction: row !important;
         width: 100% !important;
         min-height: auto !important;
         border-bottom: 1px solid #ddd !important;
         padding: 10px 0 !important;
         align-items: flex-start !important;
     }
     
     .fc .fc-daygrid-day-frame {
         display: flex !important;
         flex-direction: row !important;
         width: 100% !important;
         min-height: auto !important;
         align-items: flex-start !important;
         gap: 0 !important;
     }
     
     1열: 요일/날짜 영역
     .fc .fc-daygrid-day-top {
         flex: 0 0 80px !important;
         min-width: 80px !important;
         max-width: 80px !important;
         display: flex !important;
         flex-direction: column !important;
         align-items: center !important;
         justify-content: flex-start !important;
         padding-right: 15px !important;
         border-right: 1px solid #e5e7eb !important;
     }
     
     .fc .fc-daygrid-day-number {
         font-size: 14px !important;
         font-weight: 600 !important;
         margin-bottom: 5px !important;
     }
     
     요일 표시 (요일 헤더 대신)
     .fc .fc-daygrid-day-top::before {
         content: attr(data-day-name);
         font-size: 11px !important;
         color: #666 !important;
         display: block !important;
         margin-bottom: 3px !important;
     }
     
     요일이 없을 때 숨기기
     .fc .fc-daygrid-day-top:not([data-day-name])::before {
         display: none !important;
     }
     
     2열: 이벤트 영역 - 더 넓게
     .fc .fc-daygrid-day-events {
         flex: 1 1 auto !important;
         width: calc(100% - 95px) !important;
         min-width: 0 !important;
         max-width: none !important;
         margin: 0 !important;
         padding: 0 0 0 15px !important;
         display: flex !important;
         flex-direction: column !important;
         gap: 5px !important;
     }
     
     이벤트 스타일 조정
     .fc-event {
         width: 100% !important;
         max-width: 100% !important;
         margin: 0 !important;
     }
     
     .fc-event-title {
         font-size: 13px !important;
         line-height: 1.4 !important;
     }
     
     날짜 번호만 표시하고 다른 요소 숨기기
     .fc .fc-daygrid-day-top .fc-daygrid-day-number {
         display: block !important;
     }
     
     스크롤 가능하도록
     .fc-scroller {
         overflow-y: auto !important;
         overflow-x: hidden !important;
     }
 }
 */