/* Basic Reset & Box-sizing */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Body and Typography */
body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: 'Georgia', serif;
    margin-bottom: 0.5em;
    color: #222;
}

p {
    margin-bottom: 1em;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Buttons */
.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-color 0.3s ease;
    border: 1px solid transparent;
}

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

.btn-primary:hover {
    background-color: #0056b3;
    color: #fff;
    text-decoration: none;
}

.btn-secondary {
    background-color: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #5a6268;
    color: #fff;
    text-decoration: none;
}

.btn-tertiary {
    background-color: #28a745;
    color: #fff;
}

.btn-tertiary:hover {
    background-color: #218838;
    color: #fff;
    text-decoration: none;
}

.btn-outline {
    background-color: transparent;
    border-color: #007bff;
    color: #007bff;
}

.btn-outline:hover {
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
}

.btn-lg {
    padding: 12px 25px;
    font-size: 1.1em;
}

/* Header Specifics */
.main-header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 15px 0;
    position: relative; /* For absolute positioning of mobile menu */
    z-index: 100;
}

.header-top, .header-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.logo img {
    height: 40px; /* Adjust as needed */
    width: auto;
}

.main-nav .nav-list {
    list-style: none;
    display: flex;
}

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

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

.main-nav .nav-link:hover {
    color: #007bff;
    text-decoration: none;
}

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

.dropdown-menu {
    display: none;
    position: absolute;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    list-style: none;
    min-width: 180px;
    z-index: 100;
    padding: 10px 0;
    border-radius: 4px;
    left: 0;
    top: 100%;
}

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

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

.mobile-menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    z-index: 101; /* Ensure it's above the menu when open */
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: all 0.3s ease;
}

.search-bar {
    flex-grow: 1;
    margin-right: 20px;
}

.search-bar form {
    display: flex;
    max-width: 400px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.search-bar input[type="search"] {
    border: none;
    padding: 8px 15px;
    flex-grow: 1;
    outline: none;
    font-size: 0.9em;
}

.search-bar button {
    background-color: #f0f0f0;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-bar button svg {
    color: #555;
}

.user-actions a {
    margin-left: 10px;
}

.promo-banner {
    background-color: #ffc107; /* A warm yellow */
    color: #333;
    text-align: center;
    padding: 10px 0;
    font-weight: 500;
    margin-top: 10px;
    font-size: 0.95em;
}

.promo-banner .banner-link {
    color: #007bff;
    text-decoration: underline;
    font-weight: bold;
}

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

.hero-section h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-section p {
    font-size: 1.3em;
    max-width: 800px;
    margin: 0 auto 30px;
    line-height: 1.8;
}

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

/* Footer Specifics */
.main-footer {
    background-color: #2c3e50; /* Dark blue-grey */
    color: #ecf0f1; /* Light grey */
    padding: 50px 0 20px;
    font-size: 0.9em;
}

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

.footer-col h3 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.2em;
    position: relative;
    padding-bottom: 5px;
}

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

.footer-col ul {
    list-style: none;
}

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

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

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

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

.footer-col address p {
    margin-bottom: 5px;
}

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

.newsletter-form input[type="email"] {
    border: 1px solid #555;
    padding: 10px;
    border-radius: 5px 0 0 5px;
    flex-grow: 1;
    background-color: #34495e;
    color: #ecf0f1;
    outline: none;
    font-size: 0.9em;
}

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

.newsletter-form .btn-subscribe {
    background-color: #007bff;
    color: #fff;
    border-radius: 0 5px 5px 0;
    padding: 10px 15px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: normal;
}

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

.social-media {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.social-media a {
    color: #ecf0f1;
    font-size: 1.5em;
    transition: color 0.3s ease;
}

.social-media a:hover {
    color: #007bff;
}

.social-media a svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.footer-bottom-bar {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #34495e;
}

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

.footer-bottom-bar a {
    color: #007bff;
    text-decoration: none;
}

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

/* Responsive Adjustments */
@media (max-width: 992px) {
    .main-nav {
        display: none; /* Hidden by default for mobile */
        position: absolute;
        top: 100%; /* Position below header */
        left: 0;
        width: 100%;
        background-color: #fff;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        flex-direction: column;
        padding: 10px 0;
        z-index: 90;
        border-top: 1px solid #eee;
    }

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

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

    .main-nav .nav-item {
        margin: 0;
        border-bottom: 1px solid #eee;
    }

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

    .main-nav .nav-link {
        padding: 15px 20px;
        text-align: left;
    }

    .main-nav .nav-item.has-dropdown .dropdown-menu {
        position: static; /* Stack dropdown items */
        box-shadow: none;
        border-radius: 0;
        padding: 0;
        background-color: #f8f8f8;
        width: 100%;
        border-top: 1px solid #eee;
    }

    .main-nav .nav-item.has-dropdown .dropdown-menu li a {
        padding-left: 40px; /* Indent dropdown items */
    }

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

    .header-top {
        padding-bottom: 0;
    }

    .header-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding-top: 0;
    }

    .search-bar {
        width: 100%;
        margin-right: 0;
    }

    .user-actions {
        width: 100%;
        display: flex;
        justify-content: center;
        margin-top: 10px;
    }

    .user-actions a {
        flex: 1;
        text-align: center;
        margin: 0 5px;
    }

    .hero-section {
        padding: 80px 0;
        min-height: 350px;
    }

    .hero-section h1 {
        font-size: 2.5em;
    }

    .hero-section p {
        font-size: 1.1em;
    }

    .hero-actions {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .hero-actions .btn {
        width: 80%;
        margin: 0 auto;
    }

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

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-col ul {
        padding: 0;
    }

    .newsletter-form {
        justify-content: center;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    .social-media {
        justify-content: center;
    }

    .hero-section h1 {
        font-size: 2em;
    }

    .hero-section p {
        font-size: 1em;
    }

    .logo img {
        height: 35px;
    }
}

@media (max-width: 480px) {
    .promo-banner {
        font-size: 0.85em;
        padding: 8px 5px;
    }
    .hero-section {
        padding: 60px 0;
    }
    .hero-section h1 {
        font-size: 1.8em;
    }
    .hero-section p {
        font-size: 0.9em;
    }
    .hero-actions .btn {
        width: 95%;
    }
    .search-bar form {
        max-width: 100%;
    }
    .footer-col address {
        font-style: normal;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
