/* shared.css */

/* General Body and Container Styles */
body {
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

/* Buttons */
.button {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    border: 2px solid transparent;
}

.button-primary {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

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

.button-secondary {
    background-color: transparent;
    color: #007bff;
    border-color: #007bff;
}

.button-secondary:hover {
    background-color: #e6f2ff;
    color: #0056b3;
}

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

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

.logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

.main-nav .nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.main-nav .nav-item {
    margin-left: 30px;
    position: relative;
}

.main-nav .nav-link {
    color: #555;
    font-weight: 500;
    padding: 5px 0;
    display: block;
    position: relative;
}

.main-nav .nav-link:hover,
.main-nav .nav-link.current {
    color: #007bff;
}

.main-nav .nav-link.current::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 100%;
    height: 2px;
    background-color: #007bff;
}

/* Dropdown Menu */
.nav-item.dropdown {
    position: relative;
}

.dropdown-menu {
    list-style: none;
    margin: 0;
    padding: 10px 0;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    z-index: 10;
}

.nav-item.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 8px 20px;
    color: #555;
    white-space: nowrap;
}

.dropdown-menu li a:hover {
    background-color: #f0f0f0;
    color: #007bff;
    text-decoration: none;
}

.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    font-size: 28px;
    color: #333;
    cursor: pointer;
    padding: 0;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/static/images/hero-bg.jpg') no-repeat center center/cover;
    color: #fff;
    text-align: center;
    padding: 100px 0;
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-content p {
    font-size: 20px;
    max-width: 800px;
    margin: 0 auto 40px auto;
    line-height: 1.8;
}

.hero-actions .button {
    margin: 0 10px;
    min-width: 180px;
}

/* Footer */
.main-footer {
    background-color: #222;
    color: #ccc;
    padding: 60px 0 20px;
    font-size: 15px;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 40px;
}

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

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

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

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

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

.footer-section ul li a {
    color: #ccc;
    display: block;
    padding: 5px 0;
}

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

.footer-section .social-links a {
    color: #fff;
    font-size: 20px;
    margin-right: 15px;
    transition: color 0.3s ease;
}

.footer-section .social-links a:hover {
    color: #007bff;
}

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

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

.newsletter-form input[type="email"] {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid #555;
    border-radius: 5px 0 0 5px;
    background-color: #333;
    color: #eee;
    outline: none;
}

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

.newsletter-form button {
    border-radius: 0 5px 5px 0;
    padding: 10px 20px;
    border: 1px solid #007bff;
    background-color: #007bff;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

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

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

.footer-bottom p {
    margin: 0;
    color: #aaa;
}

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

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

/* Back to Top Button */
#backToTopBtn {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    font-size: 18px;
    border: none;
    outline: none;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
    transition: background-color 0.3s, opacity 0.3s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

#backToTopBtn:hover {
    background-color: #0056b3;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .main-nav {
        display: none; /* Hide main nav by default on smaller screens */
        flex-direction: column;
        position: absolute;
        top: 70px; /* Adjust based on header height */
        left: 0;
        width: 100%;
        background-color: #fff;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
        padding: 20px 0;
        text-align: center;
    }

    .main-nav.active {
        display: flex;
    }

    .main-nav .nav-list {
        flex-direction: column;
    }

    .main-nav .nav-item {
        margin: 10px 0;
    }

    .main-nav .nav-link {
        padding: 10px 0;
        font-size: 18px;
    }

    .main-nav .nav-link.current::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .nav-item.dropdown:hover .dropdown-menu,
    .nav-item.dropdown .dropdown-menu.active {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        border-top: 1px solid #eee;
        margin-top: 10px;
        padding-top: 10px;
    }

    .dropdown-menu li a {
        padding: 8px 0;
        text-align: center;
    }

    .menu-toggle {
        display: block; /* Show toggle button */
    }

    .hero-content h1 {
        font-size: 38px;
    }

    .hero-content p {
        font-size: 18px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .button {
        margin: 10px 0;
    }

    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-section {
        min-width: unset;
        width: 100%;
        max-width: 400px;
    }

    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .newsletter-form {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .logo span {
        display: none; /* Hide company name on very small screens */
    }
    .logo img {
        height: 35px;
    }
    .hero-content h1 {
        font-size: 30px;
    }
    .hero-content p {
        font-size: 16px;
    }
    .button {
        padding: 8px 20px;
        font-size: 15px;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
