/* Global Styles */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --white-color: #ffffff;
    --font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    --font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

body {
    font-family: var(--font-family-sans-serif);
    line-height: 1.6;
    color: var(--dark-color);
    margin: 0;
    padding: 0;
    background-color: var(--light-color);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

/* Header Styles */
.main-header .header-top-bar {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 10px 0;
    font-size: 0.9em;
}

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

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

.main-header .header-top-bar .social-links a {
    color: var(--light-color);
    margin-left: 10px;
    transition: color 0.3s ease;
}

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

.navbar {
    background-color: var(--white-color) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,.08);
}

.navbar-brand .logo-img {
    height: 40px;
    margin-right: 10px;
}

.navbar-nav .nav-item .nav-link {
    color: var(--dark-color);
    font-weight: 500;
    padding: 15px 20px;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.navbar-nav .nav-item .nav-link:hover,
.navbar-nav .nav-item .nav-link.active {
    color: var(--primary-color);
    background-color: rgba(0, 123, 255, 0.05);
}

.navbar-nav .dropdown-menu {
    border: none;
    box-shadow: 0 4px 8px rgba(0,0,0,.1);
    animation-duration: .3s;
    animation-fill-mode: both;
    animation-name: fadein;
}

.navbar-nav .dropdown-item {
    padding: 10px 20px;
    color: var(--dark-color);
    transition: background-color 0.3s ease;
}

.navbar-nav .dropdown-item:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
}

/* Submenu styles */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -6px;
    margin-left: -1px;
    border-radius: 0.25rem;
    display: none; /* Hidden by default */
}

.dropdown-submenu:hover > .dropdown-menu {
    display: block; /* Show on hover */
}

.dropdown-submenu > a:after {
    display: block;
    content: " ";
    float: right;
    width: 0;
    height: 0;
    border-color: transparent;
    border-style: solid;
    border-width: 5px 0 5px 5px;
    border-left-color: #ccc;
    margin-top: 5px;
    margin-right: -10px;
}

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

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

/* Footer Styles */
.main-footer {
    background-color: var(--dark-color) !important;
    color: var(--light-color);
}

.main-footer h5 {
    color: var(--primary-color);
}

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

.main-footer a:hover {
    color: var(--primary-color) !important;
    text-decoration: underline !important;
}

.main-footer .social-links a {
    color: var(--light-color);
    font-size: 1.2em;
    margin-right: 15px;
    transition: color 0.3s ease;
}

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

.main-footer .newsletter-signup .form-control {
    border-radius: 0;
}

.main-footer .newsletter-signup .btn {
    border-radius: 0;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.main-footer .newsletter-signup .btn:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .main-header .header-top-bar .top-bar-content {
        flex-direction: column;
        text-align: center;
    }
    .main-header .header-top-bar .contact-info span {
        display: block;
        margin-bottom: 5px;
    }
    .navbar-nav {
        text-align: center;
    }
    .navbar-nav .nav-item .nav-link {
        padding: 10px 15px;
    }
    .navbar-nav .dropdown-menu {
        text-align: left;
    }
    .dropdown-submenu > .dropdown-menu {
        position: static;
        left: auto;
        margin-left: 0;
        border-top: 1px solid rgba(0,0,0,.1);
        padding-left: 20px;
    }
    .dropdown-submenu > a:after {
        float: none;
        display: inline-block;
        margin-left: 5px;
        margin-right: 0;
        transform: rotate(90deg);
    }
    .navbar-toggler {
        margin-left: auto;
    }
    .navbar-nav .search-item, .navbar-nav .user-auth {
        margin-top: 10px;
        margin-bottom: 10px;
    }
    .navbar-nav .user-auth .btn {
        width: 100%;
    }
}

@keyframes fadein {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Utility Classes for spacing, etc. */
.mb-4 { margin-bottom: 1.5rem !important; }
.pt-5 { padding-top: 3rem !important; }
.pb-4 { padding-bottom: 1.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.me-3 { margin-right: 1rem !important; }
.ms-auto { margin-left: auto !important; }
.ms-lg-3 { margin-left: 1rem !important; }
.text-white { color: var(--white-color) !important; }
.text-decoration-none { text-decoration: none !important; }
.text-uppercase { text-transform: uppercase !important; }
.font-weight-bold { font-weight: 700 !important; }
.bg-dark { background-color: var(--dark-color) !important; }
.bg-light { background-color: var(--light-color) !important; }
.btn-primary { background-color: var(--primary-color); border-color: var(--primary-color); color: var(--white-color); }
.btn-outline-success { color: #28a745; border-color: #28a745; }
.btn-outline-success:hover { background-color: #28a745; color: var(--white-color); }
.d-flex { display: flex !important; }
.form-control { display: block; width: 100%; padding: 0.375rem 0.75rem; font-size: 1rem; line-height: 1.5; color: #495057; background-color: var(--white-color); background-clip: padding-box; border: 1px solid #ced4da; border-radius: 0.25rem; transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; }
.input-group { position: relative; display: flex; flex-wrap: wrap; align-items: stretch; width: 100%; }
.input-group > .form-control { position: relative; flex: 1 1 auto; width: 1%; min-width: 0; margin-bottom: 0; }
.input-group .btn { position: relative; z-index: 2; }
.img-fluid { max-width: 100%; height: auto; }
.list-unstyled { padding-left: 0; list-style: none; }
.row { display: flex; flex-wrap: wrap; margin-right: -15px; margin-left: -15px; }
.col-md-4, .col-md-2, .col-md-3, .col-md-7, .col-md-5, .col-lg-8, .col-lg-4, .col-sm-12, .col-sm-6 { position: relative; width: 100%; padding-right: 15px; padding-left: 15px; }
@media (min-width: 576px) { .col-sm-6 { flex: 0 0 50%; max-width: 50%; } .col-sm-12 { flex: 0 0 100%; max-width: 100%; } }
@media (min-width: 768px) { .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; } .col-md-2 { flex: 0 0 16.666667%; max-width: 16.666667%; } .col-md-3 { flex: 0 0 25%; max-width: 25%; } .col-md-7 { flex: 0 0 58.333333%; max-width: 58.333333%; } .col-md-5 { flex: 0 0 41.666667%; max-width: 41.666667%; } .text-md-start { text-align: left !important; } .text-md-end { text-align: right !important; } }
@media (min-width: 992px) { .col-lg-8 { flex: 0 0 66.666667%; max-width: 66.666667%; } .col-lg-4 { flex: 0 0 33.333333%; max-width: 33.333333%; } .ms-lg-3 { margin-left: 1rem !important; } }
.text-center { text-align: center !important; }
.align-items-center { align-items: center !important; }
.justify-content-between { justify-content: space-between !important; }
.collapse:not(.show) { display: none; }
.navbar-toggler { padding: 0.25rem 0.75rem; font-size: 1.25rem; line-height: 1; background-color: transparent; border: 1px solid transparent; border-radius: 0.25rem; }
.navbar-toggler-icon { display: inline-block; width: 1.5em; height: 1.5em; vertical-align: middle; content: ""; background: no-repeat center center; background-size: 100% 100%; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); }
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
