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

:root {
    --primary-color: #007bff; /* Blue */
    --secondary-color: #6c757d; /* Gray */
    --accent-color: #28a745; /* Green */
    --light-bg: #f8f9fa; /* Light Gray Background */
    --dark-bg: #343a40; /* Dark Gray Background */
    --dark-text: #212529; /* Dark Text */
    --light-text: #ffffff; /* White Text */
    --border-color: #dee2e6; /* Light Border */
    --font-family-sans: 'Roboto', 'Arial', sans-serif;
    --font-family-serif: 'Georgia', serif;
    --header-height: 80px;
    --topbar-height: 40px;
    --transition-speed: 0.3s;
}

body {
    font-family: var(--font-family-sans);
    line-height: 1.6;
    color: var(--dark-text);
    background-color: var(--light-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

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

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

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-sans);
    margin-bottom: 0.5em;
    color: var(--dark-text);
    font-weight: 700;
}

p {
    margin-bottom: 1em;
}

ul {
    list-style: none;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    border: 1px solid transparent;
    font-size: 1em;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--light-text);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.btn-hero {
    background-color: var(--accent-color);
    color: var(--light-text);
    border-color: var(--accent-color);
    padding: 12px 25px;
    font-size: 1.1em;
}

.btn-hero:hover {
    background-color: #218838;
    border-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.btn-hero-secondary {
    background-color: transparent;
    color: var(--light-text);
    border-color: var(--light-text);
    padding: 12px 25px;
    font-size: 1.1em;
    margin-left: 15px;
}

.btn-hero-secondary:hover {
    background-color: var(--light-text);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.3);
}

/* Header Styles */
.main-header {
    background-color: var(--light-text);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: relative;
    z-index: 1000;
}

.header-topbar {
    background-color: var(--dark-bg);
    color: var(--light-text);
    padding: 10px 0;
    font-size: 0.85em;
}

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

.welcome-message {
    font-weight: 300;
}

.topbar-links a {
    color: var(--light-text);
    margin-left: 25px;
    opacity: 0.8;
}

.topbar-links a:hover {
    color: var(--primary-color);
    opacity: 1;
    text-decoration: none;
}

.navbar {
    padding: 15px 0;
    min-height: var(--header-height);
    display: flex;
    align-items: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.brand-logo {
    display: flex;
    align-items: center;
    font-size: 1.9em;
    font-weight: bold;
    color: var(--dark-text);
    text-decoration: none;
}

.brand-logo:hover {
    text-decoration: none;
    color: var(--primary-color);
}

.logo-img {
    height: 45px;
    margin-right: 12px;
}

.navbar-toggler {
    display: none; /* Hidden by default, shown on smaller screens */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    z-index: 1001;
}

.icon-bar {
    display: block;
    width: 28px;
    height: 3px;
    background-color: var(--dark-text);
    margin: 6px 0;
    transition: all var(--transition-speed) ease;
}

.navbar-toggler[aria-expanded="true"] .icon-bar:nth-child(1) {
    transform: rotate(-45deg) translate(-6px, 6px);
}
.navbar-toggler[aria-expanded="true"] .icon-bar:nth-child(2) {
    opacity: 0;
}
.navbar-toggler[aria-expanded="true"] .icon-bar:nth-child(3) {
    transform: rotate(45deg) translate(-6px, -6px);
}

.navbar-collapse {
    display: flex;
    align-items: center;
    flex-grow: 1;
    justify-content: flex-end;
}

.nav-links {
    display: flex;
    margin-right: 30px;
}

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

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

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

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    transition: width var(--transition-speed) ease;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.dropdown-toggle i {
    margin-left: 5px;
    font-size: 0.8em;
    transition: transform var(--transition-speed) ease;
}

.nav-item.dropdown:hover .dropdown-toggle i {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    background-color: var(--light-text);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    min-width: 220px;
    z-index: 1;
    border-radius: 8px;
    padding: 12px 0;
    margin-top: 15px;
    list-style: none;
    border: 1px solid var(--border-color);
}

.nav-item.dropdown:hover .dropdown-menu {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
    color: var(--dark-text);
    padding: 12px 25px;
    display: block;
    white-space: nowrap;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

.dropdown-item:hover {
    background-color: var(--light-bg);
    color: var(--primary-color);
    text-decoration: none;
}

.dropdown-divider {
    height: 1px;
    margin: 10px 0;
    overflow: hidden;
    background-color: var(--border-color);
}

.search-bar {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    overflow: hidden;
    background-color: var(--light-bg);
}

.search-bar input {
    border: none;
    padding: 10px 18px;
    outline: none;
    font-size: 0.95em;
    width: 200px;
    background-color: transparent;
}

.search-bar button {
    background-color: var(--primary-color);
    color: var(--light-text);
    border: none;
    padding: 10px 18px;
    cursor: pointer;
    transition: background-color var(--transition-speed) ease;
}

.search-bar button:hover {
    background-color: #0056b3;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('/assets/images/hero-bg.jpg') no-repeat center center/cover;
    color: var(--light-text);
    text-align: center;
    padding: 120px 0;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 70%);
    pointer-events: none;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    color: var(--light-text);
    font-size: 3.8em;
    margin-bottom: 25px;
    line-height: 1.2;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.hero-section p {
    font-size: 1.4em;
    max-width: 850px;
    margin: 0 auto 45px auto;
    font-weight: 300;
    line-height: 1.5;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

/* Footer Styles */
.main-footer {
    background-color: var(--dark-bg);
    color: #cccccc;
    padding: 70px 0 40px 0;
    font-size: 0.9em;
    position: relative;
}

.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
}

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

.footer-col h3 {
    color: var(--light-text);
    margin-bottom: 25px;
    font-size: 1.3em;
    font-weight: 600;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.footer-col p {
    margin-bottom: 12px;
    line-height: 1.7;
}

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

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

.footer-col ul li a {
    color: #b0b0b0;
    transition: color var(--transition-speed) ease;
    display: inline-block; /* For better padding/margin */
}

.footer-col ul li a:hover {
    color: var(--primary-color);
    text-decoration: underline;
    transform: translateX(5px);
}

.social-links {
    margin-top: 25px;
    display: flex;
    gap: 15px;
}

.social-links a {
    color: var(--light-text);
    font-size: 1.6em;
    transition: color var(--transition-speed) ease, transform var(--transition-speed) ease;
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.contact-info p i {
    margin-right: 12px;
    color: var(--primary-color);
    font-size: 1.1em;
}

.newsletter-signup {
    margin-top: 30px;
}

.newsletter-signup h4 {
    color: var(--light-text);
    margin-bottom: 15px;
    font-size: 1.1em;
}

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

.newsletter-form input {
    flex-grow: 1;
    padding: 12px 18px;
    border: none;
    border-radius: 5px 0 0 5px;
    outline: none;
    font-size: 0.95em;
    background-color: rgba(255,255,255,0.9);
}

.newsletter-form .btn-subscribe {
    background-color: var(--primary-color);
    color: var(--light-text);
    border: none;
    padding: 12px 22px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color var(--transition-speed) ease;
}

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

.newsletter-disclaimer {
    font-size: 0.8em;
    margin-top: 15px;
    color: #999999;
}

.footer-bottom {
    border-top: 1px solid #444444;
    padding-top: 35px;
    margin-top: 40px;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-bottom p {
    margin: 0;
    color: #999999;
    font-size: 0.85em;
}

.footer-bottom .separator {
    margin: 0 10px;
    color: #666;
}

.payment-methods {
    display: flex;
    gap: 10px;
    margin-top: 10px; /* For smaller screens */
}

.payment-methods img {
    height: 28px;
    opacity: 0.7;
    transition: opacity var(--transition-speed) ease;
}
.payment-methods img:hover {
    opacity: 1;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: calc(var(--header-height) + var(--topbar-height) - 1px); /* Adjust based on header height */
        left: 0;
        background-color: var(--light-text);
        box-shadow: 0 8px 16px rgba(0,0,0,0.1);
        padding: 20px 0;
        border-top: 1px solid var(--border-color);
    }

    .navbar-collapse.show .nav-links {
        display: flex;
    }

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

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

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

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border-radius: 0;
        margin-top: 0;
        padding: 0;
        border: none;
    }

    .dropdown-item {
        padding-left: 50px; /* Indent dropdown items */
    }

    .navbar-toggler {
        display: block;
    }

    .navbar-collapse {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        position: absolute; /* To allow nav-links to be full width */
        top: calc(var(--header-height) + var(--topbar-height) - 1px);
        left: 0;
        background-color: var(--light-text); /* Ensure background is consistent */
        padding-top: 0;
        padding-bottom: 20px;
        box-shadow: 0 8px 16px rgba(0,0,0,0.1);
        display: none; /* Hidden by default for mobile */
    }

    .navbar-collapse.show {
        display: flex;
    }

    .search-bar {
        margin-top: 25px;
        width: calc(100% - 40px); /* Adjust for container padding */
        margin-left: 20px;
        margin-right: 20px;
    }

    .search-bar input {
        width: 100%;
    }

    .hero-section {
        padding: 80px 0;
        min-height: 400px;
    }
    .hero-section h1 {
        font-size: 2.8em;
    }
    .hero-section p {
        font-size: 1.2em;
    }
    .hero-actions {
        flex-direction: column;
        gap: 15px;
    }
    .btn-hero, .btn-hero-secondary {
        width: 80%;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
    }

    .footer-bottom p {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .header-topbar {
        padding: 8px 0;
    }
    .topbar-content {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    .topbar-links {
        margin-top: 5px;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    .topbar-links a {
        margin: 0;
    }

    .brand-logo {
        font-size: 1.6em;
    }
    .logo-img {
        height: 35px;
    }

    .hero-section h1 {
        font-size: 2.2em;
    }
    .hero-section p {
        font-size: 1em;
        margin-bottom: 30px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-col h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .footer-col ul {
        padding: 0;
    }
    .footer-col ul li a:hover {
        transform: none;
    }
    .social-links {
        justify-content: center;
        gap: 20px;
    }
    .newsletter-form {
        max-width: 350px;
        margin-left: auto;
        margin-right: auto;
    }
    .payment-methods {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    .hero-section {
        padding: 60px 0;
    }
    .hero-section h1 {
        font-size: 1.8em;
    }
    .hero-actions {
        gap: 10px;
    }
    .btn-hero, .btn-hero-secondary {
        font-size: 1em;
        padding: 10px 20px;
        width: 90%;
    }
    .footer-bottom p {
        font-size: 0.8em;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
