/*
Theme Name: Major Solution
Theme URI: https://majorsolution.com
Author: Major Solution Team
Author URI: https://majorsolution.com
Description: Professional WordPress theme for foreign trade and B2B business with multi-language support. Features custom post types for Products, Solutions, and Cases with flexible layout options.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: major-solution
Tags: custom-logo, translation-ready, e-commerce, featured-images, post-formats, theme-options
*/

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0066cc;
    --secondary-color: #004d99;
    --accent-color: #ff6600;
    --text-color: #333;
    --light-text: #666;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-white);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 20px 0;
}

/* Header */
header {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    height: 80px;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.site-logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
}

.site-logo img {
    height: 50px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-nav a {
    color: var(--text-color);
    font-weight: 500;
    padding: 10px 0;
    position: relative;
    display: block;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-color);
    cursor: pointer;
    padding: 10px;
}

.mobile-menu-toggle:hover {
    color: var(--primary-color);
}

/* 确保在桌面端汉堡按钮完全隐藏 */
@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none !important;
    }
}

/* Mobile Nav */
.main-nav.active {
    display: block;
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background: var(--bg-white);
    box-shadow: var(--shadow);
    padding: 20px;
}

.main-nav.active ul {
    flex-direction: column;
    gap: 0;
}

.main-nav.active ul li {
    border-bottom: 1px solid var(--border-color);
}

.main-nav.active ul li:last-child {
    border-bottom: none;
}

.main-nav.active a {
    padding: 15px 0;
    display: block;
}

.main-nav a:hover {
    color: var(--primary-color);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.main-nav a:hover::after {
    width: 100%;
}

.language-switcher {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lang-btn {
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-white);
    cursor: pointer;
    transition: var(--transition);
}

.lang-btn:hover {
    background: var(--primary-color);
    color: var(--bg-white);
    border-color: var(--primary-color);
}

/* Hero Banner */
.hero-banner {
    margin-top: 0;
    height: 600px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 1;
    color: var(--bg-white);
    max-width: 700px;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary-color);
    color: var(--bg-white);
    border-radius: 5px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--secondary-color);
    color: var(--bg-white);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--bg-white);
    margin-left: 15px;
}

.btn-outline:hover {
    background: var(--bg-white);
    color: var(--primary-color);
}

/* Sections */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.section-subtitle {
    text-align: center;
    color: var(--light-text);
    margin-bottom: 50px;
    font-size: 1.1rem;
}

.bg-light {
    background: var(--bg-light);
}

/* Business Services */
.business-section .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--bg-white);
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.service-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.service-desc {
    color: var(--light-text);
    line-height: 1.7;
}

/* Advantages */
.advantages-section .advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.advantage-item {
    text-align: center;
}

.advantage-number {
    font-size: 4rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
    line-height: 1;
}

.advantage-label {
    font-size: 1.1rem;
    color: var(--light-text);
}

/* About Company */
.about-section .about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-image img {
    border-radius: 8px;
    box-shadow: var(--shadow);
}

/* Cases/Portfolio */
.cases-section .cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.case-card {
    background: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.case-image {
    height: 250px;
    background-size: cover;
    background-position: center;
}

.case-content {
    padding: 25px;
}

.case-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.case-desc {
    color: var(--light-text);
    margin-bottom: 15px;
}

.case-link {
    color: var(--primary-color);
    font-weight: 500;
}

/* Blog Section */
.blog-section .blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.blog-card {
    background: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.blog-image {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.blog-content {
    padding: 25px;
}

.blog-meta {
    font-size: 0.9rem;
    color: var(--light-text);
    margin-bottom: 10px;
}

.blog-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.blog-excerpt {
    color: var(--light-text);
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Footer */
footer {
    background: #1a1a1a;
    color: #fff;
    padding: 60px 0 30px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.footer-contact h3,
.footer-form h3 {
    font-size: 1.5rem;
    margin-bottom: 25px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.contact-item .icon {
    margin-right: 15px;
    font-size: 1.2rem;
}

.footer-form h3 {
    font-size: 1.5rem;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255,255,255,0.5);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 50px;
    padding-top: 25px;
    text-align: center;
    color: rgba(255,255,255,0.6);
}

/* Alert Messages */
.alert {
    padding: 15px;
    margin-top: 20px;
    border-radius: 4px;
    text-align: center;
}

.alert.success {
    background: #28a745;
    color: #fff;
}

.alert.error {
    background: #dc3545;
    color: #fff;
}

/* Header Scroll Effect */
.site-header.scrolled {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    background: rgba(255,255,255,0.98);
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .main-nav {
        display: none;
    }

    .main-nav.active {
        display: block;
    }

    .header-inner {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .main-nav {
        order: 3;
        width: 100%;
        margin-top: 15px;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 10px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .product-detail-content,
    .solution-detail-content,
    .case-detail-content {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }

    section {
        padding: 60px 0;
    }

    .blog-post-content {
        padding: 20px;
    }

    .entry-title {
        font-size: 2rem;
    }

    .product-detail-content,
    .solution-detail-content,
    .case-detail-content {
        gap: 30px;
    }
}

/* Breadcrumb */
.breadcrumb {
    /* background: var(--bg-light); */
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb-inner {
    padding: 90px 20px 10px;
    max-width: 1200px;
    margin: 0 auto;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.breadcrumb .separator {
    color: var(--light-text);
    margin: 0 8px;
}

.category-description {
    background: var(--bg-light);
    padding: 20px 30px;
    border-radius: 8px;
    margin-bottom: 40px;
    line-height: 1.8;
    color: var(--light-text);
}

/* Product Page */
.product-page {
    margin-top: 0;
}

/* Solution Detail */
.solution-detail {
    margin-top: 0;
}

.solution-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
    align-items: start;
}

.solution-header {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.solution-header img {
    width: 100%;
    height: auto;
    display: block;
}

.solution-info {
    padding: 0;
}

.solution-info h1 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: var(--text-color);
}

.solution-description {
    margin-bottom: 30px;
    line-height: 1.8;
    color: var(--light-text);
    font-size: 1.1rem;
}

.solution-features {
    margin-top: 40px;
    padding: 30px;
    background: var(--bg-light);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.solution-features h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

.solution-features p {
    line-height: 1.8;
    color: var(--light-text);
}

.related-cases {
    margin-top: 80px;
    padding-top: 60px;
    border-top: 2px solid var(--border-color);
}

.related-cases h2 {
    font-size: 2.2rem;
    margin-bottom: 40px;
    text-align: center;
    color: var(--text-color);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.product-card {
    background: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card-image {
    height: 250px;
    background-size: cover;
    background-position: center;
}

.product-card-content {
    padding: 25px;
}

.product-card-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.product-card-desc {
    color: var(--light-text);
    margin-bottom: 15px;
}

/* Product Detail */
.product-detail {
    margin-top: 0;
}

/* Case Detail */
.case-detail {
    margin-top: 0;
}

.product-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.product-gallery img {
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.product-info h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.product-info .price {
    font-size: 1.8rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    font-weight: bold;
}

.product-features {
    margin-top: 40px;
}

/* Solution Page */
.solution-page {
    margin-top: 0;
}

.solution-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.solution-card {
    background: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.solution-card:hover {
    transform: translateY(-5px);
}

.solution-card-image {
    height: 250px;
    background-size: cover;
    background-position: center;
}

.solution-card-content {
    padding: 30px;
}

/* Blog Page */
.blog-page {
    margin-top: 0;
}

.blog-page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.blog-pagination {
    text-align: center;
    margin-top: 50px;
}

.blog-pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.blog-pagination a,
.blog-pagination span {
    display: inline-block;
    padding: 12px 20px;
    margin: 0 5px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-white);
    color: var(--text-color);
    transition: var(--transition);
}

.blog-pagination a:hover,
.blog-pagination span.current {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.blog-pagination .nav-next,
.blog-pagination .nav-prev {
    padding: 12px 25px;
}

/* Blog Detail */
.blog-detail {
    margin-top: 0;
}

.blog-post-content {
    max-width: 800px;
    margin: 0 auto 60px;
    padding: 40px;
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.entry-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--text-color);
    line-height: 1.3;
}

.entry-meta {
    padding: 15px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: var(--light-text);
    font-size: 0.95rem;
}

.entry-meta .meta-icon {
    margin-right: 5px;
}

.entry-meta a {
    color: var(--primary-color);
    text-decoration: none;
}

.entry-meta a:hover {
    text-decoration: underline;
}

.entry-meta .posted-on,
.entry-meta .cat-links,
.entry-meta .tag-links {
    display: flex;
    align-items: center;
}

.blog-featured-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 30px 0;
    box-shadow: var(--shadow);
}

.entry-content {
    line-height: 1.9;
    color: var(--text-color);
    font-size: 1.1rem;
}

.entry-content h2 {
    font-size: 1.8rem;
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--text-color);
}

.entry-content h3 {
    font-size: 1.5rem;
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--text-color);
}

.entry-content p {
    margin-bottom: 20px;
}

.entry-content ul,
.entry-content ol {
    margin: 20px 0;
    padding-left: 30px;
    line-height: 1.8;
}

.entry-content ul {
    list-style-type: disc;
}

.entry-content ol {
    list-style-type: decimal;
}

.entry-content li {
    margin-bottom: 10px;
}

.entry-content blockquote {
    margin: 30px 0;
    padding: 20px 30px;
    background: var(--bg-light);
    border-left: 4px solid var(--primary-color);
    font-style: italic;
    color: var(--light-text);
}

.entry-content a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px dashed var(--primary-color);
}

.entry-content a:hover {
    border-bottom-style: solid;
}

.entry-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.entry-footer .tag-links {
    color: var(--light-text);
    font-size: 0.95rem;
}

.entry-footer .tag-links a {
    display: inline-block;
    padding: 5px 15px;
    margin: 5px 5px 5px 0;
    background: var(--bg-light);
    border-radius: 4px;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-bottom: none;
}

.entry-footer .tag-links a:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.related-posts {
    margin-top: 80px;
    padding-top: 60px;
    border-top: 2px solid var(--border-color);
}

.related-posts h2 {
    font-size: 2.2rem;
    margin-bottom: 40px;
    text-align: center;
    color: var(--text-color);
}

/* About Page */
.about-page {
    margin-top: 120px;
}

.about-page-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-page-content h1 {
    font-size: 3rem;
    margin-bottom: 30px;
    text-align: center;
    color: var(--text-color);
}

.about-page-content h2 {
    font-size: 2rem;
    margin-top: 50px;
    margin-bottom: 20px;
    color: var(--text-color);
}

.about-page-content h3 {
    font-size: 1.5rem;
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--text-color);
}

.about-page-content p {
    line-height: 1.8;
    margin-bottom: 20px;
    color: var(--light-text);
    font-size: 1.1rem;
}

.about-page-content ul {
    list-style: none;
    padding-left: 0;
    margin: 20px 0;
}

.about-page-content ul li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    color: var(--light-text);
    line-height: 1.8;
}

.about-page-content ul li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.about-page-content a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px dashed var(--primary-color);
}

.about-page-content a:hover {
    border-bottom-style: solid;
}

/* About页面内容响应式布局 */
.about-page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin: 20px 0;
}

/* 移动端确保文字在图片上方 */
@media (max-width: 768px) {
    .about-page-content {
        padding: 20px;
    }

    .about-page-content h1 {
        font-size: 2rem;
    }

    .about-page-content h2 {
        font-size: 1.5rem;
        margin-top: 30px;
    }

    .about-page-content h3 {
        font-size: 1.3rem;
    }

    .about-page-content p {
        font-size: 1rem;
    }

    /* 确保图片在移动端正确显示，不干扰文字顺序 */
    .about-page-content img {
        display: block;
        width: 100%;
        margin: 20px 0;
    }
}
