/* shared.css - 全局共享样式 */

/* 基础重置与排版 */
html { box-sizing: border-box; font-size: 16px; }
*, *::before, *::after { box-sizing: inherit; }
body { margin: 0; padding: 0; font-family: 'Noto Sans SC', 'Helvetica Neue', Arial, sans-serif; line-height: 1.6; color: #333; background-color: #f8f9fa; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

h1, h2, h3, h4, h5, h6 { margin-top: 0; margin-bottom: 0.5em; font-weight: 700; color: #212529; }
h1 { font-size: 2.5rem; line-height: 1.2; }
h2 { font-size: 2rem; line-height: 1.25; }
h3 { font-size: 1.75rem; line-height: 1.3; }
h4 { font-size: 1.5rem; line-height: 1.35; }
h5 { font-size: 1.25rem; line-height: 1.4; }
h6 { font-size: 1rem; line-height: 1.5; }

p { margin-top: 0; margin-bottom: 1em; }
a { color: #007bff; text-decoration: none; transition: color 0.3s ease, text-decoration 0.3s ease; }
a:hover { color: #0056b3; text-decoration: underline; }

ul, ol { margin-top: 0; margin-bottom: 1em; padding-left: 20px; }
li { margin-bottom: 0.5em; }

img { max-width: 100%; height: auto; display: block; }

/* 容器与布局 */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 60px 0; }
.section-dark { background-color: #212529; color: #f8f9fa; }
.section-light { background-color: #f0f2f5; color: #333; }

/* 按钮 */
.btn { display: inline-block; font-weight: 400; text-align: center; white-space: nowrap; vertical-align: middle; user-select: none; border: 1px solid transparent; padding: 0.75rem 1.5rem; font-size: 1rem; line-height: 1.5; border-radius: 0.25rem; transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; cursor: pointer; }
.btn-primary { color: #fff; background-color: #007bff; border-color: #007bff; }
.btn-primary:hover { color: #fff; background-color: #0056b3; border-color: #0056b3; }
.btn-secondary { color: #fff; background-color: #6c757d; border-color: #6c757d; }
.btn-secondary:hover { color: #fff; background-color: #5a6268; border-color: #545b62; }
.btn-outline-primary { color: #007bff; background-color: transparent; border-color: #007bff; }
.btn-outline-primary:hover { color: #fff; background-color: #007bff; border-color: #007bff; }

/* 表单元素 */
.form-control { display: block; width: 100%; padding: 0.5rem 0.75rem; font-size: 1rem; line-height: 1.5; color: #495057; background-color: #fff; background-clip: padding-box; border: 1px solid #ced4da; border-radius: 0.25rem; transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; }
.form-control:focus { color: #495057; background-color: #fff; border-color: #80bdff; outline: 0; box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); }
.form-group { margin-bottom: 1rem; }
label { display: inline-block; margin-bottom: 0.5rem; }

/* 卡片组件 */
.card { position: relative; display: flex; flex-direction: column; min-width: 0; word-wrap: break-word; background-color: #fff; background-clip: border-box; border: 1px solid rgba(0, 0, 0, 0.125); border-radius: 0.25rem; margin-bottom: 1.5rem; }
.card-body { flex: 1 1 auto; padding: 1.25rem; }
.card-title { margin-bottom: 0.75rem; font-size: 1.25rem; }
.card-text:last-child { margin-bottom: 0; }

/* 响应式设计 */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    .section { padding: 40px 0; }
    .container { padding: 0 15px; }
    .footer-container { flex-direction: column; align-items: center; text-align: center; }
    .footer-section { margin-bottom: 30px; width: 100%; }
    .footer-section:last-child { margin-bottom: 0; }
    .social-links { justify-content: center; }
}

@media (max-width: 576px) {
    .btn { padding: 0.5rem 1rem; font-size: 0.875rem; }
    .form-control { padding: 0.4rem 0.6rem; font-size: 0.875rem; }
}

/* 实用工具类 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mt-3 { margin-top: 1rem; }
.p-3 { padding: 1rem; }
.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }

/* 滚动到顶部按钮样式 */
#scrollToTopBtn {
    display: none; /* Hidden by default */
    position: fixed; /* Fixed position */
    bottom: 30px; /* Place the button at the bottom of the page */
    right: 30px; /* Place the button 30px from the right */
    z-index: 99; /* Make sure it does not overlap */
    border: none; /* Remove borders */
    outline: none; /* Remove outline */
    background-color: #007bff; /* Set a background color */
    color: white; /* Text color */
    cursor: pointer; /* Add a mouse pointer on hover */
    padding: 15px 20px; /* Some padding */
    border-radius: 50%; /* Rounded corners */
    font-size: 20px; /* Increase font size */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

#scrollToTopBtn:hover {
    background-color: #0056b3; /* Add a dark-grey background on hover */
    transform: translateY(-3px);
}

/* 额外的布局帮助类 */
.grid-2-col { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

@media (max-width: 768px) {
    .grid-2-col, .grid-3-col { grid-template-columns: 1fr; }
}

/* 动画效果 */
.fade-in { animation: fadeIn 0.8s ease-out forwards; opacity: 0; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* 状态提示 */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}
.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}
.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}
.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* Iconography (Font Awesome placeholder) */
.fab, .fas { margin-right: 8px; }

/* Footer specific styles */
.main-footer {
    background-color: #2c3e50; /* Dark blue-grey */
    color: #ecf0f1; /* Light text */
    padding: 60px 0 30px;
    font-size: 0.95rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 20px;
}

.footer-section h3 {
    color: #ffffff;
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background-color: #007bff;
}

.footer-section p {
    margin-bottom: 10px;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

.footer-section ul li a:hover {
    color: #007bff;
    text-decoration: underline;
}

.footer-section ul li a i {
    margin-right: 10px;
    font-size: 1rem;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    color: #ecf0f1;
    font-size: 1.4rem;
    width: 40px;
    height: 40px;
    border: 1px solid #ecf0f1;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.social-links a:hover {
    background-color: #007bff;
    border-color: #007bff;
    color: #ffffff;
    text-decoration: none;
}

.contact-info p i {
    margin-right: 10px;
    color: #007bff;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 25px;
    margin-top: 40px;
    text-align: center;
    color: #bdc3c7;
    font-size: 0.85rem;
}

.footer-bottom .footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-bottom p {
    margin: 0;
}

.footer-bottom a {
    color: #bdc3c7;
    text-decoration: none;
    margin: 0 10px;
}

.footer-bottom a:hover {
    color: #007bff;
    text-decoration: underline;
}

.compliance-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

.compliance-info .cert-logo {
    height: 30px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.compliance-info .cert-logo:hover {
    opacity: 1;
}

/* Responsive adjustments for footer */
@media (max-width: 992px) {
    .footer-section {
        min-width: 45%;
    }
}

@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        align-items: flex-start;
    }
    .footer-section {
        width: 100%;
        min-width: unset;
        margin-bottom: 40px;
    }
    .footer-section h3::after {
        left: 0;
    }
    .social-links {
        justify-content: flex-start;
    }
    .footer-bottom .footer-container {
        flex-direction: column;
        text-align: center;
    }
    .footer-bottom p {
        margin-bottom: 10px;
    }
    .compliance-info {
        justify-content: center;
        width: 100%;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@media (max-width: 768px) {
  .page-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .page-content {
    overflow-x: hidden;
    max-width: 100%;
  }
  body {
    overflow-x: hidden;
  }
}
