/* 基础CSS - 原生手写，遵循BEM命名规范 */

/* CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #2f6f5e;
    --color-primary-dark: #245748;
    --color-secondary: #4979a8;
    --color-accent: #c9a24d;
    --color-success: #4caf50;
    --color-warning: #b7791f;
    --color-info: #4979a8;
    --color-text: #1d2733;
    --color-text-light: #586777;
    --color-bg: #f6f8fb;
    --color-white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(21, 36, 52, 0.06);
    --shadow-md: 0 8px 22px rgba(21, 36, 52, 0.08);
    --shadow-lg: 0 18px 38px rgba(21, 36, 52, 0.10);
    --border-radius: 8px;
    --border-radius-large: 8px;
    --transition: all 0.2s ease;
}

/* 基础字体 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
}

/* 基础元素样式 */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

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

a:hover {
    color: var(--color-primary-dark);
}

/* 容器 */
.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* 主内容区域 */
.main-content {
    min-height: auto; /* 移除固定最小高度，避免页面底部白色区域 */
    padding: 2rem 0;
}

/* 按钮基础样式 */
button {
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

/* 输入框基础样式 */
input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    font-family: inherit;
    font-size: 1rem;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    transition: var(--transition);
    width: 100%;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(47, 111, 94, 0.14);
}

/* 页眉样式 */
.pg-header {
    background: var(--color-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.pg-header__container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem 20px;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pg-header__logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pg-header__logo-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
}

.pg-header__logo-link:hover {
    color: var(--color-primary);
}

.pg-header__logo-icon {
    color: var(--color-primary);
    font-size: 1.8rem;
}

.pg-header__logo-text {
    color: var(--color-text);
}

.pg-header__nav {
    display: flex;
    align-items: center;
}

.pg-header__nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.pg-header__nav-link {
    color: var(--color-text);
    font-weight: 500;
    position: relative;
}

.pg-header__nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: var(--transition);
}

.pg-header__nav-link:hover::after,
.pg-header__nav-link--active::after {
    width: 100%;
}

/* 页脚样式 */
.pg-footer {
    background: #17212b;
    color: var(--color-white);
    padding: 2rem 0;
    margin-top: 4rem;
}

.pg-footer__container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
    text-align: center;
}

.pg-footer__links {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.pg-footer__link {
    color: var(--color-white);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.pg-footer__link:hover {
    color: var(--color-secondary);
}

.pg-footer__separator {
    color: #6d7b88;
}

.pg-footer__text {
    margin-bottom: 0.5rem;
}

.pg-footer__disclaimer {
    font-size: 0.875rem;
    color: #b8c2cc;
}

/* 响应式设计 */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }

    .pg-header__container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .pg-header__nav-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.85rem 1.25rem;
    }
}
