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

/* 基础重置 */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Helvetica Neue', 'Arial', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

a:hover {
    color: #0056b3;
    text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.7em;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.3;
}

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

p {
    margin-bottom: 1em;
}

ul, ol {
    margin-left: 25px;
    margin-bottom: 1em;
    list-style-type: disc;
    color: #555;
}

ul.no-list-style, ol.no-list-style {
    list-style-type: none;
    margin-left: 0;
}

/* 容器与布局 */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 25px;
}

.section-padding {
    padding: 60px 0;
}

.section-heading {
    text-align: center;
    margin-bottom: 40px;
}

.section-heading h2 {
    font-size: 2.8em;
    color: #2c3e50;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.section-heading h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: #007bff;
    border-radius: 2px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    background-color: #007bff;
    color: #fff;
    padding: 12px 25px;
    border-radius: 5px;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1em;
}

.btn:hover {
    background-color: #0056b3;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 123, 255, 0.3);
    text-decoration: none;
}

.btn-secondary {
    background-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
    box-shadow: 0 6px 12px rgba(108, 117, 125, 0.3);
}

.btn-outline {
    background-color: transparent;
    color: #007bff;
    border: 2px solid #007bff;
    padding: 10px 23px;
}

.btn-outline:hover {
    background-color: #007bff;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 123, 255, 0.3);
}

/* 表单元素 */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 18px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    color: #333;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
    outline: none;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

input[type="submit"] {
    width: auto;
    cursor: pointer;
    font-size: 1.1em;
    padding: 12px 30px;
}

/* 辅助类 */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mb-40 { margin-bottom: 40px; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mt-40 { margin-top: 40px; }

/* 字体图标 - 假设 Font Awesome 已经通过CDN引入，这里只是确保样式可用 */
.fas, .fab {
    line-height: 1;
}

/* 底部样式 */
.main-footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 50px 0 25px;
    font-size: 0.95em;
    margin-top: 60px;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 25px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.footer-section {
    flex: 1;
    min-width: 280px;
    margin-bottom: 35px;
    padding-right: 30px;
}

.footer-section:last-child {
    padding-right: 0;
}

.footer-section h3 {
    color: #ffffff;
    margin-bottom: 20px;
    font-size: 1.3em;
    border-bottom: 2px solid #007bff;
    padding-bottom: 8px;
    display: inline-block;
}

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

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

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

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

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

.social-links {
    display: flex;
    margin-top: 20px;
    padding-left: 0;
}

.social-links li {
    margin-right: 18px;
}

.social-links a {
    font-size: 1.6em;
    color: #bdc3c7;
    transition: color 0.3s ease, transform 0.2s ease;
}

.social-links a:hover {
    color: #007bff;
    transform: translateY(-3px);
}

.contact-info p {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
}

.contact-info p i {
    margin-right: 12px;
    color: #007bff;
    font-size: 1.2em;
    position: relative;
    top: 3px;
}

.newsletter-signup {
    margin-top: 25px;
}

.newsletter-signup h4 {
    color: #ffffff;
    margin-bottom: 12px;
    font-size: 1.1em;
}

.newsletter-signup form {
    display: flex;
    max-width: 300px;
}

.newsletter-signup input[type="email"] {
    flex-grow: 1;
    padding: 12px 18px;
    border: none;
    border-radius: 6px 0 0 6px;
    outline: none;
    background-color: #3f546a;
    color: #fff;
    font-size: 0.95em;
}

.newsletter-signup input[type="email"]::placeholder {
    color: #a0a0a0;
}

.newsletter-signup button {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 0.95em;
    font-weight: 500;
}

.newsletter-signup button:hover {
    background-color: #0056b3;
}

.newsletter-disclaimer {
    font-size: 0.85em;
    color: #a0a0a0;
    margin-top: 10px;
}

.footer-bottom {
    border-top: 1px solid #3f546a;
    padding-top: 25px;
    margin-top: 40px;
    text-align: center;
}

.footer-bottom p {
    color: #bdc3c7;
    margin-bottom: 8px;
    font-size: 0.9em;
}

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

.footer-bottom a:hover {
    text-decoration: underline;
}

/* 返回顶部按钮 */
.back-to-top {
    display: none; /* Hidden by default */
    position: fixed; /* Fixed/sticky position */
    bottom: 35px; /* Place the button at the bottom of the page */
    right: 35px; /* Place the button 35px from the right */
    z-index: 999; /* 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: 16px;
    border-radius: 50%; /* Rounded corners */
    font-size: 20px; /* Increase font size */
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: background-color 0.3s, transform 0.3s, opacity 0.3s;
    opacity: 0.9;
}

.back-to-top:hover {
    background-color: #0056b3;
    transform: translateY(-5px);
    opacity: 1;
}

/* 响应式调整 */
@media (max-width: 992px) {
    .section-padding {
        padding: 40px 0;
    }
    .section-heading h2 {
        font-size: 2.2em;
    }
    .footer-container {
        flex-direction: column;
        align-items: center;
    }
    .footer-section {
        min-width: unset;
        width: 100%;
        padding-right: 0;
        text-align: center;
        margin-bottom: 30px;
    }
    .footer-section h3 {
        margin-bottom: 15px;
        font-size: 1.2em;
    }
    .social-links {
        justify-content: center;
        margin-top: 15px;
    }
    .contact-info p {
        justify-content: center;
    }
    .newsletter-signup form {
        justify-content: center;
        margin: 0 auto;
    }
    .newsletter-signup input[type="email"] {
        max-width: 200px;
    }
    .footer-bottom {
        margin-top: 30px;
        padding-top: 20px;
    }
    .back-to-top {
        bottom: 25px;
        right: 25px;
        padding: 12px;
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2em; }
    h2 { font-size: 1.75em; }
    h3 { font-size: 1.5em; }
    .section-heading h2 {
        font-size: 1.8em;
    }
    .btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.8em; }
    h2 { font-size: 1.5em; }
    .section-heading h2 {
        font-size: 1.6em;
    }
    .footer-section p, .footer-section ul li a {
        font-size: 0.85em;
    }
    .social-links li {
        margin-right: 12px;
    }
    .social-links a {
        font-size: 1.4em;
    }
    .newsletter-signup form {
        flex-direction: column;
        align-items: center;
        max-width: 250px;
    }
    .newsletter-signup input[type="email"] {
        border-radius: 6px;
        margin-bottom: 10px;
        width: 100%;
    }
    .newsletter-signup button {
        border-radius: 6px;
        width: 100%;
    }
    .back-to-top {
        bottom: 20px;
        right: 20px;
        padding: 10px;
        font-size: 14px;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
