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

/* 基础重置和排版 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, 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.5em;
    font-weight: 600;
    color: #333;
}

p {
    margin-bottom: 1em;
}

ul {
    list-style: none;
}

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

/* 按钮样式 */
.btn {
    display: inline-block;
    background-color: #007bff;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background-color: #5a6268;
}

/* 表单元素 */
input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus {
    border-color: #007bff;
    outline: none;
}

/* 头部和底部通用样式 */
header {
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

footer {
    background-color: #222;
    color: #f4f4f4;
    padding: 40px 0 20px;
    font-size: 15px;
}

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

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

.footer-section h3 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-section p,
.footer-section ul li a {
    color: #ccc;
    line-height: 1.8;
}

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

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

.social-icons a {
    color: #ccc;
    font-size: 24px;
    margin-right: 15px;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: #007bff;
}

.newsletter-form {
    display: flex;
    margin-top: 15px;
}

.newsletter-form input {
    flex-grow: 1;
    padding: 10px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 15px;
    background-color: #444;
    color: #fff;
}

.newsletter-form input::placeholder {
    color: #bbb;
}

.newsletter-form button {
    padding: 10px 15px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

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

.footer-bottom {
    text-align: center;
    border-top: 1px solid #444;
    padding-top: 20px;
    margin-top: 30px;
    color: #ccc;
}

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

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

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease, transform 0.3s ease;
    z-index: 999;
}

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

/* 响应式调整 */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-section {
        min-width: unset;
        width: 100%;
        padding-right: 0;
    }
    .social-icons {
        display: flex;
        justify-content: center;
        margin-top: 10px;
        margin-bottom: 20px;
    }
    .social-icons a {
        margin: 0 10px;
    }
    .newsletter-form {
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .footer-section h3 {
        font-size: 16px;
    }
    .footer-section p,
    .footer-section ul li a {
        font-size: 14px;
    }
    .newsletter-form input,
    .newsletter-form button {
        font-size: 14px;
        padding: 8px 12px;
    }
}

/* Font Awesome Icons (placeholder for actual link) */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css');
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
