/* ============================================================
   ATFX 外汇平台 — 全局样式表（清新青绿 + 暖橙点缀）
   ============================================================ */

/* ===== 全局变量（想换配色只改这里） ===== */
:root {
    /* 主色：清新青绿 —— 专业、舒适、不刺眼 */
    --primary: #0D9488;
    --primary-hover: #0F766E;
    --primary-light: #CCFBF1;
    --primary-lighter: #F0FDFA;

    /* 强调色：暖橙 —— CTA、高亮点缀 */
    --accent: #F59E0B;
    --accent-hover: #D97706;
    --accent-light: #FEF3C7;

    /* 成功/安全色：翠绿 —— QQ按钮、成功提示 */
    --success: #10B981;
    --success-hover: #059669;
    --success-light: #D1FAE5;

    /* 中性色 */
    --bg-light: #F9FAFB;
    --bg-lighter: #FCFDFE;
    --text-dark: #111827;
    --text-body: #374151;
    --text-muted: #6B7280;
    --border-color: #E5E7EB;
    --border-light: #F3F4F6;

    /* 阴影 */
    --shadow-sm: 0 1px 3px rgba(17,24,39,0.05);
    --shadow-md: 0 4px 16px rgba(17,24,39,0.07);
    --shadow-lg: 0 12px 40px rgba(13,148,136,0.12);
}

/* ===== 基础 ===== */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text-body);
    background-color: #fff;
    line-height: 1.7;
    padding-bottom: 60px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@media (min-width: 992px) {
    body { padding-bottom: 0; }
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-hover); }

h1, h2, h3, h4, h5, h6 {
    color: var(--text-dark);
    letter-spacing: -0.01em;
}

/* ===== 加宽内容容器（适配大屏） ===== */
@media (min-width: 1200px) { .container { max-width: 1320px; } }
@media (min-width: 1600px) { .container { max-width: 1500px; } }
@media (min-width: 1920px) { .container { max-width: 1700px; } }

/* ===== 收紧 Section 上下留白 ===== */
section.py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

.py-5.bg-light h1 { font-size: 1.9rem; }
.py-5.bg-light {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
    background: linear-gradient(180deg, var(--primary-lighter) 0%, var(--bg-light) 100%) !important;
}

/* ===== 顶部导航 ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: #fff;
}

.header-top {
    background: linear-gradient(90deg, var(--primary-lighter) 0%, #fff 100%);
    border-bottom: 1px solid var(--border-color);
}

.header-top strong {
    color: var(--primary);
}

.navbar {
    background: #fff !important;
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 1px 2px rgba(17,24,39,0.03) !important;
}

.navbar .nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
    padding: 0.75rem 0.85rem;
    transition: color 0.2s;
    position: relative;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: var(--primary);
}

.navbar .nav-link.active::after {
    content: '';
    position: absolute;
    left: 0.85rem;
    right: 0.85rem;
    bottom: 0.35rem;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 2px;
}

.dropdown-menu {
    border: 1px solid var(--border-color);
    border-radius: 0.6rem;
    box-shadow: var(--shadow-md);
    padding: 0.4rem 0;
    margin-top: 0.3rem;
}

.dropdown-item {
    padding: 0.55rem 1.2rem;
    font-size: 0.9rem;
    color: var(--text-body);
    transition: all 0.15s;
}

.dropdown-item:hover {
    background: var(--primary-lighter);
    color: var(--primary);
    padding-left: 1.4rem;
}

.dropdown-item i {
    color: var(--primary);
    transition: color 0.15s;
}

.dropdown-item:hover i {
    color: var(--accent);
}

/* ===== 按钮 ===== */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s;
    letter-spacing: 0.01em;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(13,148,136,0.2);
}
.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #fff;
    box-shadow: 0 4px 14px rgba(13,148,136,0.3);
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    background: transparent;
}
.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(13,148,136,0.25);
}

/* 金色强调按钮 */
.btn-accent {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(245,158,11,0.2);
}
.btn-accent:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
    transform: translateY(-1px);
}

.btn-success {
    background-color: var(--success);
    border-color: var(--success);
    box-shadow: 0 2px 8px rgba(16,185,129,0.2);
}
.btn-success:hover {
    background-color: var(--success-hover);
    border-color: var(--success-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(16,185,129,0.3);
}

.btn-outline-secondary {
    color: var(--text-body);
    border-color: var(--border-color);
    background: #fff;
}
.btn-outline-secondary:hover {
    background: var(--primary-lighter);
    color: var(--primary);
    border-color: var(--primary);
}

/* ===== 轮播/Banner ===== */
.hero-banner {
    background: linear-gradient(135deg, var(--primary-lighter) 0%, #F0FDFA 40%, var(--bg-lighter) 100%);
    padding: 70px 0 50px 0;
    min-height: 400px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(13,148,136,0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-banner::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -50px;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(245,158,11,0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-banner h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
}

.hero-banner h1::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
    margin-top: 1rem;
}

.hero-banner .lead {
    color: var(--text-body);
    position: relative;
    z-index: 1;
}

.hero-banner i.bi-graph-up-arrow {
    color: var(--primary) !important;
}

@media (max-width: 768px) {
    .hero-banner { padding: 40px 0; min-height: auto; }
    .hero-banner h1 { font-size: 1.6rem; }
    .hero-banner h1::after { width: 40px; height: 3px; }
}

/* ===== 产品卡片 ===== */
.product-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 0.85rem;
    padding: 1.75rem;
    transition: box-shadow 0.3s, transform 0.25s, border-color 0.3s;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.product-card::before {
    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 0.35s ease;
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
    transform: translateY(-4px);
}

.product-card:hover::before {
    transform: scaleX(1);
}

.product-card .icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--primary-lighter);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    transition: all 0.35s;
}

.product-card:hover .icon-wrap {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #fff;
    transform: scale(1.08) rotate(-3deg);
    box-shadow: 0 8px 20px rgba(13,148,136,0.25);
}

.product-card h5,
.product-card h3.h5 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-dark);
}

.product-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.product-card .text-primary {
    color: var(--primary) !important;
}

/* ===== 新闻卡片 ===== */
.news-card {
    border: 1px solid var(--border-color);
    border-radius: 0.85rem;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.3s, border-color 0.3s, transform 0.25s;
    height: 100%;
}

.news-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
    transform: translateY(-3px);
}

.news-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.5s;
}

.news-card:hover img {
    transform: scale(1.05);
}

.news-card .card-body { padding: 1.25rem 1.5rem; }

.news-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-dark);
    transition: color 0.2s;
}

.news-card:hover .card-title {
    color: var(--primary);
}

.news-card .card-title a:hover {
    color: var(--primary);
}

.news-card .card-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== 文章详情内容 ===== */
.article-content {
    font-size: 1rem;
    line-height: 1.9;
    color: var(--text-body);
    word-break: break-word;
    overflow-wrap: break-word;
}

.article-content p { margin-bottom: 1rem; }

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

/* ===== 手机端底部栏 ===== */
.mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    background: #fff;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 12px rgba(17,24,39,0.06);
}

.mobile-bottom-bar .btn {
    border-radius: 0.5rem;
    font-size: 0.85rem;
    padding: 0.55rem 0;
    box-shadow: none;
}

/* ===== 表格 ===== */
.table-clean {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 0.85rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.table-clean th {
    background: linear-gradient(180deg, var(--primary-lighter) 0%, var(--primary-light) 100%);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.9rem 1.1rem;
    text-align: left;
    color: var(--primary-hover);
    border-bottom: 1px solid var(--primary-light);
}
.table-clean td {
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
    color: var(--text-body);
}
.table-clean tbody tr {
    transition: background 0.15s;
}
.table-clean tbody tr:hover td {
    background: var(--primary-lighter);
}
.table-clean tbody tr:last-child td {
    border-bottom: none;
}

/* Bootstrap table 主色适配 */
.table {
    --bs-table-color: var(--text-body);
}
.table thead.table-light th {
    background: var(--primary-lighter);
    color: var(--primary-hover);
    border-color: var(--primary-light);
}

/* ===== 页脚 ===== */
.site-footer {
    background: linear-gradient(180deg, #fff 0%, var(--bg-light) 100%);
    border-top: 1px solid var(--border-color);
}
.site-footer h5,
.site-footer h6 {
    color: var(--text-dark);
}
.site-footer h5.text-primary {
    color: var(--primary) !important;
}
.site-footer a {
    color: var(--text-muted);
    transition: color 0.2s, padding-left 0.2s;
}
.site-footer a:hover {
    color: var(--primary) !important;
    padding-left: 3px;
}
.site-footer .text-success {
    color: var(--success) !important;
}

/* ===== 后台样式 ===== */
.admin-sidebar {
    min-height: 100vh;
    background: linear-gradient(180deg, #0F172A 0%, #111827 100%);
    color: #CBD5E1;
}
.admin-sidebar .p-3 {
    background: #0B1220;
    border-bottom: 1px solid rgba(255,255,255,0.05) !important;
}
.admin-sidebar a {
    color: #CBD5E1;
    display: block;
    padding: 0.7rem 1.2rem;
    text-decoration: none;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}
.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: rgba(13,148,136,0.1);
    color: #fff;
    border-left-color: var(--primary);
}
.admin-sidebar a.active {
    background: linear-gradient(90deg, rgba(13,148,136,0.2), transparent);
    color: var(--primary-light);
}

/* ============================================================
   栅格间距微调
   ============================================================ */
.row.g-4 {
    --bs-gutter-x: 1.75rem;
    --bs-gutter-y: 1.75rem;
}

/* ============================================================
   全宽容器
   ============================================================ */
.container-wide {
    width: 100%;
    padding-right: 2rem;
    padding-left: 2rem;
    margin-right: auto;
    margin-left: auto;
    max-width: 1800px;
}

/* ============================================================
   响应式字号
   ============================================================ */
@media (max-width: 992px) {
    .hero-banner h1 { font-size: 1.8rem; }
}

@media (max-width: 576px) {
    .hero-banner { padding: 30px 0; }
    .hero-banner h1 { font-size: 1.35rem; }
    .hero-banner h1::after { width: 35px; height: 3px; margin-top: 0.7rem; }
    .product-card { padding: 1.25rem; }
    .news-card .card-body { padding: 1rem 1.15rem; }
}

/* ============================================================
   分页样式
   ============================================================ */
.pagination .page-link {
    color: var(--primary);
    border-color: var(--border-color);
    padding: 0.5rem 0.85rem;
    font-size: 0.9rem;
    transition: all 0.15s;
}
.pagination .page-link:hover {
    background: var(--primary-lighter);
    color: var(--primary-hover);
    border-color: var(--primary-light);
    transform: translateY(-1px);
}
.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(13,148,136,0.25);
}
.pagination .page-item.disabled .page-link {
    color: #9CA3AF;
}

/* ============================================================
   FAQ 手风琴样式
   ============================================================ */
.accordion-button {
    background: #fff;
    color: var(--text-dark);
    font-size: 0.95rem;
    padding: 1rem 1.25rem;
    border-radius: 0.5rem !important;
    box-shadow: none !important;
    font-weight: 500;
}
.accordion-button:not(.collapsed) {
    background: var(--primary-lighter);
    color: var(--primary-hover);
}
.accordion-button:focus {
    box-shadow: 0 0 0 0.15rem rgba(13,148,136,0.15) !important;
    border-color: var(--primary-light);
}
.accordion-button i.bi-question-circle {
    color: var(--primary) !important;
    transition: color 0.2s;
}
.accordion-button:not(.collapsed) i.bi-question-circle {
    color: var(--accent) !important;
}
.accordion-item {
    border: 1px solid var(--border-color) !important;
    border-radius: 0.6rem;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.accordion-item:hover {
    border-color: var(--primary-light) !important;
    box-shadow: 0 2px 8px rgba(13,148,136,0.06);
}
.accordion-body {
    padding: 1rem 1.25rem;
    line-height: 1.8;
    color: var(--text-body);
    background: #fff;
}

/* ============================================================
   徽章/标签
   ============================================================ */
.badge.bg-primary {
    background-color: var(--primary) !important;
}
.badge.bg-primary.bg-opacity-10 {
    background-color: var(--primary-lighter) !important;
    color: var(--primary) !important;
}
.badge.bg-success {
    background-color: var(--success) !important;
}

/* ============================================================
   CTA 区块（重要 - 用于替换原来的内联渐变背景）
   ============================================================ */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, #14B8A6 50%, var(--primary-hover) 100%);
    position: relative;
    overflow: hidden;
    color: #fff;
}
.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(245,158,11,0.15) 0%, transparent 60%);
    border-radius: 50%;
    pointer-events: none;
}
.cta-section::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 60%);
    border-radius: 50%;
    pointer-events: none;
}
.cta-section .btn-light {
    color: var(--primary) !important;
    font-weight: 700;
    position: relative;
    z-index: 1;
}
.cta-section .btn-light:hover {
    background: #fff;
    color: var(--primary-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}
.cta-section h2,
.cta-section h3 {
    color: #fff;
    position: relative;
    z-index: 1;
}
.cta-section p {
    position: relative;
    z-index: 1;
}
.cta-section .opacity-75 {
    color: rgba(255,255,255,0.9) !important;
}

/* ============================================================
   文字选中
   ============================================================ */
::selection {
    background: var(--primary-light);
    color: var(--primary-hover);
}

/* ============================================================
   滚动条美化
   ============================================================ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-light);
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-light), #B2DFDB);
    border-radius: 5px;
    border: 2px solid var(--bg-light);
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary), #14B8A6);
}

/* ============================================================
   链接下划线动效（可选择性使用）
   ============================================================ */
.link-underline {
    position: relative;
    text-decoration: none;
}
.link-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}
.link-underline:hover::after {
    width: 100%;
}