/* shared_css.css */
/* Basic Reset & Typography */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --accent-color: #28a745;
    --text-color: #333;
    --background-color: #f8f9fa;
    --border-color: #dee2e6;
    --font-family-sans-serif: 'Roboto', sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family-sans-serif);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

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

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

ul {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.5em;
    font-weight: 700;
    color: #212529;
}

p {
    margin-bottom: 1em;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-primary {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-secondary {
    color: #fff;
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

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

.btn-newsletter {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}

.btn-newsletter:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

/* Header Styles */
.main-header {
    background-color: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 40px;
    width: auto;
}

.main-nav ul {
    display: flex;
    gap: 25px;
}

.main-nav ul li {
    position: relative;
}

.main-nav ul li a {
    color: var(--text-color);
    font-weight: 500;
    padding: 5px 0;
    display: block;
}

.main-nav ul li a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.main-nav .submenu {
    display: none;
    position: absolute;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    min-width: 180px;
    z-index: 10;
    padding: 10px 0;
    border-radius: 4px;
    top: 100%; /* Position below the parent */
    left: 0;
}

.main-nav .submenu li {
    width: 100%;
}

.main-nav .submenu li a {
    padding: 8px 15px;
    color: var(--text-color);
    white-space: nowrap;
}

.main-nav .submenu li a:hover {
    background-color: #f0f0f0;
    color: var(--primary-color);
}

.main-nav ul li:hover > .submenu {
    display: block;
}

.auth-buttons {
    display: flex;
    gap: 10px;
}

.mobile-menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

/* Footer Styles */
.main-footer {
    background-color: #212529;
    color: #f8f9fa;
    padding: 60px 0 30px;
    font-size: 0.9rem;
}

.main-footer a {
    color: #adb5bd;
}

.main-footer a:hover {
    color: #fff;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-column h3 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-column p {
    margin-bottom: 15px;
}

.footer-column ul {
    padding: 0;
}

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

.footer-column ul li:last-child {
    margin-bottom: 0;
}

.social-links {
    margin-top: 20px;
}

.social-links a {
    display: inline-block;
    color: #adb5bd;
    font-size: 1.5rem;
    margin-right: 15px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #fff;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-info p i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

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

.newsletter-signup h4 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 1rem;
}

.newsletter-signup form {
    display: flex;
    gap: 10px;
}

.newsletter-signup input[type="email"] {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid #495057;
    border-radius: 4px;
    background-color: #343a40;
    color: #fff;
    font-size: 0.9rem;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #343a40;
    margin-top: 30px;
}

.footer-bottom p {
    margin-bottom: 8px;
}

/* Mobile Menu Styles */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1001;
    display: none; /* Hidden by default */
    justify-content: flex-end;
    align-items: flex-start;
}

.mobile-menu-overlay.active {
    display: flex;
}

.mobile-menu-content {
    background-color: #fff;
    width: 80%;
    max-width: 300px;
    height: 100%;
    padding: 20px;
    box-shadow: -2px 0 10px rgba(0,0,0,0.2);
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
    position: relative;
}

.mobile-menu-overlay.active .mobile-menu-content {
    transform: translateX(0);
}

.close-menu-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-color);
    cursor: pointer;
}

.mobile-nav ul {
    flex-direction: column;
    margin-top: 60px;
}

.mobile-nav ul li {
    margin-bottom: 15px;
}

.mobile-nav ul li a {
    font-size: 1.2rem;
    color: var(--text-color);
    padding: 10px 0;
    display: block;
    border-bottom: 1px solid #eee;
}

.mobile-nav ul li:last-child a {
    border-bottom: none;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .main-nav, .auth-buttons {
        display: none;
    }
    .mobile-menu-toggle {
        display: block;
    }
    .main-header .container {
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .social-links {
        justify-content: center;
        display: flex;
    }
    .contact-info p {
        justify-content: center;
    }
    .newsletter-signup form {
        flex-direction: column;
        align-items: center;
    }
    .newsletter-signup input[type="email"],
    .newsletter-signup button {
        width: 80%;
        max-width: 300px;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
