/* ===== HEAD ===== */
.cal-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 28px;
}
.cal-head-sub {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    color: #1255a4;
    margin-bottom: 6px;
}
.cal-head-title {
    font-size: 28px;
    font-weight: 900;
    color: #0d1b3e;
    margin: 0;
}
.cal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
.cal-legend span {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #666;
    font-weight: 600;
}
.cal-legend i {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

/* ===== 전체 레이아웃 ===== */
.cal-wrap {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px;
    margin-bottom: 40px;
    align-items: start;
}

/* ===== 달력 메인 ===== */
.cal-main {
    background: #fff;
    border: 1.5px solid #e4eaf5;
    border-radius: 18px;
    overflow: hidden;
}
.cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1.5px solid #f0f4fb;
    background: #fff;
}
.cal-month-title {
    font-size: 18px;
    font-weight: 900;
    color: #0d1b3e;
    margin: 0;
}
.cal-nav-btn {
    width: 36px;
    height: 36px;
    border: 1.5px solid #e4eaf5;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, background 0.2s;
}
.cal-nav-btn:hover { border-color: #1255a4; background: #f0f4fb; }
.cal-nav-btn svg { width: 16px; height: 16px; color: #555; }

/* ===== 그리드 ===== */
.cal-grid { padding: 0 12px 16px; }
.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 4px;
}
.cal-weekdays span {
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #aaa;
    padding: 10px 0 6px;
}
.cal-weekdays .sun { color: #e53e3e; }
.cal-weekdays .sat { color: #1255a4; }

.cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.cal-day {
    min-height: 70px;
    padding: 6px 4px 4px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.cal-day:hover { background: #f5f8ff; }
.cal-day-other { opacity: 0.3; pointer-events: none; }
.cal-day-num {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.cal-sun .cal-day-num { color: #e53e3e; }
.cal-sat .cal-day-num { color: #1255a4; }
.cal-today .cal-day-num {
    background: #0d1b3e;
    color: #fff !important;
}
.cal-selected { background: #eef3fc; }
.cal-selected .cal-day-num {
    background: #1255a4;
    color: #fff !important;
}

.cal-dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px;
}
.cal-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.cal-dot-more {
    font-size: 9px;
    color: #aaa;
    font-weight: 700;
    line-height: 6px;
}

/* ===== 사이드 패널 ===== */
.cal-side {
    background: #fff;
    border: 1.5px solid #e4eaf5;
    border-radius: 18px;
    overflow: hidden;
    min-height: 400px;
}
.cal-side-head {
    padding: 16px 20px;
    border-bottom: 1.5px solid #f0f4fb;
    font-size: 14px;
    font-weight: 800;
    color: #0d1b3e;
    background: #f8fafd;
}
.cal-event-list { padding: 12px; display: flex; flex-direction: column; gap: 8px; }

.cal-no-event {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 12px;
    color: #bbb;
    font-size: 13px;
    text-align: center;
    line-height: 1.7;
}
.cal-no-event svg { width: 44px; height: 44px; }

.cal-event-item {
    display: flex;
    align-items: stretch;
    gap: 10px;
    padding: 10px 12px;
    background: #f8fafd;
    border-radius: 10px;
    text-decoration: none;
    border: 1px solid #eaeef6;
    transition: box-shadow 0.2s, transform 0.15s;
}
.cal-event-item:hover {
    box-shadow: 0 3px 12px rgba(18,85,164,0.1);
    transform: translateY(-1px);
}
.cal-event-bar {
    width: 4px;
    border-radius: 4px;
    flex-shrink: 0;
    min-height: 100%;
}
.cal-event-body { flex: 1; }
.cal-event-title {
    font-size: 13px;
    font-weight: 700;
    color: #0d1b3e;
    line-height: 1.45;
    margin-bottom: 5px;
}
.cal-event-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 11px;
    color: #aaa;
}
.cal-event-meta svg { width: 11px; height: 11px; flex-shrink: 0; }

/* ===== 이달의 공연 일정 ===== */
.cal-upcoming { margin-bottom: 16px; }
.cal-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}
.cal-section-tag {
    background: #1255a4;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 4px 12px;
    border-radius: 20px;
}
.cal-section-title h3 {
    font-size: 20px;
    font-weight: 800;
    color: #0d1b3e;
    margin: 0;
}

.cal-upcoming-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.cal-upcoming-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    background: #fff;
    border: 1.5px solid #e4eaf5;
    border-radius: 14px;
    text-decoration: none;
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}
.cal-upcoming-item:hover {
    box-shadow: 0 6px 20px rgba(18,85,164,0.1);
    transform: translateY(-2px);
    border-color: #c5d7f5;
}
.cal-upcoming-date {
    flex-shrink: 0;
    width: 48px;
    height: 56px;
    border: 2px solid;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
}
.cal-upcoming-d {
    font-size: 20px;
    font-weight: 900;
    color: #0d1b3e;
    line-height: 1;
}
.cal-upcoming-dow {
    font-size: 11px;
    font-weight: 700;
}
.cal-upcoming-info { flex: 1; min-width: 0; }
.cal-upcoming-title {
    font-size: 13px;
    font-weight: 700;
    color: #0d1b3e;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cal-upcoming-meta { font-size: 11px; color: #aaa; }
.cal-upcoming-arrow {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #c5d7f5;
}
.cal-no-event-text { font-size: 13px; color: #aaa; padding: 20px 0; }

/* ===== 반응형 ===== */
@media (max-width: 1024px) {
    .cal-wrap { grid-template-columns: 1fr; }
    .cal-side { min-height: auto; }
    .cal-upcoming-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .cal-head { flex-direction: column; align-items: flex-start; }
    .cal-head-title { font-size: 22px; }
    .cal-day { min-height: 54px; padding: 5px 2px 3px; }
    .cal-day-num { width: 24px; height: 24px; font-size: 12px; }
    .cal-dot { width: 5px; height: 5px; }
    .cal-upcoming-list { grid-template-columns: 1fr; }
    .cal-nav { padding: 14px 16px; }
    .cal-grid { padding: 0 6px 12px; }
}
@media (max-width: 480px) {
    .cal-day { min-height: 44px; }
    .cal-day-num { font-size: 11px; width: 22px; height: 22px; }
    .cal-legend { gap: 8px; }
    .cal-upcoming-item { padding: 12px 14px; gap: 12px; }
    .cal-upcoming-date { width: 42px; height: 48px; }
    .cal-upcoming-d { font-size: 17px; }
}
