/* chinauwhgroup.com 首页优化 CSS */
/* 使用伪元素方法，安全不冲突 */

body.home .site-content {
    position: relative;
}

body.home .site-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), 
                      url('/wp-content/uploads/2025/07/shanghai_lujiazui_night_2.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: -1;
    min-height: 100vh;
}

/* 文字对比度优化 */
body.home .entry-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    margin: 20px auto;
    max-width: 1200px;
    position: relative;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

body.home .entry-content h1,
body.home .entry-content h2 {
    color: #ffffff;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
    font-weight: bold;
}

body.home .entry-content p {
    color: #f0f0f0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    line-height: 1.6;
}

/* 响应式优化 */
@media (max-width: 768px) {
    body.home .entry-content {
        padding: 20px;
        margin: 10px;
        border-radius: 15px;
    }
    body.home .site-content::before {
        background-attachment: scroll;
    }
}

/* 修复重复标题问题 - 隐藏重复的标题 */
body.home .entry-content h1:first-of-type {
    display: none;
}

/* 或者如果需要隐藏特定的重复标题 */
body.home .entry-content h1:contains("Welcome to China UWH Group"):not(:first-child) {
    display: none;
}

/* 调整灰色字体颜色，提高对比度 */
body.home .entry-content p,
body.home .entry-content li,
body.home .entry-content span {
    color: #2c3e50 !important; /* 深灰蓝色，既清晰又美观 */
    text-shadow: none !important; /* 移除文字阴影以提高清晰度 */
}

/* 针对特定的灰色文字内容 */
body.home .entry-content .wp-block-paragraph,
body.home .entry-content .has-text-color {
    color: #34495e !important; /* 稍微浅一点的深灰色 */
}

/* 确保列表项目清晰可见 */
body.home .entry-content ul li,
body.home .entry-content ol li {
    color: #2c3e50 !important;
    font-weight: 500; /* 稍微加粗提高可读性 */
}

/* 保持标题的白色，只调整正文 */
body.home .entry-content h1,
body.home .entry-content h2,
body.home .entry-content h3 {
    color: #ffffff !important; /* 保持标题为白色 */
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8) !important;
}

/* 针对描述性文字的特殊处理 */
body.home .entry-content .description,
body.home .entry-content .subtitle {
    color: #2c3e50 !important;
    background: rgba(255, 255, 255, 0.9); /* 添加半透明白色背景 */
    padding: 5px 10px;
    border-radius: 4px;
    display: inline-block;
}


/* 精确修复 - 隐藏第二个相同的标题 */
body.home .entry-content h1 + h1 {
    display: none;
}

/* 或者隐藏特定位置的重复标题 */
body.home .entry-content .wp-block-heading:nth-child(2) {
    display: none;
}

/* 提高所有正文文字的对比度 */
body.home .entry-content {
    color: #2c3e50 !important;
}

/* 确保链接也清晰可见 */
body.home .entry-content a {
    color: #1976d2 !important;
    font-weight: 600;
}

/* 特殊处理：为灰色文字添加轻微的背景 */
body.home .entry-content p:not(:first-child) {
    background: rgba(255, 255, 255, 0.8);
    padding: 8px 12px;
    border-radius: 6px;
    margin: 10px 0;
}


/* 修复Customer Feedback表单选择框溢出问题 */
.customer-feedback-form select {
    width: 100% !important;
    min-width: 200px !important;
    padding: 0.75rem 2rem 0.75rem 0.75rem !important; /* 右侧留更多空间给下拉箭头 */
    box-sizing: border-box !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* 确保选择框选项文字完整显示 */
.customer-feedback-form select option {
    padding: 8px !important;
    white-space: normal !important;
}

/* 调整表单行的网格布局，给选择框更多空间 */
.customer-feedback-form .form-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 1.5rem !important; /* 增加间距 */
    margin-bottom: 1rem !important;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .customer-feedback-form .form-row {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .customer-feedback-form select {
        font-size: 14px !important; /* 移动端稍微缩小字体 */
    }
}


/* ===== 修复1: 隐藏重复的标题 ===== */
/* 隐藏第二个出现的相同标题 */
body.home .entry-content h1:nth-of-type(2),
body.home .entry-content h1 + h1,
body.home .entry-content .wp-block-heading:nth-child(2) {
    display: none !important;
}

/* 如果标题在特定容器中重复 */
body.home .entry-content .wp-block-group h1:not(:first-child) {
    display: none !important;
}

/* ===== 修复2: 提高正文文字对比度 ===== */
/* 将灰色文字改为深色，提高可读性 */
body.home .entry-content p,
body.home .entry-content li,
body.home .entry-content span,
body.home .entry-content div {
    color: #1a1a1a !important; /* 深黑色 */
    text-shadow: none !important;
    font-weight: 500 !important; /* 稍微加粗 */
}

/* 为正文添加半透明白色背景提高对比度 */
body.home .entry-content p:not(:empty) {
    background: rgba(255, 255, 255, 0.95) !important;
    padding: 12px 16px !important;
    border-radius: 8px !important;
    margin: 12px 0 !important;
    border-left: 4px solid #1976d2 !important;
}

/* 列表项目的特殊处理 */
body.home .entry-content ul li,
body.home .entry-content ol li {
    color: #1a1a1a !important;
    background: rgba(255, 255, 255, 0.9) !important;
    padding: 8px 12px !important;
    margin: 6px 0 !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
}

/* 保持标题为白色 */
body.home .entry-content h1,
body.home .entry-content h2,
body.home .entry-content h3,
body.home .entry-content h4 {
    color: #ffffff !important;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9) !important;
    font-weight: bold !important;
}

/* ===== 修复3: 表单下拉菜单文字溢出 ===== */
/* 修复Customer Feedback表单选择框 */
.customer-feedback-form select {
    width: 100% !important;
    min-width: 250px !important;
    padding: 12px 40px 12px 12px !important; /* 右侧留足够空间 */
    box-sizing: border-box !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    border: 2px solid #ddd !important;
    border-radius: 6px !important;
}

/* 选择框选项的处理 */
.customer-feedback-form select option {
    padding: 10px !important;
    font-size: 14px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
}

/* 调整表单布局给选择框更多空间 */
.customer-feedback-form .form-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
    margin-bottom: 20px !important;
}

/* 确保表单容器有足够宽度 */
.customer-feedback-form {
    max-width: 900px !important;
    margin: 0 auto !important;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .customer-feedback-form .form-row {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .customer-feedback-form select {
        font-size: 13px !important;
        min-width: 200px !important;
    }
    
    body.home .entry-content p:not(:empty) {
        padding: 8px 12px !important;
        font-size: 14px !important;
    }
}

