/* Basic Reset & Body Styling */
body {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

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

/* Header Styling */
.site-header {
    background-color: #fff;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.header-top-bar {
    background-color: #333;
    color: #fff;
    padding: 10px 0;
    font-size: 0.9em;
}

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

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

.social-links a {
    color: #fff;
    margin-left: 15px;
    text-decoration: none;
}

.header-main-nav {
    padding: 15px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.navbar-brand .site-title {
    font-size: 1.8em;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation ul li {
    display: inline-block;
    position: relative;
}

.main-navigation ul li a {
    display: block;
    padding: 10px 15px;
    color: #555;
    text-decoration: none;
    font-weight: bold;
}

.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item > a {
    color: #007bff;
}

.main-navigation ul ul {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    border: 1px solid #eee;
    min-width: 200px;
    z-index: 999;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: none; /* Hidden by default */
}

.main-navigation ul li:hover > ul {
    display: block; /* Show on hover */
}

.main-navigation ul ul li {
    display: block;
}

.main-navigation ul ul li a {
    padding: 10px 20px;
    white-space: nowrap;
}

.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
}

.search-toggle {
    background: none;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    margin-right: 15px;
    color: #555;
}

.btn-primary {
    background-color: #007bff;
    color: #fff;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
}

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.search-overlay.active {
    visibility: visible;
    opacity: 1;
}

.search-form {
    position: relative;
    width: 80%;
    max-width: 600px;
}

.search-form input[type="search"] {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1.2em;
}

.search-form button {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 15px;
    font-size: 1.2em;
    color: #555;
}

.search-form .close-search {
    right: -40px; /* Position outside for better visibility */
    color: #fff;
}

/* Footer Styling */
.site-footer {
    background-color: #222;
    color: #ccc;
    padding-top: 50px;
    font-size: 0.9em;
}

.footer-widgets {
    padding-bottom: 30px;
}

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

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

.footer-widget .widget-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: #007bff;
    margin-top: 10px;
}

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

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

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

.footer-widget ul li a {
    color: #ccc;
    text-decoration: none;
}

.footer-widget ul li a:hover {
    color: #007bff;
}

.footer-widget .social-icons a {
    color: #ccc;
    font-size: 1.3em;
    margin-right: 15px;
    text-decoration: none;
}

.footer-widget .social-icons a:hover {
    color: #007bff;
}

address p {
    margin-bottom: 8px;
}

address p i {
    margin-right: 10px;
    color: #007bff;
}

address a {
    color: #ccc;
    text-decoration: none;
}

address a:hover {
    color: #007bff;
}

.footer-bottom {
    background-color: #1a1a1a;
    padding: 20px 0;
    border-top: 1px solid #333;
    text-align: center;
}

.footer-bottom .copyright {
    margin-bottom: 10px;
    color: #aaa;
}

.footer-bottom .footer-menu a {
    color: #aaa;
    text-decoration: none;
    margin: 0 10px;
}

.footer-bottom .footer-menu a:hover {
    color: #007bff;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .main-navigation ul {
        display: none; /* Hide desktop menu */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #fff;
        border-top: 1px solid #eee;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }

    .main-navigation ul.active {
        display: block; /* Show mobile menu */
    }

    .main-navigation ul li {
        display: block;
        border-bottom: 1px solid #eee;
    }

    .main-navigation ul li:last-child {
        border-bottom: none;
    }

    .main-navigation ul ul {
        position: static; /* Submenu becomes static */
        box-shadow: none;
        border: none;
        padding-left: 20px;
        background-color: #f8f8f8;
    }

    .menu-toggle {
        display: block; /* Show toggle button */
    }
    
    .header-actions {
        display: flex;
        align-items: center;
    }
    
    .header-top-bar .top-bar-content {
        flex-direction: column;
        text-align: center;
    }
    
    .header-top-bar .contact-info span {
        display: block;
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    .header-top-bar .social-links {
        margin-top: 10px;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr; /* Stack footer widgets */
    }
}

/* Screen reader text for accessibility */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    word-wrap: normal !important;
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
