/* ------------------------------------------------
ARCHIVE: BOSAI - 地域防災情報 -
------------------------------------------------ */

/* ---- ヘッダーバナー ---- */
.bosai__header {
    position: relative;
    margin-bottom: 1em;

    /* テープ風の上下ボーダー */
    &::after {
        content: "";
        display: block;
        width: 100%;
        height: clamp(30px, 3vw, 40px);
        background-image: repeating-linear-gradient(110deg,
                #f9c424 0 18px,
                #000 18px 36px);
        position: absolute;
        left: 0;
    }

    &::after {
        bottom: 0;
    }
}

.bosai__header-inner {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1.5em;
    padding: 0 0 20px 1em;
    z-index: 1;
    position: relative;
}

.bosai__title {
    width: clamp(300px, 38vw, 500px);
}

.bosai__title img {
    width: 100%;
    height: 100%;
}

.bosai__copy {
    --font-min: 12;
    --font-max: 16;
    font-size: var(--font-size);
    font-weight: var(--wght-bold);
    color: #000;
}

@media (width < 768px) {
    .bosai__header-inner {
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 1em;
    }

    .bosai__title {
        max-width: 80%;
    }
}


/* ---- カテゴリフィルター ---- */
.bosai-cat {
    margin-bottom: var(--space-5xl);
}

.bosai-cat__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.5em;
}

.bosai-cat__link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5em 1em;
    border: 1px solid var(--color-main);
    color: var(--color-main);
    font-weight: var(--wght-bold);
    --font-min: 13;
    --font-max: 16;
    font-size: var(--font-size);
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

.bosai-cat__link.is-active,
.bosai-cat__link:hover {
    background-color: var(--color-main);
    color: #fff;
}

@media (width < 768px) {
    .bosai-cat__list {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }
}


/* ---- 記事一覧 ---- */

.bosai__content {
    width: min(90%, 800px);
    margin: 0 auto;
}

.bosai__list {
    display: flex;
    flex-direction: column;
}

.bosai__item:not(:first-child) {
    border-top: 1px solid var(--color-gray);
}

.bosai__item:last-child {
    border-bottom: 1px solid var(--color-gray);
}

.bosai__link {
    display: flex;
    gap: var(--space-2xl);
    text-decoration: none;
    color: inherit;
    padding: var(--space-3xl) 0;
}

/* サムネイル */
.bosai__thumb {
    flex-shrink: 0;
    align-self: flex-start;
    width: clamp(160px, 25vw, 280px);
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 4px;
}

.bosai__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .bosai__link:hover .bosai__thumb img {
        transform: scale(1.05);
    }

    .bosai__link:hover .bosai__item-title {
        text-decoration: underline;
    }
}

/* 本文エリア */
.bosai__body {
    display: flex;
    flex-direction: column;
    gap: 0.8em;
    flex: 1;
    min-width: 0;
}

/* カテゴリラベル */
.bosai__label {
    display: inline-block;
    width: fit-content;
    padding: 0.3em 1em;
    background-color: var(--color-main);
    color: #fff;
    font-weight: var(--wght-medium);
    --font-min: 14;
    --font-max: 16;
    font-size: var(--font-size);
    border-radius: 2px;
}

.single-bosai .bosai__label {
    margin-bottom: 1em;
}

.bosai__date {
    --font-min: 12;
    --font-max: 14;
    font-size: var(--font-size);
}

.bosai__item-title {
    --font-min: 18;
    --font-max: 24;
    font-size: var(--font-size);
    font-weight: var(--wght-medium);
    color: var(--color-main);
    line-height: 1.5;
}

.bosai__excerpt {
    --font-min: 13;
    --font-max: 15;
    font-size: var(--font-size);
    line-height: 1.8;
    color: var(--color-base);
}

/* モバイル：縦積み */
@media (width < 768px) {
    .bosai__link {
        flex-direction: column;
        gap: var(--space-lg);
    }

    .bosai__thumb {
        width: 100%;
    }
}

/* ----------------------------------------
関連記事
---------------------------------------- */
.related {
    --space-min: 70;
    --space-max: 148;
    margin-top: var(--space);
}

.related .bosai__item{
    border-top: 1px solid var(--color-gray);
}

.related__title {
    --font-min: 16;
    --font-max: 18;
    font-size: var(--font-size);
    font-weight: var(--wght-bold);
    margin: 0 0 0.5em 0.5em;
}

.related__empty {
    text-align: center;
    color: #999;
    padding: var(--space-3xl) 0;
}