/*
Theme Name: cdyxyxlw
Theme URI: https://www.cdyxyxlw.com/
Author: 成都宇翔亿鑫螺纹紧固件有限公司
Author URI: https://www.cdyxyxlw.com/about/
Description: 成都宇翔亿鑫螺纹紧固件有限公司企业官网主题。适用于高强度螺栓、螺母、螺钉、非标精密紧固件等工业制造企业。首页包含中等高度幻灯片（无标题）、产品/方案/服务三栏卡片、订阅横幅、工厂视频、资料下载与联系方式模块；支持自定义 Logo、菜单、小工具、主题选项（电话、邮箱、地址、ICP备案号）与英文目录固定链接。
Version: 1.2.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cdyxyxlw
Domain Path: /languages
Tags: portfolio, news, grid-layout, one-column, two-columns, right-sidebar, custom-logo, custom-menu, custom-colors, featured-images, footer-widgets, full-width-template, theme-options, threaded-comments, translation-ready, block-styles, wide-blocks, editor-style, sticky-post

cdyxyxlw WordPress Theme, (C) 2025 成都宇翔亿鑫螺纹紧固件有限公司
cdyxyxlw is distributed under the terms of the GNU GPL.
*/

:root {
	--yx-primary: #0b4f9c;
	--yx-primary-dark: #083a74;
	--yx-accent: #f2b705;
	--yx-text: #1d2733;
	--yx-muted: #5b6672;
	--yx-light: #f2f4f7;
	--yx-border: #dfe3e8;
	--yx-white: #ffffff;
	--yx-max: 1280px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans SC", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.75;
	color: var(--yx-text);
	background: var(--yx-white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--yx-primary); text-decoration: none; transition: color .2s; }
a:hover, a:focus { color: var(--yx-primary-dark); }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .6em; font-weight: 700; color: var(--yx-text); }
h2 { font-size: 2.1rem; }
p { margin: 0 0 1em; }

.screen-reader-text {
	border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important;
}
.screen-reader-text:focus {
	background: #fff; clip: auto !important; clip-path: none; color: var(--yx-primary); display: block;
	height: auto; left: 8px; top: 8px; padding: 12px 20px; width: auto; z-index: 100000;
}
.skip-link { position: absolute; }

.yx-container { max-width: var(--yx-max); margin: 0 auto; padding: 0 24px; }

/* ---------- Top bar & header ---------- */
.yx-topbar { background: var(--yx-primary-dark); color: #cfe0f3; font-size: 13px; }
.yx-topbar .yx-container { display: flex; justify-content: space-between; align-items: center; height: 36px; }
.yx-topbar a { color: #fff; }
.yx-header { position: sticky; top: 0; z-index: 50; background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.admin-bar .yx-header { top: 32px; }
.yx-header .yx-container { display: flex; align-items: center; justify-content: space-between; height: 84px; }
.yx-brand { display: flex; align-items: center; gap: 12px; color: var(--yx-text); }
.yx-brand-mark {
	width: 46px; height: 46px; background: var(--yx-primary); color: #fff; display: grid; place-items: center;
	font-weight: 800; font-size: 15px; letter-spacing: 1px;
}
.yx-brand-name { font-size: 18px; font-weight: 700; line-height: 1.2; }
.yx-brand-sub { font-size: 11px; color: var(--yx-muted); letter-spacing: 1.5px; text-transform: uppercase; }
.custom-logo { max-height: 56px; width: auto; }

.yx-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.yx-nav li { position: relative; }
.yx-nav a { display: block; padding: 30px 16px; color: var(--yx-text); font-weight: 600; font-size: 15px; border-bottom: 3px solid transparent; }
.yx-nav a:hover, .yx-nav .current-menu-item > a, .yx-nav .current_page_item > a { color: var(--yx-primary); border-bottom-color: var(--yx-primary); }
.yx-nav .sub-menu { display: none; position: absolute; left: 0; top: 100%; background: #fff; min-width: 200px; flex-direction: column; box-shadow: 0 10px 30px rgba(0,0,0,.1); }
.yx-nav li:hover > .sub-menu, .yx-nav li:focus-within > .sub-menu { display: flex; }
.yx-nav .sub-menu a { padding: 12px 18px; border: 0; font-weight: 500; }
.yx-header-cta { display: flex; align-items: center; gap: 10px; }
.yx-btn {
	display: inline-flex; align-items: center; gap: 8px; padding: 12px 26px; background: var(--yx-primary); color: #fff;
	font-weight: 600; border: 2px solid var(--yx-primary); cursor: pointer; font-size: 15px; transition: all .2s;
}
.yx-btn:hover, .yx-btn:focus { background: var(--yx-primary-dark); border-color: var(--yx-primary-dark); color: #fff; }
.yx-btn-outline { background: transparent; color: var(--yx-primary); }
.yx-btn-outline:hover { color: #fff; }
.yx-btn-white { background: #fff; color: var(--yx-primary); border-color: #fff; }
.yx-btn-white:hover { background: transparent; color: #fff; border-color: #fff; }
.yx-menu-toggle { display: none; background: none; border: 0; font-size: 26px; cursor: pointer; color: var(--yx-text); }

/* ---------- Hero slider (medium height, no titles) ---------- */
.yx-hero { position: relative; height: 520px; overflow: hidden; background: #0d1b2a; }
.yx-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; }
.yx-slide.is-active { opacity: 1; }
.yx-slide img { width: 100%; height: 100%; object-fit: cover; }
.yx-hero-dots { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 3; }
.yx-hero-dots button { width: 40px; height: 4px; border: 0; background: rgba(255,255,255,.5); cursor: pointer; padding: 0; }
.yx-hero-dots button.is-active { background: #fff; }
.yx-hero-arrow {
	position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 48px; height: 48px; border: 0;
	background: rgba(11,79,156,.75); color: #fff; font-size: 22px; cursor: pointer;
}
.yx-hero-prev { left: 0; } .yx-hero-next { right: 0; }

/* ---------- Sections ---------- */
.yx-section { padding: 90px 0; }
.yx-section-light { background: var(--yx-light); }
.yx-intro { max-width: 900px; font-size: 1.15rem; color: var(--yx-muted); }
.yx-eyebrow { color: var(--yx-primary); font-weight: 700; letter-spacing: 2px; text-transform: uppercase; font-size: 13px; margin-bottom: 10px; display: block; }
.yx-title-bar { width: 60px; height: 4px; background: var(--yx-primary); margin: 0 0 28px; }

.yx-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 40px; }
.yx-card { background: #fff; border: 1px solid var(--yx-border); display: flex; flex-direction: column; transition: box-shadow .25s, transform .25s; }
.yx-card:hover { box-shadow: 0 18px 40px rgba(11,79,156,.12); transform: translateY(-4px); }
.yx-card-img { aspect-ratio: 16/10; overflow: hidden; }
.yx-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.yx-card:hover .yx-card-img img { transform: scale(1.05); }
.yx-card-body { padding: 28px; flex: 1; display: flex; flex-direction: column; }
.yx-card-body h3 { font-size: 1.35rem; }
.yx-card-body p { color: var(--yx-muted); flex: 1; }
.yx-card-link { font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }

.yx-band { background: var(--yx-primary); color: #fff; padding: 70px 0; }
.yx-band h2, .yx-band h3 { color: #fff; }
.yx-band .yx-container { display: grid; grid-template-columns: 1.4fr 1fr; gap: 50px; align-items: center; }
.yx-band p { color: #d6e4f5; }

.yx-video { position: relative; aspect-ratio: 16/9; max-height: 620px; width: 100%; overflow: hidden; margin-top: 30px; }
.yx-video img { width: 100%; height: 100%; object-fit: cover; }
.yx-video-play {
	position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 92px; height: 92px; border-radius: 50%;
	background: rgba(255,255,255,.92); color: var(--yx-primary); display: grid; place-items: center; font-size: 30px;
}

.yx-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; margin-top: 40px; }
.yx-stat { border-left: 4px solid var(--yx-primary); padding: 6px 20px; }
.yx-stat strong { font-size: 2.4rem; color: var(--yx-primary); display: block; line-height: 1.1; }
.yx-stat span { color: var(--yx-muted); }

.yx-download { display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid var(--yx-border); padding: 26px 30px; background: #fff; margin-top: 16px; }
.yx-download small { color: var(--yx-muted); display: block; }

.yx-contact { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.yx-contact-box { background: var(--yx-light); padding: 40px; }
.yx-contact-actions { display: flex; flex-direction: column; gap: 14px; margin-top: 24px; }

.yx-news-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; margin-top: 40px; }
.yx-news-item time { color: var(--yx-muted); font-size: 14px; }
.yx-news-item h3 { font-size: 1.15rem; margin-top: 8px; }

/* ---------- Page header ---------- */
.yx-page-hero { position: relative; height: 300px; background: var(--yx-primary-dark) center/cover no-repeat; display: flex; align-items: flex-end; }
.yx-page-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,58,116,.85), rgba(8,58,116,.25)); }
.yx-page-hero .yx-container { position: relative; width: 100%; padding-bottom: 40px; }
.yx-page-hero h1 { color: #fff; font-size: 2.5rem; margin: 0; }
.yx-breadcrumb { color: #cfe0f3; font-size: 14px; }
.yx-breadcrumb a { color: #fff; }

/* ---------- Content / blog ---------- */
.yx-layout { display: grid; grid-template-columns: 1fr 320px; gap: 50px; padding: 70px 0; }
.yx-layout.is-full { grid-template-columns: 1fr; }
.entry-title a { color: var(--yx-text); }
.entry-meta { color: var(--yx-muted); font-size: 14px; margin-bottom: 14px; }
.yx-post { padding-bottom: 36px; margin-bottom: 36px; border-bottom: 1px solid var(--yx-border); }
.yx-post.sticky { border-left: 4px solid var(--yx-primary); padding-left: 20px; }
.entry-content > * { max-width: 100%; }
.alignwide { margin-left: -60px; margin-right: -60px; max-width: calc(100% + 120px); }
.alignfull { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); max-width: 100vw; width: 100vw; }
.aligncenter { margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.wp-caption, .wp-block-image figcaption { color: var(--yx-muted); font-size: 14px; }
.wp-caption-text { text-align: center; }
.gallery-caption { font-size: 14px; }
.bypostauthor > .comment-body { border-left: 3px solid var(--yx-primary); padding-left: 12px; }
.widget { margin-bottom: 40px; }
.widget-title { font-size: 1.1rem; border-bottom: 2px solid var(--yx-primary); padding-bottom: 8px; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: 8px 0; border-bottom: 1px solid var(--yx-border); }
.search-form { display: flex; }
.search-form .search-field { flex: 1; padding: 10px 12px; border: 1px solid var(--yx-border); font-size: 15px; }
.search-form .search-submit { padding: 10px 18px; background: var(--yx-primary); color: #fff; border: 0; cursor: pointer; }
.pagination .nav-links, .posts-navigation .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers { padding: 6px 14px; border: 1px solid var(--yx-border); }
.pagination .current { background: var(--yx-primary); color: #fff; border-color: var(--yx-primary); }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 30px; }
.comment-body { padding: 18px 0; border-bottom: 1px solid var(--yx-border); }
.comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url], .comment-form textarea {
	width: 100%; padding: 10px; border: 1px solid var(--yx-border); font-family: inherit;
}

/* ---------- Footer ---------- */
.yx-footer { background: #0e2236; color: #a9b8c8; font-size: 14px; }
.yx-footer a { color: #d7e2ee; }
.yx-footer a:hover { color: #fff; }
.yx-footer-main { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding: 70px 0 50px; }
.yx-footer h4 { color: #fff; font-size: 16px; margin-bottom: 18px; }
.yx-footer ul { list-style: none; margin: 0; padding: 0; }
.yx-footer li { margin-bottom: 8px; }
.yx-footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0; }
.yx-footer-bottom .yx-container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.yx-backtop { position: fixed; right: 20px; bottom: 20px; width: 46px; height: 46px; background: var(--yx-primary); color: #fff; border: 0; cursor: pointer; display: none; z-index: 40; font-size: 20px; }
.yx-backtop.is-visible { display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.yx-cards, .yx-news-grid { grid-template-columns: repeat(2,1fr); }
	.yx-footer-main { grid-template-columns: 1fr 1fr; }
	.yx-layout { grid-template-columns: 1fr; }
	.alignwide { margin-left: 0; margin-right: 0; max-width: 100%; }
}
@media (max-width: 860px) {
	.yx-menu-toggle { display: block; }
	.yx-nav { display: none; position: absolute; top: 84px; left: 0; right: 0; background: #fff; box-shadow: 0 10px 20px rgba(0,0,0,.08); }
	.yx-nav.is-open { display: block; }
	.yx-nav ul { flex-direction: column; }
	.yx-nav a { padding: 14px 24px; border-bottom: 1px solid var(--yx-border); }
	.yx-nav .sub-menu { position: static; display: flex; box-shadow: none; padding-left: 16px; }
	.yx-header-cta .yx-btn { display: none; }
	.yx-hero { height: 320px; }
	.yx-band .yx-container, .yx-contact { grid-template-columns: 1fr; }
	.yx-stats { grid-template-columns: repeat(2,1fr); }
	.yx-topbar .yx-hide-m { display: none; }
}
@media (max-width: 600px) {
	.yx-cards, .yx-news-grid, .yx-footer-main { grid-template-columns: 1fr; }
	.yx-section { padding: 60px 0; }
	h2 { font-size: 1.6rem; }
	.yx-download { flex-direction: column; align-items: flex-start; }
}
