/* ── Events Table Container ── */
.sem-events-table-wrap {
    overflow-x: auto;
    margin: 2em 0;
    border-radius: 10px;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.04),
        0 4px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e4e8;
}

/* ── Table Base ── */
.sem-events-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1em;
    line-height: 1.7;
}

/* ── Header ── */
.sem-events-table thead {
    border-bottom: 2px solid rgba(0, 0, 0, 0.08);
}

.sem-events-table thead th {
    background-color: #2c3e50;
    color: #ffffff;
    padding: 18px 32px;
    text-align: left;
    font-weight: 600;
    font-size: 0.82em;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    border: none;
}

.sem-events-table thead th:first-child {
    border-radius: 9px 0 0 0;
}

.sem-events-table thead th:last-child {
    border-radius: 0 9px 0 0;
}

/* ── Body Cells ── */
.sem-events-table tbody td {
    padding: 18px 32px;
    border-bottom: 1px solid #eaeaea;
    vertical-align: middle;
    color: #333;
}

/* ── Row Base (transitions) ── */
.sem-events-table tbody tr {
    transition: background-color 0.2s ease;
}

/* ── Alternating Row Stripes ── */
.sem-events-table tbody tr:nth-child(even) {
    background-color: #f7f8fa;
}

.sem-events-table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

/* ── Row Hover ── */
.sem-events-table tbody tr:hover {
    background-color: #edf1f7;
}

/* ── Last Row ── */
.sem-events-table tbody tr:last-child td {
    border-bottom: none;
}

.sem-events-table tbody tr:last-child td:first-child {
    border-radius: 0 0 0 9px;
}

.sem-events-table tbody tr:last-child td:last-child {
    border-radius: 0 0 9px 0;
}

/* ── Past Events ── */
.sem-events-table tbody tr.sem-past-event {
    opacity: 0.5;
}

/* ── Event Name ── */
.sem-events-table .sem-col-name {
    font-weight: 600;
    color: #1a1a1a;
}

/* ── Date Column ── */
.sem-events-table .sem-col-date {
    white-space: nowrap;
}

/* ── Image Column ── */
.sem-events-table .sem-col-image {
    width: 100px;
    padding: 14px 24px;
}

.sem-events-table .sem-event-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.10);
}

/* ── Website Link as Pill Button ── */
.sem-events-table .sem-col-website a {
    display: inline-block;
    padding: 7px 20px;
    background-color: #2c3e50;
    color: #ffffff;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.84em;
    font-weight: 500;
    letter-spacing: 0.03em;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.sem-events-table .sem-col-website a:hover {
    background-color: #1a252f;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

/* ── No Events Message ── */
.sem-no-events {
    padding: 2em;
    color: #888;
    font-style: italic;
    text-align: center;
}

/* ── Responsive: Stacked Cards on Mobile ── */
@media (max-width: 600px) {
    .sem-events-table-wrap {
        box-shadow: none;
        border: none;
        border-radius: 0;
    }

    .sem-events-table,
    .sem-events-table thead,
    .sem-events-table tbody,
    .sem-events-table th,
    .sem-events-table td,
    .sem-events-table tr {
        display: block;
    }

    .sem-events-table thead {
        display: none;
    }

    .sem-events-table tbody tr {
        background: #ffffff;
        border: 1px solid #e2e4e8;
        border-radius: 10px;
        margin-bottom: 16px;
        padding: 16px;
        box-shadow:
            0 1px 4px rgba(0, 0, 0, 0.04),
            0 2px 8px rgba(0, 0, 0, 0.04);
    }

    .sem-events-table tbody tr:nth-child(even) {
        background-color: #ffffff;
    }

    .sem-events-table tbody td {
        padding: 8px 0;
        border-bottom: none;
    }

    .sem-events-table tbody td::before {
        content: attr(data-label);
        font-weight: 700;
        font-size: 0.75em;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: #888;
        display: block;
        margin-bottom: 4px;
    }

    .sem-events-table tbody tr:last-child td:first-child,
    .sem-events-table tbody tr:last-child td:last-child {
        border-radius: 0;
    }

    .sem-events-table .sem-event-image {
        width: 100%;
        max-width: 220px;
        height: auto;
        border-radius: 6px;
    }
}
