@import url('https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700;900&family=Montserrat:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #3B82F6;
    --primary-dark: #2563EB;
    --primary-light: #60A5FA;
    --secondary-color: #10B981;
    --accent-color: #8B5CF6;
    --background-light: #F9FAFB;
    --background-dark: #1F2937;
    --text-dark: #1F2937;
    --text-light: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.3s ease;
    --border-radius: 0.5rem;
    --border-radius-lg: 1rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', 'Montserrat', sans-serif;
    background: linear-gradient(to bottom, #f0f9ff, #e0f2fe);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 헤더 스타일링 */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 2rem 0;
    text-align: center;
    border-bottom-left-radius: 30% 5%;
    border-bottom-right-radius: 30% 5%;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 60%);
    animation: pulse 15s infinite;
}

header h1 {
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

header p {
    font-weight: 300;
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* 컨테이너 스타일링 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    animation: fadeIn 0.8s ease-out;
}

/* 필터 섹션 스타일링 */
.filter-section {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    transform: translateY(0);
    transition: var(--transition);
}

.filter-section:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.filter-section label {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    display: block;
}

.filter-section select,
.filter-section input[type="text"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    background-color: var(--gray-100);
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236B7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11a.5.5 0 0 1-.4-.2l-3-4a.5.5 0 0 1 .8-.6L8 9.8l2.6-3.6a.5.5 0 1 1 .8.6l-3 4A.5.5 0 0 1 8 11z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.filter-section select:focus,
.filter-section input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.filter-section button {
    background: linear-gradient(to right, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.filter-section button:hover {
    background: linear-gradient(to right, var(--primary-dark), var(--accent-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* 달력 스타일링 */
.calendar-container {
    max-width: 100%;
    margin: 0 auto;
    background: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(to right, var(--primary-light), var(--primary-color));
    color: white;
}

#calendar-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.calendar-header button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-header button:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.calendar-day-header {
    text-align: center;
    padding: 1rem;
    font-weight: 600;
    background-color: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
}

.calendar-day {
    min-height: 120px;
    padding: 0.75rem;
    background-color: white;
    border: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: var(--transition);
}

.calendar-day:hover {
    background-color: var(--gray-100);
    transform: scale(1.02);
    z-index: 10;
    box-shadow: var(--shadow);
}

.calendar-day-number {
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    flex-shrink: 0;
    font-size: 1.1rem;
}

.day-events {
    max-height: 120px;
    overflow-y: auto;
    flex-grow: 1;
    scrollbar-width: thin;
    scrollbar-color: var(--gray-400) var(--gray-100);
    margin-right: -2px;
    padding-right: 2px;
}

.day-events::-webkit-scrollbar {
    width: 4px;
}

.day-events::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 10px;
}

.day-events::-webkit-scrollbar-thumb {
    background-color: var(--gray-400);
    border-radius: 10px;
}

.calendar-event {
    font-size: 0.65rem;
    padding: 0.4rem 0.6rem;
    margin-bottom: 0.4rem;
    background: linear-gradient(to right, var(--primary-light), var(--primary-color));
    color: white;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    transform: translateY(0);
}

.calendar-event:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    background: linear-gradient(to right, var(--primary-color), var(--primary-dark));
}

.calendar-day.today {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(16, 185, 129, 0.15));
    border: 2px solid var(--secondary-color);
}

.calendar-day.today .calendar-day-number {
    color: var(--secondary-color);
}

/* 축제 카드 스타일링 */
.festival-cards-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    position: relative;
    display: inline-block;
}

.festival-cards-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

#festival-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.festival-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    background-color: white;
    box-shadow: var(--shadow);
    position: relative;
    animation: fadeInUp 0.5s ease-out;
}

/* 행사중 배지 스타일 */
.event-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #10b981, #3b82f6);
    color: white;
    padding: 5px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 4px;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    animation: pulse-light 2s infinite;
}

/* D-day 배지 스타일 */
.dday-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: white;
    padding: 5px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 4px;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* 특별 강조 D-day (7일 이내) */
.dday-badge.soon {
    background: linear-gradient(135deg, #f97316, #dc2626);
    animation: pulse-light-orange 2s infinite;
}

/* 행사종료 배지 스타일 */
.end-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #4b5563, #6b7280);
    color: white;
    padding: 5px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 4px;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

@keyframes pulse-light-orange {
    0% {
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(249, 115, 22, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0);
    }
}

@keyframes pulse-light {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.festival-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.festival-card .relative {
    overflow: hidden;
}

.festival-card img {
    transition: transform 0.6s ease;
}

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

.festival-card .p-4 {
    padding: 1.5rem;
}

.festival-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.festival-card p {
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}

.detail-btn {
    background: linear-gradient(to right, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    width: 100%;
    margin-top: 0.5rem;
}

.detail-btn:hover {
    background: linear-gradient(to right, var(--primary-dark), var(--accent-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* 모달 스타일링 */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    opacity: 1;
    will-change: opacity;
}

.modal-content {
    position: relative;
    background-color: #ffffff;
    margin: 0 auto;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeIn 0.3s ease-out;
    transform: scale(0.98);
}

.close-button {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    padding: 0.5rem;
    font-size: 1rem;
    cursor: pointer;
    z-index: 10;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-button:hover {
    background-color: var(--primary-color);
    transform: rotate(90deg);
}

/* 모달 헤더 */
.modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 1.2rem 2rem 1.5rem;
    position: relative;
    overflow: visible;
}

.modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1MCIgaGVpZ2h0PSI1MCIgdmlld0JveD0iMCAwIDUwIDUwIj48ZyBmaWxsPSJ3aGl0ZSIgb3BhY2l0eT0iMC4yIj48Y2lyY2xlIGN4PSIyNSIgY3k9IjI1IiByPSIzIi8+PC9nPjwvc3ZnPg==');
    opacity: 0.1;
}

.modal-title-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    line-height: 1.3;
}

.modal-subtitle {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
    line-height: 1.5;
    padding-bottom: 0;
}

.modal-subtitle span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.15rem 0;
}

/* 상태 배지 스타일 */
.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.status-badge.ongoing {
    background-color: #10b981;
    color: white;
}

.status-badge.upcoming {
    background-color: #3b82f6;
    color: white;
}

/* D-day 스타일 강화 */
.status-badge.upcoming.soon {
    background: linear-gradient(135deg, #f97316, #dc2626);
    color: white;
    animation: pulse-light-orange 2s infinite;
}

.status-badge.past {
    background-color: #6b7280;
    color: white;
}

/* 인라인 배지 (정보 카드 내) */
.badge-inline {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 50px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.badge-small {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
}

.badge-small.upcoming {
    background-color: #3b82f6;
    color: white;
}

.badge-small.upcoming.soon {
    background: linear-gradient(135deg, #f97316, #dc2626);
    color: white;
}

/* 모달 바디 */
.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--gray-400) var(--gray-100);
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: var(--gray-100);
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 10px;
}

.modal-section {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.festival-main-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.festival-image-container {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.main-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    aspect-ratio: 4/3;
    cursor: pointer;
}

.main-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.main-image-wrapper:hover img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.main-image-wrapper:hover .image-overlay {
    opacity: 1;
}

.overlay-content {
    color: white;
    text-align: center;
}

.overlay-content i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.info-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.info-card-header {
    background: linear-gradient(to right, var(--primary-light), var(--primary-color));
    color: white;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-card-header i {
    font-size: 1.2rem;
}

.info-card-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.info-card-content {
    padding: 1.2rem;
    flex: 1;
}

.info-item {
    display: flex;
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--gray-200);
}

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

.info-label {
    width: 110px;
    flex-shrink: 0;
    font-weight: 600;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-value {
    flex: 1;
}

.section-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.section-card-header {
    background: linear-gradient(to right, var(--primary-light), var(--primary-color));
    color: white;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-card-header i {
    font-size: 1.2rem;
}

.section-card-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.section-card-content {
    padding: 1.2rem;
    line-height: 1.6;
}

/* 갤러리 섹션 */
.gallery-section {
    padding-bottom: 3rem;
}

.gallery-card .section-card-content {
    padding: 1.5rem 0 0;
}

.image-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}

.slider-container {
    display: flex;
    transition: transform 0.5s ease;
}

.slide {
    flex: 0 0 100%;
    padding: 0 1.5rem;
}

.slide-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    aspect-ratio: 16/9;
    cursor: pointer;
}

.slide-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.slide-image-wrapper:hover img {
    transform: scale(1.05);
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.slide-image-wrapper:hover .slide-overlay {
    opacity: 1;
}

.slide-overlay-content {
    color: white;
    font-size: 2rem;
}

.image-caption {
    text-align: center;
    margin-top: 2.5rem;
    padding: 0 1rem;
    font-size: 0.9rem;
    color: var(--gray-600);
    position: relative;
    z-index: 5;
}

.slider-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.slider-button:hover {
    background-color: white;
    transform: translateY(-50%) scale(1.1);
}

.prev-button {
    left: 20px;
}

.next-button {
    right: 20px;
}

.slider-pagination {
    position: absolute;
    bottom: 50px;
    left: 20px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    z-index: 10;
}

.slider-dots {
    position: absolute;
    bottom: 60px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 5px;
    border-radius: 20px;
    width: fit-content;
    margin: 0 auto;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background-color: white;
    transform: scale(1.5);
}

/* 모달 푸터 */
.modal-footer {
    background-color: var(--gray-100);
    padding: 1rem 2.5rem;
    border-top: 1px solid var(--gray-200);
}

.modal-footer-info {
    display: flex;
    justify-content: center;
    align-items: center;
}

.info-text {
    color: var(--gray-500);
    font-size: 0.9rem;
    text-align: center;
}

.modal-footer-buttons {
    display: none;
}

/* 오류 표시 */
.error-container {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.error-icon {
    font-size: 4rem;
    color: #ef4444;
    margin-bottom: 1.5rem;
}

.error-container h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1f2937;
}

.error-container p {
    font-size: 1.1rem;
    color: #4b5563;
    margin-bottom: 1.5rem;
}

.error-details {
    font-size: 0.9rem;
    color: #6b7280;
    padding: 0.75rem 1.5rem;
    background-color: #f3f4f6;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.retry-button {
    padding: 0.8rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.retry-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

/* 전체화면 이미지 보기 */
.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fullscreen-overlay.active {
    opacity: 1;
}

.fullscreen-overlay.closing {
    opacity: 0;
}

.fullscreen-image-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.fullscreen-image-container img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.fullscreen-caption {
    color: white;
    margin-top: 1rem;
    text-align: center;
    font-size: 1rem;
    max-width: 80%;
}

.fullscreen-close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    background-color: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.fullscreen-close-btn:hover {
    transform: rotate(90deg);
}

/* 반응형 설계 */
@media (max-width: 992px) {
    .festival-main-info {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .modal-content {
        width: 95%;
        transform: scale(1);
    }
    
    .modal-header {
        padding: 1.2rem 1.5rem;
    }
    
    .modal-title {
        font-size: 1.8rem;
    }
    
    .modal-section {
        padding: 1rem 1.5rem;
    }
    
    .close-button {
        top: 0.8rem;
        right: 0.8rem;
        padding: 0.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .modal-subtitle {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 1rem;
        padding-bottom: 1rem;
    }
    
    .info-item {
        flex-direction: column;
    }
    
    .info-label {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .modal-footer-info {
        flex-direction: column;
        gap: 1rem;
    }
    
    .info-text {
        text-align: center;
    }
}

/* 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* 로더 애니메이션 */
.loader {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid var(--primary-color);
    width: 40px;
    height: 40px;
    animation: rotation 1.5s infinite linear;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* 인피니티 스크롤 로딩 표시 스타일 */
#festival-loader {
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.5s ease-in-out;
}

/* 더 이상 데이터가 없을 때 표시되는 메시지 스타일 */
.end-message {
    padding: 20px;
    text-align: center;
    color: var(--gray-500);
    font-size: 0.95rem;
    animation: fadeIn 0.5s ease-in-out;
}

/* 스크롤 애니메이션 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 새로 로드된 카드에 애니메이션 적용 */
.festival-card {
    animation: fadeInUp 0.5s ease-out;
}

/* 이미지 호버 효과 */
.festival-card .relative::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 40%);
    opacity: 0;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.festival-card:hover .relative::before {
    opacity: 1;
}

/* 페이지 스크롤 스타일 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--primary-light), var(--primary-color));
    border-radius: 10px;
    border: 2px solid var(--gray-100);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--primary-color), var(--primary-dark));
}

/* 텍스트 선택 스타일 */
::selection {
    background-color: var(--primary-color);
    color: white;
}

/* 모션 효과 */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

@keyframes shine {
    0% {
        background-position: -100% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* 이미지 스켈레톤 로딩 효과 */
.image-skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-300) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: shine 1.5s infinite;
    border-radius: var(--border-radius);
}

/* 활성화 효과 */
.filter-section button:active {
    transform: scale(0.98);
}

/* 토스트 메시지 */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* 배지 효과 */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    box-shadow: var(--shadow-sm);
}

/* 클릭 효과 */
.click-effect {
    position: relative;
    overflow: hidden;
}

.click-effect:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.click-effect:active:after {
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0) translate(-50%, -50%);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20) translate(-50%, -50%);
        opacity: 0;
    }
}

/* 달력 이벤트 카운트 배지 */
.event-count-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.25rem;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.event-count-badge:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* 일자별 행사 목록 모달 */
.day-events-modal {
    display: none;
    position: fixed;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.day-events-modal.show {
    opacity: 1;
}

.day-events-content {
    background-color: white;
    margin: 10vh auto;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.day-events-modal.show .day-events-content {
    transform: translateY(0);
}

.day-events-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-200);
}

.day-events-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
}

.day-events-close {
    background: none;
    border: none;
    color: var(--gray-500);
    font-size: 1.5rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.day-events-close:hover {
    background-color: var(--gray-200);
    color: var(--text-dark);
}

.day-events-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.day-event-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: var(--border-radius);
    background-color: var(--gray-100);
    transition: background-color 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.day-event-item:hover {
    background-color: var(--primary-light);
    color: white;
    transform: translateX(5px);
}

.day-event-icon {
    margin-right: 0.75rem;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.day-event-item:hover .day-event-icon {
    color: white;
}

.day-event-title {
    font-weight: 500;
    flex: 1;
}

/* 반응형 설정 - 모바일에서는 행사명 대신 행사 수를 표시 */
@media (max-width: 768px) {
    .calendar-event {
        display: none;
    }
    
    .event-count-badge {
        display: inline-block;
    }
    
    .calendar-day {
        min-height: 80px;
        padding: 0.5rem;
    }
    
    /* 모바일에서는 이전달/다음달 텍스트 숨김 */
    .prev-month-text, .next-month-text {
        display: none;
    }
    
    /* 모바일에서 화살표 아이콘만 표시 */
    .calendar-header button {
        padding: 0.4rem;
        min-width: 40px;
    }
    
    /* 달력 제목 축소 */
    #calendar-title {
        font-size: 1.2rem;
    }
    
    /* 요일 헤더 축소 */
    .calendar-day-header {
        padding: 0.5rem;
    }
}

/* 데스크톱에서는 배지 숨김 */
@media (min-width: 769px) {
    .event-count-badge {
        display: none;
    }
}

/* 달력 헤더 버튼 텍스트 */
.prev-month-text, .next-month-text {
    display: inline;
}

/* 행사종료 제외 버튼 스타일 */
.toggle-past-button {
    display: flex;
    align-items: center;
    background-color: #f3f4f6;
    color: #6B7280;
    border: 1px solid #d1d5db;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.toggle-past-button:hover {
    background-color: #e5e7eb;
}

.toggle-past-button.active {
    background-color: #10B981;
    color: white;
    border-color: #059669;
}

.toggle-past-button.active:hover {
    background-color: #059669;
}

.toggle-past-button i {
    margin-right: 0.5rem;
}

.section-title-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
} 