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

/* CSS Reset / Normalize (Simplified for example) */
html {
    box-sizing: border-box;
    font-size: 16px;
}
*, *::before, *::after {
    box-sizing: inherit;
}
body {
    margin: 0;
    font-family: 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5em;
    font-weight: 600;
    color: #212529;
}
p {
    margin-top: 0;
    margin-bottom: 1em;
}
a {
    color: #007bff;
    text-decoration: none;
}
a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}
.btn {
    display: inline-block;
    font-weight: 400;
    color: #fff;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    background-color: #007bff;
    border: 1px solid #007bff;
    padding: 0.6rem 1.2rem;
    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;
}
.btn:hover {
    color: #fff;
    background-color: #0056b3;
    border-color: #004d9b;
    text-decoration: none;
}
.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}
.btn-primary:hover {
    background-color: #0056b3;
    border-color: #004d9b;
}
.btn-secondary {
    color: #007bff;
    background-color: transparent;
    border-color: #007bff;
}
.btn-secondary:hover {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

/* Header Specific Styles (example) */
.main-header {
    background-color: #fff;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.main-header .logo img {
    height: 40px;
}
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}
.main-nav li {
    margin-left: 25px;
    position: relative;
}
.main-nav a {
    color: #333;
    font-weight: 500;
    padding: 0.5rem 0;
    display: block;
}
.main-nav a:hover {
    color: #007bff;
    text-decoration: none;
}
.main-nav .dropdown-menu {
    display: none;
    position: absolute;
    background-color: #fff;
    box-shadow: 0 8px 16px rgba(0,0,0,.1);
    list-style: none;
    padding: 10px 0;
    min-width: 160px;
    z-index: 1;
    border-radius: 0.25rem;
    top: 100%; /* Position below the parent link */
    left: 0;
}
.main-nav .dropdown:hover .dropdown-menu {
    display: block;
}
.main-nav .dropdown-menu li {
    margin: 0;
}
.main-nav .dropdown-menu a {
    padding: 8px 20px;
    white-space: nowrap;
}
.header-actions .btn {
    margin-left: 10px;
}
.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.icon-bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

/* Footer Specific Styles (example) */
.main-footer {
    background-color: #212529;
    color: #f8f9fa;
    padding: 3rem 0;
    margin-top: 4rem;
}
.main-footer a {
    color: #a0c4ff;
}
.main-footer a:hover {
    color: #cce0ff;
    text-decoration: underline;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 2rem;
}
.footer-col h4 {
    color: #fff;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}
.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-col ul li {
    margin-bottom: 0.8rem;
}
.footer-col p {
    font-size: 0.95rem;
    line-height: 1.8;
}
.social-links a {
    display: inline-block;
    color: #fff;
    font-size: 1.5rem;
    margin-right: 15px;
    transition: color 0.3s ease;
}
.social-links a:hover {
    color: #007bff;
}
.footer-col form {
    display: flex;
    margin-top: 1rem;
}
.footer-col form input[type="email"] {
    flex-grow: 1;
    padding: 0.75rem;
    border: 1px solid #495057;
    border-radius: 0.25rem 0 0 0.25rem;
    background-color: #343a40;
    color: #fff;
}
.footer-col form input[type="email"]::placeholder {
    color: #adb5bd;
}
.footer-col form .btn {
    border-radius: 0 0.25rem 0.25rem 0;
    padding: 0.75rem 1rem;
    white-space: nowrap;
}
.footer-bottom {
    border-top: 1px solid #495057;
    padding-top: 2rem;
    text-align: center;
    font-size: 0.85rem;
}
.footer-bottom p {
    margin-bottom: 0.5rem;
}

/* Responsive Adjustments (Simplified) */
@media (max-width: 992px) {
    .main-nav .nav-list {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #fff;
        box-shadow: 0 8px 16px rgba(0,0,0,.1);
        padding: 1rem 0;
    }
    .main-nav .nav-list.active {
        display: flex;
    }
    .main-nav li {
        margin: 0;
    }
    .main-nav a {
        padding: 10px 20px;
    }
    .main-nav .dropdown-menu {
        position: static;
        box-shadow: none;
        padding-left: 20px;
        background-color: #f8f9fa;
        border-top: 1px solid #eee;
    }
    .menu-toggle {
        display: block;
    }
    .header-actions {
        display: none; /* Hide actions on smaller screens for simplicity */
    }
}
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .social-links {
        margin-top: 1rem;
        justify-content: center;
    }
    .footer-col form {
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
