/* ============================================
   Blog Page - Specific Styles
   Extends new-top-style.css
   ============================================ */

/* Active nav
   ※太さは new-top-style.css 側で500に固定。
     ここでは色だけ指定し、下線で現在地を示す。 */
.blog-nav-active {
    color: var(--primary-color) !important;
}

/* ===== Hero ===== */
.blog-hero {
    padding: 160px 0 50px;
    text-align: center;
    background: linear-gradient(180deg, #f0f9ff 0%, #f9fafb 100%);
}

.blog-hero__label {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.blog-hero__title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
}

/* ===== Layout ===== */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    padding: 50px 0 80px;
}

/* ===== Post Cards ===== */
.blog-posts {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.post-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid #f3f4f6;
    display: grid;
    grid-template-columns: 280px 1fr;
    transition: all 0.3s;
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.post-card__image-link {
    display: block;
    overflow: hidden;
}

.post-card__image {
    width: 100%;
    height: 100%;
    min-height: 180px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-card__image img {
    transform: scale(1.05);
}

.post-card__no-image {
    font-size: 0.85rem;
    color: var(--text-light);
}

.post-card__content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-card__category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.06);
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
    align-self: flex-start;
    transition: background 0.3s;
}

.post-card__category:hover {
    background: rgba(37, 99, 235, 0.12);
}

.post-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 8px;
}

.post-card__title a {
    color: var(--text-color);
    transition: color 0.3s;
}

.post-card__title a:hover {
    color: var(--primary-color);
}

.post-card__date {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* ===== Pagination ===== */
.blog-pagination {
    margin-top: 30px;
}

.blog-pagination ul {
    display: flex;
    justify-content: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-pagination li {
    list-style: none;
}

.blog-pagination li::before {
    content: none !important;
    display: none !important;
}

.blog-pagination a,
.blog-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    background: var(--white);
    border: 1px solid #f3f4f6;
    color: var(--text-light);
    transition: all 0.3s;
}

.blog-pagination a:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.blog-pagination .current {
    background: var(--primary-color);
    color: white !important;
    border-color: var(--primary-color);
}

.blog-pagination .prev,
.blog-pagination .next {
    width: auto;
    padding: 0 15px;
}

.blog-pagination .dots {
    border: none;
    background: none;
}

/* ===== Sidebar ===== */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar__widget {
    background: var(--white);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid #f3f4f6;
}

.sidebar__title {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-family: var(--font-heading);
    color: var(--text-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

/* YouTube Widget */
.sidebar__video-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
    background: #000;
}

.sidebar__video-wrap iframe {
    width: 100%;
    height: 100%;
}

.sidebar__video-caption {
    font-size: 0.8rem;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 5px;
}

/* CTA Widget */
.sidebar__cta {
    background: var(--primary-gradient);
    border-radius: 16px;
    padding: 30px 25px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.15);
}

.sidebar__cta-title {
    color: white;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.5;
}

.sidebar__cta-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    margin-bottom: 18px;
    line-height: 1.6;
}

.sidebar__cta-btn {
    display: inline-block;
    background: white;
    color: var(--primary-color);
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.sidebar__cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

/* Recommended Posts */
.sidebar__post-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar__post-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    transition: opacity 0.3s;
}

.sidebar__post-item:hover {
    opacity: 0.8;
}

.sidebar__post-thumb {
    width: 70px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
    flex-shrink: 0;
}

.sidebar__post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar__post-title {
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--text-color);
}

/* Categories */
.sidebar__category-list {
    display: flex;
    flex-direction: column;
}

.sidebar__category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.9rem;
    color: var(--text-color);
    transition: color 0.3s;
}

.sidebar__category-item:last-child {
    border-bottom: none;
}

.sidebar__category-item:hover {
    color: var(--primary-color);
}

.sidebar__category-count {
    font-size: 0.75rem;
    background: var(--bg-gray);
    padding: 2px 8px;
    border-radius: 10px;
    color: var(--text-light);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }

    .post-card {
        grid-template-columns: 1fr;
    }

    .post-card__image {
        height: 200px;
        min-height: auto;
    }
}

/* ============================================
   Added: Archive / Search / Video facade
   ============================================ */

/* ===== Hero: description ===== */
.blog-hero__desc {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-top: 15px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== Breadcrumb ===== */
.blog-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 20px 0 0;
    font-size: 0.8rem;
    color: var(--text-light);
}

.blog-breadcrumb a {
    color: var(--text-light);
    transition: color 0.3s;
}

.blog-breadcrumb a:hover {
    color: var(--primary-color);
}

.blog-breadcrumb__sep {
    color: #d1d5db;
}

.blog-breadcrumb__current {
    color: var(--text-color);
    font-weight: 600;
}

/* ===== Sidebar Search Widget（控えめなトーン） ===== */
.sidebar__search {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.sidebar__search-input {
    flex: 1;
    min-width: 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    outline: none;
    background: var(--bg-gray, #f9fafb);
    font-size: 0.85rem;
    font-family: inherit;
    color: var(--text-color);
    padding: 9px 12px;
    transition: border-color 0.3s, background 0.3s;
}

.sidebar__search-input:focus {
    border-color: #d1d5db;
    background: var(--white);
}

.sidebar__search-input::placeholder {
    color: #9ca3af;
}

/* カテゴリのカウント表示と同じトーン：グレー背景＋青文字 */
.sidebar__search-btn {
    flex-shrink: 0;
    border: none;
    border-radius: 8px;
    background: var(--bg-gray, #f3f4f6);
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 700;
    font-family: inherit;
    padding: 0 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.sidebar__search-btn:hover {
    background: rgba(37, 99, 235, 0.08);
}

.sidebar__search-note {
    font-size: 0.72rem;
    color: var(--text-light);
    margin-top: 8px;
}

/* ===== YouTube facade（クリックで読み込み） ===== */
.sidebar__video-wrap {
    position: relative;
    cursor: pointer;
}

.sidebar__video-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sidebar__video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    line-height: 0;
    opacity: 0.9;
    transition: opacity 0.3s, transform 0.3s;
}

.sidebar__video-wrap:hover .sidebar__video-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
}

/* ===== Current category highlight ===== */
.sidebar__category-item.is-current {
    color: var(--primary-color);
    font-weight: 700;
}

.sidebar__category-item.is-current .sidebar__category-count {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

/* ===== Empty state (no posts / no results) ===== */
.blog-empty {
    background: var(--white);
    border: 1px solid #f3f4f6;
    border-radius: 16px;
    padding: 50px 30px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.blog-empty__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.7;
    margin-bottom: 10px;
}

.blog-empty__text {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 25px;
}

.blog-empty__search {
    display: flex;
    gap: 10px;
    max-width: 420px;
    margin: 0 auto;
}

.blog-empty__btn {
    display: inline-block;
    flex-shrink: 0;
    background: var(--bg-gray, #f3f4f6);
    color: var(--primary-color);
    border: none;
    padding: 11px 22px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.3s;
}

.blog-empty__btn:hover {
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary-color);
}

/* ===== 404 ===== */
.blog-404__code {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 10px;
}

/* ===== Static page content (page.php) ===== */
.blog-page-content {
    background: var(--white);
    border: 1px solid #f3f4f6;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    line-height: 1.9;
}

.blog-page-content h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 35px 0 15px;
}

.blog-page-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 30px 0 12px;
}

.blog-page-content p {
    margin-bottom: 18px;
}

.blog-page-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.blog-page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

/* ===== Responsive: smartphone ===== */
@media (max-width: 600px) {
    .blog-hero {
        padding: 110px 0 35px;
    }

    .blog-hero__title {
        font-size: 1.8rem;
    }

    .blog-hero__label {
        font-size: 0.75rem;
        letter-spacing: 2px;
    }

    .blog-layout {
        padding: 30px 0 50px;
        gap: 30px;
    }

    .post-card__content {
        padding: 18px 20px;
    }

    .post-card__title {
        font-size: 1rem;
    }

    .blog-empty {
        padding: 35px 20px;
    }

    .blog-empty__search {
        flex-direction: column;
    }

    .blog-page-content {
        padding: 25px 20px;
    }

    .blog-pagination a,
    .blog-pagination span {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }
}

/* ============================================
   Post Navigation (前の記事 / 次の記事)
   アイキャッチ付き。single.php で使用
   ============================================ */

.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 50px 0 0;
}

.post-nav__item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--white);
    border: 1px solid #f3f4f6;
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
}

.post-nav__item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

/* 片方しか無いときの空きスペース */
.post-nav__item--empty {
    background: none;
    border: none;
    box-shadow: none;
    pointer-events: none;
}

/* 「次の記事」は左右反転して右寄せ */
.post-nav__item--next {
    flex-direction: row-reverse;
    text-align: right;
}

.post-nav__thumb {
    flex-shrink: 0;
    width: 90px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-nav__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-nav__item:hover .post-nav__thumb img {
    transform: scale(1.06);
}

.post-nav__no-image {
    font-size: 0.65rem;
    color: var(--text-light);
}

.post-nav__body {
    min-width: 0;
    flex: 1;
}

.post-nav__label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--primary-color);
    margin-bottom: 6px;
}

.post-nav__title {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.55;
    color: var(--text-color);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-nav__item:hover .post-nav__title {
    color: var(--primary-color);
}

@media (max-width: 700px) {
    .post-nav {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 35px;
    }

    .post-nav__item--next {
        flex-direction: row;
        text-align: left;
    }

    .post-nav__item--empty {
        display: none;
    }

    .post-nav__thumb {
        width: 76px;
        height: 56px;
    }
}


/* footer full-bleed fix */
.footer {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

body {
    padding-bottom: 0 !important;
}
