/* Basic Reset & Global Styles */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-color: #333;
    --heading-color: #222;
    --border-color: #dee2e6;
    --font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --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(--text-color);
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

.header-top-bar {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 8px 0;
    font-size: 0.9em;
}

.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 .social-links a {
    color: var(--light-color);
    margin-left: 15px;
    transition: color 0.3s ease;
}

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

.header-main-nav .navbar-brand {
    display: flex;
    align-items: center;
    padding: 10px 0;
}

.header-main-nav .logo-img {
    height: 40px;
    margin-right: 10px;
}

.header-main-nav .logo-text {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--heading-color);
}

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

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

.navbar-nav .dropdown-menu {
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    margin-top: 0;
}

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

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

.header-actions .btn {
    border-radius: 5px;
    padding: 8px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.header-actions .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

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

.header-actions .btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.header-actions .btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* Footer Styles */
.main-footer {
    background-color: var(--dark-color);
    color: #f0f0f0;
    padding-top: 60px;
    font-size: 0.95em;
}

.main-footer a {
    color: #f0f0f0;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

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

.footer-widget {
    margin-bottom: 30px;
}

.footer-widget .widget-title {
    color: #fff;
    font-size: 1.2em;
    margin-bottom: 25px;
    position: relative;
}

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

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

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

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

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

.footer-widget address p {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
}

.footer-widget address p i {
    margin-right: 10px;
    margin-top: 4px; /* Align icon better with text */
    color: var(--primary-color);
}

.newsletter-form .form-control {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 10px 15px;
    border-radius: 5px;
    width: 100%;
}

.newsletter-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-form .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    width: 100%;
    padding: 10px 15px;
    border-radius: 5px;
}

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

.footer-bottom-bar {
    padding: 25px 0;
    text-align: center;
}

.footer-bottom-bar .copyright-text {
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom-bar .footer-nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-bottom-bar .footer-nav-links a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom-bar .footer-nav-links a:hover {
    color: var(--primary-color);
}

.back-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: var(--primary-color);
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    border: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* Utility and Responsive Classes */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -15px;
    margin-right: -15px;
}

.col-lg-3, .col-md-6 {
    position: relative;
    width: 100%;
    padding-left: 15px;
    padding-right: 15px;
}

@media (min-width: 768px) {
    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    .text-md-start { text-align: left !important; }
    .text-md-end { text-align: right !important; }
}

@media (min-width: 992px) {
    .col-lg-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
    .ms-lg-3 { margin-left: 1rem !important; }
    .navbar-nav.ms-auto { margin-left: auto !important; }
    .navbar-expand-lg .navbar-collapse { display: flex !important; flex-basis: auto; }
    .navbar-toggler { display: none; }
    .footer-bottom-bar .footer-nav-links { justify-content: flex-end; }
}

@media (max-width: 991.98px) {
    .header-main-nav .navbar-nav {
        width: 100%;
        text-align: center;
        padding-top: 15px;
    }
    .header-main-nav .navbar-nav .nav-item {
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
    .header-main-nav .navbar-nav .nav-item:last-child {
        border-bottom: none;
    }
    .header-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }
    .header-actions .btn {
        width: 100%;
    }
    .header-top-bar .top-bar-content {
        flex-direction: column;
        gap: 10px;
    }
    .footer-bottom-bar .footer-nav-links {
        flex-direction: column;
        gap: 5px;
        margin-top: 15px;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
