/* ============================================================
   China Quality Service - Unified Stylesheet
   Third-Party Inspection & Quality Control Services
   Cached for all pages — single source of truth
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --primary: #1a5276;
  --primary-dark: #123a52;
  --primary-light: #2980b9;
  --accent: #e67e22;
  --accent-hover: #d35400;
  --bg-light: #f5f7fa;
  --bg-white: #ffffff;
  --bg-footer: #1a1f2b;
  --text-dark: #2c3e50;
  --text-body: #555;
  --text-muted: #999;
  --border: #e0e5ec;
  --shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
  --radius: 8px;
  --radius-sm: 4px;
  --transition: 0.3s ease;
  --max-width: 1200px;
  --header-h: 72px;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-dark);
  background: var(--bg-white);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-light); }

/* ---------- Accessibility: Skip Link ---------- */
.skip-link {
  position: absolute; top: -100px; left: 20px;
  background: var(--primary); color: #fff;
  padding: 8px 16px; border-radius: var(--radius-sm);
  z-index: 10000; font-size: 0.9rem;
  transition: top 0.2s;
}
.skip-link:focus { top: 10px; }

ul, ol { list-style: none; }
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 15px; }
.section { padding: 50px 0; }
.bg-light { background: var(--bg-light); }

/* ---------- Buttons ---------- */
.btn { display: inline-block; padding: 12px 32px; border-radius: 4px; font-size: 1rem; font-weight: 600; text-align: center; cursor: pointer; border: 2px solid transparent; transition: all var(--transition); line-height: 1.5; }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn-outline { background: transparent; color: #fff; border-color: #fff; }
.btn-outline:hover { background: #fff; color: var(--primary); }
.btn-white { background: #fff; color: var(--primary); border-color: #fff; }
.btn-white:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- Header / Navigation ---------- */
.header { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; background: rgba(255, 255, 255, 0.97); backdrop-filter: blur(10px); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06); transition: all var(--transition); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.logo { flex-shrink: 0; }
.logo a { display: flex; align-items: center; font-size: 1.4rem; font-weight: 700; color: var(--primary); }
.logo img { height: 48px; margin-right: 10px; }
.logo span { letter-spacing: 1px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { display: block; padding: 10px 18px; color: var(--text-dark); font-size: 0.95rem; font-weight: 500; border-radius: var(--radius-sm); transition: all var(--transition); position: relative; }
.nav a:hover, .nav a.active { color: var(--primary); background: rgba(26, 82, 118, 0.06); }

/* Dropdown Menu */
.nav-dropdown { position: relative; }
.nav-dropdown > a { display: flex; align-items: center; gap: 4px; }
.nav-dropdown > a::after { content: '▾'; font-size: 0.7rem; margin-left: 2px; transition: transform var(--transition); }
.nav-dropdown.open > a::after { transform: rotate(180deg); }
.dropdown-menu { position: absolute; top: 100%; left: 0; min-width: 240px; background: #fff; border-radius: var(--radius); box-shadow: 0 8px 30px rgba(0,0,0,0.15); opacity: 0; visibility: hidden; transform: translateY(8px); transition: all var(--transition); z-index: 1002; padding: 8px 0; }
.nav-dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu a { display: block; padding: 10px 20px; color: var(--text-dark); font-size: 0.9rem; border-radius: 0; white-space: nowrap; transition: all var(--transition); }
.dropdown-menu a:hover { background: rgba(26,82,118,0.06); color: var(--primary); padding-left: 24px; }

/* Language Switch */
.lang-switch { margin-left: 16px; display: flex; gap: 4px; align-items: center; }
.lang-switch a, .lang-switch button { padding: 4px 10px; font-size: 0.8rem; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-muted); cursor: pointer; }
.lang-switch button { background: transparent; line-height: inherit; }
.lang-switch a:hover, .lang-switch a.active,
.lang-switch button:hover, .lang-switch button.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Mobile Menu Toggle */
.menu-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; background: none; border: none; z-index: 1001; }
.menu-toggle span { display: block; width: 26px; height: 2.5px; background: var(--primary); border-radius: 2px; transition: all 0.3s; }

/* ---------- Page Header ---------- */
.page-header { background: linear-gradient(135deg, rgba(13,47,69,0.97), rgba(26,82,118,0.95)), url('../images/about-banner.jpg') center/cover no-repeat; color: #fff; padding: 120px 0 50px; text-align: center; }
.page-header h1 { font-size: 2.4rem; margin-bottom: 12px; }
.page-header .breadcrumb { font-size: 0.9rem; opacity: 0.75; }
.page-header .breadcrumb a { color: rgba(255,255,255,0.8); }
.page-header .breadcrumb a:hover { color: #fff; }
.page-header .page-title { font-size: 2.2rem; margin-bottom: 12px; }
.page-header .page-header-meta { font-size: 0.9rem; opacity: 0.75; margin-top: 12px; }
.page-header .page-header-meta .meta-category { color: #fff; font-weight: 700; }

/* Section Title */
.section-title { text-align: center; margin-bottom: 50px; }
.section-title h2 { font-size: 2rem; color: var(--primary); margin-bottom: 12px; position: relative; display: inline-block; }
.section-title h2::after { content: ''; display: block; width: 50px; height: 3px; background: var(--accent); margin: 12px auto 0; border-radius: 2px; }
.section-title p { color: var(--text-muted); font-size: 1.05rem; }

/* ---------- Hero / Banner (Home) ---------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; color: #fff; text-align: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; background: url('../images/hero-banner.jpg') center/cover no-repeat; animation: kenBurns 17s ease-in-out infinite alternate; }
.hero-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(13,47,69,0.88) 0%, rgba(26,82,118,0.85) 40%, rgba(26,110,142,0.85) 100%); }

@keyframes kenBurns { 0% { transform: scale(1); } 100% { transform: scale(1.15); } }

/* Dynamic Glow Orbs */
.hero-glow { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.hero-glow .orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.95; animation: floatGlow 18s infinite alternate ease-in-out; }
.hero-glow .orb-1 { width: 500px; height: 500px; background: radial-gradient(circle, rgba(41, 128, 185, 0.8), rgba(26, 82, 118, 0.2)); top: -20%; left: -10%; animation-duration: 20s; }
.hero-glow .orb-2 { width: 450px; height: 450px; background: radial-gradient(circle, rgba(230, 126, 34, 0.6), rgba(230, 126, 34, 0.1)); bottom: -30%; right: -10%; animation-duration: 25s; animation-delay: -5s; }
.hero-glow .orb-3 { width: 350px; height: 350px; background: radial-gradient(circle, rgba(26, 82, 118, 0.7), transparent); top: 40%; left: 60%; animation-duration: 16s; animation-delay: -10s; }

@keyframes floatGlow { 0% { transform: translate(0, 0) scale(1); } 33% { transform: translate(60px, -40px) scale(1.1); } 66% { transform: translate(-30px, 50px) scale(0.9); } 100% { transform: translate(40px, -60px) scale(1.05); } }

.hero-canvas { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; }
.hero-content { position: relative; z-index: 2; max-width: 800px; padding: 0 20px; }
.hero h1 { font-size: 3rem; font-weight: 700; line-height: 1.3; margin-bottom: 20px; letter-spacing: 2px; animation: heroFadeUp 1s ease-out 0.3s both; }
.hero p { font-size: 1.2rem; opacity: 0.9; margin-bottom: 36px; line-height: 1.8; animation: heroFadeUp 1s ease-out 0.6s both; }
.hero-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; animation: heroFadeUp 1s ease-out 0.9s both; }
@keyframes heroFadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

.hero-scroll { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); animation: bounce 2s infinite; cursor: pointer; color: rgba(255,255,255,0.7); font-size: 0.85rem; z-index: 2; }
.hero-scroll::after { content: ''; display: block; width: 20px; height: 20px; border-right: 2px solid rgba(255,255,255,0.7); border-bottom: 2px solid rgba(255,255,255,0.7); transform: rotate(45deg); margin: 8px auto 0; }
@keyframes bounce { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(10px); } }

/* ---------- Cards (Home & General) ---------- */
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 36px 28px; transition: all var(--transition); border: 1px solid transparent; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--primary-light); }
.card-icon { width: 64px; height: 64px; background: linear-gradient(135deg, var(--primary), var(--primary-light)); border-radius: 16px; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; font-size: 1.8rem; color: #fff; }
.card h3 { font-size: 1.25rem; margin-bottom: 12px; color: var(--primary-dark); }
.card p { font-size: 0.95rem; color: var(--text-body); line-height: 1.7; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }

/* Home-specific grids */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }

/* ---------- Stats Bar (Home) ---------- */
.stats-bar { background: var(--primary); color: #fff; padding: 40px 0; }
.stats-bar .container { display: flex; justify-content: space-around; text-align: center; flex-wrap: wrap; gap: 20px; }
.stat-item .stat-number { font-size: 2.5rem; font-weight: 700; margin-bottom: 4px; }
.stat-item p { font-size: 0.95rem; opacity: 0.8; }

/* ---------- About Preview (Home) ---------- */
.about-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 45px; align-items: center; }
.about-preview img { border-radius: var(--radius); box-shadow: var(--shadow); }
.about-preview h2 { font-size: 2rem; color: var(--primary); margin-bottom: 20px; }
.about-preview p { color: var(--text-body); margin-bottom: 16px; }
.about-list { margin-top: 20px; }
.about-list li { padding: 8px 0; padding-left: 24px; position: relative; color: var(--text-body); }
.about-list li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: bold; }

/* ---------- News Cards (Home) ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: all var(--transition); }
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.news-card-img { height: 200px; overflow: hidden; background: var(--bg-light); }
.news-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.news-card:hover .news-card-img img { transform: scale(1.05); }
.news-card-body { padding: 20px; }
.news-card-body h3 { font-size: 1.1rem; margin-bottom: 10px; line-height: 1.5; }
.news-card-body h3 a { color: var(--text-dark); }
.news-card-body h3 a:hover { color: var(--primary); }
.news-card-date { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 10px; }
.news-card-body p { font-size: 0.9rem; color: var(--text-body); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Tools Grid (Home Resources) ---------- */
.tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.tool-card { display: flex; flex-direction: column; align-items: center; text-align: center; background: #fff; border-radius: var(--radius); padding: 32px 24px; box-shadow: var(--shadow); transition: all var(--transition); border: 2px solid transparent; }
.tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--primary-light); }
.tool-card:hover .tool-link { color: var(--primary); }
.tool-icon { font-size: 2.5rem; margin-bottom: 16px; }
.tool-card h3 { font-size: 1.1rem; color: var(--text-dark); margin-bottom: 10px; line-height: 1.4; }
.tool-card p { font-size: 0.9rem; color: var(--text-body); margin-bottom: 16px; line-height: 1.6; flex: 1; }
.tool-link { font-size: 0.9rem; color: var(--primary-light); font-weight: 600; transition: color var(--transition); }

/* ---------- Insights Page Cards ---------- */
.insights-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.insight-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: all var(--transition); }
.insight-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.insight-card-img { height: 200px; overflow: hidden; background: var(--bg-light); }
.insight-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.insight-card:hover .insight-card-img img { transform: scale(1.05); }
.insight-card-body { padding: 24px; }
.insight-card-body h2 { font-size: 1.25rem; color: var(--primary-dark); margin-bottom: 12px; }
.insight-card-body p { font-size: 0.95rem; color: var(--text-body); margin-bottom: 20px; line-height: 1.7; }
.insight-card-body .btn { display: inline-block; padding: 10px 24px; background: var(--accent); color: #fff; border-radius: 4px; font-weight: 600; transition: all var(--transition); }
.insight-card-body .btn:hover { background: var(--accent-hover); color: #fff; }

/* ---------- Case Cards (Inspection Cases List) ---------- */
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.case-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: all var(--transition); }
.case-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.case-card-img { height: 200px; overflow: hidden; background: var(--bg-light); }
.case-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.case-card:hover .case-card-img img { transform: scale(1.05); }
.case-card-body { padding: 24px; }
.case-card-body h2 { font-size: 1.15rem; margin-bottom: 10px; line-height: 1.5; }
.case-card-body h2 a { color: var(--text-dark); }
.case-card-body h2 a:hover { color: var(--primary); }
.case-card-date { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 10px; }
.case-card-body p { font-size: 0.95rem; color: var(--text-body); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.7; }

/* ---------- News List (Industry Updates List) ---------- */
.news-list-item { display: flex; gap: 24px; margin-bottom: 30px; padding: 20px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); transition: all var(--transition); }
.news-list-item:hover { box-shadow: var(--shadow-hover); }
.news-list-thumb { width: 280px; height: 140px; border-radius: var(--radius); overflow: hidden; background: var(--bg-light); flex-shrink: 0; }
.news-list-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.news-list-item:hover .news-list-thumb img { transform: scale(1.05); }
.news-list-info { flex: 1; }
.news-list-info h2 { font-size: 1.15rem; margin-bottom: 10px; line-height: 1.5; }
.news-list-info h2 a { color: var(--text-dark); }
.news-list-info h2 a:hover { color: var(--primary); }
.news-list-meta { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 10px; }
.news-list-info p { font-size: 0.9rem; color: var(--text-body); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Sub-list pages (Inspection Cases / Factory Resource / Industry Updates) ---------- */
.list-header { text-align: center; padding: 40px 0 20px; }
.list-header h1 { font-size: 2.2rem; color: var(--primary); margin-bottom: 12px; }
.list-header p { color: var(--text-body); max-width: 700px; margin: 0 auto; line-height: 1.9; }

/* ---------- Page Layout (Sidebar) ---------- */
.page-layout { display: grid; grid-template-columns: 260px 1fr; gap: 40px; padding: 50px 0; }
.sidebar { background: var(--bg-light); border-radius: var(--radius); overflow: hidden; }
.sidebar-title { background: var(--primary); color: #fff; padding: 16px 20px; font-size: 1.1rem; font-weight: 600; }
.sidebar-nav a { display: block; padding: 12px 20px; border-bottom: 1px solid var(--border); color: var(--text-dark); font-size: 0.95rem; transition: all var(--transition); }
.sidebar-nav a:hover, .sidebar-nav a.active { background: #fff; color: var(--primary); padding-left: 28px; border-left: 3px solid var(--primary); }
.sidebar-contact { padding: 20px; }
.sidebar-contact h4 { font-size: 1rem; color: var(--primary); margin-bottom: 12px; }

/* Sidebar Helpers */
.sidebar-spacer { height: 20px; }
.sidebar-rate-box {
  margin-top: 15px; padding: 10px;
  background: rgba(230, 126, 34, 0.08);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}
.sidebar-rate-box strong { color: var(--accent); }
.sidebar-heading { font-size: 0.95rem; font-weight: 700; margin-bottom: 5px; }
.sidebar-contact ul { margin-bottom: 10px; }
.sidebar-contact ul:last-child { margin-bottom: 15px; }
.grid-2.mt-20 { margin-top: 20px; }
.sidebar-contact li { font-size: 0.9rem; color: var(--text-body); padding: 4px 0; }
.main-content h2 { font-size: 1.6rem; color: var(--primary); padding-bottom: 12px; border-bottom: 2px solid var(--primary); margin-bottom: 24px; }
.main-content h3 { font-size: 1.2rem; color: var(--primary-dark); margin: 28px 0 14px; }
.main-content p { color: var(--text-body); margin-bottom: 16px; line-height: 1.9; }

/* Service Detail Cards */
.service-detail-card { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding: 40px 0; border-bottom: 1px solid var(--border); }
.service-detail-card:last-child { border: none; }
.service-detail-card:nth-child(even) { direction: rtl; }
.service-detail-card:nth-child(even) > * { direction: ltr; }
.service-detail-card img { border-radius: var(--radius); box-shadow: var(--shadow); }
.service-detail-text h3 { font-size: 1.4rem; color: var(--primary); margin-bottom: 16px; margin-top: 0; }
.service-detail-text p { color: var(--text-body); line-height: 1.9; margin-bottom: 12px; }

/* Contact */
.contact-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 50px; align-items: start; }
.contact-info-section h2 { font-size: 1.8rem; color: var(--primary); margin-bottom: 20px; }
.contact-info-section p { color: var(--text-body); margin-bottom: 24px; line-height: 1.9; }
.contact-info-list li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 0.95rem; color: var(--text-body); flex-wrap: wrap; }
.contact-info-list .contact-label { font-weight: 600; color: var(--primary); min-width: 80px; }
.contact-form { background: #fff; padding: 36px; border-radius: var(--radius); box-shadow: var(--shadow); }
.contact-form h3 { font-size: 1.4rem; color: var(--primary); margin-bottom: 24px; text-align: center; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.9rem; font-weight: 600; color: var(--text-dark); margin-bottom: 6px; }
.form-group label .required { color: var(--accent); }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.95rem; font-family: inherit; transition: border-color var(--transition); background: var(--bg-light); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--primary-light); background: #fff; }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-submit { text-align: center; margin-top: 8px; }
.form-submit .btn { padding: 14px 48px; font-size: 1.05rem; }
.form-msg { padding: 14px 20px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: 0.95rem; display: none; }
.form-msg.success { display: block; background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.form-msg.error { display: block; background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* Downloads */
.download-item { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; transition: all var(--transition); background: #fff; }
.download-item:hover { border-color: var(--primary-light); box-shadow: var(--shadow); }
.download-icon { font-size: 2rem; flex-shrink: 0; }
.download-info { flex: 1; }
.download-info h4 { font-size: 1rem; margin-bottom: 4px; }
.download-info .download-meta { font-size: 0.85rem; color: var(--text-muted); }
.download-btn { padding: 8px 20px; background: var(--primary); color: #fff; border-radius: var(--radius-sm); font-size: 0.9rem; white-space: nowrap; transition: all var(--transition); }
.download-btn:hover { background: var(--primary-dark); color: #fff; }

/* ---------- FAQ Accordion (Services) ---------- */
.faq-item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; transition: all var(--transition); }
.faq-item:hover { box-shadow: var(--shadow); }
.faq-question { padding: 20px 24px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 1.05rem; font-weight: 600; color: var(--primary-dark); user-select: none; transition: background var(--transition); }
.faq-question:hover { background: var(--bg-light); }
.faq-question::after { content: '+'; font-size: 1.4rem; font-weight: 300; color: var(--primary); transition: transform 0.3s; flex-shrink: 0; margin-left: 16px; }
.faq-item.open .faq-question::after { content: '−'; transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.4s ease; }
.faq-item.open .faq-answer { max-height: 2000px; }
.faq-answer-inner { padding: 0 24px 24px; color: var(--text-body); line-height: 1.9; font-size: 0.98rem; }
.faq-answer-inner p { margin-bottom: 12px; }
.faq-answer-inner ul { list-style: disc; padding-left: 20px; margin-bottom: 12px; }
.faq-answer-inner ul li { margin-bottom: 6px; }
.faq-answer-inner ol { list-style: decimal; padding-left: 20px; margin-bottom: 12px; }
.faq-answer-inner ol li { margin-bottom: 6px; }
.faq-answer-inner strong { color: var(--primary-dark); }

/* ---------- Article Styles ---------- */
.article-header { padding: 20px 0 0; }
.article-header h1 { font-size: 2rem; color: var(--primary); line-height: 1.4; margin-bottom: 12px; }
.article-meta { display: flex; gap: 20px; flex-wrap: wrap; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 30px; }
.article-meta .meta-category { color: var(--accent); font-weight: 600; }
.article-meta .meta-source { color: var(--text-body); font-style: italic; }
.article-body { font-size: 1.05rem; line-height: 2; color: var(--text-dark); }
.article-body p { margin-bottom: 20px; }
.article-body h2 { font-size: 1.5rem; color: var(--primary); margin: 36px 0 16px; padding-bottom: 8px; border-bottom: 2px solid var(--border); }
.article-body h3 { font-size: 1.2rem; color: var(--primary-dark); margin: 28px 0 14px; }
.article-body table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 0.95rem; }
.article-body table th, .article-body table td { border: 1px solid var(--border); padding: 12px 16px; text-align: left; vertical-align: top; }
.article-body table th { background: var(--primary); color: #fff; font-weight: 600; }
.article-body table tr:nth-child(even) td { background: var(--bg-light); }
.article-body blockquote { margin: 24px 0; padding: 16px 24px; background: var(--bg-light); border-left: 4px solid var(--primary); color: var(--text-body); font-style: italic; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.article-body strong { color: var(--primary-dark); }
.article-body .figure-caption { font-size: 0.85rem; color: var(--text-muted); text-align: center; margin-top: 8px; margin-bottom: 24px; }
.content-figure { margin: 28px 0 32px; text-align: center; }
.content-figure img { width: 100%; max-width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.content-figure figcaption { font-size: 0.85rem; color: var(--text-muted); margin-top: 10px; line-height: 1.5; }
.article-body img { border-radius: var(--radius); box-shadow: var(--shadow); margin: 20px auto; }
.article-body ul, .article-body ol { list-style: revert; padding-left: 24px; margin-bottom: 20px; }
.article-body ul li, .article-body ol li { margin-bottom: 8px; }

/* Article Navigation (Prev/Next) */
/* Related Articles */ 
.related-articles { margin-top: 50px; padding-top: 30px; border-top: 1px solid var(--border); }
.related-articles h3 { font-size: 1.2rem; color: var(--primary-dark); margin-bottom: 20px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.related-card { background: var(--bg-light); border-radius: var(--radius); padding: 22px; transition: all var(--transition); border: 1px solid var(--border); }
.related-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--primary-light); }
.related-card h4 { font-size: 1rem; margin-bottom: 6px; line-height: 1.4; }
.related-card h4 a { color: var(--primary-dark); }
.related-card h4 a:hover { color: var(--primary); }
.related-card p { font-size: 0.82rem; color: var(--text-muted); margin: 0; }
@media (max-width: 768px) { .related-grid { grid-template-columns: 1fr; } }

/* Article Navigation (Prev/Next) */
.article-nav { display: flex; justify-content: space-between; gap: 20px; margin-top: 50px; padding-top: 30px; border-top: 1px solid var(--border); }
.article-nav a { color: var(--primary); font-weight: 600; font-size: 0.95rem; }
.article-nav a:hover { color: var(--primary-light); }
.article-nav .prev, .article-nav .next { flex: 1; }
.article-nav .next { text-align: right; }
.article-nav span { font-size: 0.85rem; color: var(--text-muted); display: block; margin-bottom: 4px; }

/* Font Size Controls (Article pages only) */
.font-size-controls { display: flex; gap: 8px; justify-content: flex-end; margin-bottom: 20px; }
.font-size-controls button { padding: 6px 14px; font-size: 0.85rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; cursor: pointer; transition: all var(--transition); color: var(--text-body); }
.font-size-controls button:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- CTA Section ---------- */
.cta { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; text-align: center; padding: 45px 0; }
.cta h2 { font-size: 2rem; margin-bottom: 16px; }
.cta p { font-size: 1.1rem; opacity: 0.9; margin-bottom: 30px; max-width: 600px; margin-left: auto; margin-right: auto; }

/* ---------- Footer ---------- */
.footer { background: var(--bg-footer); color: rgba(255, 255, 255, 0.7); padding: 50px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-about .footer-title { color: #fff; font-size: 1.2rem; margin-bottom: 16px; font-weight: 700; }
.footer-about p { font-size: 0.9rem; line-height: 1.8; }
.footer-col .footer-heading { color: #fff; font-size: 1rem; margin-bottom: 16px; font-weight: 700; }
.footer-col a { display: block; color: rgba(255, 255, 255, 0.6); font-size: 0.9rem; padding: 5px 0; transition: all var(--transition); }
.footer-col a:hover { color: #fff; padding-left: 6px; }
.footer-bottom { text-align: center; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.1); font-size: 0.85rem; color: rgba(255, 255, 255, 0.4); }

/* ---------- Back to Top ---------- */
.back-to-top { position: fixed; bottom: 30px; right: 30px; width: 44px; height: 44px; background: var(--primary); color: #fff; border: none; border-radius: 50%; cursor: pointer; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: all var(--transition); box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2); z-index: 999; }
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--primary-dark); transform: translateY(-3px); }

/* ---------- Animations ---------- */
html.js-ready .fade-in { opacity: 0; transform: translateY(20px); transition: all 0.6s ease; }
html.js-ready .fade-in.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   RESPONSIVE — All breakpoints merged
   ============================================================ */

/* Tablet (992px) */
@media (max-width: 992px) {
  :root { --header-h: 64px; }
  .hero h1 { font-size: 2.2rem; }
  .hero p { font-size: 1rem; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .about-preview { grid-template-columns: 1fr; gap: 30px; }
  .page-layout { grid-template-columns: 200px 1fr; gap: 24px; }
  .contact-layout { grid-template-columns: 1fr; gap: 40px; }
  .service-detail-card { grid-template-columns: 1fr; direction: ltr !important; }
  .service-detail-card:nth-child(even) { direction: ltr !important; }
  .insights-grid { grid-template-columns: 1fr; }
  .case-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* Mobile (768px) */
@media (max-width: 768px) {
  :root { --header-h: 64px; }
  .menu-toggle { display: flex; }
  .nav { position: fixed; top: 0; right: -100%; width: 280px; height: 100vh; background: #fff; flex-direction: column; padding: 60px 24px 24px; gap: 0; box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1); transition: right 0.3s ease; overflow-y: auto; }
  .nav.open { right: 0; }
  .nav a { padding: 14px 12px; border-bottom: 1px solid var(--border); border-radius: 0; font-size: 1rem; }
  .lang-switch { margin: 16px 0 0; padding-left: 12px; }
  .nav-dropdown > a { justify-content: space-between; }
  .dropdown-menu { position: static; box-shadow: none; opacity: 1; visibility: visible; transform: none; max-height: 0; overflow: hidden; transition: max-height 0.3s ease; padding: 0; background: transparent; min-width: auto; }
  .nav-dropdown.open .dropdown-menu { max-height: 600px; }
  .dropdown-menu a { padding-left: 32px; font-size: 0.9rem; border-bottom: 1px solid var(--border); }
  .menu-overlay { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.4); z-index: 999; }
  .menu-overlay.open { display: block; }
  .hero { min-height: 80vh; }
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 0.95rem; }
  .section { padding: 50px 0; }
  .section-title h2 { font-size: 1.5rem; }
  .grid-2, .grid-3, .services-grid, .news-grid, .tools-grid { grid-template-columns: 1fr; }
  .page-header h1 { font-size: 1.8rem; }
  .page-layout { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .faq-question { font-size: 0.95rem; padding: 16px 18px; }
  .article-header h1 { font-size: 1.5rem; }
  .article-nav { flex-direction: column; gap: 12px; }
  .article-nav .next { text-align: left; }
  .news-list-item { flex-direction: column; }
  .news-list-thumb { width: 100%; height: 200px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .stats-bar .container { gap: 30px; }
  .stat-item .stat-number { font-size: 2rem; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .aggregate-rating { flex-direction: column; gap: 6px; }
  .aggregate-rating .rating-stars { font-size: 1.6rem; }
  .aggregate-rating .rating-score { font-size: 1rem; }
}

/* ===== Testimonials & Aggregate Rating ===== */
.testimonials-section { padding: 40px 0; }
.testimonials-section .section-title { margin-bottom: 15px; }

.aggregate-rating {
  text-align: center;
  padding: 10px 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.aggregate-rating .rating-stars {
  font-size: 2rem;
  font-weight: 700;
  color: #f39c12;
  letter-spacing: 2px;
}

.aggregate-rating .rating-score {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
}

.aggregate-rating .rating-count {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.testimonial-card {
  background: var(--bg-light);
  border-left: 4px solid var(--accent);
  padding: 24px 28px;
  border-radius: var(--radius);
  margin: 0;
}

.testimonial-card p {
  font-size: 1rem;
  color: var(--text-body);
  line-height: 1.8;
  margin-bottom: 12px;
  font-style: italic;
}

.testimonial-card cite {
  font-style: normal;
  font-weight: 600;
  color: var(--primary-dark);
}


/* ---------- Pre-Shipment Inspection Landing Page ---------- */

/* Process Steps */
.process-steps { margin: 32px 0; }
.process-step {
  display: flex; gap: 24px; align-items: flex-start;
  padding: 24px 0; border-bottom: 1px solid var(--border);
}
.process-step:last-child { border-bottom: none; }
.step-number {
  flex-shrink: 0; width: 44px; height: 44px;
  background: var(--primary); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; font-weight: 700;
}
.step-content h3 { font-size: 1.15rem; color: var(--primary-dark); margin: 0 0 6px; }
.step-content p { color: var(--text-body); line-height: 1.8; margin: 0; }

/* Defect Gallery */
.gallery-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  margin: 24px 0 32px;
}
.gallery-grid figure { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--bg-light); }
.gallery-grid img { width: 100%; height: 220px; object-fit: cover; display: block; }
.gallery-grid figcaption {
  padding: 10px 12px; font-size: 0.85rem; color: var(--text-body);
  line-height: 1.5; text-align: center;
}

/* Pricing Box */
.pricing-box {
  display: flex; align-items: baseline; gap: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; padding: 28px 36px; border-radius: var(--radius);
  margin: 24px 0; justify-content: center; flex-wrap: wrap;
}
.pricing-box .pricing-amount { font-size: 3rem; font-weight: 800; line-height: 1; }
.pricing-box .pricing-unit {
  font-size: 1.25rem; opacity: 0.85;
}

/* Benefit Cards */
.benefit-cards {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
  margin: 24px 0;
}
.benefit-card {
  background: var(--bg-light); border-radius: var(--radius); padding: 28px;
  border-left: 4px solid var(--primary);
}
.benefit-card h3 { font-size: 1.1rem; color: var(--primary-dark); margin: 0 0 10px; }
.benefit-card p { color: var(--text-body); line-height: 1.8; margin: 0; }

/* Responsive */
@media (max-width: 768px) {
  .process-step { flex-direction: column; gap: 12px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .benefit-cards { grid-template-columns: 1fr; }
  .pricing-box .pricing-amount { font-size: 2.2rem; }
}
@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
}
