/* ==================== SYDT Events Display ==================== */

:root {
    /* 品牌主色：碩陽紅 #a00 */
    --sydt-brand-color: #a00000;
    /* 品牌輔色：極淡紅 (用於標籤背景) */
    --sydt-brand-light: #fff1f0;
    --sydt-text-dark: #333;
    --sydt-text-light: #666;
    --sydt-border-light: #E0E0E0;
    --sydt-bg-light: #F9F9F9;
    --sydt-success: #52c41a;
    --sydt-warning: #faad14;
    
    /* 按鈕顏色 (使用品牌色稍亮的變體以利識別) */
    --sydt-btn-primary: #a00000;
    --sydt-btn-hover: #cf1322;
}

/* Container & Layout */
.sydt-events-container {
    width: 100%;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.sydt-events-wrapper {
    display: grid;
    gap: 24px;
}

/* 1. 手機與平板 */
.sydt-events-grid .sydt-events-wrapper {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* 2. 桌機版 (螢幕大於 1024px)：強制鎖定為 4 欄 */
@media (min-width: 1024px) {
    .sydt-events-grid .sydt-events-wrapper {
        grid-template-columns: repeat(4, 1fr);
    }
}

.sydt-events-list .sydt-events-wrapper {
    grid-template-columns: 1fr;
}

/* Event Card */
.sydt-event-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--sydt-border-light);
    transition: transform 0.3s ease;
}

.sydt-event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(160, 0, 0, 0.15); /* 紅色陰影 */
}

/* Image */
.sydt-event-image-wrapper {
    position: relative;
    background: var(--sydt-bg-light);
    overflow: hidden;
}

.sydt-event-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Status Badge */
.sydt-event-status-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
}
.sydt-status-ongoing { background: var(--sydt-success); }
.sydt-status-upcoming { background: var(--sydt-warning); }
.sydt-status-ended { background: #D9D9D9; color: #333; }

/* Content */
.sydt-event-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.sydt-event-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    line-height: 1.4;
}
.sydt-event-title a { color: var(--sydt-text-dark); text-decoration: none; }
.sydt-event-title a:hover { color: var(--sydt-brand-color); }

/* Categories */
.sydt-event-categories {
    margin-bottom: 12px;
}
.sydt-event-category {
    display: inline-block;
    padding: 2px 8px;
    margin-right: 5px;
    background: var(--sydt-brand-light);
    color: var(--sydt-brand-color);
    border-radius: 4px;
    font-size: 12px;
    text-decoration: none;
    border: 1px solid rgba(160, 0, 0, 0.1);
}

/* Times */
.sydt-event-times {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--sydt-border-light);
    font-size: 13px;
    color: var(--sydt-text-light);
}

.sydt-event-sessions-summary {
    margin-top: 5px;
}

/* Footer Buttons */
.sydt-event-footer {
    margin-top: auto;
}

.sydt-event-link-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    background: #fff;
    border: 1px solid var(--sydt-text-dark);
    color: var(--sydt-text-dark);
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s;
    box-sizing: border-box;
}

.sydt-event-link-btn:hover {
    background: var(--sydt-text-dark) !important;
    color: #fff !important;
    border: 1px solid var(--sydt-text-dark);
}

/* Calendar Group */
.sydt-event-calendar-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sydt-event-calendar-btn {
    flex: 1;
    min-width: 45%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    background: var(--sydt-btn-primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
    white-space: nowrap;
}

.sydt-event-calendar-btn:hover {
    background: var(--sydt-btn-hover) !important;
    color: #fff !important;
}

.sydt-event-calendar-btn.loading {
    opacity: 0.7;
    cursor: wait;
}

.sydt-event-calendar-btn .dashicons {
    margin-right: 4px;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Load More Button */
.sydt-load-more-container {
    text-align: center;
    margin-top: 50px;
    margin-bottom: 30px;
    width: 100%;
    clear: both;
}

.sydt-load-more-btn {
    display: inline-block;
    padding: 12px 40px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background-color: var(--sydt-btn-primary);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(160, 0, 0, 0.3); /* 紅色陰影 */
    letter-spacing: 1px;
}

.sydt-load-more-btn:hover {
    background-color: var(--sydt-btn-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(160, 0, 0, 0.5);
}

.sydt-load-more-btn:disabled,
.sydt-load-more-btn[disabled] {
    opacity: 0.7;
    cursor: wait;
    transform: none;
    box-shadow: none;
}
