/*
Theme Name: DynaForce Professional
Theme URI: https://www.dynaforce-sensor.com/
Description: 专业工业变送器制造商WordPress主题 - 参考麦克传感和威卡独立站设计
Version: 1.0.0
Author: DynaForce Team
Author URI: https://www.dynaforce-sensor.com/
Tags: industrial, sensor, responsive, professional, blue-theme
Text Domain: dynafroce-professional
*/

/* ============================
   全局样式和CSS变量
   ============================ */
:root {
    --primary-color: #0066CC;      /* 主色调：科技蓝 */
    --secondary-color: #00A86B;    /* 辅助色：科技绿 */
    --accent-color: #FF6B35;       /* 强调色：橙色 */
    --dark-color: #1A1A2E;         /* 深色 */
    --gray-color: #6C757D;         /* 灰色 */
    --light-gray: #F8F9FA;         /* 浅灰背景 */
    --white: #FFFFFF;
    --shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --border-radius: 8px;
}

/* ============================
   基础样式重置
   ============================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: var(--white);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ============================
   Header 头部样式
   ============================ */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: var(--dark-color);
    color: var(--white);
    padding: 8px 0;
    font-size: 14px;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-social {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-social a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
}

.header-social a:hover {
    color: var(--secondary-color);
}

.header-social a svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.contact-btn {
    padding: 6px 20px;
    background: var(--secondary-color);
    color: var(--white) !important;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
}

.contact-btn, contact-btn:hover {
    color: var(--white) !important;
}

.contact-btn:hover {
    background: var(--primary-color);
}

.header-contact a {
    color: var(--white);
    margin-right: 20px;
}

.header-contact a:hover {
    color: var(--secondary-color);
}

.header-main {
    padding: 15px 0;
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    display: flex;
    align-items: center;
}

.site-logo img {
    height: 50px;
    width: auto;
}

.site-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-left: 10px;
}

/* 导航菜单 */
.main-navigation {
    display: flex;
    align-items: center;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation ul li {
    position: relative;
    margin-left: 30px;
}

.main-navigation ul li a {
    color: var(--dark-color);
    font-weight: 500;
    padding: 10px 0;
    display: block;
    position: relative;
}

.main-navigation ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.main-navigation ul li a:hover::after {
    width: 100%;
}

/* 下拉菜单 - 优化样式 */
.main-navigation ul ul {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 220px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    flex-direction: column;
    border-radius: 0 0 8px 8px;
    padding: 8px 0;
    z-index: 999;
}

.main-navigation ul li:hover > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-navigation ul ul li {
    margin: 0;
    position: relative;
}

.main-navigation ul ul li a {
    padding: 10px 20px;
    display: block;
    color: var(--dark-color);
    font-weight: 400;
    font-size: 14px;
    border-bottom: none;
    transition: var(--transition);
}

.main-navigation ul ul li a:hover {
    background: var(--light-gray);
    color: var(--primary-color);
    padding-left: 25px;
}

.main-navigation ul ul li:last-child a {
    border-bottom: none;
}

/* 三级菜单 */
.main-navigation ul ul ul {
    left: 100%;
    top: 0;
    transform: translateX(10px);
}

.main-navigation ul ul li:hover > ul {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Mobile Menu Toggle - 三横杠按钮 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    flex-direction: column;
    justify-content: space-between;
    height: 24px;
    width: 30px;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ============================
   Hero 区域
   ============================ */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #004999 100%);
    color: var(--white);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('images/hero-pattern.png') repeat;
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: transparent;
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.btn-outline {
    background: transparent;
    border-color: var(--white);
    color: var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--primary-color);
}

/* ============================
   核心服务/产品卡片
   ============================ */
.features-section {
    padding: 80px 0;
    background: var(--light-gray);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 36px;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.section-title p {
    color: var(--gray-color);
    font-size: 18px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 36px;
    color: var(--primary-color);
}

.feature-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.feature-card p {
    color: var(--gray-color);
    margin-bottom: 20px;
}

.feature-link {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.feature-link:hover {
    gap: 10px;
}

/* ============================
   产品展示区域
   ============================ */
.products-section {
    padding: 80px 0;
}

/* Flexbox布局：单产品时不拉伸，多产品时自动换行 */
.products-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: flex-start;
}

/* 卡片固定宽度：3列/2列/1列响应式 */
.product-card {
    flex: 0 0 calc(33.333% - 20px);
    max-width: calc(33.333% - 20px);
}

@media (max-width: 1024px) {
    .product-card {
        flex: 0 0 calc(50% - 15px);
        max-width: calc(50% - 15px);
    }
}

@media (max-width: 640px) {
    .product-card {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.product-card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    transition: box-shadow 0.2s ease;
    max-width: 420px;
    width: 100%;
}

.product-card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.product-image {
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    padding: 24px;
    overflow: hidden;
}

.product-image img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: none;
}

.product-card:hover .product-image img {
    transform: none;
}

.product-info {
    padding: 24px 32px 32px;
}

.product-info h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1A1A2E;
    line-height: 1.4;
}

.product-info p {
    color: #6C757D;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 0;
}

/* ============================
   产品归档页面
   ============================ */
.page-hero {
    background: linear-gradient(135deg, #0066CC 0%, #004999 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.page-hero h1 {
    font-size: 42px;
    margin-bottom: 15px;
    font-weight: 700;
    color: white;
}

.page-hero p {
    font-size: 18px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    color: white;
}

.product-nav-section {
    background: #F8F9FA;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.product-categories-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.cat-link {
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    background: white;
    color: #333;
    border: 1px solid #ddd;
}

.cat-link.active,
.cat-link:hover {
    background: #0066CC;
    color: white;
    border-color: #0066CC;
}

.products-archive-section {
    padding: 60px 0;
}

.products-pagination {
    text-align: center;
    margin-top: 40px;
}

.products-pagination .nav-links {
    display: inline-flex;
    gap: 8px;
}

.products-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    background: white;
    border: 1px solid #ddd;
    font-size: 14px;
    transition: all 0.2s ease;
}

.products-pagination .page-numbers.current,
.products-pagination .page-numbers:hover {
    background: #0066CC;
    color: white;
    border-color: #0066CC;
}

.no-products {
    text-align: center;
    padding: 60px 20px;
    color: #6C757D;
}

.no-products svg {
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-products h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #1A1A2E;
}

.product-categories-info {
    padding: 60px 0;
    background: #F8F9FA;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.category-card {
    display: block;
    padding: 25px;
    background: white;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border-left: 4px solid #0066CC;
}

.category-card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.category-card h3 {
    font-size: 18px;
    color: #1A1A2E;
    margin-bottom: 10px;
}

.category-card p {
    color: #6C757D;
    font-size: 14px;
    margin-bottom: 10px;
}

.view-details {
    color: #0066CC;
    font-weight: 600;
    font-size: 14px;
}

/* ============================
   行业解决方案
   ============================ */
.solutions-section {
    padding: 80px 0;
    background: var(--light-gray);
}

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.solution-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
}

.solution-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.solution-card ul {
    list-style: none;
}

.solution-card ul li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    color: var(--gray-color);
}

.solution-card ul li::before {
    content: '✓';
    color: var(--secondary-color);
    margin-right: 10px;
    font-weight: bold;
}

/* ============================
   统计数据区域
   ============================ */
.stats-section {
    padding: 60px 0;
    background: var(--primary-color);
    color: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.stat-item h3 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 10px;
}

.stat-item p {
    font-size: 18px;
    opacity: 0.9;
}

/* ============================
   新闻动态
   ============================ */
.news-section {
    padding: 80px 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-card {
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
}

.news-card:hover {
    box-shadow: var(--shadow);
}

.news-image {
    height: 200px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-content {
    padding: 20px;
}

.news-date {
    color: var(--gray-color);
    font-size: 14px;
    margin-bottom: 10px;
}

.news-content h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.news-content h3 a:hover {
    color: var(--primary-color);
}

/* ============================
   页脚
   ============================ */
.site-footer {
    background: var(--dark-color);
    color: var(--white);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-widget h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--white);
}

.footer-widget ul {
    list-style: none;
}

.footer-widget ul li {
    margin-bottom: 10px;
}

.footer-widget ul li a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-widget ul li a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.footer-contact p {
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
}

/* ============================
   产品分类导航（参考麦克传感）
   ============================ */
.product-categories-nav {
    gap: 10px;
}

.cat-link {
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    background: var(--white);
    color: var(--dark-color);
    border: 1px solid #eee;
}

.cat-link:hover,
.cat-link.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* 产品卡片链接 */
.product-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-5px);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

/* ============================
   响应式设计
   ============================ */
@media (max-width: 992px) {
    .menu-toggle {
        display: block;
    }
    
    .main-navigation ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow);
    }
    
    .main-navigation ul.active {
        display: flex;
    }
    
    .main-navigation ul li {
        margin: 0;
        width: 100%;
    }
    
    .main-navigation ul li a {
        padding: 10px 0;
        border-bottom: 1px solid #eee;
    }
    
    .hero-title {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .section-title h2 {
        font-size: 28px;
    }
}

/* ============================
   WordPress 核心样式
   ============================ */
.alignleft {
    float: left;
    margin-right: 20px;
    margin-bottom: 20px;
}

.alignright {
    float: right;
    margin-left: 20px;
    margin-bottom: 20px;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption {
    max-width: 100%;
    margin-bottom: 20px;
}

.wp-caption-text {
    text-align: center;
    color: var(--gray-color);
    font-size: 14px;
    margin-top: 10px;
}

.sticky {
    /* WordPress sticky post style */
}

.gallery-caption {
    /* Gallery caption style */
}

.bypostauthor {
    /* Post author comment style */
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
}

.pagination a,
.pagination span {
    padding: 8px 15px;
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    color: var(--dark-color);
}

.pagination a:hover,
.pagination .current {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}
