/* ========================================
   トップページ ヒーローセクション
======================================== */

.top-hero-section {
    position: relative;
    display: block !important;
    /* フレックス解除 */
    overflow: hidden;
    margin-bottom: 0;
    padding: 20px 0;
    height: auto !important;
    min-height: auto !important;
    align-items: unset !important;
    justify-content: unset !important;
}

/* トップページ専用：画像サイズ調整 */
.top-hero-custom {
    padding: 20px 0;
}

/* Redesign V3: 画像全体表示、中央配置、角丸 */

.top-hero-custom .hero-background {
    max-width: 1200px;
    width: 95%;
    margin: 0 auto;
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    border-radius: 20px;
    overflow: hidden;
    z-index: 1;
}

/* オーバーレイを削除 */
.top-hero-custom .hero-background::after {
    display: none !important;
}

.top-hero-custom .hero-bg-image {
    position: relative !important;
    width: 100%;
    height: auto !important;
    /* アスペクト比維持 */
    display: block;
    border-radius: 20px;
    object-fit: contain;
    /* 画像全体を表示 */
}

/* テキストコンテンツを完全に非表示（画像にテキストが焼き込まれているため） */
.top-hero-custom .hero-content-wrapper,
.hero-content-wrapper {
    display: none !important;
    position: absolute !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* ... existing code ... */

/* CTAボタンを下部に配置 */
.hero-content-bottom {
    align-self: flex-end;
    padding-bottom: 60px;
}

/* トップページ専用：CTAボタン・メッセージを中央に */
.top-hero-custom .hero-content-bottom {
    text-align: center;
    padding: 0;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    align-self: center;
    padding-bottom: 0;
    z-index: 2;
    position: relative;
    pointer-events: none;
    display: none !important;
    /* 非表示 */
}

.top-hero-custom .hero-cta-buttons,
.top-hero-custom .hero-message-box {
    pointer-events: auto;
    display: none !important;
    /* 非表示 */
}

.top-hero-custom .hero-cta-buttons {
    justify-content: center;
}

.hero-title {
    margin-bottom: 20px;
}

.hero-title-main {
    display: block;
    color: white;
    font-size: 2.8rem;
    font-weight: bold;
    line-height: 1.5;
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.6), 0 1px 3px rgba(0, 0, 0, 0.8);
}

.hero-subtitle {
    color: white;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 30px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6), 0 1px 3px rgba(0, 0, 0, 0.8);
}

.hero-cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-cta-button {
    display: inline-block;
    padding: 18px 50px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-cta-button.primary {
    background: white;
    color: #003399;
}

.hero-cta-button.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
    background: #f8f9fa;
}

/* トップページ専用：ボタンスタイル */
.top-hero-custom .hero-cta-button.primary {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

/* ========================================
   レスポンシブ対応
======================================== */

@media (max-width: 768px) {

    /* スマホ版：トップページのヘッダースペースを削除 */
    body.home .header-box {
        display: none !important;
    }

    .top-hero-section {
        height: auto !important;
        min-height: auto !important;
        margin-bottom: 0;
        padding-bottom: 0;
        display: block !important;
        padding-top: 50px;
        /* ヘッダーの高さ分 */
    }

    .top-hero-custom {
        height: auto !important;
    }

    .top-hero-custom .hero-background {
        max-width: none;
        width: 100%;
        height: auto !important;
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        border-radius: 0;
        margin: 0;
        display: block !important;
    }

    .top-hero-custom .hero-bg-image {
        position: relative;
        width: 100%;
        height: auto !important;
        object-fit: cover;
        display: block;
    }

    /* スマホ版：オーバーレイを非表示 */
    .top-hero-custom .hero-background::after {
        display: none !important;
    }

    /* スマホ版：テキストコンテンツを非表示 */
    .hero-content-wrapper {
        display: none !important;
    }

    .top-hero-section.hero-compact {
        height: auto !important;
        margin-bottom: 20px !important;
    }
}

@media (max-width: 480px) {
    .top-hero-section {
        height: auto !important;
        min-height: auto !important;
        margin-bottom: 0;
        padding-bottom: 0;
    }

    .top-hero-custom {
        height: auto !important;
    }

    .top-hero-custom .hero-background {
        max-width: none;
        width: 100%;
        height: auto !important;
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        border-radius: 0;
        aspect-ratio: auto;
    }

    .top-hero-custom .hero-bg-image {
        position: relative;
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    /* Remove overlay on mobile to show baked-in text clearly */
    .top-hero-custom .hero-background::after {
        display: none !important;
    }

    .hero-content-wrapper {
        display: none;
    }
}