/*
  样式表：styles.css
  - 使用 CSS 变量、移动端优先、Flex + Grid 布局
  - 提供良好的可访问性与响应式体验
  - 所有关键样式均附中文注释，便于维护
*/

/* ============ CSS 变量（主题色与常用尺寸） ============ */
:root {
  --brand: #0B57D0;         /* 品牌主色（蓝） */
  --accent: #00B894;        /* 强调色（绿） */
  --danger: #E53935;        /* 警示色（红） */
  --text: #1F2937;          /* 主要文字颜色 */
  --text-muted: #4B5563;    /* 次要文字颜色 */
  --bg: #FFFFFF;            /* 背景色（白） */
  --bg-alt: #F7F9FC;        /* 交替背景（浅灰） */
  --border: #E5E7EB;        /* 边框颜色 */
  --radius: 12px;           /* 统一圆角 */
  --shadow: 0 6px 20px rgba(0,0,0,.06); /* 柔和阴影 */
  --container: 1120px;      /* 容器最大宽度 */
  --gap: 16px;              /* 网格间距（移动端基础） */
}

/* ============ 全局基础样式 ============ */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
img { max-width: 100%; display: block; height: auto; }

/* 焦点可见性：提升键盘可访问性 */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* 跳转到内容的无障碍链接，仅键盘聚焦时可见 */
.skip-link { position: absolute; left: -9999px; top: 0; background: #000; color: #fff; padding: 8px 12px; border-radius: 6px; }
.skip-link:focus { left: 8px; top: 8px; z-index: 9999; }

/* 容器：限制宽度并设置左右留白 */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }

/* ============ 头部与导航 ============ */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.9); -webkit-backdrop-filter: saturate(140%) blur(8px); backdrop-filter: saturate(140%) blur(8px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; flex-wrap: wrap; position: relative; /* 允许在小屏时换行，并作为移动按钮定位容器 */ }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-text { font-weight: 700; letter-spacing: .2px; }

.site-nav { display: none; gap: 14px; align-items: center; }
.site-nav a { color: var(--text); text-decoration: none; padding: 8px 6px; border-radius: 8px; }
.site-nav a:hover { background: var(--bg-alt); }

/* 语言切换按钮组 */
.lang-switch { display: inline-flex; gap: 6px; }
.lang-btn { appearance: none; border: 1px solid var(--border); background: #fff; color: var(--text); padding: 6px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; text-decoration: none; }
.lang-btn.is-active { border-color: var(--brand); color: var(--brand); font-weight: 600; }

/* >= 900px 显示主导航 */
@media (min-width: 900px) { .site-nav { display: inline-flex; } }

/* 移动端布局顺序：第一行品牌，第二行移动按钮（右侧对齐） */
@media (max-width: 899px) {
  .brand { order: 1; flex: 1 1 auto; }
  /* 在 iOS Safari 下，采用绝对定位，确保三按钮固定在右上角，避免换行与错位 */
  .site-header .mobile-actions { position: absolute; top: 6px; right: 16px; display: flex !important; gap: 8px; padding: 0; width: auto; flex-basis: auto; z-index: 101; }
  .site-header .mobile-actions .btn { margin: 0; padding: 8px 10px; font-size: 14px; line-height: 1; }
  /* 极窄屏优先显示 WhatsApp 与 Book Now，隐藏 Blog */
  .site-header .mobile-actions .btn-outline { display: none; }
}


/* ============ 按钮组件 ============ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 999px; text-decoration: none; border: 1px solid transparent; cursor: pointer; font-weight: 600; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { filter: brightness(1.05); }
.btn-outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-outline:hover { background: rgba(11,87,208,.06); }
.btn-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover { filter: brightness(1.06); }

/* 显示控制：桌面端显示/移动端显示 */
.show-desktop { display: none; }
.show-mobile { display: inline-flex; }
@media (min-width: 900px) { .show-desktop { display: inline-flex; } .show-mobile { display: none; } }

/* 移动端顶部快捷按钮组 */
.mobile-actions { display: flex; gap: 8px; padding: 8px 0 12px; justify-content: flex-start; align-items: center; flex-wrap: nowrap; width: 100%; flex-basis: 100%; }
.mobile-actions .btn { flex: 0 0 auto; }
/* 窄屏下收紧尺寸，优先显示 WhatsApp 与 Book Now */
@media (max-width: 414px) { .mobile-actions .btn { padding: 6px 10px; font-size: 14px; } }
@media (max-width: 390px) { .mobile-actions .btn-outline { display: none; } /* 隐藏 Blog，避免换行 */ }

.mobile-actions .btn { padding: 8px 12px; line-height: 1; white-space: nowrap; }
@media (max-width: 360px) { .mobile-actions { gap: 6px; } .mobile-actions .btn { padding: 6px 10px; font-size: 14px; } }
@media (min-width: 900px) { .mobile-actions { display: none; } }

/* 右下角固定 WhatsApp 悬浮按钮（已移除组件，保留样式以便复用） */
.whatsapp-fab { position: fixed; right: 16px; bottom: 16px; z-index: 999; background: var(--accent); color: #fff; text-decoration: none; padding: 12px 16px; border-radius: 999px; box-shadow: var(--shadow); border: 1px solid transparent; font-weight: 700; }
.whatsapp-fab:hover { filter: brightness(1.06); }
.whatsapp-fab:focus-visible { outline: 3px solid rgba(0,184,148,.35); outline-offset: 3px; }

/* ============ 英雄区 ============ */
.hero { padding: 40px 0; background: radial-gradient(1200px 600px at 80% -10%, rgba(11,87,208,.08), transparent 60%); }
.hero-inner { display: grid; gap: 24px; grid-template-columns: 1fr; align-items: center; }
.hero-text h1 { margin: 0 0 8px; font-size: 28px; line-height: 1.25; }
.hero-text .lead { color: var(--text-muted); margin: 0 0 16px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-media img { border-radius: var(--radius); box-shadow: var(--shadow); }
@media (min-width: 900px) { .hero { padding: 64px 0; } .hero-inner { grid-template-columns: 1.1fr .9fr; } .hero-text h1 { font-size: 40px; } }

/* ============ 通用区块与卡片 ============ */
.section { padding: 56px 0; }
.section.alt { background: var(--bg-alt); }
.section h2 { margin: 0 0 20px; font-size: 26px; }
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card.mini { padding: 14px; }
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--text-muted); }

.note { color: var(--text-muted); font-size: 14px; }
.small { font-size: 12px; color: var(--text-muted); }

/* ============ 工具类（Utility classes） ============ */
.mb-8 { margin-bottom: 8px; } /* 外边距工具类：替代内联样式 */
.my-24 { margin: 24px 0; } /* 垂直外边距工具类：替代内联样式 */

/* ============ 网格系统 ============ */
.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* ============ 步骤列表 ============ */
.steps { margin: 0; padding-left: 18px; display: grid; gap: 10px; }
.steps li { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }

/* ============ 表单样式 ============ */
.form { display: block; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-full { grid-column: 1 / -1; }
label { font-weight: 600; }
input, select, textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: #fff; color: var(--text); font-size: 16px; -webkit-appearance: none; appearance: none; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(11,87,208,.15); }
.form-actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.form-tip { color: var(--text-muted); }
.form-tip.error { color: var(--danger); font-weight: 600; }

/* ============ 页脚 ============ */
.site-footer { border-top: 1px solid var(--border); background: #fff; }
.footer-inner { display: grid; gap: 12px; grid-template-columns: 1fr; padding: 18px 0; }
@media (min-width: 640px) { .footer-inner { grid-template-columns: 2fr 1fr; } }

/* ============ 动画与用户偏好 ============ */
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
