<?php
// about_3.html 关于我们模块·样式3：上图下文居中卡片（无图时纯文字居中卡片）
// 可用变量：$title_text $title_style $title_color（block_title_html 输出标题）
//          $about 数组：name 单页名 / image 形象图URL(可空) / intro 简介纯文本 / url 查看更多链接
$ab3       = isset($about) && is_array($about) ? $about : array();
$ab3_name  = isset($ab3['name']) ? $ab3['name'] : '';
$ab3_img   = isset($ab3['image']) ? trim($ab3['image']) : '';
$ab3_intro = isset($ab3['intro']) ? $ab3['intro'] : '';
$ab3_url   = isset($ab3['url']) && $ab3['url'] !== '' ? $ab3['url'] : '#';
$ab3_tt    = isset($title_text) && $title_text !== '' ? $title_text : $ab3_name;
$ab3_ts    = isset($title_style) ? (int)$title_style : 3;
$ab3_tc    = isset($title_color) ? $title_color : '';
?>
<style>
.yk-ab3{margin-bottom:20px;}
.yk-ab3 .yk-ab3-card{max-width:820px;margin:0 auto;background:#fff;border-radius:12px;box-shadow:0 6px 26px rgba(20,40,70,.08);overflow:hidden;text-align:center;}
.yk-ab3 .yk-ab3-img{height:280px;overflow:hidden;background:#e9ecef;margin:22px 22px 0;border-radius:10px;}
.yk-ab3 .yk-ab3-img img{width:100%;height:100%;object-fit:contain;transition:transform .4s;}
.yk-ab3 .yk-ab3-card:hover .yk-ab3-img img{transform:scale(1.04);}
.yk-ab3 .yk-ab3-body{padding:34px 56px 42px;}
.yk-ab3 .yk-ab3-body .yk-tt{margin:0 0 16px;}
.yk-ab3 .yk-ab3-intro{color:#666;font-size:14px;line-height:2;}
.yk-ab3 .yk-ab3-more{margin-top:26px;}
.yk-ab3 .yk-ab3-more a{display:inline-block;padding:10px 40px;border-radius:30px;background:linear-gradient(90deg,var(--yk-accent,#e63946),#f0762f);color:#fff;font-size:14px;letter-spacing:1px;transition:all .25s;box-shadow:0 6px 16px rgba(230,57,70,.28);}
.yk-ab3 .yk-ab3-more a:hover{transform:translateY(-2px);box-shadow:0 10px 22px rgba(230,57,70,.36);}
@media (max-width:1199px){
  .yk-ab3 .yk-ab3-body{padding:30px 40px 36px;}
  .yk-ab3 .yk-ab3-img{height:240px;}
}
@media (max-width:767px){
  .yk-ab3 .yk-ab3-body{padding:24px 20px 30px;}
  .yk-ab3 .yk-ab3-img{height:190px;}
  .yk-ab3 .yk-ab3-intro{text-align:justify;}
}
</style>
<div class="yk-ab3">
<div class="yk-wrap">
  <div class="yk-ab3-card">
    <?php if ($ab3_img !== '') { ?>
    <div class="yk-ab3-img"><img src="<?php echo e($ab3_img); ?>" alt="<?php echo e($ab3_name); ?>"></div>
    <?php } ?>
    <div class="yk-ab3-body">
      <?php echo block_title_html($ab3_tt, $ab3_ts, $ab3_tc); ?>
      <?php if ($ab3_intro !== '') { ?><div class="yk-ab3-intro"><?php echo nl2br(e($ab3_intro)); ?></div><?php } ?>
      <div class="yk-ab3-more"><a href="<?php echo e($ab3_url); ?>">查看更多 &rarr;</a></div>
    </div>
  </div>
</div>
</div>
