/* ============================================================
   CHARA HUB  /assets/css/pages/chara-hub.css
   コンボハブ・対策ハブ 共通スタイル
   prefix: ch-
   ============================================================ */

/* ── 変数 ── */
.chara-hub--combo {
    --ch-accent:      #00f2ff;
    --ch-accent-bg:   rgba(0, 242, 255, 0.07);
    --ch-accent-bd:   rgba(0, 242, 255, 0.3);
    --ch-hero-color1: rgba(0, 180, 255, 0.45);
    --ch-hero-color2: rgba(0, 30, 80, 0.70);
    --ch-grid-color:  rgba(0, 242, 255, 0.08);
}
.chara-hub--counter {
    --ch-accent:      #ff4757;
    --ch-accent-bg:   rgba(255, 71, 87, 0.07);
    --ch-accent-bd:   rgba(255, 71, 87, 0.3);
    --ch-hero-color1: rgba(200, 30, 50, 0.50);
    --ch-hero-color2: rgba(40, 0, 10, 0.75);
    --ch-grid-color:  rgba(255, 71, 87, 0.07);
}

/* ============================================================
   HERO
   ============================================================ */
.ch-hero {
    position: relative;
    width: 100%;
    height: 44vh;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #06060a;
}

/* HEROグラデーション */
.ch-hero__grid {
    position: absolute;
    inset: 0;
    background: #06060a;
    z-index: 1;
}

.ch-hero__overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse 70% 80% at 50% 60%,
        var(--ch-hero-color1) 0%,
        var(--ch-hero-color2) 55%,
        rgba(6, 6, 10, 0.95) 100%
    );
    z-index: 2;
}

.ch-hero__content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 0 24px;
}
.ch-hero__eyebrow {
    display: block;
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .5em;
    color: var(--ch-accent);
    text-transform: uppercase;
    margin-bottom: 14px;
    opacity: .85;
}
.ch-hero__title {
    font-size: clamp(1.6rem, 4vw, 3rem);
    font-weight: 900;
    color: #fff;
    line-height: 1.2;
    margin: 0 0 14px;
    letter-spacing: -.01em;
    white-space: nowrap;   /* 最大幅では改行させない */
    text-shadow:
        0 0 40px rgba(255,255,255,.15),
        0 0 80px rgba(0,242,255,.15);
}
.ch-hero__sub {
    font-size: .95rem;
    color: rgba(255, 255, 255, .55);
    letter-spacing: .06em;
    margin: 0;
}

/* ============================================================
   コンテンツエリア — 黒+格子+下グラデ背景（beginnerスタイル）
   ============================================================ */
.chara-hub .page-container {
    position: relative;
    background-color: #000;
}
/* 格子パターン */
.chara-hub .page-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--ch-grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--ch-grid-color) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}
/* 下にフェードアウト */
.chara-hub .page-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 70%, #000 100%);
    pointer-events: none;
    z-index: 1;
}
/* コンテンツは格子の上に */
.chara-hub .page-container > * {
    position: relative;
    z-index: 2;
}

.ch-content {
    padding-top: 0;
}

/* ============================================================
   下部RELATED セクション
   ============================================================ */
.ch-related {
    background: #0a0a0d;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 72px 0 88px;
    width: 100vw;
    margin-left:  calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

/* 背景画像を重ねられるように（画像は任意） */
.ch-related::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('/assets/img/pages/database/related-bg.jpg');
    background-size: cover;
    background-position: center;
    opacity: .06;
    z-index: 0;
}
.ch-related--combo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 80% at 50% 100%, rgba(0,242,255,.06) 0%, transparent 70%);
    z-index: 0;
}
.ch-related--counter::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 80% at 50% 100%, rgba(255,71,87,.06) 0%, transparent 70%);
    z-index: 0;
}

.ch-related__inner {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 clamp(24px, 8vw, 80px);
    text-align: center;
}

.ch-related__eyebrow {
    display: block;
    font-size: .6rem;
    font-weight: 800;
    letter-spacing: .5em;
    color: var(--ch-accent);
    text-transform: uppercase;
    margin-bottom: 12px;
    opacity: .8;
}
.ch-related__heading {
    font-size: clamp(1.3rem, 3vw, 2rem);
    font-weight: 900;
    color: #fff;
    margin: 0 0 12px;
    line-height: 1.3;
}
.ch-related__desc {
    font-size: .88rem;
    color: rgba(240, 236, 228, .55);
    line-height: 1.85;
    margin: 0 0 44px;
}

/* カードグリッド: 数に応じてflexで中央寄せ */
.ch-related__cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

/* 関連カード */
.ch-rcard {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 340px;
    max-width: 100%;
    text-decoration: none;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.02);
    transition: border-color .25s, background .25s, transform .25s;
}
.ch-rcard:hover {
    border-color: var(--ch-accent-bd);
    background: var(--ch-accent-bg);
    transform: translateY(-3px);
}

/* カード背景画像レイヤー（任意） */
.ch-rcard__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity .4s;
    z-index: 0;
}
.ch-rcard:hover .ch-rcard__bg { opacity: .08; }

.ch-rcard__body {
    position: relative;
    z-index: 1;
    padding: 24px 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ch-rcard__tag {
    font-size: .52rem;
    font-weight: 800;
    letter-spacing: .4em;
    color: var(--ch-accent);
    text-transform: uppercase;
    opacity: .75;
}
.ch-rcard__title {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
    line-height: 1.35;
}
.ch-rcard__desc {
    font-size: .78rem;
    color: rgba(240, 236, 228, .55);
    line-height: 1.7;
    margin: 0;
}
.ch-rcard__cta {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .15em;
    color: var(--ch-accent);
    margin-top: 4px;
    opacity: .7;
    transition: opacity .2s;
}
.ch-rcard:hover .ch-rcard__cta { opacity: 1; }

/* 左側ボーダーアクセント */
.ch-rcard::before {
    content: '';
    position: absolute;
    left: 0; top: 0;
    width: 2px; height: 0;
    background: var(--ch-accent);
    transition: height .3s;
    z-index: 2;
}
.ch-rcard:hover::before { height: 100%; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .ch-hero { height: 38vh; min-height: 260px; }
    .ch-hero__title { font-size: 1.9rem; }
    .ch-related { padding: 52px 0 64px; }
    .ch-rcard { width: 100%; }
}