/* General Body Styles */
body {
    font-family: 'Open Sans', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    scroll-behavior: smooth;
}

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

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

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

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 40px;
    margin-right: 10px;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

.logo h1 {
    font-size: 24px;
    color: #0056b3;
    margin: 0;
    font-weight: 700;
    transition: color 0.3s ease;
}

.logo h1:hover {
    color: #007bff;
}

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

.main-nav ul li {
    position: relative;
    margin-left: 25px;
}

.main-nav ul li a {
    text-decoration: none;
    color: #555;
    font-weight: 600;
    padding: 10px 0;
    transition: color 0.3s ease, border-bottom 0.3s ease;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
    color: #007bff;
    border-bottom: 2px solid #007bff;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 180px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-top: 3px solid #007bff;
    border-radius: 0 0 4px 4px;
    padding: 5px 0;
}

.dropdown-content.show {
    display: block;
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    white-space: nowrap;
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: #e9ecef;
    color: #007bff;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.menu-toggle {
    display: none; /* Hidden by default, shown on smaller screens */
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #007bff;
    padding: 5px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    border: 1px solid transparent;
    cursor: pointer;
}

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

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

.btn-secondary {
    background-color: #f0f0f0;
    color: #007bff;
    border-color: #007bff;
}

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

/* Footer Styles */
.main-footer {
    background-color: #222;
    color: #eee;
    padding: 40px 0 20px;
    margin-top: 50px;
    border-top: 5px solid #007bff;
}

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

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

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

.footer-section h4 {
    color: #fff;
    font-size: 18px;
    margin-top: 25px;
    margin-bottom: 10px;
}

.footer-section p {
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 10px;
}

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

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

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

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

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

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

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

.contact-info p i {
    margin-right: 10px;
    color: #007bff;
    font-size: 18px;
    min-width: 20px;
}

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

.contact-info a:hover {
    text-decoration: underline;
    color: #0099ff;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    margin-top: 20px;
}

.newsletter-form input {
    padding: 12px;
    border: none;
    border-radius: 5px;
    outline: none;
    margin-bottom: 10px;
    background-color: #333;
    color: #fff;
}

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

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

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

.footer-bottom {
    background-color: #1a1a1a;
    padding: 15px 0;
    text-align: center;
    margin-top: 30px;
    font-size: 14px;
}

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

.footer-bottom p i {
    color: #dc3545; /* Red heart */
    margin: 0 5px;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 22px;
    display: flex;
    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;
}

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

/* Responsive Styles */
@media (max-width: 992px) {
    .main-nav ul li {
        margin-left: 15px;
    }

    .header-actions .btn {
        padding: 8px 15px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .logo {
        width: 100%;
        justify-content: center;
        margin-bottom: 15px;
    }

    .main-nav {
        width: 100%;
        margin-top: 0;
        position: relative;
    }

    .main-nav ul {
        flex-direction: column;
        width: 100%;
        display: none; /* Hidden by default */
        background-color: #fff;
        box-shadow: 0 8px 16px rgba(0,0,0,0.1);
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        padding: 10px 0;
        border-top: 3px solid #007bff;
    }

    .main-nav ul.nav-open {
        display: flex; /* Shown when toggled */
    }

    .main-nav ul li {
        margin: 0;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #eee;
    }

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

    .main-nav ul li a {
        padding: 15px 0;
        display: block;
        width: 100%;
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        border-top: none;
        width: 100%;
        background-color: #f1f1f1;
        padding: 0;
        border-radius: 0;
    }

    .dropdown-content a {
        padding-left: 40px;
        color: #555;
    }

    .menu-toggle {
        display: block; /* Show toggle button */
        position: absolute;
        right: 20px;
        top: 10px;
    }

    .header-actions {
        width: 100%;
        text-align: center;
        margin-top: 15px;
        display: flex;
        justify-content: center;
        gap: 10px;
    }

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

    .footer-section {
        min-width: unset;
        width: 90%;
    }

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

    .newsletter-form {
        align-items: center;
    }

    .newsletter-form input, 
    .newsletter-form button {
        width: 90%;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 20px;
    }

    .logo img {
        height: 35px;
    }

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

    .header-actions .btn {
        width: 90%;
        margin: 5px 0;
    }

    .scroll-to-top {
        width: 45px;
        height: 45px;
        font-size: 20px;
        bottom: 20px;
        right: 20px;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
