/* General Body Styling */
body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa; /* Light background for the whole page */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container for overall layout */
.container-fluid {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

/* Header Styling */
.main-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,.05);
}

.header-top-bar {
    background-color: #f2f2f2;
    padding: 8px 0;
    font-size: 0.85em;
    color: #666;
}

.header-top-bar .welcome-message {
    margin-bottom: 0;
    color: #555;
    padding-right: 15px;
}

.header-top-bar .header-links .list-inline-item a {
    color: #666;
    text-decoration: none;
    padding: 0 10px;
    border-right: 1px solid #ccc;
    transition: color 0.2s ease-in-out;
}

.header-top-bar .header-links .list-inline-item:last-child a {
    border-right: none;
}

.header-top-bar .header-links .list-inline-item a:hover {
    color: #007bff;
}

.navbar-brand .logo-img {
    height: 40px; /* Adjust as needed */
    width: auto;
    margin-right: 10px;
    vertical-align: middle;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: #333 !important;
    padding-right: 1rem !important;
    padding-left: 1rem !important;
    transition: color 0.3s ease-in-out, background-color 0.3s ease-in-out;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-item.active .nav-link {
    color: #007bff !important;
    background-color: rgba(0, 123, 255, 0.05);
    border-radius: 4px;
}

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.75rem;
    font-size: 1.25rem;
    line-height: 1;
    background-color: transparent;
    border-radius: 0.25rem;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='rgba%280, 0, 0, 0.5%29' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.search-form .form-control {
    border-radius: 0.25rem;
    border-color: #ced4da;
    padding: 0.375rem 0.75rem;
}

.search-form .btn {
    border-radius: 0.25rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.9em;
}

.auth-links .btn {
    font-size: 0.9em;
    padding: 0.4em 1em;
    border-radius: 0.25rem;
    margin-left: 5px;
}

.auth-links .btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
}

.auth-links .btn-outline-secondary:hover {
    background-color: #6c757d;
    color: #fff;
}

.promo-banner {
    background-color: #e9ecef;
    padding: 10px 0;
    font-size: 0.95em;
    color: #495057;
    text-align: center;
    border-bottom: 1px solid #dee2e6;
}

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

.promo-banner a:hover {
    text-decoration: underline;
}

.dropdown-menu {
    border: 1px solid rgba(0,0,0,.15);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.175);
    border-radius: 0.25rem;
}

.dropdown-item {
    color: #333;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.dropdown-item:hover {
    background-color: #e9ecef;
    color: #007bff;
}

/* Footer Styling */
.main-footer {
    background-color: #343a40 !important; /* Dark background */
    color: #f8f9fa !important; /* Light text */
    padding-top: 3rem;
    padding-bottom: 2rem;
    font-size: 0.9em;
}

.main-footer .footer-heading {
    color: #ffffff;
    font-size: 1.1em;
    margin-bottom: 1.5rem;
    position: relative;
    font-weight: 600;
}

.main-footer .footer-heading::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background-color: #007bff;
    margin-top: 8px;
}

.main-footer .footer-text {
    color: #ced4da;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.main-footer .footer-links,
.main-footer .latest-posts,
.main-footer .company-info {
    list-style: none;
    padding: 0;
}

.main-footer .footer-links li,
.main-footer .latest-posts li,
.main-footer .company-info li {
    margin-bottom: 8px;
}

.main-footer .footer-links a,
.main-footer .latest-posts a {
    color: #ced4da;
    text-decoration: none;
    transition: color 0.3s ease-in-out;
}

.main-footer .footer-links a:hover,
.main-footer .latest-posts a:hover {
    color: #007bff;
    text-decoration: underline;
}

.main-footer .company-info li i {
    margin-right: 10px;
    color: #007bff;
    width: 20px;
    text-align: center;
}

.main-footer .social-icons .list-inline-item a {
    color: #ced4da;
    font-size: 1.3em;
    margin-right: 10px;
    transition: color 0.3s ease-in-out;
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    border: 1px solid #ced4da;
}

.main-footer .social-icons .list-inline-item a:hover {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.main-footer .newsletter-signup .form-control {
    background-color: #495057;
    border-color: #495057;
    color: #f8f9fa;
    border-radius: 0.25rem;
}

.main-footer .newsletter-signup .form-control::placeholder {
    color: #adb5bd;
    opacity: 0.7;
}

.main-footer .newsletter-signup .btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    border-radius: 0.25rem;
}

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

.main-footer .copyright-text {
    color: #adb5bd;
    font-size: 0.8em;
    margin-top: 1.5rem;
    line-height: 1.7;
}

.main-footer .form-text {
    font-size: 0.75em;
    color: #99a3ac !important;
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: #ffffff;
        border-top: 1px solid #e0e0e0;
        padding: 10px 0;
        margin-top: 10px;
    }
    .navbar-nav .nav-item {
        margin-bottom: 5px;
    }
    .navbar-nav .nav-link {
        padding-left: 15px !important;
    }
    .search-form {
        margin-top: 15px;
        margin-bottom: 15px;
        justify-content: center;
        width: 100%;
    }
    .search-form .form-control {
        width: calc(100% - 80px); /* Adjust width for button */
    }
    .auth-links {
        flex-direction: row;
        justify-content: center;
        width: 100%;
        margin-top: 10px;
    }
    .auth-links .nav-item {
        margin: 0 5px;
    }
    .header-top-bar .text-md-left,
    .header-top-bar .text-md-right {
        text-align: center !important;
    }
    .header-top-bar .header-links {
        margin-top: 10px;
    }
    .header-top-bar .welcome-message {
        padding-right: 0;
    }
}

@media (max-width: 767.98px) {
    .main-footer .col-md-6 {
        text-align: center;
    }
    .main-footer .footer-heading::after {
        margin-left: auto;
        margin-right: auto;
    }
    .main-footer .company-info,
    .main-footer .footer-links,
    .main-footer .latest-posts,
    .main-footer .social-icons {
        text-align: center;
        padding-left: 0;
    }
    .main-footer .company-info li i {
        margin-right: 5px;
    }
    .main-footer .social-icons .list-inline-item a {
        margin: 0 5px;
    }
    .main-footer .newsletter-signup {
        margin-top: 20px;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
