/*
BJEX 高校生採用サイト - 16:9ワイド画面最適化
画像を1画面ワイド（16:9）に完璧表示

Version: Widescreen 16:9 Optimization 1.0
*/

/* ===== 16:9ワイド画面最適化設定 ===== */
* {
    box-sizing: border-box !important;
}

html, body {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
}

/* ===== 緊急修正: 背景画像表示修正 ===== */
.hero-asuzac-style {
    position: relative !important;
    width: 100vw !important;
    height: 100vh !important;
    overflow: hidden !important;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%) !important; /* フォールバック背景 */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    /* ヘッダー調整 */
    margin-top: -80px !important;
    padding-top: 80px !important;
}

/* ===== メインコンテナ - 緊急修正 ===== */
.hero-main-container {
    position: relative !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* ===== メインビジュアル - 緊急修正 ===== */
.hero-main-visual {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    overflow: hidden !important;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%) !important; /* フォールバック背景 */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* ===== 背景画像 - 緊急修正版 ===== */
.main-bg-image {
    /* 基本設定 */
    width: 100vw !important;
    height: 100vh !important;
    
    object-fit: contain !important;
    object-position: center center !important;
    
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    
    z-index: 1 !important;
    
    /* 緊急修正: 表示を確実に */
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    
    /* 高品質表示 */
    image-rendering: -webkit-optimize-contrast !important;
    image-rendering: crisp-edges !important;
    
    /* フォールバック背景色 */
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%) !important;
}

/* 背景画像が読み込まれない場合のフォールバック */
.main-bg-image:not([src]),
.main-bg-image[src=""],
.main-bg-image[src*="undefined"] {
    background: linear-gradient(135deg, #FF6B35 0%, #4ECDC4 50%, #FFE66D 100%) !important;
    opacity: 0.1 !important;
}

/* 画像読み込みエラー時のフォールバック */
.main-bg-image::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%) !important;
    z-index: -1 !important;
}

/* ===== 先輩社員オーバーレイ - 16:9対応 ===== */
.senior-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    pointer-events: none !important;
    z-index: 10 !important;
}

.senior-person {
    position: absolute !important;
    z-index: 15 !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* ===== 先輩1（左側）- 16:9画面対応 ===== */
.senior-left {
    bottom: 0 !important;
    left: 3% !important;
    width: 500px !important;
    height: auto !important;
    animation: slideInLeft 1.5s ease-out 0.5s both !important;
}

/* ===== 先輩2（右側）- 16:9画面対応 ===== */
.senior-right {
    bottom: 0 !important;
    right: 3% !important;
    width: 480px !important;
    height: auto !important;
    animation: slideInRight 1.5s ease-out 1s both !important;
}

.senior-image {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3)) !important;
    transition: all 0.3s ease !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.senior-person:hover .senior-image {
    transform: scale(1.05) translateY(-10px) !important;
    filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.4)) !important;
}

/* ===== メッセージバブル - 16:9対応 ===== */
.hero-message-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    pointer-events: none !important;
    z-index: 20 !important;
}

.message-bubble {
    position: absolute !important;
    background: white !important;
    border: 3px solid #FF6B35 !important;
    border-radius: 25px !important;
    padding: 20px 25px !important;
    font-weight: 700 !important;
    color: #2c3e50 !important;
    font-size: 1.1rem !important;
    max-width: 300px !important;
    text-align: center !important;
    box-shadow: 0 15px 35px rgba(255, 107, 53, 0.3) !important;
    animation: fadeInScale 1s ease-out both !important;
    line-height: 1.4 !important;
    font-family: 'Noto Sans JP', sans-serif !important;
    z-index: 25 !important;
}

.message-bubble::before {
    content: '' !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    border-style: solid !important;
}

.message-1 {
    top: 10% !important;
    left: 10% !important;
    animation-delay: 2s !important;
    background: linear-gradient(135deg, #fff 0%, #fff5f0 100%) !important;
}

.message-1::before {
    bottom: -15px !important;
    left: 40px !important;
    border-width: 15px 18px 0 18px !important;
    border-color: #FF6B35 transparent transparent transparent !important;
}

.message-2 {
    top: 12% !important;
    right: 12% !important;
    animation-delay: 2.5s !important;
    background: linear-gradient(135deg, #fff 0%, #f0f8ff 100%) !important;
    border-color: #4ECDC4 !important;
}

.message-2::before {
    bottom: -15px !important;
    right: 40px !important;
    border-width: 15px 18px 0 18px !important;
    border-color: #4ECDC4 transparent transparent transparent !important;
}

.message-3 {
    top: 50% !important;
    left: 18% !important;
    animation-delay: 3s !important;
    background: linear-gradient(135deg, #fff 0%, #fffbf0 100%) !important;
    border-color: #FFE66D !important;
}

.message-3::before {
    top: -15px !important;
    left: 40px !important;
    border-width: 0 18px 15px 18px !important;
    border-color: transparent transparent #FFE66D transparent !important;
}

/* ===== アニメーション ===== */
@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-100px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(100px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ===== 画像収まり最適化 ===== */
/* すべての画面サイズで画像が収まるように */
.main-bg-image {
    width: 100vw !important;
    height: 100vh !important;
    object-fit: contain !important;
    object-position: center !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    background-color: #f0f8ff !important;
}

/* ===== 大型ディスプレイ対応（1920px以上） ===== */
@media (min-width: 1920px) {
    .main-bg-image {
        width: 100vw !important;
        height: 100vh !important;
        object-fit: contain !important;
        object-position: center !important;
    }
    
    .senior-left {
        width: 600px !important;
        left: 4% !important;
    }
    
    .senior-right {
        width: 580px !important;
        right: 4% !important;
    }
    
    .message-bubble {
        font-size: 1.3rem !important;
        padding: 25px 30px !important;
        max-width: 350px !important;
    }
}

/* ===== 中型ディスプレイ対応（1440-1919px） ===== */
@media (min-width: 1440px) and (max-width: 1919px) {
    .main-bg-image {
        width: 100vw !important;
        height: 100vh !important;
        object-fit: contain !important;
        object-position: center !important;
    }
    
    .senior-left {
        width: 520px !important;
        left: 3% !important;
    }
    
    .senior-right {
        width: 500px !important;
        right: 3% !important;
    }
    
    .message-bubble {
        font-size: 1.2rem !important;
        padding: 22px 28px !important;
        max-width: 320px !important;
    }
}

/* ===== ノートPC対応（1024-1439px） ===== */
@media (min-width: 1024px) and (max-width: 1439px) {
    .senior-left {
        width: 400px !important;
        left: 2% !important;
    }
    
    .senior-right {
        width: 380px !important;
        right: 2% !important;
    }
    
    .message-bubble {
        font-size: 1rem !important;
        padding: 18px 22px !important;
        max-width: 280px !important;
    }
}

/* ===== タブレット対応（768-1023px） ===== */
@media (min-width: 768px) and (max-width: 1023px) {
    .hero-asuzac-style {
        margin-top: -70px !important;
        padding-top: 70px !important;
    }
    
    .senior-left {
        width: 300px !important;
        left: 2% !important;
    }
    
    .senior-right {
        width: 280px !important;
        right: 2% !important;
    }
    
    .message-bubble {
        font-size: 0.9rem !important;
        padding: 15px 20px !important;
        max-width: 250px !important;
    }
}

/* ===== スマートフォン対応（～767px） ===== */
@media (max-width: 767px) {
    .hero-asuzac-style {
        margin-top: -60px !important;
        padding-top: 60px !important;
    }
    
    .senior-left {
        width: 220px !important;
        left: 2% !important;
    }
    
    .senior-right {
        width: 200px !important;
        right: 2% !important;
    }
    
    .message-bubble {
        font-size: 0.8rem !important;
        padding: 12px 16px !important;
        max-width: 200px !important;
    }
    
    .message-1 {
        top: 5% !important;
        left: 5% !important;
    }
    
    .message-2 {
        top: 8% !important;
        right: 8% !important;
    }
    
    .message-3 {
        top: 45% !important;
        left: 10% !important;
    }
}

/* ===== パフォーマンス最適化 ===== */
.senior-image,
.main-bg-image {
    will-change: transform !important;
    transform: translateZ(0) !important;
    backface-visibility: hidden !important;
}

/* ===== 他のヒーローセクションを無効化 ===== */
.hero-combined,
.hero-image-only,
.hero-simple-modern,
.hero-jr-inspired,
.hero-clean,
.hero-google-icons {
    display: none !important;
}

/* ===== アクセシビリティ対応 ===== */
@media (prefers-reduced-motion: reduce) {
    .senior-person,
    .message-bubble {
        animation: none !important;
    }
    
    .senior-image,
    .message-bubble {
        transition: none !important;
    }
}