/* ===== 途悦户外 现代企业风格 V3 ===== */
/* 浅色主题 · 响应式 · 图片完美适配 */

/* === 全局 === */
.site-header, .ast-header-section, #masthead { background: #ffffff !important; box-shadow: 0 2px 12px rgba(0,0,0,0.08) !important; position: relative; z-index: 100; }
body, .site, #page { background: #f5f7fa !important; color: #333 !important; font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif; }
.site-footer, #colophon { background: #1a2332 !important; color: #a0aec0 !important; padding: 40px 0 20px; }
.site-footer a { color: #4a9eff !important; }
.entry-content, .entry-content p { color: #444 !important; line-height: 1.8; }
.entry-title, .entry-title a { color: #1a2332 !important; font-weight: 700; }

/* === 导航栏 === */
.main-header-menu li a, .ast-header-section li a, .menu-item a { color: #1a2332 !important; font-weight: 600; transition: color 0.3s; }
.main-header-menu li a:hover, .menu-item a:hover { color: #2563eb !important; }
.ast-primary-header-bar { background: #ffffff !important; border-bottom: 1px solid #e2e8f0 !important; }
.site-branding a, .site-logo-img { transition: transform 0.3s; }
.site-branding a:hover { transform: scale(1.05); }
.site-title a { color: #1a2332 !important; font-weight: 800; }

/* === 容器 === */
.ty-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* === 英雄区 - 全宽渐变 === */
.ty-hero {
  background: linear-gradient(135deg, #1a2332 0%, #2d4a7c 50%, #1a4d8e 100%);
  padding: 80px 0 70px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.ty-hero::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" width="60" height="60" viewBox="0 0 60 60"><g fill="none" stroke="white" stroke-width="0.5" opacity="0.08"><path d="M0 0h60v60H0z"/></g></svg>');
}
.ty-hero h1 { color: #ffffff !important; font-size: 2.6em; font-weight: 800; margin-bottom: 16px; letter-spacing: 1px; position: relative; }
.ty-hero h1 span { color: #60a5fa; }
.ty-hero p { color: #cbd5e1 !important; font-size: 1.1em; line-height: 1.8; max-width: 680px; margin: 0 auto 28px; position: relative; }

/* === 按钮 === */
.ty-btn {
  display: inline-block;
  padding: 12px 36px;
  background: #2563eb;
  color: #fff !important;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1em;
  transition: all 0.3s;
  box-shadow: 0 4px 14px rgba(37,99,235,0.3);
  position: relative;
}
.ty-btn:hover { background: #1d4ed8; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(37,99,235,0.4); }
.ty-btn-outline {
  display: inline-block;
  padding: 10px 32px;
  background: transparent;
  color: #fff !important;
  text-decoration: none;
  border: 2px solid #fff;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1em;
  transition: all 0.3s;
}
.ty-btn-outline:hover { background: #fff; color: #1a2332 !important; }

/* === 区块 === */
.ty-section { background: #ffffff; padding: 70px 0; }
.ty-section-light { background: #f8fafc; padding: 70px 0; }
.ty-section-dark { background: #1a2332; padding: 70px 0; color: #e2e8f0; }
.ty-section-dark h2, .ty-section-dark h3 { color: #fff !important; }
.ty-section-title { text-align: center; margin-bottom: 45px; }
.ty-section-title h2 { color: #1a2332 !important; font-size: 2em; font-weight: 700; position: relative; display: inline-block; padding-bottom: 12px; }
.ty-section-title h2::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 50px; height: 3px; background: #2563eb; border-radius: 2px; }
.ty-section-title p { color: #64748b !important; font-size: 1em; margin-top: 8px; }

/* === 两栏布局 === */
.ty-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.ty-two-col p { color: #555 !important; font-size: 1em; line-height: 1.9; }

/* === 特性横幅 === */
.ty-feature-banner { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.ty-feature-img img { width: 100%; height: auto; max-height: 380px; object-fit: cover; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,0.12); display: block; }
.ty-feature-text h3 { color: #1a2332 !important; font-size: 1.5em; margin-bottom: 16px; font-weight: 700; }
.ty-feature-text p { color: #555 !important; line-height: 1.9; margin-bottom: 12px; }

/* === 生产线网格 === */
.ty-production-line { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.ty-production-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: all 0.3s;
}
.ty-production-card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(0,0,0,0.15); }
.ty-production-card img { width: 100%; height: 220px; object-fit: cover; display: block; }
.ty-production-info { padding: 20px; }
.ty-production-info h3 { color: #1a2332 !important; font-size: 1.15em; margin: 0 0 8px; font-weight: 700; }
.ty-production-info p { color: #64748b !important; font-size: 0.9em; line-height: 1.6; margin: 0; }

/* === 统计数据 === */
.ty-stats { display: flex; justify-content: center; gap: 50px; flex-wrap: wrap; }
.ty-stat-item { text-align: center; }
.ty-stat-num { font-size: 2.2em; font-weight: 800; color: #2563eb; }
.ty-stat-label { color: #64748b; margin-top: 6px; font-size: 0.95em; }

/* === 价值卡片 === */
.ty-value-box {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 30px;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.ty-value-box:hover { border-color: #2563eb; box-shadow: 0 8px 25px rgba(37,99,235,0.1); transform: translateY(-2px); }
.ty-value-box h3 { color: #1a2332 !important; font-size: 1.3em; margin-bottom: 12px; font-weight: 700; }
.ty-value-box p { color: #555 !important; line-height: 1.8; }

/* === 产品网格 === */
.ty-product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.ty-product-item {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: all 0.3s;
}
.ty-product-item:hover { transform: translateY(-6px); box-shadow: 0 12px 35px rgba(0,0,0,0.15); }
.ty-product-item img { width: 100%; height: 240px; object-fit: cover; display: block; }
.ty-product-info { padding: 16px; text-align: center; }
.ty-product-info h3 { color: #1a2332 !important; font-size: 1.1em; margin: 0; font-weight: 700; }
.ty-product-info p { color: #64748b !important; font-size: 0.85em; margin-top: 6px; }

/* === 图片画廊 === */
.ty-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ty-gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  transition: all 0.3s;
}
.ty-gallery-item:hover { transform: scale(1.03); box-shadow: 0 8px 25px rgba(0,0,0,0.15); }
.ty-gallery-item img { width: 100%; height: 200px; object-fit: cover; display: block; transition: transform 0.4s; }
.ty-gallery-item:hover img { transform: scale(1.08); }
.ty-gallery-item .ty-gallery-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(26,35,50,0.85));
  color: #fff;
  padding: 20px 15px 12px;
  font-size: 0.9em;
  font-weight: 600;
}

/* === 视差区 === */
.ty-parallax {
  position: relative;
  height: 400px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ty-parallax img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.ty-parallax::after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(26,35,50,0.6); }
.ty-parallax .ty-container { position: relative; z-index: 2; text-align: center; }
.ty-parallax h2 { color: #fff !important; font-size: 2em; font-weight: 700; margin-bottom: 12px; }
.ty-parallax p { color: #cbd5e1 !important; font-size: 1.1em; }

/* === 联系区 === */
.ty-contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.ty-contact-info { background: #fff; border-radius: 12px; padding: 35px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.ty-contact-info h3 { color: #1a2332 !important; font-size: 1.3em; margin-bottom: 20px; font-weight: 700; }
.ty-contact-item { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #f1f5f9; }
.ty-contact-label { color: #64748b; font-size: 0.95em; min-width: 120px; }
.ty-contact-value { color: #1a2332; font-size: 0.95em; text-align: right; font-weight: 600; }

/* === 卡片 === */
.ty-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: all 0.3s;
}
.ty-card:hover { border-color: #2563eb; box-shadow: 0 6px 20px rgba(37,99,235,0.08); }
.ty-card h3 { color: #1a2332 !important; font-size: 1.15em; margin-bottom: 10px; font-weight: 700; }
.ty-card p { color: #555 !important; line-height: 1.7; }

/* === 图片修复类 === */
.ty-factory-img { width: 100%; height: auto; max-height: 500px; object-fit: cover; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,0.12); display: block; }
.ty-img-full { width: 100%; height: auto; display: block; border-radius: 12px; }
.ty-img-centered { max-width: 100%; height: auto; display: block; margin: 0 auto; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); }

/* === 分隔线 === */
.ty-divider { width: 100%; height: 1px; background: linear-gradient(90deg, transparent, #cbd5e1, transparent); margin: 40px 0; }

/* === Logo === */
.custom-logo, .site-logo-img { max-height: 50px !important; width: auto !important; }
.site-branding { padding: 6px 0; }

/* === 时间线 === */
.ty-timeline { position: relative; padding-left: 30px; }
.ty-timeline::before { content: ''; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; background: #e2e8f0; }
.ty-timeline-item { display: flex; align-items: flex-start; margin-bottom: 30px; position: relative; }
.ty-timeline-item::after { content: ''; position: absolute; left: -24px; top: 8px; width: 12px; height: 12px; background: #2563eb; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px #2563eb; }
.ty-timeline-content { background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); width: 100%; }
.ty-timeline-content h3 { color: #1a2332 !important; font-size: 1.1em; margin: 0 0 8px; }
.ty-timeline-content p { color: #555 !important; margin: 0; line-height: 1.7; }

/* === 响应式适配 === */
@media (max-width: 1024px) {
  .ty-container { padding: 0 20px; }
  .ty-feature-banner { gap: 30px; }
  .ty-feature-img img { max-height: 300px; }
  .ty-production-card img { height: 200px; }
  .ty-product-item img { height: 220px; }
  .ty-gallery-item img { height: 180px; }
}

@media (max-width: 768px) {
  .ty-hero { padding: 50px 0 40px; }
  .ty-hero h1 { font-size: 1.8em; }
  .ty-hero p { font-size: 0.95em; }
  .ty-section, .ty-section-light, .ty-section-dark { padding: 45px 0; }
  .ty-section-title h2 { font-size: 1.5em; }
  .ty-section-title { margin-bottom: 30px; }
  .ty-two-col { grid-template-columns: 1fr; gap: 25px; }
  .ty-feature-banner { grid-template-columns: 1fr; gap: 25px; }
  .ty-feature-img img { max-height: 250px; }
  .ty-stats { gap: 25px; }
  .ty-stat-num { font-size: 1.8em; }
  .ty-product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .ty-product-item img { height: 160px; }
  .ty-product-info { padding: 10px; }
  .ty-product-info h3 { font-size: 0.95em; }
  .ty-gallery { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .ty-gallery-item img { height: 140px; }
  .ty-production-line { grid-template-columns: 1fr; gap: 16px; }
  .ty-production-card img { height: 200px; }
  .ty-contact-grid { grid-template-columns: 1fr; gap: 25px; }
  .ty-parallax { height: 280px; }
  .ty-parallax h2 { font-size: 1.5em; }
  .ty-btn { padding: 10px 28px; font-size: 0.95em; }
  .ty-btn-outline { padding: 8px 24px; font-size: 0.95em; }
}

@media (max-width: 480px) {
  .ty-hero h1 { font-size: 1.5em; }
  .ty-hero p { font-size: 0.85em; }
  .ty-product-grid { grid-template-columns: 1fr; }
  .ty-product-item img { height: 200px; }
  .ty-gallery { grid-template-columns: 1fr; }
  .ty-gallery-item img { height: 200px; }
  .ty-stats { gap: 15px; }
  .ty-stat-num { font-size: 1.5em; }
  .ty-value-box { padding: 20px; }
  .ty-contact-info { padding: 20px; }
}

/* === Astra 覆盖 === */
.ast-container, .site-content { max-width: 100% !important; }
.entry-content { max-width: 100% !important; }
.wp-block-image img { max-width: 100%; height: auto; }


/* === 全局图片安全约束 === */
.entry-content img { max-width: 100% !important; height: auto !important; }
.entry-content figure img { max-width: 100% !important; height: auto !important; }
img[class*="ty-"], img[src*="uploads"] { max-width: 100%; height: auto; }

/* 确保所有ty容器内的图片不会溢出 */
.ty-container img { max-width: 100%; height: auto; }
.ty-section img, .ty-section-light img, .ty-section-dark img { max-width: 100%; height: auto; }

/* 防止图片加载时布局偏移 */
.ty-product-item, .ty-production-card, .ty-gallery-item, .ty-feature-img {
  contain: layout style paint;
}

/* 图片懒加载动画 */
img[loading="lazy"] { opacity: 0; transition: opacity 0.3s; }
img[loading="lazy"].loaded, img[loading="lazy"][src] { opacity: 1; }
