/*
    Hestia's Definitive Blueprint for the Grand Concourse
    -----------------------------------------------------
    File: top.css
    Role: To create the ultimate hub, a perfect fusion of a welcoming home and a functional station.
*/

/* --- [I] The Grand Concourse: Hero Section Design --- */
.hero-top {
    position: relative;
    height: 70vh;
    min-height: 500px;
    color: white;
    display: flex;
    align-items: center;
    text-align: left;
}

.hero-background-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #333;
    overflow: hidden;
}

.hero-background-slider::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* ★黒っぽさを解消し、ブランドカラーである青系のオーバーレイに修正 */
    background: linear-gradient(45deg, rgba(0, 50, 100, 0.7), rgba(0, 90, 158, 0.6));
}

.hero-top-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.hero-text h1 {
    font-family: 'Noto Serif JP', serif;
    font-size: clamp(2.5rem, 5vw, 3.8rem);
    line-height: 1.4;
    text-shadow: 0 4px 15px rgba(0,0,0,0.5);
    margin: 0 0 1rem 0;
}

.hero-text p {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    line-height: 1.8;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.hero-characters {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2rem;
}

.hero-characters img {
    height: 100px;
    margin: 0 -15px;
    transition: transform 0.3s ease-out;
}
.hero-characters img:hover {
    transform: translateY(-10px) rotate(2deg);
}
.hero-characters img[alt*="フォリオ先生"] {
    height: 160px;
}

.hero-characters img[alt*="コレクト"] {
    height: 140px;
}

.hero-characters img[alt*="コネクト"] {
    height: 140px;
}

/* --- [II] The Core of the Station: Section Layout --- */
.top-section {
    padding: 5rem 0;
}
.top-section:nth-of-type(even) {
    background-color: #ffffff;
}
.top-section > .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- [III] The Platforms: Gateways Guide Design --- */
.gateways-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    width: 100%;
}

.gateway-card {
    display: block;
    background-color: white;
    padding: 2.5rem 2rem;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    color: var(--color-text);
    box-shadow: 0 5px 25px rgba(0,0,0,0.07);
}

.gateway-card img {
    height: 120px;
    margin-bottom: 1.5rem;
}

.gateway-card h3 {
    font-family: var(--font-family-title);
    font-size: 1.6rem;
    margin: 0 0 0.5rem 0;
}

.gateway-card p {
    margin: 0 0 2rem 0;
    color: #555;
    font-size: 0.9rem;
}

/* --- [IV] The Information Board: Station News Design --- */
.news-list-top {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 2rem auto;
}
.news-item {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
    padding: 1.2rem 0;
    border-bottom: 1px solid #e0e0e0;
    text-decoration: none;
    color: var(--color-text);
}
.news-item:first-child {
    border-top: 1px solid #e0e0e0;
}
.news-item:hover h3 {
    color: var(--color-secondary);
}
.news-item time {
    font-weight: bold;
    color: #777;
    font-size: 0.9rem;
}
.news-item h3 {
    margin: 0;
    font-size: 1.1rem;
    transition: color 0.3s;
}

/* --- [V] The Lounge: Meet Our Family Design --- */
.top-characters {
    background: linear-gradient(to bottom, #f8f9fa, #eef2f7);
    overflow: hidden; 
}

.characters-intro {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 3.5rem 2rem; 
    width: 100%;
    margin-top: 2rem;
    margin-bottom: 3rem;
}

.character-card {
    position: relative;
    background-color: #fff;
    padding: 0; 
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 90, 158, 0.1);
    text-align: center;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    overflow: visible; 
}

.character-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 18px 40px rgba(0, 90, 158, 0.15);
}


/* ★変更点: キャラクター画像の基本となる高さを削除し、個別に正確なサイズを指定 */
.character-card img {
    position: relative;
    transition: transform 0.3s cubic-bezier(0.2, 1.5, 0.5, 1);
    /* margin-bottom と bottom は各キャラクターで個別に設定 */
}


/* ★変更点: ちさまるを基準として、他のキャラクターのサイズを明確にスケールアップ */

/* 1. ちさまる (基準サイズ) */
.character-card img[alt*="ちさまる"] {
    height: 100px;
    bottom: 40px;
    margin-bottom: -40px;
}

/* 2. コレクトとコネクト (ちさまるより明確に大きい) */
.character-card img[alt*="コレクト"],
.character-card img[alt*="コネクト"] {
    height: 125px; /* サイズをアップ */
    bottom: 45px;  /* 高さに合わせて飛び出す位置を調整 */
    margin-bottom: -45px;
}

/* 3. フォリオ先生 (最も大きい存在) */
.character-card img[alt*="フォリオ先生"] {
    height: 160px; /* 以前のサイズ感を維持しつつ、他との差を明確に */
    bottom: 50px;
    margin-bottom: -50px;
}


.character-card:hover img {
    transform: scale(1.1) rotate(-3deg); 
}

.character-card .card-content {
    padding: 1.5rem;
    padding-top: 0;
}

.character-card h3 {
    font-family: var(--font-family-title);
    font-size: 1.6rem;
    margin: 0 0 0.5rem 0;
    color: var(--color-primary);
}

.character-card p {
    font-size: 0.9rem;
    color: #555;
    margin: 0;
    line-height: 1.6;
}

/* --- [VI] The Attractions: Pick Up Contents Design --- */
.pickup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    width: 100%;
}
.pickup-card {
    position: relative;
    height: 250px;
    border-radius: 12px;
    overflow: hidden;
    color: white;
    display: flex;
    align-items: flex-end;
    background-size: cover;
    background-position: center;
}
.card-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0));
    padding: 1.5rem;
    width: 100%;
}
.card-overlay h3 {
    margin: 0 0 0.25rem 0;
    font-family: var(--font-family-title);
}
.card-overlay p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* --- [VII] The Special Train: Career Invitation Design --- */
.top-career {
    background-color: #e3f2fd;
}
.career-banner {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fff;
    padding: 3rem;
    border-radius: 15px;
    width: 100%;
    max-width: 1000px;
    gap: 2rem;
    flex-wrap: wrap;
}
.banner-text {
    text-align: center;
    flex: 1;
    min-width: 300px;
}
.banner-text h3 {
    font-family: var(--font-family-title);
    font-size: 2rem;
    color: var(--color-primary);
    margin: 0 0 1rem 0;
}
.banner-text p {
    margin: 0 0 2rem 0;
}
.banner-character img {
    height: 180px;
}

/* --- [VIII] The Secret Hint --- */
.secret-dialogue {
    display: flex;
    align-items: center;
    gap: 2rem;
    background-color: #fff;
    padding: 2rem;
    border-radius: 12px;
    border: 2px dashed #ccc;
    max-width: 800px;
}
.secret-dialogue img {
    height: 100px;
}
.secret-dialogue p {
    margin: 0;
    line-height: 1.8;
    color: #555;
}
/* --- [IX] The Grand Stage: Pick Up Event Design --- */
/*
    Role: To elegantly showcase featured events, inviting users to participate.
*/

/* イベントセクション全体の基本設定 */
.top-events {
    /* 背景色をキャラクターセクションと合わせ、優しい雰囲気を継続 */
    background: linear-gradient(to bottom, #eef2f7, #ffffff);
}

/* イベントカードを並べるコンテナ */
.events-container {
    display: grid;
    /* 画面幅に応じてカードの列数を自動調整（最小幅320pxを確保） */
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem; /* カード間の余白 */
    width: 100%;
}

/* イベントカード本体のデザイン */
.event-card {
    display: flex;
    flex-direction: column; /* 中の要素（画像、情報）を縦に並べる */
    background-color: #ffffff;
    border-radius: 16px; /* 角を丸くする */
    box-shadow: 0 8px 30px rgba(0, 70, 130, 0.08); /* 影をつけて立体感を出す */
    text-decoration: none; /* aタグの下線を消す */
    color: var(--color-text);
    overflow: hidden; /* カードの角丸に合わせて画像もトリミングする */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* アニメーションを滑らかに */
}

/* マウスカーソルが乗った時の効果 */
.event-card:hover {
    transform: translateY(-10px); /* 少し上に浮き上がる */
    box-shadow: 0 15px 40px rgba(0, 70, 130, 0.15); /* 影を濃くする */
}

/* イベント画像エリア */
.event-image {
    height: 200px; /* 高さを固定 */
    background-size: cover; /* エリア全体を画像で埋める */
    background-position: center; /* 画像の中央を表示 */
}

/* イベント情報エリア */
.event-info {
    padding: 1.5rem 1.8rem; /* 内側の余白 */
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* カードの高さが揃うように伸びる */
}

/* イベントタイトル */
.event-info h3 {
    font-family: var(--font-family-title);
    font-size: 1.5rem;
    margin: 0 0 0.75rem 0;
    color: var(--color-primary);
}

/* イベント情報（開催日と説明文）の段落 */
.event-info p {
    margin: 0 0 1rem 0;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #555;
}

/* 最後のpタグ下の余白をなくす */
.event-info p:last-child {
    margin-bottom: 0;
}


/* 開催日の段落（pタグの1つ目）にカレンダーアイコンを追加 */
.event-info p:first-of-type {
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
}

.event-info p:first-of-type::before {
    content: '';
    display: inline-block;
    width: 1em;
    height: 1em;
    margin-right: 0.5em;
    background-color: var(--color-secondary);
    /* SVGアイコンをマスクとして使用（カレンダーアイコン） */
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z'/%3E%3C/svg%3E") no-repeat center;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

/* --- Hero Slider Styles --- */
.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 0;
}
.hero-slide.active {
    opacity: 1;
}
/* Hestia's Note: スライダーの上に、コンテンツが、乗るように */
.hero-top-content {
    z-index: 2;
}
/* オーバーレイも、スライダーの、上に */
.hero-background-slider::after {
    z-index: 1;
}