/*
Theme Name:    Twenty Ten Child
Description:   twentyten テーマの子テーマ。カスタマイズはこの中で行い、親テーマは触らない。
Template:      twentyten
Version:       1.0
Author:        po-kaki-to
Text Domain:   twentyten-child
*/

/* ここに親テーマを上書きする CSS を書く。
   親テーマの style.css は functions.php で先に enqueue されている。 */

/* ============================================================
 *  pokakito-structure タグアーカイブ (pkt-tag-pc.php / pkt-tag-sp.php)
 *  tag-pinterest の Pinterest 風ダークデザインを踏襲
 * ============================================================ */

.pkt-archive {
    max-width: 1020px;
    margin: 0 auto;
    padding: 14px;
    color: #e6e6e6;
    background: transparent;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Noto Sans JP", sans-serif;
}

/* H1 タイトル */
.pkt-archive__title {
    font-size: 24px;
    line-height: 1.3;
    margin: 12px 0 16px;
    padding: 0 0 12px;
    border-bottom: 2px solid #ffa500;
    color: #fff;
    font-weight: 700;
}

/* 0 件メッセージ */
.pkt-archive__empty {
    text-align: center;
    padding: 50px 12px;
    color: #888;
    font-size: 14px;
}

/* グリッド(PC: 4列×8行=32件、SP: 1列縦) */
.pkt-archive__list {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.pkt-archive__list--single {
    grid-template-columns: 1fr;
}

/* カード */
.pkt-card {
    background: #1f1f1f;
    border: 1px solid #444;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .15s, transform .15s, border-color .15s;
    list-style: none;
}
.pkt-card:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, .5);
    transform: translateY(-2px);
    border-color: #ffa500;
}
.pkt-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}
.pkt-card__thumb {
    height: 160px;
    flex: 0 0 160px;
    background: #2a2a2a;
    overflow: hidden;
}
.pkt-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pkt-card__title {
    font-size: 14px;
    line-height: 1.45;
    margin: 8px 10px 4px;
    color: #ffa500;
    font-weight: 600;
    word-break: break-word;
}
.pkt-card:hover .pkt-card__title { color: #fff; }

/* 抜粋は非表示(タイトル + PV/コメだけ表示) */
.pkt-card__excerpt { display: none; }

/* メタ情報(PV + コメント数) */
.pkt-card__meta {
    display: flex;
    justify-content: space-between;
    padding: 4px 10px 10px;
    font-size: 12px;
    color: #888;
}
.pkt-card__meta span { display: inline-flex; align-items: center; gap: 3px; }
.pkt-card__pv { color: #aaa; }
.pkt-card__cc { color: #aaa; }

/* SP 修飾子(smart テーマ + pkt-tag-sp.php 時) */
.pkt-archive--sp .pkt-card,
.pkt-card--sp {
    flex-direction: row;
    align-items: stretch;
}
.pkt-archive--sp .pkt-card__link,
.pkt-card--sp .pkt-card__link {
    flex-direction: row;
    align-items: stretch;
    width: 100%;
}
.pkt-archive--sp .pkt-card__thumb,
.pkt-card--sp .pkt-card__thumb {
    flex: 0 0 130px;
    width: 130px;
    height: 100px;
    align-self: center;
    overflow: hidden;
}
.pkt-archive--sp .pkt-card__thumb img,
.pkt-card--sp .pkt-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* タグページ(SP)で smart テーマのサイト名ヘッダー(hgroup) を隠す
   pkt-archive__title のタグ名 h1 と二重になるため */
body.tag #branding hgroup { display: none; }
.pkt-archive--sp .pkt-card__body,
.pkt-card--sp .pkt-card__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    justify-content: space-between;
    padding: 4px 0;
    min-width: 0;
}
.pkt-archive--sp .pkt-card__title,
.pkt-card--sp .pkt-card__title { margin: 0 10px 4px; font-size: 14px; }
.pkt-archive--sp .pkt-card__meta,
.pkt-card--sp .pkt-card__meta { padding: 4px 10px 4px; }

/* ページャー */
.pkt-archive__pager {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    margin: 16px 0 32px;
}
.pkt-archive__pager a,
.pkt-archive__pager .pkt-pager__current,
.pkt-archive__pager span {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #444;
    border-radius: 4px;
    text-decoration: none;
    color: #e6e6e6;
    font-size: 14px;
    background: #1f1f1f;
}
.pkt-archive__pager a:hover {
    background: #333;
    border-color: #ffa500;
    color: #ffa500;
}
.pkt-archive__pager .pkt-pager__current {
    background: #ffa500;
    color: #2a2a2a;
    border-color: #ffa500;
    font-weight: 700;
}

/* タブレット幅: 3 列 / 2 列に縮退 */
@media (max-width: 900px) {
    .pkt-archive__list { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
    .pkt-archive__list { grid-template-columns: 1fr; }
    .pkt-card {
        flex-direction: row;
        align-items: stretch;
    }
    .pkt-card__link {
        flex-direction: row;
        align-items: stretch;
        width: 100%;
    }
    .pkt-card__thumb {
        flex: 0 0 130px;
        width: 130px;
        height: auto;
        align-self: stretch;
    }
    .pkt-card__title { font-size: 13px; }
    .pkt-archive__title { font-size: 20px; }
}
