/**
 * Bento Grid - NatureCredit Theme
 * 直接値使用
 */

/* ==========================================================================
   Bento Grid Container
   ========================================================================== */
.bento-section {
    background-color: #FFFFFF;
    padding: 48px 0;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 200px);
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.bento-grid__empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px;
    color: #666666;
}

/* ==========================================================================
   Bento Cards
   ========================================================================== */
.bento-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background-color: #FFFFFF;
    border: 1px solid #E5E5E5;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bento-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}

.bento-card__link {
    display: block;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* Slot A: Main (2x2) */
.bento-card--slot-a {
    grid-column: span 2;
    grid-row: span 2;
}

/* Slot B: Side (1x2) */
.bento-card--slot-b {
    grid-column: span 1;
    grid-row: span 2;
}

/* Slot C & D: Small (1x1) */
.bento-card--slot-c,
.bento-card--slot-d {
    grid-column: span 1;
    grid-row: span 1;
}

/* ==========================================================================
   Bento Card Thumbnail
   ========================================================================== */
.bento-card__thumbnail {
    position: relative;
    height: 60%;
    overflow: hidden;
}

.bento-card--slot-a .bento-card__thumbnail {
    height: 65%;
}

.bento-card--slot-b .bento-card__thumbnail {
    height: 45%;
}

.bento-card--slot-c .bento-card__thumbnail,
.bento-card--slot-d .bento-card__thumbnail {
    height: 50%;
}

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

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

.bento-card__placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #E5E5E5 0%, #D0D0D0 100%);
}

/* ==========================================================================
   Bento Card Category
   ========================================================================== */
.bento-card__category {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    color: #FFFFFF;
    background-color: #0D7377;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bento-card--slot-a .bento-card__category {
    font-size: 12px;
    padding: 8px 16px;
}

/* カテゴリ色はティールに統一 */
.bento-card__category--news,
.bento-card__category--opinion,
.bento-card__category--explainer {
    background-color: #0D7377;
}

/* ==========================================================================
   Bento Card Content
   ========================================================================== */
.bento-card__content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    height: 45%;
    background-color: #FFFFFF;
}

.bento-card--slot-a .bento-card__content {
    padding: 20px 24px;
    height: 35%;
}

.bento-card--slot-b .bento-card__content {
    height: 55%;
}

.bento-card--slot-c .bento-card__content,
.bento-card--slot-d .bento-card__content {
    height: 50%;
    padding: 12px;
}

.bento-card__title {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    font-weight: 700;
    line-height: 1.4;
    color: #111111;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    flex-shrink: 0;
}

.bento-card--slot-a .bento-card__title {
    font-size: 22px;
    -webkit-line-clamp: 2;
}

.bento-card--slot-b .bento-card__title {
    font-size: 16px;
    -webkit-line-clamp: 3;
}

.bento-card--slot-c .bento-card__title,
.bento-card--slot-d .bento-card__title {
    font-size: 14px;
    -webkit-line-clamp: 2;
}

.bento-card__excerpt {
    font-size: 13px;
    line-height: 1.5;
    color: #666666;
    margin: 8px 0 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    min-height: 0;
}

.bento-card--slot-a .bento-card__excerpt {
    font-size: 14px;
    -webkit-line-clamp: 3;
}

.bento-card--slot-b .bento-card__excerpt {
    -webkit-line-clamp: 3;
}

.bento-card--slot-c .bento-card__excerpt,
.bento-card--slot-d .bento-card__excerpt {
    display: none;
}

.bento-card__date {
    font-size: 12px;
    color: #666666;
    margin-top: auto;
}

.bento-card--slot-c .bento-card__date,
.bento-card--slot-d .bento-card__date {
    font-size: 11px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1023px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }

    .bento-card--slot-a {
        grid-column: span 2;
        grid-row: span 1;
        min-height: 320px;
    }

    .bento-card--slot-b {
        grid-column: span 2;
        grid-row: span 1;
        min-height: 280px;
    }

    .bento-card--slot-c,
    .bento-card--slot-d {
        grid-column: span 1;
        grid-row: span 1;
        min-height: 220px;
    }

    .bento-card__thumbnail {
        height: 55%;
    }

    .bento-card__content {
        height: 45%;
    }
}

@media (max-width: 767px) {
    .bento-section {
        padding: 24px 0;
    }

    .bento-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 0 16px;
    }

    .bento-card--slot-a {
        grid-column: span 1;
        min-height: 340px;
    }

    .bento-card--slot-a .bento-card__thumbnail {
        height: 50%;
    }

    .bento-card--slot-a .bento-card__content {
        height: 50%;
        padding: 16px;
    }

    .bento-card--slot-b {
        grid-column: span 1;
        min-height: 280px;
    }

    .bento-card--slot-c,
    .bento-card--slot-d {
        grid-column: span 1;
        min-height: 220px;
    }

    .bento-card--slot-a .bento-card__title {
        font-size: 18px;
    }

    .bento-card--slot-b .bento-card__title {
        font-size: 16px;
    }

    .bento-card--slot-a .bento-card__excerpt {
        font-size: 13px;
        -webkit-line-clamp: 2;
        display: -webkit-box;
    }

    .bento-card--slot-a .bento-card__content {
        padding: 16px;
    }
}
