<?php
/**
 * Solution Block Template
 * 解决方案区块模板
 */

// 获取自定义属性
$block_class = '';
$block_id = '';

if (isset($block) && is_array($block)) {
    $block_class = isset($block['className']) ? $block['className'] : '';
    $block_id = isset($block['id']) ? $block['id'] : '';
} elseif (isset($args) && is_array($args)) {
    $block_class = isset($args['class']) ? $args['class'] : '';
    $block_id = isset($args['id']) ? $args['id'] : '';
}
?>

<div class="solution-block <?php echo esc_attr($block_class); ?>" <?php echo $block_id ? 'id="' . esc_attr($block_id) . '"' : ''; ?>>
    <div class="solution-container">
        <div class="solution-header">
            <span class="solution-subtitle">SOLUTION</span>
            <h2 class="solution-title">解决方案</h2>
        </div>
        
        <div class="solution-panels">
            <div class="solution-panel" data-panel="1">
                <a href="https://cn.nenghui.com/solutions/"><div class="panel-background" style="background-image: url('<?php echo get_template_directory_uri(); ?>/assets/images/solution-1.webp');"></div>
                <div class="panel-content">
                    <div class="panel-text">
                        <h3 class="panel-title">户用</h3>
                    </div>
                </div></a>
            </div>
            
            <div class="solution-panel" data-panel="2">
                <a href="https://cn.nenghui.com/solutions/"><div class="panel-background" style="background-image: url('<?php echo get_template_directory_uri(); ?>/assets/images/solution-2.webp');"></div>
                <div class="panel-content">
                    <div class="panel-text">
                        <h3 class="panel-title">工商业</h3>
                    </div>
                </div></a>
            </div>
            
            <div class="solution-panel" data-panel="3">
                <a href="https://cn.nenghui.com/solutions/"><div class="panel-background" style="background-image: url('<?php echo get_template_directory_uri(); ?>/assets/images/solution-3.webp');"></div>
                <div class="panel-content">
                    <div class="panel-text">
                        <h3 class="panel-title">商用车充换电</h3>
                    </div>
                </div></a>
            </div>
        </div>
    </div>
</div>