/**
 * 投資効果比較セクション - アニメーションCSS
 * 
 * プロフェッショナルなBtoB向けアニメーション:
 * - 控えめで上品な動き
 * - ビジネス効率を重視した視覚表現
 * - アクセシビリティ対応
 */

/* CTAボタンのパルスアニメーション */
@keyframes pulse-cta {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 10px 25px rgba(255, 127, 50, 0.3);
    }
    50% { 
        transform: scale(1.02); 
        box-shadow: 0 15px 35px rgba(255, 127, 50, 0.5);
    }
}

.pulse-animation {
    animation: pulse-cta 2.5s infinite;
}

.pulse-animation:hover {
    animation: none;
}

/* ========================================
   基本アニメーション設定
======================================== */

/* アニメーション無効設定 (アクセシビリティ対応) */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 初期状態の非表示設定 */
.comparison-header,
.agv-item,
.das-item {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.agv-item {
    transform: translateX(-50px);
}

.das-item {
    transform: translateX(50px);
}

/* ========================================
   スライドインアニメーション
======================================== */

.animate-slide-in-top {
    opacity: 1;
    transform: translateY(0);
    animation: slideInFromTop 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-slide-in-left {
    opacity: 1;
    transform: translateX(0);
    animation: slideInFromLeft 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-slide-in-right {
    opacity: 1;
    transform: translateX(0);
    animation: slideInFromRight 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========================================
   プログレスバー
======================================== */

.progress-bar {
    position: relative;
    width: 100%;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 6px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* AGV用プログレスバー (グレー系) */
.agv-progress .progress-fill {
    background: linear-gradient(90deg, #888888, #666666);
    box-shadow: 0 0 10px rgba(102, 102, 102, 0.3);
}

.agv-progress .progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

/* Wireless DAS用プログレスバー (赤系) */
.das-progress .progress-fill {
    background: linear-gradient(90deg, #E53935, #C62828);
    box-shadow: 0 0 15px rgba(229, 57, 53, 0.4);
}

.das-progress .progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* ========================================
   数値強調アニメーション
======================================== */

.animate-number-emphasis {
    animation: numberPulse 0.6s ease-out;
}

@keyframes numberPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
        text-shadow: 0 0 10px currentColor;
    }
    100% {
        transform: scale(1);
    }
}

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

.comparison-icon {
    display: inline-block;
    font-size: 1.5em;
    margin-right: 0.5rem;
    animation: iconBounce 2s ease-in-out infinite;
}

/* アイコン色は動的に設定されるため、ここではアニメーション設定のみ */
.comparison-icon {
    animation-delay: 0s;
}

.comparison-icon.cost-icon {
    animation-delay: 0s;
}

.comparison-icon.time-icon {
    animation-delay: 0.2s;
}

.comparison-icon.maintenance-icon {
    animation-delay: 0.4s;
}

.comparison-icon.roi-icon {
    animation-delay: 0.6s;
}

@keyframes iconBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

/* ========================================
   カード要素のホバー効果
======================================== */

.comparison-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.comparison-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

/* ========================================
   削減率の強調表示
======================================== */

.reduction-highlight {
    position: relative;
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    background: linear-gradient(135deg, #27AE60, #2ECC71);
    color: white;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(39, 174, 96, 0.3);
    animation: reductionGlow 3s ease-in-out infinite;
}

/* ROI強調用の赤系スタイル */
.roi-emphasis {
    background: linear-gradient(135deg, #E53935, #D32F2F) !important;
    box-shadow: 0 3px 15px rgba(229, 57, 53, 0.4) !important;
    animation: roiGlow 3s ease-in-out infinite !important;
}

@keyframes reductionGlow {
    0%, 100% {
        box-shadow: 0 2px 10px rgba(39, 174, 96, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(39, 174, 96, 0.6);
    }
}

@keyframes roiGlow {
    0%, 100% {
        box-shadow: 0 3px 15px rgba(229, 57, 53, 0.4);
    }
    50% {
        box-shadow: 0 6px 25px rgba(229, 57, 53, 0.7);
        transform: scale(1.05);
    }
}

/* ========================================
   戦略的優位性カードスタイル
======================================== */

/* 戦略的優位性カードの基本スタイル */
.strategy-card {
    position: relative;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.strategy-card:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18);
}

/* オレンジ系戦略カード */
.strategy-card-orange {
    background: linear-gradient(135deg, rgba(255, 245, 240, 0.95), rgba(255, 237, 230, 0.9)) !important;
    border-color: #FF7F32 !important;
}

.strategy-card-orange:hover {
    background: linear-gradient(135deg, rgba(255, 240, 235, 0.98), rgba(255, 230, 220, 0.95)) !important;
    border-color: #E6723D !important;
}

/* ブルー系戦略カード */
.strategy-card-blue {
    background: linear-gradient(135deg, rgba(240, 246, 255, 0.95), rgba(230, 240, 255, 0.9)) !important;
    border-color: #4A90E2 !important;
}

.strategy-card-blue:hover {
    background: linear-gradient(135deg, rgba(235, 243, 255, 0.98), rgba(220, 235, 255, 0.95)) !important;
    border-color: #3A7BC8 !important;
}

/* グリーン系戦略カード */
.strategy-card-green {
    background: linear-gradient(135deg, rgba(240, 255, 245, 0.95), rgba(230, 255, 238, 0.9)) !important;
    border-color: #2E7D4F !important;
}

.strategy-card-green:hover {
    background: linear-gradient(135deg, rgba(235, 255, 240, 0.98), rgba(220, 255, 230, 0.95)) !important;
    border-color: #236B43 !important;
}

/* 戦略カード内アイコンのアニメーション */
.strategy-card i {
    transition: all 0.4s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.strategy-card:hover i {
    transform: scale(1.15) rotate(-5deg);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

/* 戦略カード数値の強調 */
.strategy-number {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.02em;
}

/* 戦略カードレスポンシブ対応 */
@media (max-width: 768px) {
    .strategy-card {
        padding: 1.25rem;
        min-height: 160px;
    }
    
    .strategy-number {
        font-size: 2rem;
    }
}

/* ========================================
   効果項目カード（バッジ）スタイル
======================================== */

/* 効果項目カードの基本スタイル */
.benefit-card {
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.benefit-card:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* オレンジ系カード */
.benefit-card-orange {
    background: linear-gradient(135deg, rgba(255, 245, 245, 0.95), rgba(255, 237, 237, 0.9)) !important;
    border-color: #FF7F32 !important;
}

.benefit-card-orange:hover {
    background: linear-gradient(135deg, rgba(255, 240, 240, 0.98), rgba(255, 230, 230, 0.95)) !important;
}

/* ブルー系カード */
.benefit-card-blue {
    background: linear-gradient(135deg, rgba(245, 249, 255, 0.95), rgba(237, 245, 255, 0.9)) !important;
    border-color: #4A90E2 !important;
}

.benefit-card-blue:hover {
    background: linear-gradient(135deg, rgba(240, 246, 255, 0.98), rgba(230, 240, 255, 0.95)) !important;
}

/* グリーン系カード */
.benefit-card-green {
    background: linear-gradient(135deg, rgba(245, 255, 248, 0.95), rgba(237, 255, 242, 0.9)) !important;
    border-color: #2E7D4F !important;
}

.benefit-card-green:hover {
    background: linear-gradient(135deg, rgba(240, 255, 245, 0.98), rgba(230, 255, 238, 0.95)) !important;
}

/* カード内アイコンのアニメーション */
.benefit-card i {
    transition: all 0.3s ease;
}

.benefit-card:hover i {
    transform: scale(1.1) rotate(5deg);
}

/* 数値部分の強調 */
.benefit-number {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* レスポンシブ調整 */
@media (max-width: 768px) {
    .benefit-card {
        padding: 1rem;
    }
    
    .benefit-number {
        font-size: 1.5rem;
    }
}

/* ========================================
   統一セクション背景スタイル
======================================== */

/* 統一されたセクション背景 */
.unified-section-bg {
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.75), rgba(52, 73, 94, 0.8)) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 統一されたカード背景 */
.unified-card-bg {
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
}

/* テキストの統一スタイル */
.unified-text-primary {
    color: #FFFFFF !important;
}

.unified-text-secondary {
    color: #E0E0E0 !important;
}

/* 統一されたアクセントカラー */
.unified-accent-orange {
    color: #FF7F32 !important;
}

.unified-accent-blue {
    color: #4A90E2 !important;
}

.unified-accent-green {
    color: #2E7D4F !important;
}

/* ========================================
   投資効果サマリーセクション専用アニメーション
======================================== */

/* ロケットアイコンのアニメーション */
.rocket-icon {
    display: inline-block;
    animation: rocketBoost 3s ease-in-out infinite;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.4));
}

@keyframes rocketBoost {
    0%, 100% {
        transform: translateY(0) scale(1);
        filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.4));
    }
    25% {
        transform: translateY(-3px) scale(1.05);
        filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.6));
    }
    50% {
        transform: translateY(-5px) scale(1.1);
        filter: drop-shadow(0 0 25px rgba(255, 255, 255, 0.8));
    }
    75% {
        transform: translateY(-3px) scale(1.05);
        filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.6));
    }
}

/* タイトル強調エフェクト */
.summary-title {
    position: relative;
    background: linear-gradient(135deg, #FFFFFF 0%, #F0F8FF 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: titleGlow 4s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    }
    50% {
        text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 255, 255, 0.3);
    }
}

/* メイン削減率見出しの強調エフェクト */
.main-cost-reduction {
    position: relative;
    animation: costReductionPulse 6s ease-in-out infinite;
}

@keyframes costReductionPulse {
    0%, 100% {
        transform: scale(1);
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    }
    50% {
        transform: scale(1.02);
        text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 255, 255, 0.2);
    }
}

/* ========================================
   強調エフェクト（アクセントマーク）
======================================== */

.accent-mark {
    display: inline-block;
    font-size: 1.2em;
    font-weight: bold;
    animation: accentPulse 2s ease-in-out infinite;
    text-shadow: 0 0 5px rgba(229, 57, 53, 0.5);
}

@keyframes accentPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

/* 無線DASセクション全体の強調 */
.das-section {
    position: relative;
    overflow: hidden;
}

.das-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(229, 115, 115, 0.08), transparent);
    animation: sectionHighlight 4s ease-in-out infinite;
}

/* 総合投資効果セクションの落ち着いた背景スタイル */
.comparison-summary {
    background: linear-gradient(135deg, rgba(229, 115, 115, 0.8), rgba(255, 205, 210, 0.75)) !important;
    backdrop-filter: blur(10px);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(229, 115, 115, 0.2);
}

@keyframes sectionHighlight {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

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

@media (max-width: 768px) {
    .comparison-icon {
        font-size: 1.2em;
    }
    
    .progress-bar {
        height: 10px;
    }
    
    .comparison-card {
        margin-bottom: 1rem;
    }
    
    /* モバイルでは控えめなアニメーション */
    .animate-slide-in-left,
    .animate-slide-in-right {
        animation-duration: 0.5s;
    }
}

/* ========================================
   ダークモード対応
======================================== */

@media (prefers-color-scheme: dark) {
    .progress-bar {
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    .comparison-card {
        background: rgba(255, 255, 255, 0.03);
        border-color: rgba(255, 255, 255, 0.05);
    }
    
    .comparison-card:hover {
        background: rgba(255, 255, 255, 0.06);
    }
}