/* =========================================================
   Chirimen — precimach-inspired design system
   Palette: deep navy #1a306e (primary / headings / dark)
            sky blue #1890d7 (accent / actions / links)
   Font: Inter. Light blue-gray surfaces. Generous whitespace.
   ========================================================= */

:root {
  --primary: #1a306e;
  --primary-700: #15295c;
  --primary-600: #213a82;
  --primary-500: #2a4696;
  --accent: #1890d7;
  --accent-dark: #0f7ac0;
  --accent-soft: #e8f3fb;
  --text: #1f2733;
  --text-muted: #5a6678;
  --bg: #ffffff;
  --bg-muted: #f0f4fb;
  --bg-muted-2: #e9eef6;
  --border: #e3e9f2;
  --shadow: 0 8px 30px rgba(26, 48, 110, 0.08);
  --shadow-lg: 0 18px 50px rgba(26, 48, 110, 0.14);
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1200px;
  --header-height: 76px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scrollbar-gutter: stable; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 { line-height: 1.2; color: var(--primary); letter-spacing: -0.01em; }

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

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(24, 144, 215, 0.28); }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(24, 144, 215, 0.34); }
.btn-secondary { background: #fff; color: var(--primary); border-color: var(--primary); }
.btn-secondary:hover { background: var(--accent-soft); }
.btn-light { background: #fff; color: var(--primary); }
.btn-light:hover { background: var(--bg-muted); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.55); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }
.btn-lg { padding: 15px 32px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; }
.btn-link:hover { color: var(--accent-dark); gap: 9px; }

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed; right: 22px; bottom: 22px;
  width: 54px; height: 54px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45);
  z-index: 1100; transition: transform 0.15s ease;
}
.wa-float:hover { transform: scale(1.08); }
.wa-ico { font-size: 26px; line-height: 1; }

/* ---------- Announcement ---------- */
.announcement {
  background: var(--primary);
  color: #fff;
  font-size: 0.86rem;
  padding: 9px 24px;
  text-align: center;
  display: flex; align-items: center; justify-content: center;
  gap: 16px; flex-wrap: wrap;
}
.announcement-cta {
  background: var(--accent);
  color: #fff; border: none;
  padding: 5px 14px; border-radius: 999px;
  font-weight: 600; cursor: pointer; transition: background .15s ease;
}
.announcement-cta:hover { background: var(--accent-dark); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 1000; transition: box-shadow 0.2s ease;
}
.site-header.scrolled { box-shadow: var(--shadow); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-height);
}
.logo { display: flex; align-items: center; line-height: 1.05; }
.logo-mark { font-weight: 800; font-size: 1.4rem; letter-spacing: -0.03em; color: var(--primary); }
.logo-tag { font-size: 0.68rem; color: var(--text-muted); letter-spacing: 0.06em; text-transform: uppercase; }

.main-nav { display: none; }
.nav-list { display: flex; list-style: none; gap: 1px; align-items: center; }
.nav-list > li { position: relative; }
.nav-list > li > a {
  display: block; padding: 10px 13px;
  font-weight: 500; font-size: 0.92rem; white-space: nowrap;
  color: var(--text); border-radius: var(--radius-sm);
  transition: color .15s ease, background .15s ease;
}
.nav-list > li > a:hover,
.has-dropdown:hover > a,
.has-dropdown:focus-within > a { background: var(--bg-muted); color: var(--primary); }

.dropdown.mega {
  position: absolute; top: calc(100% + 8px); left: 0;
  min-width: 220px; max-width: min(960px, calc(100vw - 32px));
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  list-style: none; padding: 16px 18px;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: all .18s ease; z-index: 60;
}
.has-dropdown:hover .dropdown.mega,
.has-dropdown:focus-within .dropdown.mega { opacity: 1; visibility: visible; transform: translateY(0); }
.mega-inner { display: flex; flex-wrap: wrap; gap: 4px; }
.mega-inner a {
  display: inline-block; padding: 7px 12px; margin: 2px;
  border-radius: 999px; font-size: 0.84rem; line-height: 1.3; white-space: nowrap;
  color: var(--text); background: var(--bg-muted); transition: all .15s ease;
}
.mega-inner a:hover { background: var(--accent); color: #fff; }
.mega-more {
  display: inline-block; margin: 6px 0 0 6px; padding: 6px 10px;
  font-size: 0.8rem; font-weight: 600; color: var(--accent); text-decoration: underline;
}
.nav-list > li:nth-last-child(-n + 3) .dropdown.mega { left: auto; right: 0; }

.header-actions { display: flex; align-items: center; gap: 12px; }
.menu-toggle {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; background: transparent; border: none; cursor: pointer;
}
.menu-toggle span { display: block; height: 2px; width: 24px; background: var(--text); transition: all 0.2s ease; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none; background: #fff; border-top: 1px solid var(--border);
  padding: 12px 18px; max-height: calc(100vh - var(--header-height)); overflow-y: auto;
}
.mobile-menu.open { display: block; }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; }
.mobile-menu li { border-bottom: 1px solid var(--border); }
.mobile-menu li > a { display: block; padding: 13px 4px; font-weight: 600; font-size: 0.98rem; color: var(--text); }
.mobile-menu li:last-child { border-bottom: none; padding-top: 16px; }
.mobile-menu .sub-links { list-style: none; margin: 0 0 10px; padding: 0 0 0 12px; }
.mobile-menu .sub-links li { border-bottom: none; }
.mobile-menu .sub-links a { display: block; padding: 9px 4px; font-weight: 400; font-size: 0.9rem; color: var(--text-muted); }

/* ---------- Hero ---------- */
/* ---------- Hero ---------- */
.hero {
  position: relative; padding: 72px 0 88px;
  background:
    radial-gradient(1100px 480px at 88% -12%, rgba(24, 144, 215, 0.12), transparent 60%),
    linear-gradient(180deg, #fff 0%, var(--bg-muted) 100%);
}
.eyebrow {
  color: var(--accent); font-weight: 700; font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 16px;
}
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.07; margin-bottom: 20px; letter-spacing: -0.02em; }
.hero-lead { font-size: 1.15rem; color: var(--text-muted); max-width: 560px; margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 26px; }
.hero-checks { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.hero-checks li { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 0.95rem; }
.hero-checks li::before {
  content: "✓"; display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; background: var(--accent); color: #fff;
  border-radius: 50%; font-size: 0.72rem; font-weight: 700; flex: none;
}

/* Hero carousel variant: full-bleed background image slides + centered text overlay */
.hero-carousel {
  min-height: 92vh; display: flex; align-items: center; justify-content: center;
  overflow: hidden; padding: 0;
}
.hero-bg-slides { position: absolute; inset: 0; z-index: 0; }
.hero-bg-slide {
  position: absolute; inset: 0; opacity: 0;
  background-size: cover; background-position: center;
  transform: scale(1.08); transition: opacity 1.2s ease, transform 6s ease;
}
.hero-bg-slide.active { opacity: 1; transform: scale(1); }
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(15, 35, 75, 0.82) 0%, rgba(15, 35, 75, 0.55) 55%, rgba(15, 35, 75, 0.35) 100%);
}
.hero-content {
  position: relative; z-index: 2; width: 100%;
  max-width: 820px; margin: 0 auto; padding: 120px 0 100px;
  text-align: center; color: #fff;
}
.hero-carousel .eyebrow { color: #7dd3fc; }
.hero-carousel h1 { color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,0.25); }
.hero-carousel .hero-lead { color: rgba(255,255,255,0.88); margin-left: auto; margin-right: auto; text-shadow: 0 1px 10px rgba(0,0,0,0.25); }
.hero-carousel .hero-checks { justify-content: center; }
.hero-carousel .hero-checks li { color: rgba(255,255,255,0.88); justify-content: center; }
.hero-carousel .hero-actions { justify-content: center; }
.btn-ghost {
  background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.5);
  backdrop-filter: blur(4px);
}
.btn-ghost:hover { background: rgba(255,255,255,0.22); color: #fff; }

/* ---------- Trust bar ---------- */
.trust-bar { padding: 34px 0; border-bottom: 1px solid var(--border); }
.trust-label {
  text-align: center; font-size: 0.85rem; color: var(--text-muted);
  margin-bottom: 18px; text-transform: uppercase; letter-spacing: 0.06em;
}
.trust-logos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 30px; }
.trust-logos span { font-weight: 600; color: var(--text-muted); font-size: 1rem; }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section-muted { background: var(--bg-muted); }
.section-tight { padding: 60px 0; }

/* ---------- Sub-page grid (landing -> child links) ---------- */
.sub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 8px;
}
.sub-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.02rem;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.sub-card::after { content: "\2192"; color: var(--accent); opacity: 0; transform: translateX(-6px); transition: opacity .18s ease, transform .18s ease; }
.sub-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow-lg); }
.sub-card:hover::after { opacity: 1; transform: translateX(0); }
@media (max-width: 900px) { .sub-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .sub-grid { grid-template-columns: 1fr; } }
.section-header { max-width: 740px; margin-bottom: 48px; }
.section-header.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-header h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); margin-bottom: 14px; }
.section-header p { color: var(--text-muted); font-size: 1.05rem; }

/* ---------- Cards ---------- */
.card-grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(1, 1fr); }
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px; transition: all 0.2s ease; display: flex; flex-direction: column;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-4px); border-color: var(--accent-soft); }
.card-icon {
  width: 50px; height: 50px; display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); border-radius: 12px; font-size: 1.5rem; margin-bottom: 18px;
}
.card h3 { font-size: 1.18rem; margin-bottom: 10px; color: var(--primary); }
.card h3 a { color: var(--primary); }
.card h3 a:hover { color: var(--accent); }
.card p { color: var(--text-muted); font-size: 0.95rem; flex: 1; }
.card-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; color: var(--accent); font-weight: 600; font-size: 0.92rem; }
.card-link:hover { color: var(--accent-dark); gap: 9px; }
.industry-card h3 a:hover { color: var(--accent); }

/* ---------- Stats ---------- */
.stats-band { background: var(--bg-muted); padding: 84px 0; }
.stats-band .section-header { margin-bottom: 52px; }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.stat {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 18px; text-align: center; box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.stat:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--accent-soft); }
.stat-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; background: var(--accent-soft); color: var(--accent);
  border-radius: 14px; margin-bottom: 16px;
}
.stat-icon svg { width: 26px; height: 26px; }
.stat-value { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; color: var(--primary); line-height: 1; margin-bottom: 10px; }
.stat-unit { font-size: 0.5em; margin-left: 4px; }
.stat-label { color: var(--text-muted); font-size: 0.92rem; }

.capability-highlights { display: grid; gap: 20px; }
.capability-item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 26px; }
.capability-item h4 { margin-bottom: 6px; font-size: 1.05rem; color: var(--primary); }
.capability-item p { color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Parts chips ---------- */
.parts-list { display: flex; flex-wrap: wrap; gap: 12px; }
.part-chip {
  display: inline-block; padding: 10px 18px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 999px; font-weight: 500; font-size: 0.95rem; transition: all 0.2s ease;
}
.part-chip:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- Quality / showcase ---------- */
.quality-grid { display: grid; gap: 48px; align-items: center; }
.quality-copy h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: 16px; }
.quality-copy p { color: var(--text-muted); margin-bottom: 20px; }
.quality-list { list-style: none; margin-bottom: 24px; }
.quality-list li { padding: 8px 0 8px 28px; position: relative; color: var(--text); }
.quality-list li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.quality-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.quality-card {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 120px; padding: 16px; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); font-weight: 600; color: var(--primary);
}
.quality-gallery img { border-radius: var(--radius); border: 1px solid var(--border); width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.about-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 24px; }

/* generic media grid (factory / equipment / team showcases) */
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.media-grid figure { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--bg-muted); }
.media-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; transition: transform .3s ease; }
.media-grid figure:hover img { transform: scale(1.04); }
.media-grid figcaption { font-size: 0.82rem; color: var(--text-muted); padding: 9px 12px; }

/* application mosaic (decor images) */
.mosaic { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 28px; }
.mosaic figure { margin: 0; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 1/1; background: var(--bg-muted); }
.mosaic img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.mosaic figure:hover img { transform: scale(1.06); }

/* ---------- Process steps ---------- */
/* ---------- Process rail ---------- */
.process-rail { display: grid; gap: 22px; position: relative; }
.process-rail::before {
  content: ""; position: absolute; top: 21px; left: 11%; right: 11%; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--primary)); opacity: 0.28; z-index: 0;
}
.pf-step { position: relative; z-index: 1; text-align: center; }
.pf-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--primary)); color: #fff;
  font-weight: 800; font-size: 1.1rem; margin-bottom: 16px;
  box-shadow: 0 8px 18px rgba(24, 144, 215, 0.35); border: 3px solid #fff;
}
.pf-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 20px; box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
  min-height: 160px; display: flex; flex-direction: column; justify-content: flex-start;
}
.pf-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pf-card h4 { margin-bottom: 8px; font-size: 1.08rem; color: var(--primary); }
.pf-card p { color: var(--text-muted); font-size: 0.94rem; }

/* ---------- About ---------- */
.about-grid { display: grid; gap: 48px; align-items: center; }
.about-media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); }
.about-copy h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: 16px; }
.about-copy p { color: var(--text-muted); margin-bottom: 16px; }

/* ---------- Case studies ---------- */
.case-card { cursor: pointer; }
.case-meta { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); font-weight: 700; margin-bottom: 10px; }
.case-link { display: inline-block; margin-top: 14px; color: var(--accent); font-weight: 600; }
.case-disclaimer { text-align: center; color: var(--text-muted); font-size: 0.85rem; margin-top: 28px; }

/* ---------- FAQ ---------- */
.faq-narrow { max-width: 1040px; margin: 0 auto; padding: 0 12px; }
.faq-list {
  column-count: 2; column-gap: 12px;
}
.faq-item {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden; margin-bottom: 12px;
  break-inside: avoid; page-break-inside: avoid; -webkit-column-break-inside: avoid;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.faq-item[open] { border-color: var(--accent-soft); box-shadow: var(--shadow); }
.faq-item summary {
  padding: 15px 18px; font-weight: 600; font-size: 0.97rem; cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--primary);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.3rem; color: var(--accent); line-height: 1; flex: none; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { padding: 0 18px 16px; color: var(--text-muted); font-size: 0.94rem; }
.faq-item[open] p {
  animation: faqFadeIn .35s ease both;
}
@keyframes faqFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- CTA ---------- */
.cta-section { background: var(--primary); color: #fff; padding: 84px 24px; text-align: center; }
.cta-inner { max-width: 720px; margin: 0 auto; }
.cta-section h2 { color: #fff; font-size: clamp(1.7rem, 4vw, 2.5rem); margin-bottom: 12px; }
.cta-section p { opacity: 0.9; margin-bottom: 28px; font-size: 1.05rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary-700); color: #aeb8cc; padding: 64px 0 24px; font-size: 0.9rem; }
.footer-grid { display: grid; gap: 40px; margin-bottom: 48px; }
.footer-brand .logo-mark { color: #fff; margin-bottom: 12px; }
.footer-brand p { max-width: 320px; line-height: 1.7; }
.footer-col h4 { color: #fff; font-size: 0.95rem; margin-bottom: 16px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 24px;
  display: flex; flex-direction: column; gap: 6px; text-align: center; color: #8e99b3;
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(26, 48, 110, 0.65); backdrop-filter: blur(4px);
  z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 24px;
  opacity: 0; visibility: hidden; transition: all 0.25s ease;
}
.modal-overlay:not([hidden]) { opacity: 1; visibility: visible; }
.modal-panel {
  background: #fff; border-radius: var(--radius); width: 100%; max-width: 620px;
  max-height: 90vh; overflow-y: auto; padding: 32px; position: relative;
  box-shadow: var(--shadow-lg); transform: translateY(12px); transition: transform 0.25s ease;
}
.modal-overlay:not([hidden]) .modal-panel { transform: translateY(0); }
.modal-close {
  position: absolute; top: 16px; right: 20px; background: transparent; border: none;
  font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--text-muted);
}
.modal-close:hover { color: var(--text); }
.modal-panel h2 { margin-bottom: 6px; font-size: 1.5rem; color: var(--primary); }
.modal-subtitle { color: var(--text-muted); margin-bottom: 24px; }
.rfq-form { display: flex; flex-direction: column; gap: 18px; }
.form-row { display: grid; gap: 18px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field span { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.form-field input, .form-field textarea {
  padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.95rem; font-family: inherit; transition: border-color 0.2s ease;
}
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.file-field input { padding: 8px; }
.form-note { font-size: 0.8rem; color: var(--text-muted); text-align: center; }
.form-success { text-align: center; padding: 24px 0; }
.form-success h3 { margin-bottom: 10px; color: var(--accent); }
.form-success p { color: var(--text-muted); margin-bottom: 20px; }

/* ---------- Subpage: breadcrumb / hero / layout ---------- */
.breadcrumb { background: var(--bg-muted); border-bottom: 1px solid var(--border); font-size: 0.9rem; padding: 14px 0; }
.breadcrumb .container { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--text-muted); }
.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: var(--border); }
.breadcrumb [aria-current="page"] { color: var(--text); font-weight: 500; }

.page-hero { background: linear-gradient(180deg, var(--bg-muted) 0%, #fff 100%); border-bottom: 1px solid var(--border); padding: 44px 0 36px; }
.page-kicker {
  display: inline-block; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent); background: var(--accent-soft);
  padding: 4px 12px; border-radius: 999px; margin-bottom: 14px;
}
.page-title { font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.15; margin: 0 0 14px; color: var(--primary); }
.page-lead { font-size: 1.05rem; line-height: 1.6; color: var(--text-muted); max-width: 760px; margin: 0 0 20px; }
.page-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.page-hero-media { margin-top: 26px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--bg-muted); aspect-ratio: 16 / 7; }
.page-hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.page-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
.page-content { min-width: 0; }
.content-block { display: grid; grid-template-columns: 56px 1fr; gap: 20px; padding: 26px 0; border-top: 1px solid var(--border); }
.content-block:first-child { border-top: none; padding-top: 6px; }
.block-num { font-size: 1.5rem; font-weight: 800; color: var(--accent-soft); line-height: 1.2; }
.content-block h2 { font-size: 1.3rem; margin: 0 0 10px; color: var(--primary); }
.content-block p { margin: 0; line-height: 1.7; color: var(--text-muted); }
.placeholder { color: #b08a3a !important; font-style: italic; }

.draft-note {
  max-width: 760px; margin: 28px 0 0; padding: 10px 14px; font-size: 0.82rem;
  color: var(--text-muted); background: var(--bg-muted); border-left: 3px solid var(--accent-soft);
  border-radius: 0 8px 8px 0;
}

.related-links {
  position: sticky; top: 90px; background: var(--bg-muted); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.related-links h3 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin: 0 0 14px; }
.related-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.related-grid a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px;
  background: #fff; border: 1px solid var(--border); border-radius: 8px; color: var(--text);
  text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: all .15s ease;
}
.related-grid a:hover { border-color: var(--accent); color: var(--accent); transform: translateX(2px); }
.related-grid .arrow { color: var(--accent); transition: transform .15s ease; }
.related-grid a:hover .arrow { transform: translateX(3px); }

/* gallery inside subpages */
.page-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 28px; }
.page-gallery figure { margin: 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--bg-muted); }
.page-gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.page-gallery figcaption { font-size: 0.8rem; color: var(--text-muted); padding: 7px 10px; }

/* ---------- Blog ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 28px; }
.post-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.post-link { display: block; color: inherit; text-decoration: none; height: 100%; }
.post-cover { position: relative; aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--primary-600), var(--accent)); overflow: hidden; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.post-card:hover .post-cover img { transform: scale(1.06); }
.post-cover-empty { display: flex; align-items: center; justify-content: center; }
.post-cover-empty span { font-size: 3rem; font-weight: 800; color: rgba(255, 255, 255, 0.85); }
.pc-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; }
.post-cat {
  align-self: flex-start; font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--accent); background: var(--accent-soft);
  padding: 4px 10px; border-radius: 999px;
}
.pc-body h3 { font-size: 1.18rem; color: var(--primary); line-height: 1.3; }
.post-excerpt { color: var(--text-muted); font-size: 0.93rem; line-height: 1.55; }
.post-meta { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.post-tag { font-size: 0.72rem; color: var(--text-muted); }
.post-readmore { margin-top: 2px; color: var(--accent); font-weight: 700; font-size: 0.92rem; display: inline-flex; align-items: center; gap: 6px; }
.post-card:hover .post-readmore { gap: 9px; }

/* featured (first post) */
.blog-featured-wrap { margin-top: 26px; }
.blog-featured {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: box-shadow .2s ease;
}
.blog-featured:hover { box-shadow: var(--shadow-lg); }
.feat-link { display: grid; grid-template-columns: 1.1fr 1fr; color: inherit; text-decoration: none; }
.feat-link .post-cover { aspect-ratio: auto; min-height: 280px; }
.feat-body { padding: 32px 34px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.feat-body h3 { font-size: 1.7rem; color: var(--primary); line-height: 1.2; }
.feat-body .post-excerpt { font-size: 1rem; }

/* topics filter */
.blog-topics { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 6px; }
.topic-pill {
  border: 1px solid var(--border); background: #fff; color: var(--text-muted);
  padding: 7px 16px; border-radius: 999px; font-size: 0.88rem; font-weight: 600; cursor: pointer;
  transition: all .15s ease;
}
.topic-pill:hover { border-color: var(--accent); color: var(--accent); }
.topic-pill.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.post-body { max-width: 760px; margin: 0 auto; }
.post-body h1 { font-size: 2rem; margin: 0 0 10px; }
.post-body h2 { font-size: 1.5rem; margin: 32px 0 12px; }
.post-body h3 { font-size: 1.2rem; margin: 24px 0 10px; }
.post-body p { margin: 14px 0; }
.post-body ul, .post-body ol { margin: 14px 0 14px 22px; }
.post-body li { margin: 6px 0; }
.post-body blockquote { margin: 18px 0; padding: 12px 18px; border-left: 4px solid var(--accent); background: var(--bg-muted); color: var(--text-muted); border-radius: 0 var(--radius) var(--radius) 0; }
.post-body pre { background: #0f172a; color: #e2e8f0; padding: 16px; border-radius: var(--radius); overflow-x: auto; font-size: 0.9rem; }
.post-body code { font-family: 'SFMono-Regular', Consolas, monospace; }
.post-body img { border-radius: var(--radius); margin: 18px 0; }
.post-body a { color: var(--accent); }

/* ---------- Site directory ---------- */
.dir-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 32px; margin-top: 36px; }
.dir-col h3 { font-size: 1.02rem; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 2px solid var(--accent-soft); }
.dir-col h3 a { color: var(--accent); text-decoration: none; }
.dir-col h3 a:hover { color: var(--accent-dark); }
.dir-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.dir-col li a { color: var(--text-muted); text-decoration: none; font-size: 0.93rem; line-height: 1.4; display: inline-block; transition: color .15s ease, transform .15s ease; }
.dir-col li a:hover { color: var(--accent); transform: translateX(2px); }

/* ---------- Partner logo wall ---------- */
.partner-wall { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 22px; }
.partner-logo {
  display: flex; align-items: center; justify-content: center; background: #fff;
  border: 1px solid var(--border); border-radius: 10px; padding: 18px 14px; min-height: 88px;
}
.partner-logo img { max-width: 100%; max-height: 52px; width: auto; height: auto; object-fit: contain; filter: grayscale(0.15); transition: filter .2s ease; }
.partner-logo:hover img { filter: grayscale(0); }

/* ---------- Certificate grid ---------- */
.cert-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 22px; }
.cert-item { margin: 0; background: #fff; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.cert-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--bg-muted); }
.cert-item figcaption { font-size: 0.78rem; color: var(--text-muted); padding: 8px 10px; text-align: center; }

/* ---------- Responsive ---------- */
@media (min-width: 768px) {
  .hero-grid { grid-template-columns: 1.02fr 1fr; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .capability-highlights { grid-template-columns: repeat(2, 1fr); }
  .process-rail { grid-template-columns: repeat(4, 1fr); }
  .quality-grid, .about-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .form-row { grid-template-columns: 1fr 1fr; }
  .media-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .main-nav { display: block; }
  .menu-toggle { display: none; }
  .mobile-menu { display: none !important; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .stats-grid { grid-template-columns: repeat(5, 1fr); }
  .hero { padding: 72px 0 88px; }
  .hero-carousel { min-height: 88vh; }
  .hero-content { padding: 140px 0 120px; max-width: 900px; }
  .section { padding: 104px 0; }
}
@media (max-width: 900px) {
  .dir-grid { grid-template-columns: repeat(2, 1fr); }
  .partner-wall { grid-template-columns: repeat(3, 1fr); }
  .cert-grid { grid-template-columns: repeat(3, 1fr); }
  .media-grid { grid-template-columns: repeat(2, 1fr); }
  .page-layout { grid-template-columns: 1fr; gap: 28px; }
  .related-links { position: static; }
  .mosaic { grid-template-columns: repeat(3, 1fr); }
  .process-rail { grid-template-columns: repeat(2, 1fr); }
  .process-rail::before { display: none; }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .feat-link { grid-template-columns: 1fr; }
  .feat-link .post-cover { min-height: 220px; }
}
@media (max-width: 640px) {
  .dir-grid { grid-template-columns: 1fr; }
  .partner-wall { grid-template-columns: repeat(2, 1fr); }
  .cert-grid { grid-template-columns: repeat(2, 1fr); }
  .media-grid { grid-template-columns: 1fr; }
  .page-gallery { grid-template-columns: 1fr 1fr; }
  .mosaic { grid-template-columns: repeat(2, 1fr); }
  .content-block { grid-template-columns: 1fr; gap: 6px; }
  .block-num { font-size: 1.1rem; }
  .faq-list { column-count: 1; }
  .post-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   NEW: i18n language switcher, right-side floating contact,
   scroll-reveal, counters, hero slider, back-to-top
   ========================================================= */

/* ---------- Language switcher ---------- */
.lang-switch { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.12); color: #fff;
  border: 1px solid rgba(255,255,255,0.22); border-radius: 999px;
  padding: 7px 14px; font-size: 0.85rem; font-weight: 600; cursor: pointer;
  transition: background .25s ease, border-color .25s ease;
}
.lang-btn:hover { background: rgba(255,255,255,0.2); }
.lang-btn .caret { font-size: 0.7rem; opacity: .8; }
.lang-menu {
  position: absolute; top: calc(100% + 10px); right: 0; min-width: 150px;
  list-style: none; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  padding: 6px; opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s; z-index: 60;
}
.lang-switch.open .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-menu li { margin: 0; }
.lang-menu button {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 9px 12px; border-radius: 6px; font-size: 0.9rem; color: var(--text);
  display: flex; align-items: center; gap: 8px; transition: background .2s ease;
}
.lang-menu button:hover { background: var(--accent-soft); }
.lang-menu button.active { color: var(--accent); font-weight: 700; }
.lang-menu .flag { font-size: 1.05rem; line-height: 1; }

/* ---------- Right-side floating contact (collapsible, whole-panel) ---------- */
.side-contact {
  position: fixed; right: 14px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 6px; z-index: 70;
  background: rgba(255,255,255,0.78); backdrop-filter: blur(10px);
  padding: 8px; border-radius: 14px;
  box-shadow: 0 12px 32px rgba(26,48,110,0.18);
}
.side-contact .sc-item {
  display: flex; align-items: center; gap: 10px;
  width: 52px; height: 46px; padding: 0 14px; overflow: hidden;
  color: #fff; border-radius: 8px;
  font-size: 0.9rem; font-weight: 600; letter-spacing: 0.2px;
  white-space: nowrap; text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.14);
  transition: width .32s cubic-bezier(.22,.68,.36,1), transform .25s ease,
              box-shadow .25s ease, background .25s ease, filter .25s ease;
}
.side-contact .sc-item .sc-ico { flex: 0 0 24px; display: flex; align-items: center; justify-content: center; }
.side-contact .sc-item .sc-label { opacity: 0; transition: opacity .22s ease; }

/* Expand: hover ANYWHERE on the panel — all three move together */
.side-contact:hover .sc-item { width: 168px; }
.side-contact:hover .sc-item .sc-label { opacity: 1; transition-delay: .06s; }

.side-contact .sc-item:hover {
  transform: translateX(-3px) scale(1.03);
  box-shadow: 0 8px 22px rgba(0,0,0,0.22);
  filter: brightness(1.06);
}
.side-contact .sc-item:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.sc-whatsapp { background: linear-gradient(135deg,#25d366 0%,#1ebe5b 100%); }
.sc-email   { background: linear-gradient(135deg,#1890d7 0%,#1479b5 100%); }
.sc-phone   { background: linear-gradient(135deg,#1a306e 0%,#243f86 100%); }
.sc-whatsapp:hover { background: linear-gradient(135deg,#2ee073 0%,#23c667 100%); }
.sc-email:hover    { background: linear-gradient(135deg,#2aa1e8 0%,#1683c1 100%); }
.sc-phone:hover    { background: linear-gradient(135deg,#243f86 0%,#2c4d9e 100%); }
@media (max-width: 768px) { .side-contact { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .side-contact .sc-item { transition: none; }
  .side-contact .sc-item:hover { transform: none; }
}

/* ---------- Scroll reveal (AOS-style) ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal-left { opacity: 0; transform: translateX(-26px); transition: opacity .7s ease, transform .7s ease; }
.reveal-left.in { opacity: 1; transform: none; }
.reveal-right { opacity: 0; transform: translateX(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal-right.in { opacity: 1; transform: none; }
.reveal-zoom { opacity: 0; transform: scale(.94); transition: opacity .7s ease, transform .7s ease; }
.reveal-zoom.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left, .reveal-right, .reveal-zoom { opacity: 1 !important; transform: none !important; }
}

/* ---------- Counters ---------- */
.stat-num { font-variant-numeric: tabular-nums; }

/* ---------- Back to top ---------- */
#toTop {
  position: fixed; right: 22px; bottom: 22px; width: 46px; height: 46px;
  border-radius: 50%; border: 0; cursor: pointer; background: var(--primary); color: #fff;
  font-size: 1.2rem; box-shadow: var(--shadow-lg); z-index: 65;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .3s ease, transform .3s ease, visibility .3s, background .25s ease;
}
#toTop.show { opacity: 1; visibility: visible; transform: translateY(0); }
#toTop:hover { background: var(--accent); }

/* ---------- Floating quote button (bottom-right inquiry) ---------- */
.floating-quote {
  position: fixed; right: 22px; bottom: 82px; z-index: 66;
  border: 0; cursor: pointer; border-radius: 999px;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 0.92rem;
  font-family: inherit; padding: 13px 22px; box-shadow: var(--shadow-lg);
  transition: background .25s ease, transform .25s ease;
}
.floating-quote:hover { background: var(--primary); transform: translateY(-2px); }
@media (max-width: 768px) {
  .floating-quote { right: 14px; bottom: 78px; padding: 11px 18px; font-size: 0.85rem; }
}

/* ---------- Plain page head (子页面无 hero 配图版式) ---------- */
.page-hero-plain { background: none; border-bottom: 0; padding: 40px 0 6px; }
.page-hero-plain .page-title { margin: 16px 0 0; font-size: 2rem; }
@media (max-width: 768px) { .page-hero-plain .page-title { font-size: 1.5rem; } }

/* ---------- Logo image ---------- */
.logo-img { height: 44px; width: auto; display: block; }
[dir="rtl"] .logo { margin-right: 0; margin-left: auto; }

/* ---------- RTL (Arabic etc.) ---------- */
[dir="rtl"] .reveal-left { transform: translateX(26px); }
[dir="rtl"] .reveal-right { transform: translateX(-26px); }
[dir="rtl"] .header-inner { flex-direction: row-reverse; }
[dir="rtl"] .header-actions { flex-direction: row-reverse; }
[dir="rtl"] .nav-list { flex-direction: row-reverse; }
[dir="rtl"] .lang-menu { right: auto; left: 0; }
[dir="rtl"] .mega-inner { direction: rtl; }
[dir="rtl"] .side-contact { right: auto; left: 14px; }
[dir="rtl"] #toTop { right: auto; left: 22px; }
[dir="rtl"] .floating-quote { right: auto; left: 22px; }
[dir="rtl"] .hero-grid,
[dir="rtl"] .quality-grid,
[dir="rtl"] .about-grid,
[dir="rtl"] .page-layout { direction: rtl; }
[dir="rtl"] .hero-copy,
[dir="rtl"] .quality-copy,
[dir="rtl"] .about-copy { direction: rtl; text-align: right; }
[dir="rtl"] .hero-checks li { justify-content: flex-end; }
[dir="rtl"] .hero-actions { justify-content: flex-end; }
[dir="rtl"] .section-header { margin-right: 0; }
[dir="rtl"] .section-header.center { margin-left: auto; margin-right: auto; text-align: center; }
[dir="rtl"] .content-block { grid-template-columns: 1fr 56px; }
[dir="rtl"] .content-block:first-child { padding-top: 6px; }
[dir="rtl"] .block-num { text-align: left; }
[dir="rtl"] .mobile-menu .sub-links { padding-left: 0; padding-right: 12px; }
[dir="rtl"] .partner-wall,
[dir="rtl"] .cert-grid,
[dir="rtl"] .media-grid,
[dir="rtl"] .mosaic,
[dir="rtl"] .page-gallery { direction: rtl; }
@media (max-width: 900px) {
  [dir="rtl"] .page-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  [dir="rtl"] .content-block { grid-template-columns: 1fr; }
}

/* =========================================================
   CMS additions: blog cards, markdown body, page/nav admin
   ========================================================= */

/* ---------- 文章卡片（前台目录 + 单篇） ---------- */
.post-grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.post-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform .25s ease, box-shadow .25s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.post-link { display: block; color: inherit; text-decoration: none; }
.post-cover { width: 100%; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-muted, #f0f4fb); }
.post-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-cover-empty {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1a306e 0%, #1890d7 100%);
  color: #fff; font-size: 2.4rem; font-weight: 700;
}
.post-body { padding: 16px 18px 18px; }
.post-body h3 { margin: 0 0 8px; font-size: 1.05rem; color: var(--primary); }
.post-excerpt { margin: 0 0 10px; font-size: .9rem; color: var(--muted, #6b7280); line-height: 1.6; }
.post-meta { font-size: .8rem; color: var(--muted, #9aa4b2); }
.post-tag {
  display: inline-block; background: #eef4fd; color: var(--accent);
  padding: 2px 8px; border-radius: 999px; font-size: .72rem; margin-left: 4px;
}
.post-full { max-width: 820px; }
.post-full-cover { margin-bottom: 18px; border-radius: var(--radius); overflow: hidden; }
.post-full-cover img { width: 100%; display: block; }
.post-title { font-size: 1.7rem; color: var(--primary); margin: 0 0 8px; }

/* ---------- Markdown 正文排版 ---------- */
.post-content, .md-preview, .page-content { line-height: 1.8; }
.post-content h1, .post-content h2, .post-content h3,
.md-preview h1, .md-preview h2, .md-preview h3,
.page-content h1, .page-content h2, .page-content h3 {
  color: var(--primary); margin: 1.4em 0 .6em; line-height: 1.35;
}
.post-content h1, .md-preview h1, .page-content h1 { font-size: 1.6rem; }
.post-content h2, .md-preview h2, .page-content h2 { font-size: 1.3rem; }
.post-content h3, .md-preview h3, .page-content h3 { font-size: 1.08rem; }
.post-content p, .md-preview p, .page-content p { margin-bottom: 1em; }
.post-content ul, .post-content ol,
.md-preview ul, .md-preview ol,
.page-content ul, .page-content ol { margin: 0 0 1em 1.4em; }
.post-content li, .md-preview li, .page-content li { margin-bottom: .4em; }
.post-content img, .md-preview img, .page-content img {
  max-width: 100%; height: auto; border-radius: 8px; margin: 1em 0;
}
.post-content blockquote, .md-preview blockquote, .page-content blockquote {
  border-left: 4px solid var(--accent); background: #f5f9ff;
  margin: 1em 0; padding: 12px 16px; border-radius: 0 8px 8px 0;
}
.post-content blockquote p:last-child, .md-preview blockquote p:last-child,
.page-content blockquote p:last-child { margin-bottom: 0; }
.post-content code, .md-preview code, .page-content code {
  background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-size: .88em;
}
.post-content pre, .md-preview pre, .page-content pre {
  background: #0f172a; color: #e2e8f0; padding: 15px 18px; border-radius: 10px;
  overflow-x: auto; margin: 1em 0;
}
.post-content pre code, .md-preview pre code, .page-content pre code {
  background: none; color: inherit; padding: 0;
}
.post-content table, .md-preview table, .page-content table {
  width: 100%; border-collapse: collapse; margin: 1em 0; font-size: .92rem;
}
.post-content th, .md-preview th, .page-content th {
  background: #f8fafc; text-align: left; padding: 9px 12px; border-bottom: 2px solid var(--border);
}
.post-content td, .md-preview td, .page-content td {
  padding: 9px 12px; border-bottom: 1px solid #eef2f8;
}
.post-content hr, .md-preview hr, .page-content hr { border: 0; border-top: 1px solid var(--border); margin: 1.6em 0; }

/* ---------- Admin: 导航编辑器 ---------- */
.nav-editor { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.nav-item { border: 1px solid var(--border); border-radius: 10px; padding: 12px; background: #fbfcfe; }
.nav-row { display: flex; gap: 8px; align-items: center; }
.nav-row input[type="text"] {
  flex: 1; padding: 8px 10px; border: 1px solid var(--border);
  border-radius: 7px; font-size: .9rem;
}
.nav-row input[type="text"]:focus { outline: none; border-color: var(--accent); }
.nav-row .nav-name { flex: 0 0 30%; }
.nav-kids { margin: 10px 0 0 22px; display: flex; flex-direction: column; gap: 8px; }
.nav-row-sub .nav-kname { flex: 0 0 34%; }
.mini-btn.danger { background: #fee2e2; color: #b91c1c; }
.mini-btn.danger:hover { background: #fecaca; }

/* ---------- Admin: 页面列表行 ---------- */
.post-list li { display: flex; align-items: center; gap: 12px; }
.pl-title { flex: 1; font-weight: 600; color: var(--text); }
.pl-meta { font-size: .82rem; color: var(--muted, #7a8699); }
.pl-actions { flex: 0 0 auto; }
.md-preview { max-height: 460px; overflow-y: auto; }
