/*
    Hestia's Definitive Blueprint for the Grand Concourse (v2.0 with New Family)
    -----------------------------------------------------
    File: top.css
    Role: Main stylesheet for the top page. Includes Hero, Gateways, Characters, Events, etc.
*/

/* --- [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;
    overflow: hidden;
}

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

.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));
    z-index: 1;
}

/* スライド画像のアニメーション用クラス */
.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; }

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

.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;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.3));
}
.hero-characters img:hover { transform: translateY(-10px) rotate(2deg); }

/* ヒーローエリアでのキャラサイズ調整（魂の比率） */
.hero-characters img {
    height: 100px; /* 基本サイズ（ちさまる・ポチまる） */
    margin: 0 -10px; /* 少し重ねて仲良し感を出す */
    transition: transform 0.3s ease-out;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.3));
}

/* ミニまるは小さく */
.hero-characters img[alt*="ミニまる"] { height: 80px; }

/* 先生たちは大きく */
.hero-characters img[alt*="フォリオ先生"] { height: 160px; }
.hero-characters img[alt*="コレクト"] { height: 140px; }
.hero-characters img[alt*="コネクト"] { height: 140px; }


/* --- [II] General 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] Gateways (Entrance Guide) --- */
.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);
    transition: transform 0.3s, box-shadow 0.3s;
}
.gateway-card:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(0,0,0,0.1); }

.gateway-card img { height: 120px; margin-bottom: 1.5rem; object-fit: contain; }
.gateway-card h3 { font-family: var(--font-family-title); font-size: 1.6rem; margin: 0 0 0.5rem 0; color: var(--color-primary); }
.gateway-card p { margin: 0 0 2rem 0; color: #555; font-size: 0.9rem; line-height: 1.6; }


/* --- [IV] Station News --- */
.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);
    transition: background-color 0.2s;
}
.news-item:first-child { border-top: 1px solid #e0e0e0; }
.news-item:hover { background-color: #fafafa; }
.news-item:hover h3 { color: var(--color-secondary); }
.news-item time { font-weight: bold; color: #777; font-size: 0.9rem; min-width: 100px; }
.news-item h3 { margin: 0; font-size: 1.1rem; transition: color 0.3s; }


/* --- [V] Meet Our Family (Characters) --- */
.top-characters {
    background: linear-gradient(to bottom, #f8f9fa, #eef2f7);
    overflow: visible; /* キャラクターの頭が飛び出すのを許可 */
}

.characters-intro {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 4rem 2rem; /* 縦の間隔を広げて、飛び出しに対応 */
    width: 100%;
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.character-card {
    position: relative;
    background-color: #fff;
    padding: 0 1.5rem 1.5rem 1.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 90, 158, 0.1);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    margin-top: 20px; /* 上にはみ出る分のスペース */
}
.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;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.1));
}
.character-card:hover img { transform: scale(1.1) rotate(-3deg); }

/* ★ キャラクターごとのサイズ調整（新メンバー対応） ★ */

/* 1. ちさまる・ミニまる (基準: 小さめ) */
.character-card img[alt*="ちさまる"],
.character-card img[alt*="ミニまる"] {
    height: 100px;
    top: -40px;
    margin-bottom: -30px;
}

/* 2. コレクト・コネクト・ポチまる (中くらい) */
.character-card img[alt*="コレクト"],
.character-card img[alt*="コネクト"],
.character-card img[alt*="ポチまる"] {
    height: 125px;
    top: -45px;
    margin-bottom: -35px;
}

/* 3. フォリオ先生 (最大) */
.character-card img[alt*="フォリオ先生"] {
    height: 160px;
    top: -50px;
    margin-bottom: -40px;
}

.character-card h3 {
    font-family: var(--font-family-title);
    font-size: 1.6rem;
    margin: 1rem 0 0.5rem 0;
    color: var(--color-primary);
}
.character-card p {
    font-size: 0.9rem;
    color: #555;
    margin: 0;
    line-height: 1.6;
}


/* --- [VI] Pick Up Events (The Missing Style Repaired) --- */
.top-events { background: linear-gradient(to bottom, #eef2f7, #ffffff); }

.events-container {
    display: grid;
    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;
    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;
    transition: transform 0.5s;
}
.event-card:hover .event-image { transform: scale(1.05); }

.event-info {
    padding: 1.5rem 1.8rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
    z-index: 1;
    background-color: white;
}
.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;
}
.event-info p:last-child { margin-bottom: 0; }

/* 開催日アイコン */
.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);
    -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;
}


/* --- [VII] Pick Up Contents --- */
.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;
    text-decoration: none;
    transition: transform 0.3s;
}
.pickup-card:hover { transform: translateY(-5px); }
.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; }


/* --- [VIII] Career & Secret --- */
.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;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.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; line-height: 1.8; }
.banner-character img { height: 180px; transform: rotate(5deg); }

.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] Smartphone Responsiveness --- */
@media (max-width: 768px) {
    .hero-top { height: 60vh; }
    .hero-text h1 { font-size: 2.2rem; }
    .hero-characters img { height: 80px; margin: 0 -5px; }
    .hero-characters img[alt*="フォリオ先生"] { height: 120px; }
    
    .characters-intro { gap: 4rem 1rem; } 
    
    .career-banner { padding: 2rem 1rem; }
    .banner-character img { height: 120px; }
    
    .secret-dialogue { flex-direction: column; text-align: center; }
}