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

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --accent-color: #28a745;
    --text-color: #343a40;
    --bg-color: #f8f9fa;
    --light-gray: #e9ecef;
    --border-color: #dee2e6;
    --font-family-sans: 'Roboto', sans-serif;
    --font-family-serif: 'Open Sans', serif;
    --header-height: 70px;
    --max-width-container: 1200px;
}

body {
    font-family: var(--font-family-sans);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Accessibility Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    z-index: 1000;
    transition: top 0.3s;
}
.skip-link:focus {
    top: 0;
}

/* Container for Centering Content */
.container {
    max-width: var(--max-width-container);
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

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

.logo-area .site-logo img {
    height: 40px;
    width: auto;
    display: block;
}

.main-navigation .nav-list {
    list-style: none;
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
}

.nav-item .nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    padding: 10px 0;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-item.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    min-width: 180px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    padding: 10px 0;
    border-radius: 4px;
}

.nav-item.dropdown:hover .dropdown-menu,
.dropdown-menu.show { /* .show class added by JS for touch/keyboard */
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 8px 15px;
    color: var(--text-color);
    text-decoration: none;
    white-space: nowrap;
}

.dropdown-item:hover {
    background-color: var(--light-gray);
    color: var(--primary-color);
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn {
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

.btn-primary:hover {
    background-color: #0056b3; /* Darker primary */
    border-color: #0056b3;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: #545b62; /* Darker secondary */
    border-color: #545b62;
}

.btn-lg {
    padding: 12px 25px;
    font-size: 1.1em;
}

.search-toggle, .menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.search-toggle:hover, .menu-toggle:hover {
    background-color: var(--light-gray);
}

.search-toggle .search-icon {
    font-size: 1.2em;
    color: var(--text-color);
}

.search-bar-container {
    background-color: var(--light-gray);
    padding: 15px 0;
    border-top: 1px solid var(--border-color);
    display: none; /* Hidden by default, toggled by JS */
}

.search-bar-container.active {
    display: block;
}

.search-bar-container .container {
    display: flex;
    gap: 10px;
}

.search-bar-container input[type="search"] {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1em;
    outline: none;
}

.search-bar-container button {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

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

/* Hero Section */
.hero-section {
    background: linear-gradient(to right, rgba(0, 123, 255, 0.8), rgba(0, 86, 179, 0.8)), url('/assets/images/hero-bg.jpg') no-repeat center center;
    background-size: cover;
    color: white;
    text-align: center;
    padding: 100px 0;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
    z-index: 1;
    position: relative;
}

.hero-section h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.25em;
    margin-bottom: 40px;
    opacity: 0.9;
}

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

/* Footer Styles */
.site-footer {
    background-color: var(--text-color);
    color: #f8f9fa;
    padding: 50px 0 20px;
    margin-top: auto; /* Pushes footer to bottom */
}

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

.footer-col h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.2em;
}

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

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

.footer-col ul li a,
.footer-col p,
.footer-col address a {
    color: #ced4da;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover,
.footer-col address a:hover {
    color: var(--primary-color);
}

.footer-logo img {
    filter: brightness(0) invert(1); /* Makes logo white if it's dark */
    margin-bottom: 15px;
}

.company-description {
    font-size: 0.9em;
    margin-bottom: 20px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2em;
    margin-right: 15px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.1);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

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

/* Placeholder for social icons - in a real project, these would be SVG/font icons */
/* The F, T, L, I in HTML are temporary text placeholders */

.newsletter-form {
    margin-top: 25px;
}

.newsletter-form p {
    margin-bottom: 10px;
    color: #ced4da;
}

.newsletter-form input[type="email"] {
    width: calc(100% - 90px);
    padding: 10px 15px;
    border: 1px solid #495057;
    border-radius: 5px 0 0 5px;
    background-color: #495057;
    color: white;
    font-size: 1em;
    vertical-align: middle;
    outline: none;
}

.newsletter-form input[type="email"]::placeholder {
    color: #adb5bd;
}

.newsletter-form .btn-subscribe {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    vertical-align: middle;
    transition: background-color 0.3s ease;
}

.newsletter-form .btn-subscribe:hover {
    background-color: #218838; /* Darker accent */
}

.footer-bottom {
    border-top: 1px solid #495057;
    padding-top: 20px;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
}

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

.legal-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0 20px;
    justify-content: center;
}

.legal-links li a {
    color: #adb5bd;
    text-decoration: none;
}

.legal-links li a:hover {
    color: var(--primary-color);
}

/* Utility classes */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .main-navigation {
        order: 3; /* Move navigation below logo and actions on smaller screens */
        flex-basis: 100%;
        margin-top: 15px;
    }
    .nav-list {
        flex-direction: column;
        display: none; /* Hidden by default, toggled by JS */
        width: 100%;
        text-align: center;
        background-color: #f0f0f0;
        border-top: 1px solid var(--border-color);
        padding: 10px 0;
    }
    .nav-list.active {
        display: flex;
    }
    .nav-item {
        margin: 5px 0;
    }
    .nav-item .nav-link {
        padding: 10px;
        display: block;
    }
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding: 0;
        min-width: unset;
        background-color: #e0e0e0;
        transform: none;
        opacity: 1;
        visibility: visible;
        margin-top: 5px;
        border-radius: 0;
    }
    .dropdown-item {
        padding-left: 30px;
    }
    .menu-toggle {
        display: block;
        order: 2; /* Place toggle button next to actions */
        margin-left: auto;
    }
    .menu-toggle .icon-bar {
        display: block;
        width: 25px;
        height: 3px;
        background-color: var(--text-color);
        margin: 5px auto;
        transition: all 0.3s ease-in-out;
    }
    .header-actions {
        order: 2;
    }
    .logo-area {
        order: 1;
    }
    .hero-section h1 {
        font-size: 2.5em;
    }
    .hero-subtitle {
        font-size: 1.1em;
    }
    .hero-actions {
        flex-direction: column;
        gap: 15px;
    }
    .hero-actions .btn {
        width: 80%;
        max-width: 300px;
        margin: 0 auto;
    }
    .footer-bottom {
        flex-direction: column;
    }
    .legal-links {
        margin-top: 15px;
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .site-header {
        padding: 10px 0;
    }
    .header-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    .main-navigation {
        flex-basis: auto;
        margin-top: 0;
    }
    .nav-list {
        position: absolute;
        top: var(--header-height); /* Needs to be dynamic or calculated */
        left: 0;
        width: 100%;
        background-color: #fff;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        display: none;
        flex-direction: column;
        padding: 15px 0;
        z-index: 99;
    }
    .nav-list.active {
        display: flex;
    }
    .nav-item {
        text-align: left;
        padding: 0 20px;
    }
    .search-bar-container input[type="search"] {
        width: calc(100% - 70px);
    }
    .search-bar-container button {
        padding: 10px 15px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 60px 0;
        min-height: 400px;
    }
    .hero-section h1 {
        font-size: 2em;
    }
    .hero-subtitle {
        font-size: 1em;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-col {
        margin-bottom: 30px;
    }
    .footer-col ul {
        padding: 0;
    }
    .social-links {
        justify-content: center;
        display: flex;
    }
    .newsletter-form input,
    .newsletter-form .btn-subscribe {
        width: 100%;
        border-radius: 5px;
        margin-bottom: 10px;
        margin-right: 0;
    }
    .newsletter-form .btn-subscribe {
        margin-bottom: 0;
    }
}
/* 移动端内容区防溢出（系统追加，请勿删除） */
@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;
  }
}
