/* ===== 0. Reset & Base (新增：确保所有页面计算逻辑一致) ===== */
* {
    box-sizing: border-box; /* 防止 padding 撑大容器高度 */
}

:root {
    --primary-blue: #003366;
    --accent-red: #b22222;
    --text-color: #333;
    --bg-light: #f9f9f9;
    --border-color: #ddd;
    --nav-height: 70px; /* 统一导航高度变量 */
}

/* ===== Global ===== */
body {
    font-family: Arial, sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    margin: 0;
    padding: 0;
    background: #fff;
}

/* 统一容器：删除所有 PHP 页面里的 <style> .container，以此为准 */
.container {
    max-width: 1120px; /* 稍微加宽一点更符合现代设计 */
    margin: 0 auto;
    padding: 0 20px;   /* 仅设置左右间距，垂直间距由具体的 section 控制 */
}

/* ===== Header & Nav (深度优化：修复对齐不一致) ===== */
header {
    border-bottom: 1px solid var(--border-color);
    background: #fff;
    width: 100%;
    /* 删除了之前的 padding: 12px 0，改由内部 flex 撑起 */
}

.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center; /* 垂直居中核心 */
    height: var(--nav-height); /* 固定高度，确保所有页面一模一样 */
}

.logo {
    font-weight: bold;
    font-size: 24px;
    color: var(--accent-red);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo:hover { text-decoration: none; }

nav {
    display: flex;
    align-items: center;
    gap: 30px; /* 使用 gap 代替 margin，间距更精准 */
}

nav a {
    color: #666;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    line-height: 1; /* 消除行高造成的上下偏移 */
    transition: color 0.2s;
}

nav a:hover {
    color: var(--primary-blue);
    text-decoration: none;
}

.btn-get-started {
    background: var(--accent-red);
    color: white !important;
    padding: 10px 22px;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

/* ===== Typography System ===== */
h1 {
    color: var(--primary-blue);
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
}

h2 {
    color: var(--primary-blue);
    font-size: 26px;
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 15px;
}

h3 {
    font-size: 20px;
    font-weight: 600;
    margin-top: 25px;
    margin-bottom: 10px;
}

p {
    font-size: 16px;
    margin-bottom: 18px;
}

/* ===== Hero Section ===== */
.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 60px 0;
}

.hero-content {
    flex: 1;
    padding-right: 40px;
}

/* ===== Buttons ===== */
.btn-primary {
    display: inline-block;
    background: var(--primary-blue);
    color: white !important;
    padding: 14px 28px;
    border-radius: 6px;
    font-weight: bold;
    margin-top: 25px;
    transition: 0.2s ease;
    text-decoration: none;
}

.btn-primary:hover { opacity: 0.85; text-decoration: none; }

/* ===== Promo Card ===== */
.promo-card {
    width: 320px;
    height: 190px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-radius: 14px;
    padding: 25px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 12px 25px rgba(0,0,0,0.15);
    flex-shrink: 0; /* 防止被挤压 */
}

.promo-code-display {
    font-size: 34px;
    text-align: center;
    font-weight: bold;
    letter-spacing: 2px;
}

/* ===== Grid Systems ===== */
.usage-grid, .benefits-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin: 50px 0;
}

/* ===== Tables ===== */
.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.comparison-table th, .comparison-table td {
    border: 1px solid var(--border-color);
    padding: 14px;
    text-align: center;
}

.comparison-table th { background: #f5f7fa; }

/* ===== Helper Classes ===== */
.highlight-box {
    background: #f0f4f8;
    padding: 25px;
    border-left: 4px solid var(--primary-blue);
    margin: 30px 0;
    border-radius: 6px;
}

.code-tag {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 6px;
    font-weight: bold;
    color: white;
}
.code-tag.blue { background: var(--primary-blue); }
.code-tag.red { background: var(--accent-red); }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero { flex-direction: column; text-align: center; }
    .hero-content { padding-right: 0; margin-bottom: 30px; }
    .usage-grid, .benefits-grid { grid-template-columns: 1fr; gap: 30px; }
    .nav-bar { flex-direction: column; height: auto; padding: 15px 0; gap: 15px; }
    nav { gap: 15px; }
}
