/* Basic Reset & Global Styles */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --accent-color: #28a745;
    --light-bg: #f8f9fa;
    --dark-text: #343a40;
    --white: #ffffff;
    --border-color: #dee2e6;
    --font-family: 'Arial', sans-serif;
}

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

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--dark-text);
    background-color: var(--light-bg);
}

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

a:hover {
    color: var(--accent-color);
}

ul {
    list-style: none;
}

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

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: none;
}

.btn-login {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-login:hover {
    background-color: #0056b3; /* Darkened primary color */
}

.btn-signup {
    background-color: var(--accent-color);
    color: var(--white);
}

.btn-signup:hover {
    background-color: #1e7e34; /* Darkened accent color */
}

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

.header-top-bar {
    background-color: #333;
    color: #eee;
    padding: 8px 0;
    font-size: 0.9em;
}

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

.contact-info span {
    margin-right: 20px;
}

.contact-info i, .social-links i {
    margin-right: 5px;
}

.social-links a {
    color: #eee;
    margin-left: 15px;
    font-size: 1.1em;
}

.social-links a:hover {
    color: var(--primary-color);
}

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

.navbar-brand {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 40px; /* Adjust as needed */
    margin-right: 10px;
}

.logo-text {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--dark-text);
}

.hamburger-menu {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger-menu .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--dark-text);
    margin: 5px 0;
    transition: 0.4s;
}

.main-nav-menu {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    margin-right: 20px;
}

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

.nav-link {
    display: block;
    padding: 10px 0;
    color: var(--dark-text);
    font-weight: 500;
}

.nav-link.active, .nav-link:hover {
    color: var(--primary-color);
}

.dropdown-toggle i {
    margin-left: 5px;
    font-size: 0.8em;
}

.dropdown-menu {
    display: none;
    position: absolute;
    background-color: var(--white);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    min-width: 200px;
    z-index: 10;
    padding: 10px 0;
    border-radius: 5px;
    top: 100%;
    left: 0;
}

.nav-item.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    padding: 10px 20px;
    display: block;
    color: var(--dark-text);
}

.dropdown-menu li a:hover {
    background-color: var(--light-bg);
    color: var(--primary-color);
}

.nav-actions .btn {
    margin-left: 10px;
}

/* Footer Styles */
.main-footer {
    background-color: #222;
    color: #eee;
    padding: 50px 0 20px;
    font-size: 0.9em;
}

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

.footer-widget {
    flex: 1;
    min-width: 250px;
    margin: 0 15px 30px 15px;
}

.footer-widget:first-child {
    flex: 1.5; /* Make about us wider */
}

.widget-title {
    color: var(--white);
    font-size: 1.3em;
    margin-bottom: 20px;
    position: relative;
}

.widget-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
    margin-top: 10px;
}

.footer-widget p {
    margin-bottom: 10px;
}

.footer-widget ul {
    padding: 0;
}

.footer-widget ul li {
    margin-bottom: 8px;
}

.footer-widget ul li a {
    color: #bbb;
    transition: color 0.3s ease;
}

.footer-widget ul li a:hover {
    color: var(--primary-color);
}

.contact-details p {
    display: flex;
    align-items: center;
}

.contact-details i {
    margin-right: 10px;
    color: var(--primary-color);
}

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

.newsletter-form input[type="email"] {
    border: 1px solid #555;
    padding: 10px 15px;
    border-radius: 5px 0 0 5px;
    background-color: #333;
    color: var(--white);
    flex: 1;
}

.newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: var(--primary-color);
}

.newsletter-form .btn-subscribe {
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 0 5px 5px 0;
    padding: 10px 15px;
    white-space: nowrap;
}

.newsletter-form .btn-subscribe:hover {
    background-color: #0056b3; /* Darkened primary color */
}

.social-media-footer {
    margin-top: 20px;
}

.social-media-footer a {
    color: #bbb;
    font-size: 1.3em;
    margin-right: 15px;
    transition: color 0.3s ease;
}

.social-media-footer a:hover {
    color: var(--primary-color);
}

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

.footer-bottom i {
    color: #dc3545; /* Red heart */
}

/* Responsive Design */
@media (max-width: 992px) {
    .nav-list {
        margin-right: 0;
    }
    .nav-item {
        margin-left: 15px;
    }
    .nav-actions .btn {
        padding: 8px 15px;
    }
    .footer-widget {
        min-width: 200px;
        flex: 1 1 45%; /* Two columns */
        margin: 0 10px 30px 10px;
    }
    .footer-widget:first-child {
        flex: 1 1 90%; /* About us takes full width */
    }
}

@media (max-width: 768px) {
    .top-bar-content {
        flex-direction: column;
        text-align: center;
    }
    .contact-info span, .social-links {
        margin-bottom: 10px;
    }
    .contact-info span {
        margin-right: 0;
        display: block;
    }
    .social-links a {
        margin: 0 8px;
    }

    .hamburger-menu {
        display: block;
    }

    .main-nav-menu {
        display: none; /* Hide by default on mobile */
        flex-direction: column;
        position: absolute;
        top: 100%; /* Position below header */
        left: 0;
        width: 100%;
        background-color: var(--white);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        padding: 20px;
        z-index: 999;
        text-align: center;
    }

    .main-nav-menu.active {
        display: flex; /* Show when active */
    }

    .nav-list {
        flex-direction: column;
        width: 100%;
        margin-bottom: 20px;
    }

    .nav-item {
        margin: 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-item:last-child {
        border-bottom: none;
    }

    .nav-link {
        padding: 15px 0;
    }

    .dropdown-menu {
        position: static; /* Make dropdown inline on mobile */
        display: none;
        box-shadow: none;
        background-color: var(--light-bg);
        padding: 0;
        border-radius: 0;
        margin-top: 10px;
    }

    .nav-item.dropdown.active .dropdown-menu {
        display: block; /* Show dropdown when parent is active */
    }

    .dropdown-menu li a {
        padding: 10px 20px;
        text-align: center;
    }

    .nav-actions {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .nav-actions .btn {
        margin: 5px 0;
        width: 100%;
    }

    .footer-widgets {
        flex-direction: column;
        align-items: center;
    }
    .footer-widget {
        flex: 1 1 90%; /* Single column */
        margin: 0 0 30px 0;
        text-align: center;
    }
    .footer-widget:first-child {
        flex: 1 1 100%;
    }
    .newsletter-form {
        justify-content: center;
    }
    .widget-title::after {
        margin-left: auto;
        margin-right: auto;
    }
    .contact-details p {
        justify-content: center;
    }
    .social-media-footer {
        justify-content: center;
        display: flex;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
