/*
 * csr.css - CSR活動ページ
 * Version: 3.0
 * v3.0: グロリグラデ明度UP + セクション間ボーダー追加 + 視認性向上
 */

/* ===================================
   Page Base
=================================== */
.ewrd-page-csr {
    background: #fff;
}

/* ===================================
   カテゴリヘッダー
=================================== */
.ewrd-csr-category {
    padding: 96px 0 0;
}

.ewrd-csr-category-title {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 700;
    color: var(--secondary-color, #1A2B48);
    font-family: var(--font-serif, 'Noto Serif JP', serif);
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    padding-bottom: 16px;
    border-bottom: 3px solid;
    border-image: var(--gradient-gloriosa) 1;
}

/* ===================================
   コンテンツアイテム — 画像背景 + グロリグラデオーバーレイ
=================================== */
.ewrd-csr-content {
    padding: 0;
}

.ewrd-csr-item {
    position: relative;
    display: flex;
    align-items: stretch;
    min-height: 480px;
    overflow: hidden;
    border: 3px solid;
    border-image: var(--gradient-gloriosa) 1;
}

/* 背景画像 */
.ewrd-csr-img {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.ewrd-csr-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.ewrd-csr-item:hover .ewrd-csr-img img {
    transform: scale(1.03);
}

/* ノイズテクスチャ（控えめに） */
.ewrd-csr-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyBAMAAADsEZWCAAAAElBMVEUAAAAAAAAAAAAAAAAAAAAAAAAi4wAAAAV0Uk5TABAQEBDQlXkAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAA0SURBVDjLY2AYBaNgOAMmBgYWBij4DwIMUMAEBQxQwAAFTFDABAWMUMCIAsAKUMG/UTDkAQAHLALRSN0r2AAAAABJRU5ErkJggg==");
    background-repeat: repeat;
    opacity: 0.03;
    z-index: 2;
    pointer-events: none;
    mix-blend-mode: overlay;
}

/* ネイビーオーバーレイ — aboutページ準拠、左からテキスト用 */
.ewrd-csr-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(26, 43, 72, 0.85) 0%,
        rgba(26, 43, 72, 0.6) 45%,
        rgba(26, 43, 72, 0.15) 100%
    );
    z-index: 1;
    pointer-events: none;
}

/* 偶数アイテム: 右からオーバーレイ */
.ewrd-csr-item.ewrd-reverse::after {
    background: linear-gradient(
        to left,
        rgba(26, 43, 72, 0.85) 0%,
        rgba(26, 43, 72, 0.6) 45%,
        rgba(26, 43, 72, 0.15) 100%
    );
}

/* テキストブロック */
.ewrd-csr-txt {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 72px 64px;
    max-width: 520px;
    color: #fff;
}

/* デフォルト: テキスト左 */
.ewrd-csr-item .ewrd-csr-txt {
    margin-right: auto;
    margin-left: max(40px, calc((100vw - 1200px) / 2));
}

/* reverse: テキスト右 */
.ewrd-csr-item.ewrd-reverse .ewrd-csr-txt {
    margin-left: auto;
    margin-right: max(40px, calc((100vw - 1200px) / 2));
}

.ewrd-csr-txt h3 {
    font-size: clamp(1.375rem, 2.2vw, 1.75rem);
    margin-bottom: 28px;
    color: #fff;
    font-family: var(--font-serif, 'Noto Serif JP', serif);
    position: relative;
    padding-bottom: 18px;
    letter-spacing: 0.06em;
    font-weight: 700;
    line-height: 1.5;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.ewrd-csr-txt h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 1px;
    background: rgba(255, 255, 255, 0.6);
}

.ewrd-csr-txt p {
    line-height: 2;
    font-size: var(--fs-body, 0.9375rem);
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.04em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

/* 区切り線は不要 — ボーダーで代替 */
.ewrd-csr-divider {
    display: none;
}

/* ===================================
   レスポンシブ
=================================== */
@media (max-width: 950px) {
    .ewrd-csr-item {
        min-height: 400px;
    }

    .ewrd-csr-item::after,
    .ewrd-csr-item.ewrd-reverse::after {
        background: linear-gradient(135deg,
            rgba(26, 43, 72, 0.85) 0%,
            rgba(26, 43, 72, 0.65) 50%,
            rgba(26, 43, 72, 0.45) 100%
        ) !important;
    }

    .ewrd-csr-txt {
        padding: 56px 32px;
        max-width: 100%;
    }

    .ewrd-csr-item .ewrd-csr-txt,
    .ewrd-csr-item.ewrd-reverse .ewrd-csr-txt {
        margin-left: 24px;
        margin-right: 24px;
    }
}

@media (max-width: 600px) {
    .ewrd-csr-item {
        min-height: 360px;
    }

    .ewrd-csr-txt {
        padding: 40px 24px;
    }

    .ewrd-csr-txt h3 {
        font-size: 1.25rem;
    }
}
