/* ======================================================================== */
/* PART 3: 行事曆系統 */
/* ======================================================================== */
.schedule-calendar-wrapper { background: #ffffff; border-radius: 12px; padding: 20px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; overflow: hidden; max-width: 100%;}
.widget .schedule-calendar-wrapper { padding: 15px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); }
.calendar-toolbar { display: flex; justify-content: space-between; align-items: center; padding-bottom: 15px; border-bottom: 1px solid #e9e9e9; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.widget .calendar-toolbar { flex-direction: column; gap: 10px; }
.calendar-nav { background-color: transparent; border: 1px solid #dcdcdc; color: #555; border-radius: 50%; width: 36px; height: 36px; font-size: 20px; cursor: pointer; transition: all 0.2s ease; display: flex; justify-content: center; align-items: center; }
.widget .calendar-nav { width: 32px; height: 32px; font-size: 18px; }
.calendar-nav:hover:not(:disabled) { background-color: #f5f5f5; border-color: #aaa; }
.calendar-nav:disabled { opacity: 0.4; cursor: not-allowed; }
.calendar-select-container { position: relative; }
.calendar-select-container::after { content: ''; position: absolute; top: 50%; right: 15px; width: 6px; height: 6px; border-style: solid; border-color: #888; border-width: 0 2px 2px 0; transform: translateY(-75%) rotate(45deg); pointer-events: none; transition: transform 0.2s ease; }
#calendar-jump-select { -webkit-appearance: none; -moz-appearance: none; appearance: none; background-color: #f9f9f9; border: 1px solid #e0e0e0; border-radius: 8px; padding: 8px 30px 8px 15px; font-size: 16px; font-weight: 500; cursor: pointer; transition: border-color 0.2s; min-width: 150px; }
.widget #calendar-jump-select { font-size: 14px; padding: 6px 25px 6px 12px; min-width: 120px; }
#calendar-jump-select:hover { border-color: #c0c0c0; }
.calendar-slider-wrapper { width: 100%; overflow: hidden; }
.calendar-slider { display: flex; transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.calendar-slide { width: 100%; flex-shrink: 0; }
.calendar-header { text-align: center; margin-bottom: 15px; }
.calendar-header h3 { font-size: 22px; font-weight: 600; color: #333; margin: 0; }
.widget .calendar-header h3 { font-size: 18px; }
.schedule-calendar-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.schedule-calendar-table th { font-weight: 600; color: #777; padding: 8px 4px; font-size: 14px; text-align: center; }
.widget .schedule-calendar-table th { font-size: 12px; padding: 6px 2px; }
.schedule-calendar-table td { border: 1px solid #f0f0f0; vertical-align: top; min-height: 100px; transition: background-color 0.3s; padding: 4px; }
.widget .schedule-calendar-table td { min-height: 80px; padding: 3px; }
.schedule-calendar-table td:hover { background-color: #fafcff; }
.sc-day-number { font-size: 13px; font-weight: 500; color: #333; margin-bottom: 5px; text-align: right; }
.widget .sc-day-number { font-size: 12px; }
.sc-today .sc-day-number { background-color: #007bff; color: #fff; border-radius: 50%; width: 24px; height: 24px; display: inline-flex; justify-content: center; align-items: center; float: right; }
.widget .sc-today .sc-day-number { width: 20px; height: 20px; font-size: 11px; }
.sc-day-events { display: flex; flex-direction: column; gap: 3px; }
.sc-event a { display: block; color: #212529; font-size: 12px; font-weight: 500; padding: 3px 5px; border-radius: 4px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: transform 0.2s, box-shadow 0.2s; }
.widget .sc-event a { font-size: 10px; padding: 2px 4px; }
.sc-event a:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1); }
.sc-day-events .events-list-container { max-height: 90px; overflow: hidden; transition: max-height 0.5s ease-in-out; }
.sc-day-events.is-expanded .events-list-container { max-height: 1000px; }
.sc-more-toggle { background: #f0f4f8; border: none; color: #337ab7; cursor: pointer; font-size: 12px; font-weight: 500; padding: 6px 10px; width: 100%; margin-top: 5px; border-radius: 4px; display: flex; justify-content: space-between; align-items: center; transition: background-color 0.2s; }
.widget .sc-more-toggle { font-size: 11px; }
.sc-more-toggle:hover { background-color: #e6ecf1; }
.sc-more-arrow { display: inline-block; transition: transform 0.3s ease-in-out; font-size: 10px; }
.sc-day-events.is-expanded .sc-more-arrow { transform: rotate(180deg); }
.calendar-other-list-wrapper { padding: 0 10px; max-height: 400px; overflow-y: auto; }
.widget .calendar-other-list-wrapper { max-height: 300px; padding: 0 5px; }
.calendar-other-list { list-style: none; padding: 0; margin: 0; }
.calendar-other-list li { margin-bottom: 8px; }
.calendar-other-list li.no-events { color: #999; text-align: center; padding: 20px 0; font-style: italic; }
.widget .calendar-other-list li.no-events { padding: 15px 0; font-size: 14px; }
.calendar-other-list .sc-event a { font-size: 14px; padding: 8px 12px; }
.widget .calendar-other-list .sc-event a { font-size: 12px; padding: 6px 10px; }
.calendar-other-list .year-group > h4, .calendar-other-list .month-group > h4 { font-size: 18px; font-weight: 600; color: #333; border-bottom: 2px solid #eee; padding-bottom: 8px; margin: 20px 0 15px 0; }
.widget .calendar-other-list .year-group > h4 { font-size: 16px; margin: 15px 0 10px 0; }
.calendar-other-list .year-group:first-child > h4 { margin-top: 0; }
.calendar-other-list .month-group > h4 { font-size: 16px; border-bottom-width: 1px; margin-bottom: 10px; padding-left: 15px; }
.widget .calendar-other-list .month-group > h4 { font-size: 14px; padding-left: 10px; }
.calendar-other-list ul { list-style: none; padding-left: 0; }
.calendar-other-list .month-group ul { padding-left: 15px; }
.widget .calendar-other-list .month-group ul { padding-left: 10px; }
.schedule-calendar-mobile { display: none; }
.sc-event{ margin-bottom: 5px; }
@media (max-width: 768px) {
    .schedule-calendar-desktop { display: none; }
    .schedule-calendar-mobile { display: block; }
    .calendar-toolbar { flex-direction: column; gap: 10px; }
    .schedule-calendar-wrapper { padding: 15px; }
    .widget .schedule-calendar-wrapper { padding: 10px; }
}
@media (max-width: 480px) {
    .widget .schedule-calendar-wrapper { padding: 8px; }
    .widget .calendar-header h3 { font-size: 16px; }
    .widget #calendar-jump-select { font-size: 13px; min-width: 100px; }
}

/* ======================================================================== */
/* PART 7: 關聯大專題卡片 & 相關文章列表 */
/* ======================================================================== */
.major-topic-card { display: flex; background-color: #fff; border-radius: 12px; box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08); margin-bottom: 40px; overflow: hidden; text-decoration: none; color: inherit; border: 1px solid #e7eaf3; }
.major-topic-card .card-image { flex: 0 0 300px; }
.major-topic-card .card-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.major-topic-card .card-content { flex: 1; padding: 25px 30px; }
.major-topic-card .card-eyebrow { font-size: 0.9em; color: #888; margin-bottom: 8px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.major-topic-card .card-title { margin: 0 0 10px 0; font-size: 1.8em; font-weight: 700; }
.major-topic-card .card-title a { text-decoration: none; color: inherit; }
.major-topic-card .card-description { margin-bottom: 0; color: #555; }
@media (max-width: 768px) {
    .major-topic-card { flex-direction: column; }
    .major-topic-card .card-image { flex-basis: auto; width: 100%; height: 220px; }
}

.related-posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 25px; }
.related-post-card { background: #fff; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.07); overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; text-decoration: none; }
.related-post-card:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); }
.related-post-card .card-image { height: 160px; background-color: #f0f0f0; }
.related-post-card .card-image img { width: 100%; height: 100%; object-fit: cover; }
.related-post-card .card-content { padding: 15px 20px; }
.related-post-card .card-title { margin: 0; font-size: 1.1em; color: #333; line-height: 1.4; }

/* ======================================================================== */
/* PART 9 & 11: 資訊卡 */
/* ======================================================================== */
.term-info-box-wrapper { background: #f9f9f9; border: 1px solid #eee; border-radius: 8px; margin: 24px 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; box-shadow: 0 4px 12px rgba(0,0,0,0.1); overflow: hidden; font-size: 1rem; isolation: isolate; }
.term-info-box-wrapper:hover { box-shadow: 0 6px 16px rgba(0,0,0,0.15); }
.term-info-box-wrapper h2, .term-info-box-wrapper h3, .term-info-box-wrapper h4 { min-width: unset !important; min-height: unset !important; clear: none !important; margin: 0 !important; padding: 0 !important; background: transparent !important; color: inherit !important; }
.term-info-box-wrapper a { text-decoration: none !important; color: #d20243 !important; background: transparent !important; }
.term-info-box-static-title { display: flex; justify-content: space-between; align-items: flex-start; padding: 20px 24px; border-bottom: 1px solid #e0e0e0; background: linear-gradient(180deg, #ffffff, #f9f9f9); gap: 16px; }
.term-info-box-static-title h2 { font-size: 2rem; font-weight: 700; color: #111; line-height: 1.3; }
.term-info-box-archive-link { display: inline-flex; align-items: center; background-color: #f1f1f1; color: #333 !important; padding: 8px 16px; border-radius: 8px; font-weight: 500; font-size: 1rem; white-space: nowrap; transition: background-color 0.2s ease; flex-shrink: 0; }
.term-info-box-archive-link:hover { background-color: #e0e0e0; }
.term-info-box-archive-link-icon { margin-right: 8px; font-weight: bold; line-height: 1; }
.term-info-box-collapsible-content { position: relative; max-height: 280px; overflow: hidden; transition: max-height 0.8s cubic-bezier(0.4, 0, 0.2, 1); padding: 20px 24px 0; }
.term-info-box-wrapper.is-expanded .term-info-box-collapsible-content { max-height: 6000px; padding-bottom: 24px; }
.term-info-box-collapsible-content::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 100px; background: linear-gradient(to bottom, rgba(249, 249, 249, 0), #f9f9f9 90%); pointer-events: none; transition: opacity 0.4s ease; }
.term-info-box-wrapper.is-expanded .term-info-box-collapsible-content::after { opacity: 0; }
.term-info-box-toggle-trigger { display: flex; align-items: center; justify-content: center; width: 100%; padding: 15px 24px; background: transparent; border: none; border-top: 1px solid #e0e0e0; font-size: 1rem; font-weight: 500; color: #d20243; cursor: pointer; transition: all 0.3s ease; }
.term-info-box-toggle-trigger:hover { background-color: rgba(210, 2, 67, 0.1); color: #b5023a; }
.term-info-box-toggle-trigger .toggle-arrow { display: inline-block; margin-left: 10px; transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.term-info-box-wrapper.is-expanded .term-info-box-toggle-trigger .toggle-arrow { transform: rotate(180deg); }
.term-info-box-wrapper .text-collapse { display: none; }
.term-info-box-wrapper.is-expanded .text-expand { display: none; }
.term-info-box-wrapper.is-expanded .text-collapse { display: inline; }
.term-info-box-collapsible-content p, .term-info-box-collapsible-content li { line-height: 1.7; color: #333; font-size: 1rem; margin: 0 0 1em; }
.term-info-box-header { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: flex-start; margin-bottom: 24px; }
.term-info-box-header.no-image { grid-template-columns: 1fr; }
.term-info-box-image img { width: 100%; height: auto; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.term-info-box-details h3.subtitle { font-size: 1.5rem; font-weight: 700; color: #111; border-bottom: 3px solid #d20243; padding-bottom: 8px; margin: 0 0 20px !important; }
.term-info-box-details .description { border-left: 4px solid #d20243; padding-left: 16px; color: #333; line-height: 1.7; margin-bottom: 0; }
.term-info-box-section { margin-top: 40px; }
.term-info-box-section:last-child { margin-bottom: 0; }
.term-info-box-section h4 { font-size: 1.5rem; font-weight: 700; color: #111; border-bottom: 3px solid #d20243; padding-bottom: 8px; margin: 0 0 20px !important; }
.term-info-box-split-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.term-info-box-studio-info { margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px dashed #eee; font-size: 1rem; }
.term-info-box-section .content { background-color: #fdfdfd; padding: 20px; border: 1px solid #eee; border-radius: 8px; }
.term-info-box-section .content p > strong { display: block; margin-bottom: 0.5em; color: #111; font-size: 1.05em; }
.term-info-box-section ul { list-style: none; padding: 0; }
.term-info-box-section ul li a { display: block; padding: 10px 15px; background: #fdfdfd; border: 1px solid #eee; border-radius: 6px; transition: all 0.3s ease; }
.term-info-box-copyright { text-align: center; font-size: 0.9rem; color: #777; margin-top: 40px; padding: 15px; border-top: 1px solid #e0e0e0; }
.music-grid-container { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.music-divider { border: 0; border-top: 1px solid #eee; margin: 20px 0; }
.broadcast-date-badge { display: inline-block; background-color: #f2f2f2; color: #555555; font-size: 0.9rem; padding: 4px 12px; border-radius: 12px; margin-top: 12px; }
.broadcast-grid-container { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.broadcast-group-label strong { display: block; margin-bottom: 0.5em; color: #111; font-size: 1.05em; }
.broadcast-list { display: flex; flex-direction: column; gap: 8px; padding-left: 0; }
.broadcast-list-item { line-height: 1.6; }
@media (max-width: 768px) {
    .term-info-box-static-title { flex-direction: column; align-items: flex-start; gap: 12px; }
    .term-info-box-static-title h2 { font-size: 1.6rem; }
    .term-info-box-collapsible-content { padding: 16px; }
    .term-info-box-header { grid-template-columns: 1fr; gap: 16px; }
    .term-info-box-image { max-width: 280px; margin: 0 auto; }
    .term-info-box-details h3.subtitle { font-size: 1.3rem; }
    .term-info-box-split-layout { grid-template-columns: 1fr; }
    .term-info-box-section h4 { font-size: 1.3rem; }
    .broadcast-grid-container { grid-template-columns: 1fr; }
    .music-grid-container { grid-template-columns: 1fr; }
}

/* ======================================================================== */
/* PART 13: 每週新番日曆 */
/* ======================================================================== */
.weekly-schedule-container { background: #fff; padding: 20px; border-radius: 8px; border: 1px solid #eee; margin: 24px 0; }
.weekly-schedule-filter-form { display: flex; gap: 10px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; position: relative; }
.weekly-schedule-filter-form select { -webkit-appearance: none; -moz-appearance: none; appearance: none; padding: 8px 35px 8px 16px !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23555' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
.weekly-schedule-filter-form select, .ws-weekly-nav a, .ws-monthly-nav a, .ws-view-toggle-btn, .ws-monthly-filter-btn { padding: 8px 16px; border: none; background-color: #f1f1f1; color: #555; font-weight: 500; border-radius: 6px; cursor: pointer; transition: all 0.2s ease-in-out; text-decoration: none; display: inline-flex; align-items: center; }
.weekly-schedule-filter-form select:hover, .ws-weekly-nav a:hover, .ws-monthly-nav a:hover, .ws-view-toggle-btn:hover, .ws-monthly-filter-btn:hover { background-color: #e0e0e0; }
.weekly-schedule-filter-form select.active, .ws-weekly-nav a.active, .ws-monthly-nav a.active, .ws-view-toggle-btn.active, .ws-monthly-filter-btn.active { background-color: #fff; color: #d20243; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.weekly-schedule-filter-form button { padding: 8px 15px; border-radius: 6px; border: none; background-color: #d20243; color: #fff; cursor: pointer; }
.ws-weekly-nav, .ws-monthly-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.ws-weekly-nav a, .ws-monthly-nav a { gap: 8px; }
.ws-weekly-nav-date-range, .ws-monthly-nav-date-range { font-weight: 700; font-size: 1.1em; color: #333; flex-grow: 1; text-align: center; padding: 0 10px; }
.ws-monthly-nav { margin-top: 5px; }
.weekly-schedule-no-results { text-align: center; padding: 20px; color: #777; grid-column: 1 / -1; }
.ws-view-switcher, .ws-monthly-filter { display: flex; gap: 5px; margin-bottom: 20px; background-color: #f1f1f1; border-radius: 8px; padding: 5px; justify-content: center; }
.ws-view-container, .ws-monthly-view-pane { display: none; }
.ws-view-container.active, .ws-monthly-view-pane.active { display: block; }
.weekly-schedule-calendar { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.weekly-day-column { background: #fdfdfd; border: 1px solid #eee; border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.weekly-day-header { background: #f1f1f1; padding: 12px 15px; font-size: 1.1rem; font-weight: 600; color: #333; border-bottom: 1px solid #e5e5e5; }
.weekly-items-list { padding: 10px; list-style: none; margin: 0; }
.weekly-item-container a, .ws-monthly-item a { text-decoration: none; color: inherit; flex-grow: 1; min-width: 0; }
.weekly-item-container, .ws-monthly-item { position: relative; display: flex; align-items: flex-start; gap: 8px; padding: 12px; margin-bottom: 8px; border-radius: 6px; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.05); text-decoration: none; color: #222; transition: all 0.2s ease; border-left: 4px solid; cursor: pointer; }
.weekly-item-container:hover, .ws-monthly-item:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.item-content { flex-grow: 1; min-width: 0; }
.item-time { display: block; font-size: 0.9rem; font-weight: 600; color: #555; margin-bottom: 4px; }
.item-title { line-height: 1.4; font-weight: 500; }
.ws-monthly-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.ws-monthly-table th { background: #f9f9f9; padding: 10px 5px; font-weight: 600; text-align: center; border-bottom: 2px solid #eee; }
.ws-monthly-table td { border: 1px solid #f0f0f0; vertical-align: top; height: auto !important; min-height: 100px; padding: 4px; }
.ws-day-number { text-align: right; font-size: 0.9em; font-weight: 500; color: #333; margin-bottom: 4px; }
.ws-day-events { display: flex; flex-direction: column; gap: 4px; }
.ws-monthly-item { padding: 8px 6px; font-size: 0.8em; }
.item-special-label { color:#d20243; opacity: 0.9; }
.ws-more-btn { background: #f0f0f0; border: none; font-size: 0.8em; text-align: center; width: 100%; padding: 4px; margin-top: 4px; border-radius: 3px; cursor: pointer; }
.ws-more-btn:hover { background: #e0e0e0; }
.ws-monthly-item.ws-item-hidden, .weekly-item-container.ws-item-hidden { display: none; }
.item-expand-toggle { -webkit-tap-highlight-color: transparent; flex-shrink: 0; width: 24px; height: 24px; margin-top: 0; border: none; background: #f0f0f0; border-radius: 50%; cursor: pointer; transition: all 0.3s ease; display: none; position: relative; }
.item-expand-toggle::before { content: ''; position: absolute; top: 8px; left: 8px; width: 8px; height: 8px; border-left: 2px solid #555; border-bottom: 2px solid #555; transform: rotate(-45deg); transition: transform 0.3s ease; }
.item-expand-toggle:hover { background: #e0e0e0; }
.item-expand-toggle.is-expanded::before { transform: rotate(135deg); }
.weekly-item-container.is-truncated .item-expand-toggle, .ws-monthly-item.is-truncated .item-expand-toggle { display: block; }
.item-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; text-overflow: ellipsis; height: calc(1.4em * 2); transition: all 0.3s ease-in-out; }
.ws-monthly-item .item-title { height: auto; -webkit-line-clamp: 1; }
.item-title.is-expanded { -webkit-line-clamp: unset; height: auto; max-height: 500px; }
@media (max-width: 768px) {
    .ws-monthly-table thead { display: none; }
    .ws-monthly-table .ws-day-number { display: none; }
    .ws-monthly-table, .ws-monthly-table tbody, .ws-monthly-table tr, .ws-monthly-table td { display: block; width: 100%; }
    .ws-monthly-table td { border: none; padding: 10px; min-height: unset; }
    .ws-monthly-table tr { margin-bottom: 15px; border: 1px solid #eee; border-radius: 8px; overflow: hidden; }
    .ws-monthly-table td:not(:empty)::before { content: attr(data-date); display: block; font-weight: 600; font-size: 1.1em; color: #333; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid #f0f0f0; }
    .ws-monthly-table td:empty { display: none; }
}
@media (max-width: 520px) {
    .ws-weekly-nav .ws-nav-text, .ws-monthly-nav .ws-nav-text { display: none; }
    .ws-weekly-nav a, .ws-monthly-nav a { padding: 10px 12px; }
    .ws-weekly-nav-date-range, .ws-monthly-nav-date-range { font-size: 1em; }
}