/*
 Theme Name:   UFIDA Child Theme
 Description:  上海用友风格自定义子主题
 Author:       企易信息科技
 Template:     astra
 Version:      1.0.0
 Text Domain:  ufida-child
*/

/* 用友蓝配色 */
:root {
    --ufida-red: #CC0000;
    --ufida-blue: #0066CC;
    --ufida-dark-blue: #004499;
    --ufida-light-blue: #E6F0FA;
    --ufida-orange: #FF6600;
    --ufida-orange-hover: #E55A00;
    --ufida-gray: #666666;
    --ufida-light-gray: #F5F5F5;
    --ufida-text: #333333;
}

/* 重置样式 */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: var(--ufida-text);
    margin: 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: normal;
}

a {
    text-decoration: none;
    color: inherit;
}

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

img {
    max-width: 100%;
    height: auto;
}

/* 页面容器 */
#page {
    max-width: 100%;
    overflow-x: hidden;
}

/* 顶部导航栏 */
.site-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 80px;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
}

/* Logo样式 */
.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-logo .logo-main {
    background: var(--ufida-red);
    color: #fff;
    padding: 8px 12px;
    font-size: 24px;
    font-weight: bold;
    border-radius: 4px;
}

.site-logo .logo-sub {
    font-size: 12px;
    color: #999;
    line-height: 1.3;
}

.site-logo .logo-sub-en {
    font-size: 10px;
    color: #bbb;
}

.site-logo img {
    height: 60px; width: auto;
}

/* 主导航 */
.main-nav ul {
    display: flex;
    gap: 40px;
}

.main-nav a {
    color: var(--ufida-gray);
    font-size: 16px;
    transition: color 0.3s;
    padding: 5px 0;
}

.main-nav a:hover {
    color: var(--ufida-blue);
}

/* 400电话按钮 */
.header-phone {
    background: var(--ufida-blue);
    color: #fff;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s;
}

.header-phone:hover {
    background: var(--ufida-dark-blue);
}

/* Banner轮播区域 */
.banner-section {
    margin-top: 80px;
    height: 480px;
    background: linear-gradient(135deg, var(--ufida-blue) 0%, var(--ufida-dark-blue) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    position: relative;
}

.banner-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.03)"/></svg>');
    background-size: 200px 200px;
}

.banner-content {
    position: relative;
    z-index: 1;
}

.banner-content h1 {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.banner-content .subtitle {
    font-size: 22px;
    opacity: 0.9;
    margin-bottom: 10px;
}

/* CTA按钮 */
.cta-button {
    display: inline-block;
    background: var(--ufida-orange);
    color: #fff;
    padding: 15px 50px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 18px;
    margin-top: 30px;
    transition: all 0.3s;
    font-weight: 500;
}

.cta-button:hover {
    background: var(--ufida-orange-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 102, 0, 0.4);
    color: #fff;
}

/* 通用容器 */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 70px 20px;
}

/* 区块标题 */
.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 32px;
    color: #333;
    margin-bottom: 12px;
    font-weight: bold;
}

.section-title p {
    font-size: 16px;
    color: #888;
}

/* 产品线区域 */
.products-section {
    background: var(--ufida-light-gray);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.product-card {
    background: #fff;
    padding: 35px 15px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    transition: all 0.3s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.product-icon {
    width: 70px;
    height: 70px;
    background: var(--ufida-light-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 26px;
    color: var(--ufida-blue);
    font-weight: bold;
    transition: all 0.3s;
}

.product-card:hover .product-icon {
    background: var(--ufida-blue);
    color: #fff;
}

.product-card h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
    font-weight: 500;
}

.product-card p {
    font-size: 12px;
    color: #888;
    line-height: 1.5;
}

/* 解决方案区域 */
.solutions-section {
    background: #fff;
}

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.solution-card {
    background: var(--ufida-light-blue);
    padding: 30px 20px;
    text-align: center;
    border-radius: 8px;
    transition: all 0.3s;
    cursor: pointer;
}

.solution-card:hover {
    background: var(--ufida-blue);
    color: #fff;
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 102, 204, 0.3);
}

.solution-card:hover p {
    color: rgba(255,255,255,0.8);
}

.solution-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 500;
}

.solution-card p {
    font-size: 14px;
    color: #666;
}

/* 案例展示区域 */
.cases-section {
    background: var(--ufida-light-gray);
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.case-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: all 0.3s;
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.case-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.case-card h4 {
    padding: 18px 15px;
    font-size: 14px;
    color: #444;
    text-align: center;
    margin: 0;
    font-weight: normal;
    line-height: 1.5;
}

/* 工具区域 */
.tools-section {
    background: #fff;
}

/* 联系区域 */
.contact-section {
    background: var(--ufida-light-blue);
}

.contact-section h2 {
    font-size: 32px;
    margin-bottom: 15px;
    font-weight: bold;
}

.contact-section p {
    font-size: 16px;
    color: #666;
    margin-bottom: 25px;
}

/* 底部区域 */
.site-footer {
    background: #333;
    color: #fff;
    padding: 25px 20px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-phone {
    text-align: center;
}

.footer-phone-label {
    font-size: 12px;
    opacity: 0.7;
    margin-bottom: 4px;
}

.footer-phone-number {
    font-size: 28px;
    font-weight: bold;
    color: var(--ufida-orange);
    letter-spacing: 2px;
}

.footer-info {
    text-align: right;
    font-size: 12px;
    opacity: 0.7;
    line-height: 1.6;
}

.footer-copyright {
    text-align: center;
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 11px;
    opacity: 0.5;
}

/* 蓝色按钮变体 */
.cta-button-blue {
    background: var(--ufida-blue);
}

.cta-button-blue:hover {
    background: var(--ufida-dark-blue);
    box-shadow: 0 5px 20px rgba(0, 102, 204, 0.4);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .solutions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 12px;
        padding: 10px 20px;
        height: auto;
    }
    
    .site-header {
        height: auto;
        position: relative;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px 25px;
    }
    
    .products-grid,
    .solutions-grid,
    .cases-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .banner-section {
        margin-top: 0;
        height: auto;
        padding: 60px 20px;
    }
    
    .banner-content h1 {
        font-size: 28px;
    }
    
    .banner-content .subtitle {
        font-size: 16px;
    }
    
    .section-container {
        padding: 50px 15px;
    }
    
    .section-title h2 {
        font-size: 24px;
    }
    
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    
    .footer-info {
        text-align: center;
    }
    
    .footer-phone-number {
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    .products-grid,
    .solutions-grid,
    .cases-grid {
        grid-template-columns: 1fr;
    }
    
    .site-logo .logo-sub,
    .site-logo .logo-sub-en {
        display: none;
    }
}

/* 新闻资讯区域 */
.news-section { padding: 80px 0; background: #fff; }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.news-card { background: #f8f9fa; border-radius: 8px; padding: 30px; transition: transform 0.3s, box-shadow 0.3s; }
.news-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.news-date { color: #0066CC; font-size: 14px; margin-bottom: 10px; font-weight: 500; }
.news-card h4 { font-size: 18px; color: #333; margin-bottom: 12px; line-height: 1.5; }
.news-card p { font-size: 14px; color: #666; line-height: 1.6; margin-bottom: 15px; }
.news-card a { color: #0066CC; font-size: 14px; text-decoration: none; font-weight: 500; }
.news-card a:hover { text-decoration: underline; }

@media (max-width: 768px) {
    .news-grid { grid-template-columns: 1fr; }
}

/* 下拉菜单样式 */
.nav-item { position: relative; }
.nav-item .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    min-width: 160px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    border-radius: 4px;
    z-index: 1000;
    padding: 8px 0;
    margin-top: 0;
}
.nav-item .dropdown-menu a {
    display: block;
    padding: 10px 24px;
    color: #333;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}
.nav-item .dropdown-menu a:hover {
    background: #f0f6ff;
    color: #0066CC;
}

/* 大型下拉菜单（软件产品） */
.nav-item .mega-menu {
    min-width: 780px;
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    border-radius: 4px;
    z-index: 1000;
    padding: 24px;
    display: none;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 24px;
}
.nav-item .mega-menu .mega-menu-column h4 {
    color: #CC0000;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 12px;
    margin: 0 0 4px 0;
    border-bottom: 1px solid #eee;
}
.nav-item .mega-menu .mega-menu-column a {
    display: block;
    padding: 6px 12px;
    color: #555;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s;
}
.nav-item .mega-menu .mega-menu-column a:hover {
    color: #0066CC;
}

/* 鼠标悬停显示下拉 */
.nav-item:hover > .dropdown-menu,
.nav-item:hover > .mega-menu {
    display: grid !important;
}
.nav-item:hover > a {
    color: #0066CC;
}

@media (max-width: 768px) {
    .nav-item .mega-menu {
        min-width: auto;
        grid-template-columns: 1fr;
        position: static;
        transform: none;
        box-shadow: none;
        padding: 12px;
    }
}

/* Banner轮播样式 */
.banner-section { position: relative; overflow: hidden; }
.banner-slider { position: relative; width: 100%; }
.banner-slide {
    display: none;
    min-height: 420px;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 20px;
}
.banner-slide.active { display: flex; }
.banner-slide .banner-content h1 {
    color: #fff;
    font-size: 40px;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.banner-slide .banner-content .subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 18px;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.banner-slide .banner-content .cta-button {
    display: inline-block;
    padding: 14px 40px;
    background: #FF6600;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.3s, transform 0.3s;
}
.banner-slide .banner-content .cta-button:hover {
    background: #e55a00;
    transform: translateY(-2px);
}
.banner-dots {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}
.banner-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}
.banner-dots .dot.active {
    background: #fff;
    transform: scale(1.2);
}
.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: none;
    font-size: 24px;
    padding: 16px 14px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
    border-radius: 4px;
}
.banner-arrow:hover { background: rgba(255,255,255,0.3); }
.banner-prev { left: 20px; }
.banner-next { right: 20px; }

@media (max-width: 768px) {
    .banner-slide { min-height: 280px; padding: 40px 20px; }
    .banner-slide .banner-content h1 { font-size: 24px; }
    .banner-slide .banner-content .subtitle { font-size: 14px; }
}

/* 首页案例卡片新样式 - 从CPT读取 */
.case-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: all 0.3s;
    text-decoration: none;
    display: block;
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.case-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    transition: transform 0.3s;
}

.case-card:hover img {
    transform: scale(1.05);
}

.case-card h4 {
    padding: 12px 15px;
    font-size: 14px;
    color: #333;
    text-align: left;
    margin: 0;
    font-weight: 600;
    line-height: 1.4;
}

.case-card:hover h4 {
    color: var(--ufida-blue);
}

.case-card-excerpt {
    padding: 0 15px 12px;
    font-size: 12px;
    color: #999;
    margin: 0;
    line-height: 1.4;
    text-align: left;
}

/* 案例卡片无图片占位符 */
.case-card-placeholder {
    width: 100%;
    height: 140px;
    background: linear-gradient(135deg, #e8f4ff 0%, #d0e8ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.case-card-placeholder span {
    font-size: 36px;
    color: var(--ufida-blue);
    font-weight: bold;
}

/* 案例区域链接按钮样式 */
.cta-button-blue {
    background: var(--ufida-blue) !important;
}

.cta-button-blue:hover {
    background: var(--ufida-dark-blue) !important;
}
