/* ===========================================================
   EAST PARALLEL — landing page styles
   All colors come from CSS variables injected by site-config.js
   =========================================================== */

:root {
  --bg: #f4f1e9;
  --card: #ffffff;
  --border: #eae3d3;
  --accent: #a9762f;
  --heading: #2f2a24;
  --text: #4a443c;
  --muted: #8a7d6b;
  --wa: #25d366;
  --radius: 16px;
  --max-width: 880px;
  --shadow: 0 2px 14px rgba(64, 52, 30, 0.05);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; border: 0; }
a { color: inherit; text-decoration: none; }
b, strong { color: var(--heading); font-weight: 700; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 18px;
}

/* ---------------- header ---------------- */
.site-header { padding: 30px 0 22px; text-align: center; }
.site-header .container { position: relative; }
.site-header .logo {
  max-height: 62px;
  width: auto;
  margin: 0 auto 8px;
}
.site-header .brand-name {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--heading);
  margin: 0;
  text-transform: uppercase;
}
.site-header .brand-sub {
  margin: 6px 0 0;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.34em;
  color: var(--accent);
  text-transform: uppercase;
}

/* ---------------- 语言切换按钮（EN / ES） ---------------- */
.lang-switch {
  position: absolute;
  top: 0;
  right: 18px;
  display: flex;
  gap: 4px;
  padding: 3px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow);
  z-index: 5;
}
.lang-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .16s, color .16s;
}
.lang-btn:hover { color: var(--heading); }
.lang-btn.active { background: var(--accent); color: #fff; }

/* ---------------- galleries（图片块） ---------------- */
.gallery {
  display: grid;
  gap: 6px;
  margin: 0 0 20px;
}
.gallery.layout-full { grid-template-columns: 1fr; }
.gallery.layout-grid2 { grid-template-columns: repeat(2, 1fr); }
.gallery.layout-grid3 { grid-template-columns: repeat(3, 1fr); }

.g-item {
  position: relative;
  display: block;
  overflow: hidden;
  background: #e9e2d2;
  border-radius: 6px;
}
.gallery.layout-full .g-item { border-radius: 0; }
.g-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery.layout-grid2 .g-item,
.gallery.layout-grid3 .g-item { aspect-ratio: 1 / 1; }

/* 原比例模式（默认）：整张图完整显示，绝不裁切 */
.gallery.fit-natural { align-items: start; }
.gallery.fit-natural .g-item { aspect-ratio: auto; }
.gallery.fit-natural .g-item img { height: auto; object-fit: contain; }

/* 整幅大图：始终原比例完整显示 */
.gallery.layout-full .g-item img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.cover-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 26px 20px 14px;
  background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0));
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
}

/* ---------------- cards ---------------- */
.cards { padding-bottom: 10px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
  margin-bottom: 18px;
}

/* highlight / messenger bar */
.hl-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 17px 2px;
}
.hl-row + .hl-row { border-top: 1px solid #f0e9da; }
.hl-icon {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  margin-top: 1px;
}
.hl-icon svg { width: 100%; height: 100%; display: block; }
.hl-icon img { width: 100%; height: 100%; object-fit: contain; display: block; }
.hl-text { font-size: 15px; line-height: 1.7; }
.hl-row a.hl-text { display: block; }
.hl-text b, .hl-text strong { color: var(--heading); font-weight: 700; }
.hl-text i, .card-body i, .list-item i {
  font-style: normal;
  font-weight: 700;
  color: var(--accent);
}

/* generic card section */
.card .card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid #f0e9da;
  font-size: 20px;
  font-weight: 800;
  color: var(--heading);
  letter-spacing: .01em;
}
.card .card-title::before {
  content: "";
  display: block;
  width: 5px;
  height: 20px;
  border-radius: 3px;
  background: var(--accent);
  flex: 0 0 5px;
}
.card .card-body { font-size: 15.5px; line-height: 1.85; margin-top: 16px; }
.card .card-body p { margin: 0 0 10px; }
.card .card-body p:last-child { margin-bottom: 0; }
.card-body b, .card-body strong { color: var(--accent); font-weight: 700; }

.list-item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 14px 2px;
  font-size: 15.5px;
}
.list-item + .list-item { border-top: 1px solid #f0e9da; }
.list-item .tick {
  flex: 0 0 17px;
  width: 17px; height: 17px;
  margin-top: 5px;
  color: var(--accent);
}
.list-item .tick svg { width: 100%; height: 100%; display: block; }

/* ---------------- CTA ---------------- */
.cta-card { text-align: center; padding: 30px 24px 26px; }
.cta-card img.cta-image {
  max-width: 320px;
  margin: 0 auto 18px;
  border-radius: 12px;
}
.cta-card h2 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 800;
  color: var(--heading);
}
.cta-card p { margin: 0 0 20px; color: var(--muted); font-size: 15px; }

.wa-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 15px 22px;
  background: var(--wa);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .04em;
  text-align: center;
  border-radius: 999px;
  box-shadow: 0 0 0 7px rgba(37, 211, 102, .22), 0 8px 20px rgba(37, 211, 102, .28);
  transition: transform .15s ease, background .2s ease;
  animation: rubberBand 2.6s infinite ease-in-out;
  transform-origin: center;
}
.wa-button svg { width: 20px; height: 20px; flex: 0 0 20px; }
.wa-button:hover { background: #1eb356; }
.wa-button:active { transform: scale(.985); animation: none; }

@keyframes rubberBand {
  0%   { transform: scale(1); }
  30%  { transform: scaleX(1.045) scaleY(.965); }
  40%  { transform: scaleX(.975) scaleY(1.02); }
  50%  { transform: scaleX(1.02) scaleY(.99); }
  65%  { transform: scale(1); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .wa-button { animation: none; }
}

/* ---------------- footer ---------------- */
.site-footer {
  text-align: center;
  padding: 26px 18px 40px;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: 12px;
}
.site-footer a { color: var(--accent); text-decoration: underline; }

/* ---------------- 底部吸底 WhatsApp 胶囊（跟随滚动） ---------------- */
.wa-sticky {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 30px;
  background: var(--wa);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .02em;
  border-radius: 999px;
  box-shadow: 0 0 0 7px rgba(37, 211, 102, .22), 0 12px 28px rgba(0, 0, 0, .28);
  transition: transform .18s ease, background .2s ease;
  white-space: nowrap;
}
.wa-sticky:hover { background: #1eb356; transform: translateX(-50%) translateY(-2px); }
.wa-sticky svg { width: 20px; height: 20px; flex: 0 0 20px; fill: #fff; }

/* 给吸底按钮让出底部空间，避免遮挡页脚 */
body { padding-bottom: 86px; }
.site-footer { padding-bottom: 16px; }

/* ---------------- 手机 / 窄屏自适应 ---------------- */
@media (max-width: 700px) {
  .gallery { gap: 5px; }
  /* 原比例模式下，手机上窄图并排会太小 → 降为单列/两列 */
  .gallery.fit-natural.layout-grid2 { grid-template-columns: 1fr; }
  .gallery.fit-natural.layout-grid3 { grid-template-columns: repeat(2, 1fr); }
  /* 正方形裁切模式下，三列在手机上改两列，别挤成一条缝 */
  .gallery.fit-square.layout-grid3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  body { font-size: 15.5px; padding-bottom: 78px; }
  .site-header { padding: 24px 0 18px; }
  .site-header .brand-name { font-size: 22px; }
  .site-header .brand-sub { letter-spacing: 0.22em; }
  .card { padding: 18px 16px; border-radius: 13px; }
  .card .card-title { font-size: 18px; }
  .cta-card h2 { font-size: 22px; }
  .hl-text { font-size: 14.5px; }
  .wa-sticky { padding: 12px 24px; font-size: 15px; bottom: 14px; }
  .lang-switch { top: -6px; right: 10px; }
  .lang-btn { padding: 4px 9px; font-size: 11px; }
  .cover-caption { font-size: 13.5px; padding: 20px 14px 10px; }
}

/* 超窄屏（小手机）再收一档 */
@media (max-width: 380px) {
  .gallery.fit-natural.layout-grid3,
  .gallery.fit-square.layout-grid3 { grid-template-columns: 1fr; }
  .site-header .logo { max-height: 48px; }
}
