.it-events {
    --it-event-accent: #9b2f2d;
    --it-event-text: #1D1A1A;
    color: var(--it-event-text);
    width: 100%;
}

.it-events__header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 28px;
    padding: 0 80px;
}

.it-events__heading {
    display: flex;
    align-items: center;
    gap: 17px;
    margin: 0;
    font-family: "Noto Sans TC", Sans-serif;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 2.56px;
}

.it-events__dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--it-event-accent);
}

.it-events__nav {
    display: flex;
    gap: 12px;
}

.it-events__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: #fff;
    color: rgba(29, 26, 26, 0.5);
}

.it-events__arrow-icon {
    display: block;
    width: 10px;
    height: 16px;
    fill: currentColor;
}

.it-events__arrow--prev .it-events__arrow-icon {
    transform: rotate(180deg);
}

.it-events__view-toggle {
    display: inline-flex;
    gap: 8px;
    max-width: 250px;
    padding: 8px;
    border-radius: 999px;
    margin-left: auto;
    background: #fff;
}

.it-events__view-toggle a {
    color: var(--Color-Black-100, #1D1A1A);
    min-width: 113px;
    padding: 8px 0;
    text-align: center;
    border-radius: 40px;
    /* Button */
    font-family: "Noto Sans TC";
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: 20px;
    /* 125% */
    letter-spacing: 0.64px;
    text-decoration: none;
}

.it-events__view-toggle a.is-active {
    color: var(--it-event-accent);
}

.it-events__list {
    display: grid;
    margin: 0 auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 80px;
    max-width: 1120px;
}

.it-events__item {
    display: grid;
    position: relative;
}

.it-events__item.is-open {
    cursor: pointer;
}

.it-events__image {
    display: block;
    overflow: hidden;
    aspect-ratio: 320 / 180;
    border-radius: 12px;
    background: rgba(29, 26, 26, 0.08);
}

.it-events__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.it-events__title {
    color: var(--Color-Branding-Color-Primary, #9B2F2D);

    /* Paragraph */
    font-family: "Noto Sans TC";
    font-size: 18px;
    font-style: normal;
    font-weight: 700;
    line-height: 36px;
    /* 200% */
    letter-spacing: 1.44px;
    margin-top: 8px;
    margin-bottom: 12px;
}

.it-events__title:hover,
.it-events__item.is-open:hover .it-events__title {
    color: #B61E1B;
}

.it-events__item time {
    color: var(--Color-Black-100, #1D1A1A);

    /* Label */
    font-family: "Noto Sans TC";
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 14px;
    /* 100% */
    letter-spacing: 0.84px;
}

.it-events__status {
    color: var(--Color-Black-100, #1D1A1A);

    /* Paragraph */
    font-family: "Noto Sans TC";
    font-size: 18px;
    font-style: normal;
    font-weight: 400;
    line-height: 36px;
    /* 200% */
    letter-spacing: 1px;
    border-radius: 12px;
    padding: 4px 16px;
}

.it-events__status.is-open {
    background: #f46f86;
    color: #1d1a1a;
}

.it-events__status.is-open::after {
    content: "";
    position: absolute;
    inset: 0;
}

.it-events__status.is-closed {
    background: rgba(29, 26, 26, 0.1);
    color: #1d1a1a;
}

.it-event-calendar__legend-item {
    text-decoration: none;
}

.it-event-calendar__legend-item.is-active {
    /* box-shadow: inset 0 0 0 2px currentColor; */
}

.it-event-calendar {
    padding: 25px;
    border-radius: 40px;
    background: #fdebed;
}

.it-event-calendar__legend {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 12px;
}

.it-event-calendar__legend-item {
    min-width: 82px;
    padding: 7px 18px;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-family: "Noto Sans TC", Sans-serif;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
}

.it-event-calendar__legend-item--open {
    border-radius: 22px;
    border: 1px solid #9B2F2D;
    background: #FFF2F4;
    color: var(--Color-Branding-Color-Primary, #9B2F2D);

    /* Button */
    font-family: "Noto Sans TC";
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: 20px;
    /* 125% */
    letter-spacing: 0.64px;
}

.it-event-calendar__legend-item--open:hover {
    color: var(--Color-Branding-Color-Primary, #9B2F2D);

}

.it-event-calendar__legend-item--closed {
    color: var(--Color-Black-100, #1D1A1A);

    /* Button */
    font-family: "Noto Sans TC";
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: 20px;
    /* 125% */
    letter-spacing: 0.64px;
    border-radius: 22px;
    border: 1px solid var(--Color-Black-100, #1D1A1A);
    background: #D4D4D4;
}

.it-event-calendar__legend-item--closed:hover {
    color: var(--Color-Black-100, #1D1A1A);

}

.it-event-calendar__weekdays,
.it-event-calendar__grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

.it-event-calendar__weekdays {
    margin-bottom: 40px;
}

.it-event-calendar__weekdays span {
    color: #9B2F2D;
    text-align: center;

    /* Button */
    font-family: "Noto Sans TC";
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: 20px;
    /* 125% */
    letter-spacing: 0.64px;
    display: flex;
    height: 36px;
    text-align: center;
    background: #fff;
    justify-content: center;
    border-radius: 100px;
    line-height: 36px;
}

.it-event-calendar__cell {
    position: relative;
    min-height: 160px;
    padding: 12px 10px;
    border: 1px solid transparent;
    background: #fff;
    overflow: hidden;
    transition: all 0.2s;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.00) 0%, rgba(0, 0, 0, 0.00) 100%), var(--Color-White, #FFF);
}

.it-event-calendar__cell:hover {
    border: 2px solid var(--Color-Branding-Color-Primary, #9B2F2D);
}

.it-event-calendar__cell.is-outside-month .it-event-calendar__day {
    color: rgba(0, 0, 0, 0.32);
}

.it-event-calendar__outside-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: block;
    pointer-events: auto;

}

.it-event-calendar__day {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
    color: rgba(0, 0, 0, 0.88);
    font-family: Inter;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 20px;
    /* 142.857% */
    letter-spacing: -0.15px;
}

.it-event-calendar__event {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 4px;
    padding: 8px;
    border-radius: 4px;
    color: var(--it-event-accent);
    font-family: "Noto Sans TC", Sans-serif;
    font-size: 13px;
    line-height: 1.35;
    text-decoration: none;
    display: flex;
    gap: 8px;
    flex-flow: column;
}

.it-event-calendar__event.is-open {
    border: 1px solid rgba(155, 47, 45, 0.18);
    background: #fff2f4;
}

.it-event-calendar__event.is-closed {

    border-radius: 4px;
    border: 1px solid rgba(155, 47, 45, 0.10);
    background: var(--Color-Black-10, rgba(29, 26, 26, 0.10));
}

.it-event-calendar__event.is-outside {
    color: rgba(29, 26, 26, 0.35);
    background: rgba(29, 26, 26, 0.06);
    border-radius: 4px;
    opacity: 0.3;
    background: var(--Color-Black-10, rgba(29, 26, 26, 0.10));
}

.it-event-calendar__event span,
.it-event-calendar__event strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--Color-Black-100, #1D1A1A);

    /* Body-Small */
    font-family: "Noto Sans TC";
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    letter-spacing: 0.72px;
}

.it-event-calendar__event strong {
    color: var(--Color-Black-100, #1D1A1A);
    text-overflow: clip;

    /* Label */
    font-family: "Noto Sans TC";
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    height: 18px;
    line-height: 18px;
    letter-spacing: 0.84px;
    vertical-align: top;
}

.sc-full {
    width: 100%;

}

.it-events-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.it-event-calendar__event.is-open strong {
    color: #9B2F2D;
}

.it-event-calendar__agenda {
    display: none;
}

@media (max-width:1024px) {
    .it-events__list {
        gap: 48px;
        max-width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .it-events__header {
        padding: 0;
    }

    .it-event-calendar__cell {
        min-height: 82px;
    }
}

@media (max-width:767px) {
    .it-events__header {
        flex-wrap: wrap;
    }

    .it-events__list {
        gap: 24px;
        max-width: 100%;
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }

    .it-event-calendar {
        padding: 24px;
        border-radius: 24px;
    }

    .it-event-calendar__weekdays,
    .it-event-calendar__grid {
        display: none;
    }

    .it-event-calendar__legend {
        justify-content: center;
        margin-bottom: 24px;
    }

    .it-event-calendar__agenda {
        display: grid;
        gap: 18px;
    }

    .it-event-calendar__agenda-day {
        display: grid;
        gap: 10px;
    }

    .it-event-calendar__agenda-day h3 {
        margin: 0;
        color: var(--Color-Branding-Color-Primary, #9B2F2D);
        font-family: "Noto Sans TC", Sans-serif;
        font-size: 18px;
        font-weight: 700;
        line-height: 1.4;
    }

    .it-event-calendar__agenda-events {
        display: grid;
        gap: 8px;
    }

    .it-event-calendar__agenda-event {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 10px;
        padding: 12px;
        border-radius: 10px;
        background: #fff;
    }

    .it-event-calendar__agenda-event.is-open {
        border: 1px solid rgba(155, 47, 45, 0.22);
        background: #fff2f4;
    }

    .it-event-calendar__agenda-event.is-closed {
        background: rgba(29, 26, 26, 0.08);
    }

    .it-event-calendar__agenda-event time,
    .it-event-calendar__agenda-event strong,
    .it-event-calendar__agenda-event a,
    .it-event-calendar__agenda-event span {
        font-family: "Noto Sans TC", Sans-serif;
        font-size: 14px;
        line-height: 1.4;
    }

    .it-event-calendar__agenda-event strong {
        min-width: 0;
        overflow: hidden;
        color: #1D1A1A;
        font-weight: 500;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .it-event-calendar__agenda-event a,
    .it-event-calendar__agenda-event span {
        padding: 6px 10px;
        border-radius: 999px;
        font-weight: 500;
        text-decoration: none;
        white-space: nowrap;
    }

    .it-event-calendar__agenda-event a {
        color: #9B2F2D;
        border: 1px solid #9B2F2D;
        background: #fff;
    }

    .it-event-calendar__agenda-event span {
        color: #1D1A1A;
        background: rgba(29, 26, 26, 0.12);
    }

    .it-event-calendar__agenda-empty {
        margin: 0;
        color: #1D1A1A;
        font-family: "Noto Sans TC", Sans-serif;
        font-size: 16px;
        line-height: 1.6;
    }

}