/*
 * トップページ（フロントページ）専用CSS
 * ヒーローセクション、カード表示、メインコンテンツなど
 */

/* ==========================================================================
   ヒーローセクション（トップページのメインビジュアル）
   ========================================================================== */

.hero-section {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: end;
    justify-content: center;
    overflow: hidden;
}

/* .hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #3498db;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
} */

/* 動画背景用のスタイル */
.hero-video-background {
    /* background-color: #2c3e50; */
    /* 動画が読み込まれるまでのフォールバック色 */
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
    z-index: -1;
    /* opacity: 0; */
    /* 初期状態では透明に */
    transition: opacity 0.5s ease;
    /* フェードイン効果 */
}

/* モバイルデバイスで動画の代わりに画像を表示する場合 */
@media (max-width: 768px) {
    .hero-video {
        display: block !important;
    }

    .hero-video-background {
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }
}

/* ヒーロー画像の上に重ねるオーバーレイ */
/* .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
            rgba(44, 62, 80, 0.8) 0%,
            rgba(52, 152, 219, 0.6) 100%);
} */

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    max-width: 800px;
    padding: 0 20px;
}

.hero-title {
    font-size: 2.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
    animation: fadeInUp 1s ease 0.3s both;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 30px;
    opacity: 0.95;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease 0.6s both;
}

.hero-actions {
    margin-bottom: 30px;
}

.hero-button {
    width: fit-content;
    margin: 0 auto;
    gap: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 46, 31, 0.479);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 1s ease 0.9s both;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* ホバー時のグラスモーフィズム効果強化 */
.hero-button:hover {
    background: rgba(31, 135, 255, 0.479);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* アクティブ状態（クリック時）の効果 */
.hero-button:active {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

/* ボタン内部の光る効果（疑似要素を使用） */
.hero-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    transition: left 0.8s ease;
}

/* ホバー時の光る効果のアニメーション */
.hero-button:hover::before {
    left: 100%;
}

/* フォーカス時のアクセシビリティ対応 */
.hero-button:focus {
    outline: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1),
        0 0 0 3px rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   カードコンポーネント（投稿・ページ表示）
   ========================================================================== */

.post-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

/* カード画像 */
.card-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card-image:hover img {
    transform: scale(1.05);
}

/* カードコンテンツ */
.card-content {
    padding: 25px;
}

.card-title {
    margin: 0 0 15px 0;
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.3;
}

.card-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.card-title a:hover {
    color: #3498db;
}

.card-excerpt {
    color: #7f8c8d;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* カードメタ情報 */
.card-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9rem;
    color: #95a5a6;
    margin-bottom: 20px;
}

.card-date,
.card-category {
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-category a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.card-category a:hover {
    text-decoration: underline;
}

/* カードのアクション */
.card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.read-more-link {
    display: inline-block;
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 16px;
    border: 2px solid #3498db;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.read-more-link:hover {
    background-color: #3498db;
    color: #fff;
    transform: translateX(5px);
}

/* ==========================================================================
   コンテンツエリアのレイアウト
   ========================================================================== */

/* カードグリッドレイアウト */
.content-area {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin: 40px 5%;
}

/* 複数カラムレイアウト（デスクトップ） */
@media (min-width: 768px) {
    .content-area {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

/* ==========================================================================
   レスポンシブデザイン
   ========================================================================== */

/* タブレット対応 */
@media (max-width: 768px) {
    .hero-section {
        min-height: 400px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-button {
        padding: 12px 25px;
        font-size: 1rem;
    }

    .card-content {
        padding: 20px;
    }

    .card-title {
        font-size: 1.2rem;
    }
}

/* モバイル対応 */
@media (max-width: 600px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .card-meta {
        font-size: 0.8rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .card-image {
        height: 150px;
    }

    .card-actions {
        text-align: center;
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .content-area {
        gap: 20px;
        margin: 30px 0;
    }
}

/* ==========================================================================
   アニメーション
   ========================================================================== */

/* フェードインアップアニメーション */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* バウンスアニメーション */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-15px);
    }

    60% {
        transform: translateY(-10px);
    }
}

/* カードの順次表示アニメーション */
.post-card {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.post-card:nth-child(1) {
    animation-delay: 0.1s;
}

.post-card:nth-child(2) {
    animation-delay: 0.2s;
}

.post-card:nth-child(3) {
    animation-delay: 0.3s;
}

.post-card:nth-child(4) {
    animation-delay: 0.4s;
}

.post-card:nth-child(5) {
    animation-delay: 0.5s;
}

.post-card:nth-child(6) {
    animation-delay: 0.6s;
}