/* ==========================================
   EME 活动模板统一样式 (列表 + 详情)
   版本: 2.0 - 卡片化详情结构
   ========================================== */

/* --- 1. 全局变量 --- */
:root {
    --eme-primary: #2563eb;
    --eme-primary-hover: #1d4ed8;
    --eme-text-dark: #1f2937;
    --eme-text-words: #415879;
    --eme-text-light: #6b7280;
    --eme-bg-light: #f9fafb;
    --eme-white: #ffffff;
    --eme-radius: 8px;
    --eme-shadow: 0 0px 20px 1px rgba(0,0,0,0.05), 0 2px 6px -1px rgba(0,0,0,0.04);
}

/* ==========================================
   2. 列表卡片样式 (活动列表页)
   ========================================== */
.eme-event-card {
    display: flex;
    flex-direction: column;
    background: var(--eme-white);
    border-radius: var(--eme-radius);
    box-shadow: var(--eme-shadow);
    overflow: hidden;
    transition: transform 0.3s ease;
    height: 100%;
    border: 1px solid #e5e7eb;
}

.eme-event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

.eme-card-image {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
    background-color: var(--eme-bg-light);
}

.eme-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.eme-event-card:hover .eme-card-image img {
    transform: scale(1.05);
}

/* 分类标签容器，浮于图片左上角 */
.eme-card-category {
    position: absolute;
    top: 12px;
    left: 20px;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* 分类标签基础样式 (列表卡片与详情页共用) */
.eme-category1,
.eme-category2,
.eme-category3,
.eme-category9,
.eme-category0 {
    font-size: 0.9rem;
    color: var(--eme-text-dark);
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 600;
    display: inline-block;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.eme-category1 { background: #eff6ff; }
.eme-category2 { background: #fbeede; }
.eme-category3 { background: #e3f7ea; }
.eme-category9,
.eme-category0 { background: #ffffff; }

/* 卡片内容区域 */
.eme-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.eme-card-title {
    margin: 0 0 10px 0;
    font-size: 1.25rem;
    color: var(--eme-text-dark);
    line-height: 1.4;
}

.eme-link {
    text-decoration: none;
    color: inherit;
}
.eme-link:hover {
    color: var(--eme-primary);
}

.eme-card-location {
    font-size: 0.9rem;
    color: var(--eme-text-light);
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

/* 日期胶囊 (普通活动) */
.eme-date {
    background: #fef3c7;
    color: #a11f00;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* 往期活动日期胶囊 */
.eme-date9 {
    background: #e5e7eb;
    color: #a9a9a9;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* 地点胶囊 (详情页使用，列表页也可复用) */
.eme-location-badge {
 /*    background: #e0f2fe;*/
    color: #0c4a6e;
 /*    padding: 4px 12px;*/
 /*     border-radius: 20px;*/
    font-weight: 700;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
  /*    box-shadow: 0 1px 4px rgba(0,0,0,0.08);*/
}

.eme-card-excerpt {
    font-size: 0.95rem;
    color: var(--eme-text-light);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* 按钮样式 */
.eme-btn {
    display: inline-block;
    background: var(--eme-primary);
    color: var(--eme-white);
    padding: 8px 28px;
    border-radius: 26px;
    text-decoration: none;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}
.eme-btn9 {
    display: inline-block;
    background: #8d9cbd;
    color: var(--eme-white);
    padding: 8px 28px;
    border-radius: 26px;
    text-decoration: none;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.eme-btn:hover {
    background: var(--eme-primary-hover);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.eme-btn9:hover {
    background: #7a8ab5;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    color: var(--eme-white);
}

/* ==========================================
   3. 详情页样式 (卡片式结构)
   ========================================== */
.eme-single-event {
    max-width: 900px;
    margin: 0 auto;
    box-shadow: var(--eme-shadow);
    border-radius: 0 0 var(--eme-radius) var(--eme-radius);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* 图片容器 - 对应列表卡片的 .eme-card-image */
.eme-detail-image-wrapper {
    position: relative;
    width: 100%;
    height: 300px;               /* 可自行调整高度 */
    overflow: hidden;
    background-color: var(--eme-bg-light);
    border-radius: var(--eme-radius) var(--eme-radius) 0 0;
}

.eme-detail-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 详情页分类标签 - 绝对定位，与列表卡片标签风格一致 */
.eme-detail-category {
    position: absolute;
    top: 16px;
    left: 50px;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* 详情页内容卡片 */
.eme-detail-content {
    background: var(--eme-white);
    padding: 50px;
    border-radius: 0 0 var(--eme-radius) var(--eme-radius);
/*     border: 1px solid #e5e7eb;*/
    margin-bottom: 40px;
    border-top: none;            /* 与图片无缝连接 */
}

/* 标题 */
.eme-event-title {
    font-size: 2rem;
    margin: 0 0 20px 0;
    color: var(--eme-text-dark);
    line-height: 1.2;
    font-weight: 800;
}

/* 日期与地点横排 */
.eme-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
    align-items: center;
}

/* 报名按钮区域 */
/* ========== 报名预订区域 ========== */
.eme-booking-area {
    margin-top: 30px;
    padding: 24px;
    text-align: center;
}

/* 报名按钮 */
.eme-btn .eme-booking-area  {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    min-width: 200px;
    font-size: 1rem;
    font-weight: 600;
    padding: 12px 32px;
    background: var(--eme-primary);
    color: #fff;
    border-radius: 50px;              /* 全圆角胶囊按钮 */
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
    transition: all 0.25s ease;
}

.eme-booking-area .eme-btn:hover {
    background: var(--eme-primary-hover);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

.eme-booking-area .eme-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(37, 99, 235, 0.2);
}

/* 预订提示文字（若有额外说明） */
.eme-booking-area .booking-info {
    margin-top: 10px;
    font-size: 0.85rem;
    color: #94a3b8;
}
/* 活动详情正文标题 */
.eme-detail-heading {
    margin: 0 0 20px 0;
    font-size: 1.4rem;
    color: var(--eme-text-dark);
    border-bottom: 2px solid var(--eme-bg-light);
    padding-bottom: 12px;
}

.eme-description {
    color: var(--eme-text-words);
    line-height: 1.8;
    font-size: 1.05rem;
}

/* ==========================================
   4. 响应式适配
   ========================================== */
/* 小屏手机 (≤768px) */
@media (max-width: 768px) {
    /* 列表卡片 */
    .eme-card-excerpt {
        display: none;
    }
    .eme-card-image {
        height: 140px;
    }

    /* 详情页 */
    .eme-detail-image-wrapper {
        height: 200px;
    }
    .eme-detail-content {
        padding: 20px;
    }
    .eme-event-title {
        font-size: 1.5rem;
    }
    .eme-detail-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .eme-booking-area {
        padding: 16px;
        margin-top: 20px;
    }
    .eme-booking-area .eme-btn {
        min-width: 160px;
        font-size: 0.95rem;
        padding: 10px 24px;
    }
}

/* 中等屏幕 (平板竖屏, ≤830px) */
@media (max-width: 830px) {
    /* 列表卡片标题 */
    .eme-card-title {
        font-size: 1rem !important;
        font-weight: 700;
    }

    /* 日期、地点胶囊缩小 */
    .eme-date,
    .eme-date9,
    .eme-location-badge {
        font-size: 0.8rem;
        padding: 3px 8px;
    }

    /* 按钮全宽并缩小 */
    .eme-btn,
    .eme-btn9 {
        width: 100%;
        font-size: 0.85rem;
        padding: 8px 20px;
        box-sizing: border-box;
    }

    .eme-card-content {
        padding: 15px;
    }

    .eme-detail-category {
        left: 20px;
    }
    
    /* 详情页头部内边距微调 */
    .eme-detail-content {
        padding: 20px;
    }
    .eme-detail-content {
    margin-bottom: 10px;

}
}

/* ========== 预订表格整体样式 ========== */
.eme-rsvp-form-wrapper {
    width: 80%;
    margin: 24px auto;
    padding: 24px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 18px rgba(0, 0, 0, 0.15);
}

.eme-rsvp-form {
    width: 100%;
    border-collapse: collapse;
}

.eme-rsvp-form tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 5px;
}

.eme-rsvp-form tr:last-of-type {
    margin-bottom: 0;
}

.eme-rsvp-form th {
    width: 100px;
    min-width: 100px;
    padding: 8px 12px 8px 0;
    text-align: right;
    font-weight: 500;
    font-size: 0.95rem;
    color: #475569;
    white-space: nowrap;
    flex-shrink: 0;
}

.required {
    color: #ef4444;
    font-weight: 700;
    margin-left: 2px;
}
.eme-required-field{
    font-size: 14px;
    color: #b5b5b5;
}

.eme-rsvp-form td {
    flex: 1;
    min-width: 200px;
    padding: 4px 0;
}

.eme-rsvp-form input[type="text"],
.eme-rsvp-form input[type="email"],
.eme-rsvp-form input[type="tel"],
.eme-rsvp-form input[type="number"],
.eme-rsvp-form textarea,
.eme-rsvp-form select {
    width: 100%;
    padding: 10px 14px;
    margin-bottom: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    color: #1e293b;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.eme-rsvp-form input:focus,
.eme-rsvp-form textarea:focus,
.eme-rsvp-form select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.eme-rsvp-form textarea {
    min-height: 150px;
    resize: vertical;
}

.eme-submit-wrapper {
    margin-top: 20px;
    text-align: center;
}

.eme-submit-wrapper input[type="submit"],
.eme-submit-wrapper button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
    padding: 12px 36px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: #2563eb;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
    transition: all 0.25s ease;
}

.eme-submit-wrapper input[type="submit"]:hover,
.eme-submit-wrapper button:hover {
    background: #1d4ed8;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

/* 示例：修改表格 */
table.eme-rsvp-form {
    width: 95%;;
}

@media (max-width: 768px) {
    .eme-rsvp-form-wrapper {
        padding: 16px;
        width: 100%;
    }
    .eme-rsvp-form input[type="text"],
    .eme-rsvp-form input[type="email"],
    .eme-rsvp-form input[type="tel"],
    .eme-rsvp-form input[type="number"],
    .eme-rsvp-form textarea,
    .eme-rsvp-form select { 
        margin-bottom: 2px;
    }
   .eme-rsvp-form tr {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 0px;
    }
    .eme-rsvp-form th {
        width: 100%;
        text-align: left;
        padding: 0 0 4px 0;
        font-size: 0.9rem;
    }

    .eme-rsvp-form td {
        width: 100%;
        min-width: 0;
        padding: 1px 0;
    }
    .eme-submit-wrapper input[type="submit"],
    .eme-submit-wrapper button {
        width: 100%;
        min-width: 0;
    }
    table.eme-rsvp-form th {
        padding-left: 1.5em;
        text-align: left;
    }
}
/* 返回按钮样式 - 与整体风格统一 */
.eme-back-button-wrapper {
    margin-top: 30px;
    text-align: center;
    padding: 10px 0;
}

.eme-back-button {
    display: inline-block;
    padding: 10px 40px;
    background: linear-gradient(135deg, #667eea 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.eme-back-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    background: linear-gradient(135deg, #5a67d8 0%, #4f6aed 100%);
}