/* ============================================
   企业邮箱服务中心 - 首页自定义样式
   粘贴到：外观 → 自定义 → 额外 CSS
   ============================================ */

/* -- 全局变量 -- */
:root {
  --primary: #1a56db;
  --primary-dark: #1040a8;
  --accent: #f59e0b;
  --bg-dark: #0f172a;
  --bg-light: #f8fafc;
  --text-main: #0f172a;
  --text-sub: #475569;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --radius: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow-md: 0 8px 30px rgba(0,0,0,.08);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.12);
  --shadow-glow: 0 0 40px rgba(26,86,219,.15);
}

/* ============================================
   全宽方案（简单稳定版，不依赖页面结构）
   只针对 .mail-home，不影响主题头尾
   ============================================ */

/* 去掉所有外层包裹容器的宽度和内边距限制 */
.wp-block-post-content:has(.mail-home),
.wp-block-post-content .wp-block-html:has(.mail-home),
.wp-block-group:has(.mail-home),
.entry-content:has(.mail-home),
.is-layout-constrained:has(.mail-home),
.is-layout-flow:has(.mail-home) {
  max-width: none !important;
  width: auto !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* mail-home 占满父容器，区块内部不做任何位移 */
.mail-home {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

/* 消除头部/Hero/尾部之间的白缝
   去掉包裹我们区块的「组」和「内容」容器的上下内边距与间距 */
.wp-block-post-content:has(.mail-home),
.wp-block-group:has(.mail-home),
.wp-block-group:has(> .mail-home),
.is-layout-flow:has(> .mail-home),
.is-layout-constrained:has(> .mail-home) {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  gap: 0 !important;
  row-gap: 0 !important;
}

/* 去掉 mail-home 内部区块之间的默认 block 间距 */
.mail-home > * {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* 消除相邻自定义HTML区块（含mail-home）之间的默认间距 */
.wp-block-html:has(.mail-home) {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
.wp-block-html:has(.mail-home) + .wp-block-html:has(.mail-home) {
  margin-top: 0 !important;
}

/* 头部模板部件吸顶 */
.wp-block-template-part:has(.site-header-custom) {
  position: sticky;
  top: 0;
  z-index: 999;
}

/* 消除模板部件（头部/尾部）的默认间距与内边距 */
.wp-block-template-part:has(.mail-home),
.wp-block-template-part {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
.wp-block-template-part:has(.mail-home) > *,
.wp-block-template-part > .wp-block-group {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}




/* -- HERO -- */
.mail-home .hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #1a56db 100%);
  position: relative;
  overflow: hidden;
  min-height: 600px;
  display: flex;
  align-items: center;
}
.mail-home .hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 80% 30%, rgba(245,158,11,.12) 0%, transparent 70%),
    radial-gradient(ellipse 500px 500px at 20% 80%, rgba(26,86,219,.2) 0%, transparent 70%);
}
.mail-home .hero-grid-pattern {
  position: absolute;
  inset: 0;
  opacity: .04;
  background-image:
    linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 60px 60px;
}
.mail-home .hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 2;
}
.mail-home .hero-text h1 {
  font-size: 42px;
  font-weight: 900;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 20px;
  animation: fadeUp .8s ease;
}
.mail-home .hero-text h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent) 0%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.mail-home .hero-text p {
  font-size: 16px;
  line-height: 1.8;
  color: rgba(255,255,255,.72);
  margin-bottom: 32px;
  max-width: 460px;
  animation: fadeUp .8s ease .15s both;
}
.mail-home .hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  animation: fadeUp .8s ease .3s both;
}
.mail-home .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--accent) !important;
  color: #fff !important;
  font-size: 15px;
  font-weight: 700;
  border-radius: 12px;
  text-decoration: none !important;
  transition: all .25s;
  box-shadow: 0 4px 20px rgba(245,158,11,.35);
}
.mail-home .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(245,158,11,.45);
  color: #fff !important;
}
.mail-home .btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: rgba(255,255,255,.08);
  color: #fff !important;
  font-size: 15px;
  font-weight: 500;
  border-radius: 12px;
  text-decoration: none !important;
  border: 1px solid rgba(255,255,255,.18);
  transition: all .25s;
}
.mail-home .btn-outline:hover {
  background: rgba(255,255,255,.14);
  color: #fff !important;
}
.mail-home .hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeUp 1s ease .2s both;
}
.mail-home .hero-visual img {
  max-width: 100%;
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
}

/* -- 通用 Section -- */
.mail-home .section {
  padding: 70px 24px;
}
.mail-home .section-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.mail-home .section-title {
  font-size: 34px;
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 16px;
  color: var(--text-main);
}
.mail-home .section-desc {
  font-size: 16px;
  color: var(--text-sub);
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 48px;
}

/* -- 为什么选择我们 -- */
.mail-home .why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.mail-home .why-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.mail-home .why-item {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--border);
  transition: all .3s;
}
.mail-home .why-item:hover {
  border-color: rgba(26,86,219,.2);
  box-shadow: var(--shadow-glow);
  transform: translateX(6px);
}
.mail-home .why-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(26,86,219,.08), rgba(26,86,219,.03));
  color: var(--primary);
}
.mail-home .why-icon svg {
  width: 22px;
  height: 22px;
}
.mail-home .why-content h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}
.mail-home .why-content p {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.6;
}
.mail-home .why-image img {
  width: 100%;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
}

/* -- 申请流程 -- */
.mail-home .flow-section {
  background: #fff;
}
.mail-home .flow-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.mail-home .flow-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.mail-home .flow-step {
  display: flex;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}
.mail-home .flow-step:last-child {
  border-bottom: none;
}
.mail-home .step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  border-radius: 10px;
}
.mail-home .step-text h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}
.mail-home .step-text p {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.5;
}
.mail-home .flow-image img {
  width: 100%;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
}

/* -- 服务卡片 -- */
.mail-home .services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.mail-home .service-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px 28px;
  border: 1px solid var(--border);
  transition: all .35s;
  position: relative;
  overflow: hidden;
}
.mail-home .service-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s;
}
.mail-home .service-card:hover::after {
  transform: scaleX(1);
}
.mail-home .service-card:hover {
  border-color: rgba(26,86,219,.15);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.mail-home .service-card h3 {
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 10px;
  color: var(--text-main);
}
.mail-home .service-card p {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.7;
}
.mail-home .service-tag {
  display: inline-block;
  margin-top: 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  padding: 4px 10px;
  background: rgba(26,86,219,.06);
  border-radius: 6px;
}
.mail-home .coop-banner {
  margin-top: 40px;
  padding: 28px 36px;
  background: linear-gradient(135deg, var(--bg-dark) 0%, #1e3a5f 100%);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.mail-home .coop-banner p {
  color: rgba(255,255,255,.85);
  font-size: 15px;
  line-height: 1.6;
}
.mail-home .coop-banner p em {
  font-style: normal;
  color: var(--accent);
  font-weight: 700;
}

/* -- 资讯卡片 -- */
.mail-home .news-section {
  background: #fff;
  padding-top: 60px !important;
  padding-bottom: 60px !important;
}
/* 资讯标题：去掉多余上间距，下间距固定 */
.mail-home .news-section > .section-inner > .animate:first-child {
  margin-top: 0 !important;
  margin-bottom: 40px !important;
}
.mail-home .news-section .section-title {
  margin: 0 !important;
}
.mail-home .news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.mail-home .news-card {
  background: var(--bg-light);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all .35s;
  border: 1px solid transparent;
  text-decoration: none;
  color: inherit;
  display: block;
}
.mail-home .news-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.mail-home .news-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform .5s;
}
.mail-home .news-card:hover img {
  transform: scale(1.04);
}
.mail-home .news-card-body {
  padding: 20px;
}
.mail-home .news-card-body .date {
  font-size: 12px;
  color: var(--text-light);
  font-weight: 500;
  margin-bottom: 8px;
}
.mail-home .news-card-body h3 {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 8px;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mail-home .news-card-body p {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* -- FAQ 手风琴 -- */
.mail-home .faq-page-section {
  background: var(--bg-light);
}
.mail-home .faq-list {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}
.mail-home .faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all .3s;
  background: #fff;
}
.mail-home .faq-item:hover {
  border-color: rgba(26,86,219,.2);
}
.mail-home .faq-item.open {
  border-color: rgba(26,86,219,.25);
  box-shadow: var(--shadow-md);
}
.mail-home .faq-q {
  padding: 18px 22px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  user-select: none;
  line-height: 1.5;
}
.mail-home .faq-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-light);
  border-radius: 8px;
  background: rgba(26,86,219,.05);
  transition: all .3s;
}
.mail-home .faq-item.open .faq-icon {
  transform: rotate(45deg);
  color: #fff;
  background: var(--primary);
}
.mail-home .faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s cubic-bezier(.4,0,.2,1);
}
.mail-home .faq-item.open .faq-a {
  max-height: 500px;
}
.mail-home .faq-a p {
  padding: 0 22px 18px;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.8;
  margin: 0;
}
.mail-home .faq-a code {
  background: rgba(26,86,219,.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--primary);
}

/* -- 底部 CTA -- */
.mail-home .cta-section {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #1a56db 100%);
  text-align: center;
  padding: 80px 24px;
  position: relative;
  overflow: hidden;
}
.mail-home .cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 600px 300px at 50% 50%, rgba(245,158,11,.1), transparent);
}
.mail-home .cta-section h2 {
  font-size: 34px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 12px;
  position: relative;
}
.mail-home .cta-section p {
  font-size: 16px;
  color: rgba(255,255,255,.65);
  margin-bottom: 32px;
  position: relative;
}

/* ============================================
   链接颜色修正 - 防止主题默认蓝色链接覆盖
   只作用于我们的区块内部，不影响头部菜单
   ============================================ */

/* Hero 区域内的链接保持白/金色 */
.mail-home .hero a:not(.btn-primary):not(.btn-outline) {
  color: var(--accent) !important;
}

/* 资讯卡片标题链接 */
.mail-home .news-card, .mail-home .news-card:hover, .mail-home .news-card:visited {
  color: inherit !important;
  text-decoration: none !important;
}
.mail-home .news-card-body h3 {
  color: var(--text-main) !important;
}

/* 服务卡片标签文字色 */
.mail-home .service-tag {
  color: var(--primary) !important;
}

/* 合作横幅文字 */
.mail-home .coop-banner p {
  color: rgba(255,255,255,.85) !important;
}
.mail-home .coop-banner p em {
  color: var(--accent) !important;
}

/* CTA 区域文字 */
.mail-home .cta-section h2 { color: #fff !important; }
.mail-home .cta-section p { color: rgba(255,255,255,.65) !important; }

/* FAQ 文字色 */
.mail-home .faq-q { color: var(--text-main) !important; }
.mail-home .faq-a p { color: var(--text-sub) !important; }

/* -- 滚动动画 -- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
.mail-home }
.animate {
  opacity: 0;
  transform: translateY(30px);
  transition: all .7s cubic-bezier(.16,1,.3,1);
}
.mail-home .animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* -- 响应式 -- */
@media (max-width: 900px) {

  .mail-home .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .mail-home .hero-text p { margin-left: auto; margin-right: auto; }
  .mail-home .hero-cta { justify-content: center; }
  .mail-home .hero-visual { order: -1; }
  .mail-home .hero-visual img { max-width: 320px; }
  .mail-home .why-grid, .mail-home .flow-grid { grid-template-columns: 1fr; }
  .mail-home .flow-image { order: -1; }
  .mail-home .services-grid { grid-template-columns: 1fr 1fr; }
  .mail-home .news-grid { grid-template-columns: 1fr; }
  .mail-home .faq-list { grid-template-columns: 1fr; }
  .mail-home .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .mail-home .section-title { font-size: 26px; }
  .mail-home .hero-text h1 { font-size: 30px; }

}
@media (max-width: 600px) {

  .mail-home .services-grid { grid-template-columns: 1fr; }
  .mail-home .hero { min-height: auto; }
  .mail-home .hero-inner { padding: 50px 20px; }
  .mail-home .coop-banner { flex-direction: column; text-align: center; }

}

/* ============================================
   自定义头部 Header（内容你的，样式我的）
   ============================================ */
.mail-home .site-header-custom {
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  position: sticky;
  top: 0;
  z-index: 999;
}
.mail-home .header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  gap: 24px;
}
.mail-home .logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
  flex-shrink: 0;
}
.mail-home .logo-area img { height: 40px; width: auto; }
.mail-home .logo-area span {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main) !important;
  letter-spacing: -.3px;
  white-space: nowrap;
}
.mail-home .nav-wrap { display: flex; align-items: center; }
.mail-home .nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.mail-home .nav-links li { margin: 0; }
.mail-home .nav-links a {
  text-decoration: none !important;
  color: var(--text-sub) !important;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all .2s;
  white-space: nowrap;
  display: block;
}
.mail-home .nav-links a:hover {
  color: var(--primary) !important;
  background: rgba(26,86,219,.06);
}
/* 移动端汉堡菜单 */
.mail-home .nav-toggle-cb { display: none; }
.mail-home .nav-toggle-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}
.mail-home .nav-toggle-btn span {
  width: 24px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: all .3s;
}

/* ============================================
   自定义尾部 Footer（内容你的，样式我的）
   ============================================ */
.mail-home .site-footer-custom {
  background: var(--bg-dark);
  color: #f1f5f9;
  padding: 60px 24px 30px;
}
.mail-home .footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 48px;
}
.mail-home .footer-col h4 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 20px;
  color: rgba(255,255,255,.5) !important;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.mail-home .footer-col p {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255,255,255,.6) !important;
  margin: 0;
}
.mail-home .footer-qr {
  margin-top: 18px;
}
.mail-home .footer-qr img {
  display: block;
  width: 100px;
  height: 100px;
  border-radius: 8px;
  background: #fff;
  padding: 6px;
}
.mail-home .footer-qr span {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: rgba(255,255,255,.5);
}
.mail-home .footer-col a {
  display: block;
  font-size: 14px;
  color: rgba(255,255,255,.6) !important;
  text-decoration: none !important;
  margin-bottom: 10px;
  transition: color .2s;
}
.mail-home .footer-col a:hover { color: var(--accent) !important; }
.mail-home .footer-bottom {
  max-width: 1200px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 12px;
  color: rgba(255,255,255,.35) !important;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.mail-home .footer-bottom a {
  color: rgba(255,255,255,.45) !important;
  text-decoration: none !important;
}
.mail-home .footer-bottom a:hover { color: var(--accent) !important; }

/* 头尾响应式 */
@media (max-width: 900px) {
  .mail-home .nav-toggle-btn { display: flex; }
  .mail-home .nav-wrap { position: static; }
  .mail-home .site-header-custom { position: relative; }
  .mail-home .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 8px 16px 16px;
    gap: 2px;
    box-shadow: 0 8px 30px rgba(0,0,0,.1);
    border-top: 1px solid var(--border);
    display: none;
    z-index: 999;
  }
  .mail-home .nav-toggle-cb:checked ~ .nav-links { display: flex; }
  .mail-home .nav-links a { padding: 12px 14px; font-size: 15px; }
  .mail-home .footer-inner { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .mail-home .footer-bottom { justify-content: center; text-align: center; }
  .mail-home .footer-qr img { margin-left: auto; margin-right: auto; }
  .mail-home .footer-col a { text-align: center; }
}
@media (max-width: 480px) {
  .mail-home .header-inner { padding: 12px 16px; gap: 12px; }
  .mail-home .logo-area img { height: 32px; }
  .mail-home .logo-area span { font-size: 15px; }
}
