/* === SSZ Seminar Cards === */
:root {
    --ssz-primary: #3faeb2;
    --ssz-primary-dark: #2d8a8e;
    --ssz-primary-light: #e7f7f8;
    --ssz-green: #4fce80;
    --ssz-green-dark: #3ab86a;
    --ssz-white: #ffffff;
    --ssz-gray-100: #f5f5f5;
    --ssz-gray-200: #d9d9d9;
    --ssz-gray-300: #ccc;
    --ssz-gray-500: #888;
    --ssz-gray-700: #444;
    --ssz-gray-900: #333;
    --ssz-radius: 5px;
}

/* ===== Common ===== */
.ssz-card {
    font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--ssz-gray-900);
    margin: 24px 0;
}
.ssz-card * { box-sizing: border-box; }
.ssz-card a { text-decoration: none; }

/* Tags */
.ssz-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.ssz-tag {
    display: inline-block;
    padding: 3px 14px;
    border: 1px solid var(--ssz-primary);
    border-radius: 4px;
    font-size: 13px;
    color: var(--ssz-primary) !important;
    background: var(--ssz-white);
    text-decoration: none !important;
    transition: all 0.2s;
}
a.ssz-tag:hover {
    background: var(--ssz-primary);
    color: var(--ssz-white) !important;
}

/* Title */
.ssz-card-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.5;
    color: var(--ssz-gray-900);
}

/* Summary */
.ssz-card-summary {
    font-size: 16px;
    color: var(--ssz-gray-900);
    margin: 0 0 16px;
    line-height: 1.7;
}

/* Info Table */
.ssz-info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 10px;
}
/* 共通セルスタイル */
.ssz-info-table th,
.ssz-info-table td {
    font-size: 16px;
    font-weight: 400;
    color: var(--ssz-gray-900);
    padding: 12px 14px;
    border-bottom: 1px solid var(--ssz-gray-200);
    text-align: left;
    vertical-align: middle;
}
.ssz-info-table th {
    background: none;
    white-space: nowrap;
    width: 80px;
}
/* 1行目: 枠線+背景色ヘッダ */
.ssz-info-table tr:first-child th,
.ssz-info-table tr:first-child td {
    border: 1px solid var(--ssz-gray-200);
    height: 48px;
}
.ssz-info-table tr:first-child th {
    background: var(--ssz-primary-light);
    text-align: center;
}

/* Info Grid (div-based, replaces table) */
.ssz-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 0 0 10px;
}
.ssz-info-item {
    padding: 0;
    border-bottom: 1px solid var(--ssz-gray-200);
}
.ssz-info-item:first-child,
.ssz-info-item:nth-child(2) {
    border-top: 1px solid var(--ssz-gray-200);
    background: none;
}
.ssz-info-item:first-child .ssz-info-label,
.ssz-info-item:nth-child(2) .ssz-info-label {
    background: var(--ssz-primary-light);
    text-align: center;
    border-bottom: 1px solid var(--ssz-gray-200);
    padding: 10px 14px;
}
.ssz-info-item:first-child .ssz-info-value,
.ssz-info-item:nth-child(2) .ssz-info-value {
    padding: 10px 14px;
}
.ssz-info-wide {
    grid-column: 1 / -1;
}
.ssz-info-label {
    font-size: 16px;
    font-weight: 400;
    color: var(--ssz-gray-900);
    padding: 12px 14px 2px;
    white-space: nowrap;
}
.ssz-info-value {
    font-size: 16px;
    font-weight: 400;
    color: var(--ssz-gray-900);
    padding: 2px 14px 12px;
}

@media (max-width: 768px) {
    .ssz-info-grid {
        grid-template-columns: 1fr;
    }
    .ssz-info-item:first-child,
    .ssz-info-item:nth-child(2) {
        border-top: none;
    }
    .ssz-info-item:first-child .ssz-info-label,
    .ssz-info-item:nth-child(2) .ssz-info-label {
        background: none;
        text-align: left;
        border: none;
        padding: 8px 0 2px;
        font-size: 12px;
        color: var(--ssz-gray-500, #888);
    }
    .ssz-info-item:first-child .ssz-info-value,
    .ssz-info-item:nth-child(2) .ssz-info-value {
        border: none;
        padding: 2px 0 10px;
    }
    .ssz-info-label {
        padding: 8px 0 2px;
        font-size: 12px;
        color: var(--ssz-gray-500, #888);
    }
    .ssz-info-value {
        padding: 2px 0 10px;
    }
}

/* Venue Link */
.ssz-venue-link {
    display: inline-block;
    float: right;
    padding: 4px 16px;
    margin: -4px 0;
    background: var(--ssz-white);
    border: 1px solid var(--ssz-primary);
    color: var(--ssz-primary) !important;
    border-radius: 30px;
    font-size: 16px;
    text-decoration: none !important;
    vertical-align: middle;
    transition: all 0.2s;
}
.ssz-venue-link:hover {
    background: var(--ssz-primary);
    color: var(--ssz-white) !important;
}

/* Buttons */
.ssz-btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    text-decoration: none !important;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}
.ssz-btn-detail {
    background: #7B7A7A;
    color: var(--ssz-white) !important;
    flex: 1;
}
.ssz-btn-detail:hover {
    background: #5a5959;
    color: var(--ssz-white) !important;
}
.ssz-btn-apply {
    background: var(--ssz-primary);
    color: var(--ssz-white) !important;
    flex: 1;
}
.ssz-btn-apply:hover {
    background: var(--ssz-primary-dark);
    color: var(--ssz-white) !important;
}

/* Outline buttons (Top card) */
.ssz-btn-outline {
    display: inline-block;
    padding: 8px 20px;
    border: 2px solid var(--ssz-green);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ssz-green) !important;
    background: var(--ssz-white);
    text-decoration: none !important;
    transition: all 0.2s;
}
.ssz-btn-outline:hover {
    background: var(--ssz-green);
    color: var(--ssz-white) !important;
}

/* Card Actions */
.ssz-card-actions {
    display: flex;
    gap: 16px;
    margin-top: 16px;
}
.ssz-card-actions .ssz-btn {
    flex: 1;
}
.ssz-card-actions-center {
    justify-content: center;
}
.ssz-card-actions-center .ssz-btn.ssz-btn-apply,
.ssz-card-actions-center .ssz-btn {
    flex: none;
    min-width: 300px;
    max-width: 500px;
    width: 60%;
}
.ssz-card-actions-split {
    justify-content: space-between;
}
.ssz-btn-center {
    flex: none !important;
    width: 60%;
    min-width: 300px;
    max-width: 500px;
    margin: 0 auto;
}

/* Closed state */
.ssz-card-closed {
    opacity: 0.6;
}
.ssz-link-closed {
    display: inline-block;
    padding: 10px 24px;
    background: var(--ssz-gray-200);
    color: var(--ssz-gray-500);
    border-radius: 30px;
    font-size: 14px;
}

/* ===== Archive Card (横型フルカード) ===== */
.ssz-card-archive {
    background: var(--ssz-white);
    border: 1px solid var(--ssz-gray-200);
    border-radius: var(--ssz-radius);
    overflow: hidden;
    box-shadow: 0 4px 4px rgba(0,0,0,0.25);
}
.ssz-card-archive-top {
    display: flex;
    gap: 0;
    padding: 26px 30px 0;
}
.ssz-card-header {
    flex: 1;
    padding: 4px 0 16px 24px;
}
.ssz-card-archive-inner {
    display: flex;
    gap: 0;
}
.ssz-card-thumb {
    width: 286px;
    flex-shrink: 0;
    overflow: hidden;
}
.ssz-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ssz-card-body {
    padding: 16px 30px 30px;
}

/* Archive responsive — 縦型カードに切り替え */
@media (max-width: 768px) {
    /* レイアウトを縦積みに */
    .ssz-card-archive-top {
        flex-direction: column;
        padding: 0;
    }
    .ssz-card-archive-inner {
        flex-direction: column;
    }
    /* サムネイルを上部全幅 */
    .ssz-card-thumb {
        width: 100%;
        height: 200px;
    }
    /* ヘッダー（タイトル・概要）*/
    .ssz-card-header {
        padding: 20px 20px 12px;
    }
    .ssz-card-archive .ssz-card-title {
        font-size: 18px;
    }
    .ssz-card-archive .ssz-card-summary {
        font-size: 14px;
        margin-bottom: 8px;
    }
    /* ボディ（テーブル・ボタン）*/
    .ssz-card-body {
        padding: 0 20px 20px;
    }
    /* ボタンを縦積み全幅 */
    .ssz-card-actions {
        flex-direction: column;
        gap: 10px;
    }
    .ssz-card-actions .ssz-btn {
        width: 100%;
        min-width: 0;
        text-align: center;
        box-sizing: border-box;
    }
    .ssz-card-actions-center .ssz-btn {
        width: 100%;
        min-width: 0;
    }

    /* 情報テーブル: 全セルを1列表示 */
    .ssz-info-table,
    .ssz-info-table tbody,
    .ssz-info-table tr,
    .ssz-info-table th,
    .ssz-info-table td {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box;
    }
    .ssz-info-table th {
        padding: 8px 0 2px;
        font-size: 12px;
        color: var(--ssz-gray-500, #888);
        border-bottom: none;
    }
    .ssz-info-table td {
        padding: 2px 0 10px;
        border-bottom: 1px solid var(--ssz-gray-200);
    }
    /* 1行目の枠線スタイルをリセット */
    .ssz-info-table tr:first-child th,
    .ssz-info-table tr:first-child td {
        border: none;
        height: auto;
        background: none;
        text-align: left;
    }
    .ssz-info-table tr:first-child td {
        border-bottom: 1px solid var(--ssz-gray-200);
    }
    .ssz-info-table tr:first-child th {
        background: none;
        color: var(--ssz-gray-500, #888);
    }
    .ssz-info-table tr {
        border-bottom: none;
        padding: 4px 0;
    }
    .ssz-info-table th {
        border-bottom: none;
    }
    .ssz-venue-link {
        float: none;
        display: block;
        width: fit-content;
        margin: 8px 0 0;
    }
}

/* ===== Top Card (縦型カード) ===== */
.ssz-card-top {
    background: var(--ssz-white);
    border: 1px solid var(--ssz-gray-200);
    border-radius: var(--ssz-radius);
    overflow: hidden;
    box-shadow: 0 4px 4px rgba(0,0,0,0.25);
    max-width: 320px;
}
.ssz-card-top-thumb {
    width: 100%;
    height: 200px;
    overflow: hidden;
}
.ssz-card-top-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ssz-card-top-body {
    padding: 20px;
}
.ssz-card-top .ssz-card-title {
    font-size: 16px;
}
.ssz-card-top .ssz-info-compact th {
    width: 70px;
    padding: 6px 10px;
    font-size: 12px;
}
.ssz-card-top .ssz-info-compact td {
    padding: 6px 10px;
    font-size: 12px;
}
.ssz-card-top .ssz-card-actions-split {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}
.ssz-card-top .ssz-card-actions-split .ssz-btn {
    font-size: 14px;
    padding: 10px 0;
}

/* ===== Page Card (情報テーブル+ボタン) ===== */
.ssz-card-page {
    background: var(--ssz-white);
    border: 1px solid var(--ssz-gray-200);
    border-radius: var(--ssz-radius);
    padding: 24px;
    box-shadow: 0 4px 4px rgba(0,0,0,0.25);
}
.ssz-card-page .ssz-card-actions {
    margin-top: 24px;
}

/* ===== List (一覧表示) ===== */
.ssz-list {
    display: flex;
    flex-direction: column;
    gap: 50px;
    width: 100%;
}
.ssz-list .ssz-card {
    margin: 0;
}
.ssz-empty {
    text-align: center;
    color: var(--ssz-gray-500);
    padding: 40px 0;
    font-size: 15px;
}

/* ===== Top Card Grid (トップページ用グリッド) ===== */
.ssz-topcard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.ssz-topcard-grid .ssz-card {
    margin: 0;
    max-width: none;
}
@media (max-width: 640px) {
    .ssz-topcard-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Archive Page Layout ===== */
.form-wrapper.ssz-archive-wrapper {
    max-width: var(--wp--style--global--content-size, 1340px);
}

/* ===== Archive Page Heading ===== */
.ssz-archive-heading {
    font-size: 36px;
    font-weight: 400;
    color: var(--ssz-gray-900);
    margin: 0 0 32px;
    padding-bottom: 0;
    border-bottom: none;
    text-align: center;
}
.ssz-archive-heading::after {
    content: '';
    display: block;
    width: 20px;
    height: 3px;
    background: var(--ssz-primary);
    margin: 12px auto 0;
}
.ssz-archive-back {
    margin: 0 0 20px;
    font-size: 14px;
}
.ssz-archive-back a {
    color: var(--ssz-primary);
    text-decoration: none;
}
.ssz-archive-back a:hover {
    color: var(--ssz-primary-dark);
    text-decoration: underline;
}

/* ===== Pagination ===== */
.ssz-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 50px;
    font-family: 'Noto Sans JP', sans-serif;
}
.ssz-pagination a,
.ssz-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    font-size: 16px;
    transition: all 0.2s;
}
.ssz-pagination .ssz-page-num {
    width: 48px;
    height: 48px;
    border: 1px solid var(--ssz-primary);
    background: var(--ssz-white);
    color: var(--ssz-primary) !important;
}
.ssz-pagination .ssz-page-num.ssz-page-current {
    background: var(--ssz-gray-900);
    border-color: var(--ssz-primary);
    color: var(--ssz-white) !important;
}
.ssz-pagination .ssz-page-num:hover:not(.ssz-page-current) {
    background: var(--ssz-primary-light);
}
.ssz-pagination .ssz-page-prev,
.ssz-pagination .ssz-page-next {
    color: var(--ssz-primary) !important;
    font-size: 16px;
    padding: 0 8px;
}
.ssz-pagination .ssz-page-prev:hover,
.ssz-pagination .ssz-page-next:hover {
    color: var(--ssz-primary-dark) !important;
}
.ssz-pagination .ssz-page-dots {
    color: var(--ssz-primary);
    font-size: 16px;
    padding: 0 4px;
}
