/* ===========================================
   DF Guide Search - ポップアート/コミックデザイン
   トップページの What's NEW / Blog 帯デザインと統一
   アクセントカラー: Guide用のオレンジ #ffc107
   /wp-content/plugins/df-guide-search/assets/guide-search.css
   =========================================== */

.dfg-guide-band-wrap,
.guide-filter-wrap,
.guide-list,
.guide-pagination,
#df-guide-results {
    box-sizing: border-box;
}
.dfg-guide-band-wrap *,
.guide-filter-wrap *,
.guide-list *,
.guide-pagination * {
    box-sizing: border-box;
}

/* ===========================================
   検索バンド見出し（NEWS/BLOG帯と同じ構造）
   =========================================== */
.dfg-guide-band-wrap {
    position: relative;
    margin: 20px 0 0;
}

.dfg-guide-band-wrap::after {
    content: "";
    position: absolute;
    left: 2%;
    right: 2%;
    bottom: -12px;
    height: 50px;
    z-index: 0;
    filter: blur(1px);
    pointer-events: none;
    background: rgba(255, 154, 60, .55);
    clip-path: polygon(0% 0%, 50% 35%, 100% 0%, 100% 100%, 50% 65%, 0% 100%);
}

.guide-filter-toggle {
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    background-color: #ffc107;
    border: 2px solid #333;
    border-radius: 0;
    padding: 14px 18px;
    cursor: pointer;
    overflow: hidden;
    background-image:
        linear-gradient(125deg, rgba(255,255,255,.34) 0%, rgba(255,255,255,.34) 22%, transparent 22.5%),
        linear-gradient(to bottom, transparent 80%, rgba(0,0,0,.16) 80%, rgba(0,0,0,.16) 100%);
    background-repeat: no-repeat;
}

.guide-filter-toggle-label {
    position: relative;
    z-index: 1;
    font-family: "Archivo", sans-serif;
    font-weight: 900;
    font-size: clamp(18px, 3vw, 24px);
    letter-spacing: .02em;
    text-transform: uppercase;
    color: #333;
    line-height: 1;
}

.guide-filter-toggle-ja {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .14em;
    color: #333;
    opacity: .85;
    white-space: nowrap;
    text-align: left;
    padding-left: 4px;
}

.guide-filter-toggle-caret {
    position: relative;
    z-index: 1;
    color: #fff;
    font-size: 14px;
    transition: transform .2s ease;
    display: none; /* only meaningful/shown on mobile, see media query */
}

/* ===========================================
   絞り込みフォーム本体
   =========================================== */
.guide-filter-wrap {
    margin: 20px 0 34px;
}

.guide-filter-body {
    background: #fff8f0;
    border: none;
    padding: 18px 20px;
}

.guide-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: center;
    margin-bottom: 12px;
}

.guide-filter-row:last-child {
    margin-bottom: 0;
}

.guide-filter-row label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-size: 13px;
    color: #333;
    font-weight: 700;
}

.guide-filter-input {
    flex: 1 1 240px;
    min-width: 0;
    height: 40px;
    padding: 0 14px;
    border: 2px solid #333;
    border-radius: 0;
    font-size: 15px;
    background: #fff;
}

.guide-filter-select {
    min-width: 0;
    height: 36px;
    padding: 0 10px;
    border: 2px solid #333;
    border-radius: 0;
    background: #fff;
    font-size: 13px;
    font-weight: 700;
    color: #333;
}

.guide-filter-submit {
    display: inline-flex;
    align-items: center;
    height: 40px;
    box-sizing: border-box;
    background: #ffc107;
    color: #333;
    border: 2px solid #333;
    border-radius: 0;
    padding: 0 22px;
    cursor: pointer;
    font-family: "Archivo", sans-serif;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .02em;
    line-height: 1;
    box-shadow: 3px 3px 0 #333;
    transition: transform .15s ease, box-shadow .15s ease;
}

.guide-filter-submit:hover {
    background: #e0a527;
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 #333;
}

.guide-filter-reset {
    display: inline-flex;
    align-items: center;
    height: 40px;
    box-sizing: border-box;
    padding: 0 14px;
    border: 2px solid #333;
    background: #fff;
    color: #333;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    line-height: 1;
}

.guide-filter-reset:hover {
    background: #f3f3f3;
}

.guide-result-count {
    color: #666;
    font-size: 14px;
    margin: 4px 0 20px;
    font-weight: 700;
}

/* ===========================================
   カテゴリ チップ（ボタン）
   =========================================== */
.guide-filter-pill-group {
    margin-bottom: 16px;
}

.guide-filter-pill-label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    color: #666;
    margin: 0 0 8px;
    text-transform: uppercase;
}

.guide-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 4px 2px;
}

.guide-filter-pill {
    display: inline-flex;
    align-items: center;
    height: 36px;
    box-sizing: border-box;
    padding: 0 16px;
    border-radius: 0;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid #333;
    background: #fff;
    color: #333;
    line-height: 1;
    transition: transform .15s ease, box-shadow .15s ease;
    transform: rotate(-1.5deg);
}

.guide-filter-pills > .guide-filter-pill:nth-child(even) {
    transform: rotate(1.5deg);
}

.guide-filter-pills > .guide-filter-pill:nth-child(3n) {
    transform: rotate(-2.2deg);
}

.guide-filter-pill:hover {
    transform: translate(-1px, -1px) rotate(0deg);
    box-shadow: 2px 2px 0 #333;
}

.guide-filter-pill.is-active {
    background: #ffc107;
    border-color: #333;
    color: #333;
    box-shadow: 3px 3px 0 #333;
    transform: rotate(0deg);
}

.guide-filter-pill-child {
    height: 32px;
    padding: 0 14px;
    font-size: 12px;
}

.guide-filter-pill-child.is-active {
    background: #ffe9cc;
    border-color: #333;
    color: #a35a00;
    box-shadow: 2.5px 2.5px 0 #ffc107;
    transform: rotate(0deg);
}

/* ===========================================
   記事カード一覧
   =========================================== */
.guide-list {
    display: grid;
    gap: 26px 22px;
    max-width: 100%;
    overflow-x: hidden;
    padding: 14px 4px 6px;
}

.guide-item {
    position: relative;
    background: #fff;
    border: none;
    border-radius: 3px;
    max-width: 100%;
    overflow: visible; /* allow the pin to poke out above the card */
    padding: 10px 10px 4px;
    box-shadow: 5px 5px 0 #ff8c00;
    transition: transform .15s ease, box-shadow .15s ease;
    transform: rotate(-1deg);
}

.guide-item:nth-child(even) {
    transform: rotate(1deg);
}

.guide-item:nth-child(3n) {
    transform: rotate(-1.4deg);
}

.guide-item:hover {
    transform: translateY(-3px) rotate(0deg);
    box-shadow: 7px 7px 0 #ff4e68;
}

/* ── push-pin, cycling through the brand accent colors ── */
.guide-item::before {
    content: "";
    position: absolute;
    top: -9px;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    z-index: 3;
    background: radial-gradient(circle at 35% 30%, #ffffff, #ffc107 42%, #cc6a00 92%);
    box-shadow:
        0 3px 4px rgba(0,0,0,.35),
        inset -2px -2px 3px rgba(0,0,0,.25),
        inset 2px 2px 3px rgba(255,255,255,.6);
}

.guide-item:nth-child(2n)::before {
    background: radial-gradient(circle at 35% 30%, #ffffff, #ff4e68 42%, #b5233c 92%);
}

.guide-item:nth-child(3n)::before {
    background: radial-gradient(circle at 35% 30%, #ffffff, #cd7eff 42%, #8a3fc4 92%);
}

.guide-item-link {
    display: flex;
    gap: 16px;
    text-decoration: none;
    color: inherit;
    max-width: 100%;
}

.guide-item-thumb {
    flex: 0 0 200px;
    min-width: 0;
    overflow: hidden;
    border-radius: 2px;
    background: #eee;
}

.guide-item-thumb img {
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.guide-item-body {
    min-width: 0;
    flex: 1 1 auto;
    padding: 12px 6px 14px 0;
}

.guide-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.guide-item-date-chip {
    display: inline-flex;
    align-items: center;
    font-family: "Archivo", sans-serif;
    font-weight: 800;
    font-size: 11px;
    letter-spacing: .02em;
    background: #fff;
    color: #333;
    border: 2px solid #333;
    padding: 4px 8px;
    box-shadow: 2px 2px 0 #ffc107;
    white-space: nowrap;
    transform: rotate(-2deg);
}

.guide-item:nth-child(even) .guide-item-date-chip {
    transform: rotate(2deg);
    box-shadow: -2px 2px 0 #ffc107;
}

.guide-item-link:hover .guide-item-date-chip {
    transform: translate(-1px, -1px) rotate(-2deg);
    box-shadow: 3px 3px 0 #ffc107;
}

.guide-item:nth-child(even) .guide-item-link:hover .guide-item-date-chip {
    transform: translate(1px, -1px) rotate(2deg);
    box-shadow: -3px 3px 0 #ffc107;
}

.guide-item-burst {
    width: 32px;
    height: 32px;
    color: #ffc107;
    filter: drop-shadow(1.5px 1.5px 0 #333);
    flex-shrink: 0;
}

.guide-item-burst svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.guide-item-burst text {
    font-family: "Archivo", sans-serif;
    font-weight: 900;
    font-size: 28px;
    fill: #fff;
    stroke: #333;
    stroke-width: 5px;
    stroke-linejoin: round;
    paint-order: stroke fill;
}

.guide-item-title {
    font-size: 15px;
    font-weight: 900;
    line-height: 1.5;
    margin: 0 0 6px;
    color: #333;
    overflow-wrap: break-word;
    word-break: break-word;
}

.guide-item-excerpt {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.7;
    overflow-wrap: break-word;
    word-break: break-word;
}

.guide-no-result {
    padding: 40px 20px;
    text-align: center;
    color: #999;
    background: #fff8f0;
    border: 2px solid #333;
    font-weight: 700;
}

/* ===========================================
   ページネーション
   =========================================== */
.guide-pagination {
    text-align: center;
    margin: 40px 0;
}

.guide-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    min-width: 36px;
    box-sizing: border-box;
    padding: 0 12px;
    margin: 0 3px;
    border: 2px solid #333;
    border-radius: 0;
    text-decoration: none;
    color: #333;
    background: #fff;
    font-weight: 800;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    vertical-align: middle;
    transition: transform .15s ease, box-shadow .15s ease;
}

.guide-pagination a.page-numbers:hover {
    transform: translate(-1px, -1px);
    box-shadow: 2px 2px 0 #ffc107;
}

.guide-pagination .page-numbers.current {
    background: #ffc107;
    color: #333;
    border-color: #333;
    box-shadow: 2.5px 2.5px 0 #333;
}

.guide-pagination .page-numbers.dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    box-sizing: border-box;
    padding: 0 4px;
    margin: 0 2px;
    color: #999;
    border: none;
    background: transparent;
    line-height: 1;
    vertical-align: middle;
}

/* ===========================================
   Ajaxローディング
   =========================================== */
#df-guide-results {
    transition: opacity 0.15s ease;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

#df-guide-results.df-guide-loading {
    opacity: 0.4;
    pointer-events: none;
}

/* ===========================================
   モバイル
   =========================================== */
@media (max-width: 600px) {
    .guide-item-link { flex-direction: column; }
    .guide-item-thumb {
        flex: none;
        width: 100%;
        border-bottom: none;
        aspect-ratio: 4 / 3;
    }
    .guide-item-body { padding: 10px 4px 10px; }

    .guide-filter-row { flex-direction: column; align-items: stretch; }
    .guide-filter-row label {
        display: block;
        white-space: normal;
        min-width: 0;
    }
    .guide-filter-input { flex: none; width: 100%; box-sizing: border-box; }
    .guide-filter-select { width: 100%; box-sizing: border-box; min-width: 0; }

    .guide-filter-pills { gap: 6px; }
    .guide-filter-pill { height: 34px; padding: 0 12px; font-size: 12px; }
    .guide-filter-pill-child { height: 30px; padding: 0 10px; font-size: 11px; }

    /* collapsible search: band header becomes clickable toggle, body hidden by default */
    .guide-filter-toggle-caret {
        display: inline-block;
    }
    .guide-filter-toggle[aria-expanded="true"] .guide-filter-toggle-caret {
        transform: rotate(180deg);
    }

    .guide-filter-body {
        display: none;
    }

    .guide-filter-body.is-open {
        display: block;
    }

    /* last line of defense: if anything inside still tries to overflow,
       clip it rather than letting it widen the whole page on mobile */
    body {
        overflow-x: hidden;
        max-width: 100vw;
    }
}

/* ===========================================
   PC: 3-column card grid (3 columns x 3 rows = 9 per page)
   =========================================== */
@media (min-width: 601px) {
    .guide-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 28px 24px;
    }

    .guide-item-link {
        flex-direction: column;
        gap: 0;
        height: 100%;
    }

    .guide-item-thumb {
        flex: none;
        width: 100%;
        border-bottom: none;
    }

    .guide-item-thumb img {
        aspect-ratio: 4 / 3;
        object-fit: cover;
    }

    .guide-item-body {
        padding: 12px 6px 14px;
    }

    .guide-item-excerpt {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* on desktop the search form is always open (not a real toggle),
       so the band shouldn't look clickable */
    .guide-filter-toggle {
        cursor: default;
    }
}
