<?php
// page_4.html 带侧边联系信息卡：正文左、右侧固定宽度卡片（电话/地址/邮箱）
$pg4_name    = isset($page['name']) ? $page['name'] : '联系我们';
$pg4_content = isset($page['content']) ? $page['content'] : '';
$pg4_company = site_config('company_name', '炎酷CMS');
$pg4_phone   = site_config('phone', '');
$pg4_address = site_config('address', '');
$pg4_email   = site_config('email', '');
?>
<style>
.yk-page4{background:#f5f7fa;padding:50px 0 64px}
.yk-pg4-top{max-width:1200px;margin:0 auto 30px;padding:0 24px}
.yk-pg4-top h1{margin:0;font-size:30px;color:#22303f;font-weight:700}
.yk-pg4-top .yk-pg4-crumb{margin:10px 0 0;font-size:13px;color:#8a97a5}
.yk-pg4-top .yk-pg4-crumb a{color:#1a5fb4;text-decoration:none}
.yk-pg4-wrap{max-width:1200px;margin:0 auto;padding:0 24px;display:flex;gap:30px;align-items:flex-start}
.yk-pg4-main{flex:1;min-width:0;background:#fff;border-radius:10px;box-shadow:0 3px 18px rgba(20,50,90,.06);padding:44px 48px;font-size:15px;line-height:2;color:#444}
.yk-pg4-main img{max-width:100%;height:auto}
.yk-pg4-main h2,.yk-pg4-main h3{color:#22303f;margin:1.2em 0 .6em}
.yk-pg4-main p{margin:0 0 1em}
.yk-pg4-card{flex:0 0 320px;background:linear-gradient(165deg,#22303f 0%,#33475c 100%);border-radius:10px;color:#fff;padding:36px 30px;position:sticky;top:20px}
.yk-pg4-card h3{margin:0 0 6px;font-size:19px;font-weight:700}
.yk-pg4-card .yk-pg4-card-sub{font-size:12px;color:rgba(255,255,255,.65);letter-spacing:1px;margin-bottom:22px}
.yk-pg4-item{display:flex;gap:12px;padding:14px 0;border-top:1px solid rgba(255,255,255,.12);font-size:14px;line-height:1.7}
.yk-pg4-item .yk-pg4-ico{flex:0 0 34px;height:34px;border-radius:8px;background:rgba(255,255,255,.12);display:flex;align-items:center;justify-content:center;font-size:16px}
.yk-pg4-item .yk-pg4-label{display:block;font-size:12px;color:rgba(255,255,255,.6)}
.yk-pg4-item .yk-pg4-val{word-break:break-all}
.yk-pg4-card .yk-pg4-company{margin-top:20px;padding-top:16px;border-top:1px solid rgba(255,255,255,.12);font-size:12px;color:rgba(255,255,255,.55);letter-spacing:1px}
@media (max-width:1199px){
  .yk-pg4-card{flex:0 0 280px;padding:30px 24px}
  .yk-pg4-main{padding:36px 34px}
}
@media (max-width:767px){
  .yk-page4{padding:30px 0 44px}
  .yk-pg4-top{padding:0 14px}
  .yk-pg4-top h1{font-size:24px}
  .yk-pg4-wrap{flex-direction:column;padding:0 14px}
  .yk-pg4-main{padding:26px 20px;font-size:14px;line-height:1.9}
  .yk-pg4-card{flex:none;width:100%;position:static}
}
</style>
<div class="yk-page4">
  <div class="yk-pg4-top">
    <h1><?php echo e($pg4_name); ?></h1>
    <p class="yk-pg4-crumb"><a href="<?php echo e(url_home()); ?>">首页</a> &nbsp;/&nbsp; <?php echo e($pg4_name); ?></p>
  </div>
  <div class="yk-pg4-wrap">
    <article class="yk-pg4-main">
      <?php echo $pg4_content; ?>
    </article>
    <aside class="yk-pg4-card">
      <h3>联系方式</h3>
      <div class="yk-pg4-card-sub">CONTACT US</div>
      <?php if ($pg4_phone !== '') { ?>
      <div class="yk-pg4-item">
        <span class="yk-pg4-ico">☎</span>
        <div><span class="yk-pg4-label">服务热线</span><span class="yk-pg4-val"><?php echo e($pg4_phone); ?></span></div>
      </div>
      <?php } ?>
      <?php if ($pg4_address !== '') { ?>
      <div class="yk-pg4-item">
        <span class="yk-pg4-ico">◎</span>
        <div><span class="yk-pg4-label">公司地址</span><span class="yk-pg4-val"><?php echo e($pg4_address); ?></span></div>
      </div>
      <?php } ?>
      <?php if ($pg4_email !== '') { ?>
      <div class="yk-pg4-item">
        <span class="yk-pg4-ico">✉</span>
        <div><span class="yk-pg4-label">电子邮箱</span><span class="yk-pg4-val"><?php echo e($pg4_email); ?></span></div>
      </div>
      <?php } ?>
      <div class="yk-pg4-company"><?php echo e($pg4_company); ?></div>
    </aside>
  </div>
</div>
