/*
Theme Name: 外汇返佣网
Theme URI: https://www.sosoforex.com/
Author: 陈钰
Description: 外汇返佣网模板
Version: 1.1
*/

/* =========================
   Reset & Global
========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #222;
  background-color: #f7f8fb;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: #1a73e8;
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: #155ab6;
  text-decoration: underline;
}

ul,
ol {
  margin-bottom: 16px;
  padding-left: 20px;
}

li {
  margin-bottom: 8px;
}

/* =========================
   Containers
========================= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-narrow {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* =========================
   Typography
========================= */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.4;
  color: #111;
  margin-bottom: 16px;
}

h1 { font-size: 36px; }
h2 { font-size: 28px; }
h3 { font-size: 22px; }
h4 { font-size: 18px; }

p {
  color: #444;
  margin-bottom: 16px;
}

small {
  font-size: 14px;
  color: #666;
}

/* =========================
   Buttons
========================= */
.btn-primary,
.btn-secondary {
  display: inline-block;
  font-weight: 600;
  border-radius: 6px;
  padding: 12px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: #1a73e8;
  color: #fff;
}

.btn-primary:hover {
  background-color: #155ab6;
}

.btn-secondary {
  background-color: #fff;
  border: 1px solid #ddd;
  color: #222;
}

.btn-secondary:hover {
  background-color: #f1f3f6;
}

/* =========================
   Header
========================= */
.site-header {
  background-color: #fff;
  border-bottom: 1px solid #eee;
  padding: 15px 0;
}

.site-logo {
  font-size: 24px;
  font-weight: 700;
}

.main-nav ul {
  display: flex;
  gap: 24px;
  list-style: none;
}

.main-nav ul li a {
  font-weight: 500;
}

/* =========================
   Breadcrumb
========================= */
.breadcrumb {
  font-size: 14px;
  margin: 20px 0;
}

.breadcrumb ol {
  display: flex;
  gap: 6px;
  list-style: none;
}

.breadcrumb a {
  color: #666;
}

/* =========================
   Cards
========================= */
.card {
  background-color: #fff;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

/* =========================
   Tables
========================= */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

th, td {
  padding: 12px 15px;
  border: 1px solid #eee;
  text-align: left;
}

th {
  background-color: #f3f4f6;
  font-weight: 600;
}

/* =========================
   Footer
========================= */
.site-footer {
  background-color: #111;
  color: #aaa;
  padding: 40px 0;
  margin-top: 60px;
}

.site-footer a {
  color: #ddd;
}

.site-footer a:hover {
  color: #fff;
}

/* =========================
   Forms
========================= */
input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 16px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #1a73e8;
  outline: none;
}

/* =========================
   Responsive
========================= */
@media (max-width: 992px) {
  .main-nav ul {
    flex-direction: column;
    gap: 12px;
  }
}

@media (max-width: 768px) {
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
  .container { padding: 0 16px; }
}

@media (max-width: 576px) {
  h1 { font-size: 24px; }
  h2 { font-size: 20px; }
  .btn-primary,
  .btn-secondary {
    width: 100%;
    text-align: center;
  }
}

/* ===========================
   Header 样式
=========================== */

/* ====== 顶部整体 header ====== */
.site-header {
  background-color: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  padding: 15px 0;
  position: relative;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

/* container 内部布局 */
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  flex-wrap: wrap; /* 支持换行，移动端自然堆叠 */
}

/* 网站名称 + 描述 */
.site-branding {
  text-align: left;
  flex: 1 1 auto;
}

.site-title-link {
  text-decoration: none;
  color: #222;
  display: flex;
  flex-direction: column;
}

.site-title {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
}

.site-description {
  font-size: 0.95rem;
  color: #555;
  margin-top: 4px;
  line-height: 1.3;
}

/* 导航菜单 */
.main-navigation {
  flex: 1 1 auto;
  text-align: right;
}

/* 主菜单 */
.primary-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 25px;
  justify-content: flex-end;
  flex-wrap: wrap; /* 多行时自动换行 */
}

.primary-menu li {
  position: relative;
}

.primary-menu li a {
  text-decoration: none;
  color: #222;
  font-weight: 500;
  transition: color 0.3s, border-bottom 0.3s;
  padding: 6px 0;
  display: inline-block;
}

.primary-menu li a:hover {
  color: #0073e6;
  border-bottom: 2px solid #0073e6;
}

/* 子菜单 */
.primary-menu li ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  padding: 10px 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  list-style: none;
  min-width: 180px;
  z-index: 999;
}

.primary-menu li:hover ul {
  display: block;
}

.primary-menu li ul li a {
  padding: 8px 15px;
  color: #222;
  font-weight: 400;
  border-bottom: none;
}

.primary-menu li ul li a:hover {
  background-color: #f5f5f5;
  color: #0073e6;
}

/* ====== 移动端自适应 ====== */
@media (max-width: 992px) {
  .header-container {
    flex-direction: column;
    align-items: center; /* 居中显示 */
  }

  .site-branding {
    text-align: center;
    margin-bottom: 10px;
  }

  .main-navigation {
    width: 100%;
    text-align: center;
    margin-top: 10px;
  }

  .primary-menu {
    flex-direction: column;
    gap: 10px;
    justify-content: center;
  }

  /* 子菜单改为可折叠，移动端更友好 */
  .primary-menu li ul {
    position: static;
    box-shadow: none;
    display: none; /* 初始隐藏，点击可展开需要 JS */
  }

  .primary-menu li:hover ul {
    display: none; /* 禁用 hover 展开，靠 JS 控制 */
  }
}

/* ====== 小屏幕汉堡菜单可选 ====== */
/* 如果使用 JS + class 切换显示，样式支持折叠导航 */
.mobile-menu-toggle {
  display: none;
  cursor: pointer;
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
    font-size: 1.6rem;
    color: #222;
    position: absolute;
    right: 20px;
    top: 18px;
  }

  .primary-menu {
    display: none; /* 默认隐藏，通过 JS 展开 */
  }

  .primary-menu.active {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}


/* ====== 底部整体 ====== */
.site-footer {
  background-color: #1a1a1a;
  color: #f0f0f0;
  padding: 40px 20px;
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"PingFang SC","Microsoft YaHei",sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
}

/* 网站信息 */
.footer-branding {
  flex: 1 1 200px;
}

.footer-title {
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.footer-description {
  color: #bbb;
}

/* 底部导航 */
.footer-navigation {
  flex: 1 1 200px;
}

.footer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-menu li a {
  color: #f0f0f0;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-menu li a:hover {
  color: #1a73e8;
}

/* 社交媒体 */
.footer-social {
  flex: 1 1 200px;
  display: flex;
  gap: 12px;
}

.footer-social a {
  color: #f0f0f0;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.footer-social a:hover {
  color: #1a73e8;
}

/* 版权信息 */
.footer-copy {
  width: 100%;
  text-align: center;
  margin-top: 20px;
  color: #777;
  font-size: 13px;
}

/* 移动端优化 */
@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-social {
    justify-content: center;
    margin: 10px 0;
  }

  .footer-navigation {
    margin: 10px 0;
  }
}