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

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

body {
    font-family: var(--font-family-sans);
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
    scroll-behavior: smooth;
}

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

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-sans);
    margin-bottom: 0.5em;
    line-height: 1.2;
    color: var(--dark-bg);
}

p {
    margin-bottom: 1em;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

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

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 400;
    color: #fff;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    background-color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 0.75em 1.5em;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    cursor: pointer;
}

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

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

.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}
.btn-secondary:hover {
    background-color: #545b62;
    border-color: #545b62;
}

.btn-cta {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    padding: 1em 2em;
    font-size: 1.1rem;
    font-weight: 600;
}
.btn-cta:hover {
    background-color: #218838;
    border-color: #218838;
}

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

.header-top-bar {
    background-color: var(--dark-bg);
    color: #fff;
    padding: 10px 0;
    font-size: 0.85rem;
}

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

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

.header-top-bar .contact-info i {
    margin-right: 5px;
    color: var(--primary-color);
}

.header-top-bar .social-links a {
    color: #fff;
    margin-left: 15px;
    font-size: 1rem;
}

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

.header-main-nav {
    padding: 15px 0;
}

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

.navbar-brand .logo {
    display: block;
}

.main-navigation .nav-menu {
    display: flex;
    margin: 0;
    padding: 0;
}

.main-navigation .nav-menu > li {
    position: relative;
    margin-left: 30px;
}

.main-navigation .nav-menu > li > a {
    display: block;
    padding: 10px 0;
    font-weight: 600;
    color: var(--dark-bg);
    white-space: nowrap;
}

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

.main-navigation .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    min-width: 200px;
    padding: 10px 0;
    display: none;
    list-style: none;
    z-index: 10;
    border-top: 3px solid var(--primary-color);
}

.main-navigation .menu-item-has-children:hover > .sub-menu {
    display: block;
}

.main-navigation .sub-menu li {
    position: relative;
}

.main-navigation .sub-menu a {
    padding: 10px 20px;
    display: block;
    color: var(--text-color);
    white-space: nowrap;
}

.main-navigation .sub-menu a:hover {
    background-color: var(--light-bg);
    color: var(--primary-color);
    text-decoration: none;
}

.main-navigation .sub-menu .sub-menu {
    left: 100%;
    top: 0;
}

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

.menu-toggle .icon-bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--dark-bg);
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-actions .search-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--dark-bg);
}

.header-actions .user-auth {
    display: flex;
    gap: 10px;
}

.header-actions .language-selector select {
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: 0.25rem;
    background-color: #fff;
    cursor: pointer;
}

.search-overlay {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: rgba(0,0,0,0.9);
    padding: 20px 0;
    display: none;
    z-index: 999;
}

.search-overlay.active {
    display: block;
}

.search-form {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-form input[type="search"] {
    flex-grow: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 5px 0 0 5px;
    font-size: 1rem;
}

.search-form button {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-size: 1rem;
}

.search-form button.close-search {
    position: absolute;
    right: -40px; /* Adjust as needed */
    top: 50%;
    transform: translateY(-50%);
    background: none;
    color: #fff;
    font-size: 1.5rem;
    border-radius: 0;
    padding: 0;
}

.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;
    text-align: center;
    padding: 100px 0;
    margin-bottom: 40px;
}

.hero-section h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: #fff;
}

.hero-section p {
    font-size: 1.25rem;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer Styles */
.main-footer {
    background-color: var(--dark-bg);
    color: #fff;
    padding: 60px 0 20px;
    font-size: 0.9rem;
}

.footer-widgets {
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

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

.widget {
    margin-bottom: 20px;
}

.widget-title {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.widget-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

.widget p {
    color: rgba(255,255,255,0.7);
}

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

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

.widget ul li a {
    color: rgba(255,255,255,0.7);
    transition: color 0.3s ease;
}

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

.contact-details p {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    color: rgba(255,255,255,0.7);
}

.contact-details i {
    margin-right: 10px;
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-top: 3px;
}

.newsletter-form {
    display: flex;
    margin-bottom: 20px;
}

.newsletter-form input[type="email"] {
    flex-grow: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 5px 0 0 5px;
    background-color: rgba(255,255,255,0.1);
    color: #fff;
    outline: none;
}

.newsletter-form input[type="email"]::placeholder {
    color: rgba(255,255,255,0.5);
}

.newsletter-form .btn-subscribe {
    background-color: var(--primary-color);
    border: none;
    color: #fff;
    padding: 10px 15px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

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

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

.social-media .social-title {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 10px;
}

.social-media a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background-color: rgba(255,255,255,0.1);
    color: #fff;
    border-radius: 50%;
    margin-right: 10px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.social-media a:hover {
    background-color: var(--primary-color);
    color: #fff;
    text-decoration: none;
}

.footer-bottom {
    padding-top: 20px;
}

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

.copyright p {
    margin: 0;
    color: rgba(255,255,255,0.7);
}

.copyright a {
    color: var(--primary-color);
}

.footer-menu ul {
    display: flex;
    padding: 0;
    margin: 0;
}

.footer-menu ul li {
    margin: 0 15px;
}

.footer-menu ul li a {
    color: rgba(255,255,255,0.7);
}

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

.payment-partners {
    display: flex;
    gap: 10px;
    margin-top: 10px; /* For mobile, if wraps */
}

.payment-partners img {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.payment-partners img:hover {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 992px) {
    .main-navigation .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: #fff;
        position: absolute;
        top: calc(100% + 1px); /* Below main nav */
        left: 0;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        padding: 10px 0;
    }

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

    .main-navigation .nav-menu > li {
        margin: 0;
        border-bottom: 1px solid var(--border-color);
    }

    .main-navigation .nav-menu > li:last-child {
        border-bottom: none;
    }

    .main-navigation .nav-menu > li > a {
        padding: 15px 20px;
        color: var(--dark-bg);
    }

    .main-navigation .sub-menu {
        position: static;
        box-shadow: none;
        border-top: none;
        background-color: var(--light-bg);
        padding-left: 30px;
        display: none; /* Hide by default on mobile */
    }

    .main-navigation .menu-item-has-children:hover > .sub-menu {
        display: none; /* Disable hover on mobile, rely on JS toggle */
    }

    .main-navigation .menu-item-has-children.active > .sub-menu {
        display: block;
    }

    .main-navigation .sub-menu .sub-menu {
        left: auto;
        top: auto;
        padding-left: 20px;
    }

    .menu-toggle {
        display: block;
    }

    .header-main-nav .container {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .header-actions {
        order: 3; /* Move actions below logo/toggle on smaller screens */
        width: 100%;
        justify-content: flex-end;
        padding-top: 10px;
    }

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

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

    .footer-bottom .container {
        flex-direction: column;
    }

    .copyright, .footer-menu, .payment-partners {
        margin-bottom: 15px;
    }
    .footer-menu ul {
        flex-direction: column;
        align-items: center;
    }
    .footer-menu ul li {
        margin: 5px 0;
    }
}

@media (max-width: 768px) {
    .header-top-bar .top-bar-content {
        flex-direction: column;
        text-align: center;
    }
    .header-top-bar .contact-info span {
        margin: 0 10px 5px 10px;
    }
    .header-top-bar .social-links {
        margin-top: 10px;
    }
    .header-main-nav {
        padding: 10px 0;
    }
    .navbar-brand {
        flex-grow: 1;
    }
    .header-actions {
        width: auto;
        justify-content: flex-end;
        padding-top: 0;
    }
    .footer-widgets .grid-layout {
        grid-template-columns: 1fr;
    }
    .widget {
        text-align: center;
    }
    .widget-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .contact-details p {
        justify-content: center;
    }
    .newsletter-form {
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
    .social-media {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 60px 0;
    }
    .hero-section h1 {
        font-size: 2rem;
    }
    .btn-cta {
        padding: 0.8em 1.5em;
        font-size: 1rem;
    }
    .search-form button.close-search {
        right: 5px;
        transform: translateY(-50%) scale(0.8);
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
