/* 정부지원금 캘린더 — subpage/calendar.html */

.page-cal [id^="section-"] {
    scroll-margin-top: 88px;
}

.cal-hero {
    position: relative;
    padding: 52px 0 48px;
    text-align: center;
    color: #fff;
    overflow: hidden;
}

.cal-hero__bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, #4f46e5 0%, #7c3aed 50%, #a855f7 100%);
}

.cal-hero__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 50% at 20% 20%, rgba(94, 234, 212, 0.18), transparent 50%);
}

.cal-hero__inner {
    position: relative;
    z-index: 1;
    max-width: 640px;
    margin: 0 auto;
}

.cal-hero__eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.14);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cal-hero__title {
    font-size: clamp(1.55rem, 3.5vw, 2.1rem);
    font-weight: 800;
    margin: 0 0 12px;
    letter-spacing: -0.03em;
}

.cal-hero__lead {
    font-size: 1.02rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.94);
    margin: 0 0 22px;
}

.cal-hero__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    font-size: 15px;
    font-weight: 700;
    color: #4f46e5;
    background: #fff;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cal-hero__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.18);
}

.cal-main {
    padding: 36px 0 56px;
    background: linear-gradient(180deg, #f1f5f9 0%, #e8eef5 100%);
}

.cal-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.cal-legend {
    max-width: 1100px;
    margin: 0 auto 18px;
    font-size: 12px;
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    align-items: center;
}

.cal-legend .cal-dot {
    display: inline-block;
    vertical-align: middle;
}

.cal-month-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cal-month-nav__btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
    cursor: pointer;
    font-size: 18px;
    color: #475569;
    transition: background 0.2s, border-color 0.2s;
}

.cal-month-nav__btn:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #4f46e5;
}

.cal-month-label {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e293b;
    min-width: 160px;
    text-align: center;
}

.cal-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cal-filters select {
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    font-size: 13px;
    font-weight: 600;
    background: #fff;
    color: #475569;
}

.cal-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 16px 18px;
    max-width: 1100px;
    margin: 0 auto;
    align-items: start;
    grid-template-areas:
        "cal side"
        "detail side";
}

.cal-card {
    grid-area: cal;
    background: #fff;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.cal-detail {
    grid-area: detail;
}

.cal-side {
    grid-area: side;
}

.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 12px;
    font-weight: 800;
    color: #64748b;
    text-align: center;
    padding: 10px 0;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e2e8f0;
    padding: 1px;
}

.cal-cell {
    min-height: 88px;
    background: #fff;
    padding: 6px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
    position: relative;
}

.cal-cell:hover {
    background: #fafbff;
}

.cal-cell--muted {
    background: #f8fafc;
    color: #94a3b8;
    cursor: default;
}

.cal-cell--muted:hover {
    background: #f8fafc;
}

.cal-cell--today {
    outline: 2px solid #818cf8;
    outline-offset: -2px;
    border-radius: 8px;
}

.cal-cell--selected {
    background: linear-gradient(180deg, #e0e7ff, #fff) !important;
    box-shadow: 0 10px 26px rgba(99, 102, 241, 0.18);
    transform: translateY(-1px);
    border-radius: 10px;
    outline: 2px solid #6366f1;
    outline-offset: -2px;
}

.cal-cell[data-day]:focus-visible {
    outline: 2px solid #22d3ee;
    outline-offset: -2px;
    border-radius: 10px;
}

.cal-cell--today.cal-cell--selected {
    outline-color: #4f46e5;
    box-shadow: 0 14px 34px rgba(79, 70, 229, 0.22);
}

.cal-cell__num {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}

.cal-cell__dots {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 4px;
}

.cal-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.cal-dot--start {
    background: #3b82f6;
}

.cal-dot--deadline {
    background: #ef4444;
}

.cal-dot--ongoing {
    background: #22c55e;
}

.cal-dot--local {
    background: #a855f7;
}

.cal-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cal-side__block {
    padding: 18px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

.cal-side__block h3 {
    font-size: 14px;
    font-weight: 800;
    color: #4f46e5;
    margin: 0 0 12px;
}

.cal-side__list {
    margin: 0;
    padding-left: 1.1em;
    font-size: 13px;
    color: #475569;
    line-height: 1.65;
}

.cal-detail {
    margin-top: 12px;
    padding: 18px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #e2e8f0;
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

.cal-detail__empty {
    font-size: 14px;
    color: #94a3b8;
    text-align: center;
    margin: 0;
}

.cal-detail__title {
    font-size: 15px;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 12px;
}

.cal-event-card {
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    margin-bottom: 10px;
    background: #fafbff;
}

.cal-event-card:last-child {
    margin-bottom: 0;
}

.cal-event-card__name {
    font-weight: 800;
    font-size: 14px;
    color: #312e81;
    margin: 0 0 6px;
}

.cal-event-card__meta {
    font-size: 12px;
    color: #64748b;
    margin: 0 0 8px;
    line-height: 1.5;
}

.cal-event-card__btn {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4f46e5;
    text-decoration: none;
    border: 1px solid #c7d2fe;
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
    opacity: 0.92;
}

.cal-event-card__btn:hover {
    transform: translateY(-1px);
    background: #e0e7ff;
    box-shadow: 0 8px 18px rgba(99, 102, 241, 0.16);
}

.cal-event-card__btn.is-disabled {
    pointer-events: none;
    opacity: 0.7;
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #64748b;
}

.cal-faq {
    padding: 56px 0 72px;
    background: #fff;
}

@media (max-width: 960px) {
    .cal-layout {
        grid-template-columns: 1fr;
        grid-template-areas:
            "cal"
            "detail"
            "side";
    }

    .cal-cell {
        min-height: 72px;
    }
}
