/* ===================================================================
   Hongyuan Waterproofing — Global Site Stylesheet
   =================================================================== */

:root{
  --red: #E2231A;
  --red-dark: #B4160F;
  --red-light: #FDEAE9;
  --navy: #12203C;
  --navy-2: #1B2A4A;
  --navy-soft: #2b3c60;
  --ink: #1D2230;
  --muted: #667085;
  --line: #E7E9EE;
  --bg: #F6F7F9;
  --white: #FFFFFF;
  --radius: 10px;
  --shadow-sm: 0 2px 10px rgba(18,32,60,.06);
  --shadow-md: 0 12px 30px rgba(18,32,60,.12);
  --container: 1180px;
  --nav-h: 76px;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  color:var(--ink);
  background:var(--white);
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4{
  font-family:'Oswald',Impact,'Segoe UI',sans-serif;
  text-transform:uppercase;
  letter-spacing:.3px;
  line-height:1.15;
  margin:0 0 14px;
  color:var(--navy);
}
p{ margin:0 0 14px; color:var(--ink); }
a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }
ul{ margin:0; padding:0; list-style:none; }
button{ font-family:inherit; cursor:pointer; }
.container{ max-width:var(--container); margin:0 auto; padding:0 24px; }
.section{ padding:72px 0; }
.section.tight{ padding:48px 0; }
.section.alt{ background:var(--bg); }
.section.navy{ background:linear-gradient(135deg,var(--navy) 0%,var(--navy-2) 100%); color:#fff; }
.section.navy h2, .section.navy h3, .section.navy p{ color:#fff; }
.section.navy .muted{ color:#c7cee0; }

.eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  color:var(--red); font-weight:700; font-size:.8rem;
  letter-spacing:2px; text-transform:uppercase; margin-bottom:10px;
}
.eyebrow::before{ content:""; width:22px; height:3px; background:var(--red); display:inline-block; }
h2{ font-size:clamp(1.7rem,3vw,2.4rem); }
.section-head{ max-width:720px; margin-bottom:40px; }
.section-head.center{ margin-left:auto; margin-right:auto; text-align:center; }
.muted{ color:var(--muted); }

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:14px 28px; border-radius:6px; font-weight:700; font-size:.92rem;
  letter-spacing:.4px; text-transform:uppercase; border:2px solid transparent;
  transition:all .2s ease; white-space:nowrap;
}
.btn-primary{ background:var(--red); color:#fff; }
.btn-primary:hover{ background:var(--red-dark); transform:translateY(-2px); box-shadow:var(--shadow-md); }
.btn-outline{ background:transparent; border-color:currentColor; }
.btn-outline:hover{ background:rgba(255,255,255,.12); }
.btn-dark{ background:var(--navy); color:#fff; }
.btn-dark:hover{ background:var(--navy-2); }
.btn-whatsapp{ background:#25D366; color:#fff; }
.btn-whatsapp:hover{ background:#1DA851; }
.btn-row{ display:flex; gap:14px; flex-wrap:wrap; margin-top:8px; }

/* ---------- Header ---------- */
.site-header{
  position:sticky; top:0; z-index:1000; background:rgba(255,255,255,.97);
  backdrop-filter:blur(6px); border-bottom:1px solid var(--line);
  height:var(--nav-h); display:flex; align-items:center;
}
.site-header .container{ display:flex; align-items:center; justify-content:space-between; gap:24px; }
.brand{ display:flex; align-items:center; gap:10px; }
.brand img{ height:42px; width:auto; }
.brand-text{ font-family:'Oswald',sans-serif; font-weight:600; font-size:.72rem; color:var(--muted); letter-spacing:1px; line-height:1.3; }
.main-nav{ display:flex; align-items:center; gap:30px; }
.main-nav a{
  font-weight:600; font-size:.92rem; color:var(--navy); position:relative; padding:8px 0;
}
.main-nav a::after{
  content:""; position:absolute; left:0; bottom:0; width:0; height:2px; background:var(--red);
  transition:width .2s ease;
}
.main-nav a:hover::after, .main-nav a.active::after{ width:100%; }
.main-nav a.active{ color:var(--red); }
.header-actions{ display:flex; align-items:center; gap:14px; }

.lang-switch{ position:relative; }
.lang-btn{
  display:flex; align-items:center; gap:6px; background:var(--bg); border:1px solid var(--line);
  padding:9px 14px; border-radius:6px; font-weight:700; font-size:.82rem; color:var(--navy);
}
.lang-menu{
  position:absolute; right:0; top:calc(100% + 8px); background:#fff; border:1px solid var(--line);
  border-radius:8px; box-shadow:var(--shadow-md); min-width:160px; overflow:hidden;
  opacity:0; visibility:hidden; transform:translateY(-6px); transition:all .18s ease;
}
.lang-switch.open .lang-menu{ opacity:1; visibility:visible; transform:translateY(0); }
.lang-menu button{
  display:flex; width:100%; align-items:center; gap:10px; padding:11px 14px; background:none; border:none;
  font-size:.88rem; font-weight:600; color:var(--ink); text-align:left;
}
.lang-menu button:hover{ background:var(--bg); }
.lang-menu button.active{ color:var(--red); }

.nav-toggle{ display:none; background:none; border:none; width:34px; height:34px; position:relative; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after{
  content:""; position:absolute; left:6px; right:6px; height:2px; background:var(--navy); transition:all .2s ease;
}
.nav-toggle span{ top:16px; }
.nav-toggle span::before{ top:-8px; }
.nav-toggle span::after{ top:8px; }
.nav-toggle.open span{ background:transparent; }
.nav-toggle.open span::before{ top:0; transform:rotate(45deg); background:var(--navy);}
.nav-toggle.open span::after{ top:0; transform:rotate(-45deg); background:var(--navy);}

/* ---------- Hero ---------- */
.hero{
  position:relative; color:#fff; overflow:hidden;
  background:linear-gradient(120deg,var(--navy) 10%, var(--navy-2) 55%, #223258 100%);
}
.hero .hero-bg{ position:absolute; inset:0; object-fit:cover; opacity:.32; }
.hero .hero-overlay{ position:absolute; inset:0; background:linear-gradient(115deg,var(--navy) 20%, rgba(18,32,60,.55) 70%, rgba(18,32,60,.25) 100%); }
.hero-inner{ position:relative; z-index:2; padding:110px 0 90px; max-width:720px; }
.hero-inner .eyebrow{ color:#ff9490; }
.hero-inner h1{ color:#fff; font-size:clamp(2.1rem,5vw,3.4rem); margin-bottom:16px; }
.hero-inner p{ color:#dbe0ee; font-size:1.08rem; max-width:560px; }
.page-hero{ padding:64px 0; }
.page-hero h1{ color:#fff; font-size:clamp(1.9rem,4vw,2.8rem); }
.breadcrumb{ font-size:.85rem; color:#b9c1d8; margin-bottom:10px; }
.breadcrumb a:hover{ color:#fff; }

/* ---------- Stat strip ---------- */
.stat-strip{ background:var(--navy); color:#fff; }
.stat-grid{ display:grid; grid-template-columns:repeat(5,1fr); gap:20px; padding:34px 0; }
.stat-item{ text-align:center; border-left:1px solid rgba(255,255,255,.15); padding:0 10px; }
.stat-item:first-child{ border-left:none; }
.stat-num{ font-family:'Oswald',sans-serif; font-size:clamp(1.5rem,3vw,2.3rem); color:var(--red); font-weight:600; }
.stat-label{ font-size:.78rem; color:#c7cee0; text-transform:uppercase; letter-spacing:.5px; margin-top:4px; }

/* ---------- Cards ---------- */
.grid{ display:grid; gap:26px; }
.grid-2{ grid-template-columns:repeat(2,1fr); }
.grid-3{ grid-template-columns:repeat(3,1fr); }
.grid-4{ grid-template-columns:repeat(4,1fr); }

.card{
  background:#fff; border:1px solid var(--line); border-radius:var(--radius);
  overflow:hidden; transition:transform .2s ease, box-shadow .2s ease; height:100%;
}
.card:hover{ transform:translateY(-4px); box-shadow:var(--shadow-md); }
.card-body{ padding:24px; }
.card h3{ font-size:1.05rem; margin-bottom:8px; }
.card img{ width:100%; height:190px; object-fit:cover; }
.icon-badge{
  width:52px; height:52px; border-radius:10px; background:var(--red-light); color:var(--red);
  display:flex; align-items:center; justify-content:center; font-size:1.4rem; margin-bottom:16px;
}
.section.navy .icon-badge{ background:rgba(255,255,255,.1); color:#fff; }

/* Advantage card (dark) */
.adv-card{
  background:var(--navy-2); color:#fff; border-radius:var(--radius); padding:28px;
  border:1px solid rgba(255,255,255,.08); height:100%;
}
.adv-card h3{ color:#fff; }
.adv-card p{ color:#c7cee0; font-size:.94rem; }

/* ---------- About / split blocks ---------- */
.split{ display:grid; grid-template-columns:1fr 1fr; gap:50px; align-items:center; }
.split img{ border-radius:var(--radius); box-shadow:var(--shadow-md); width:100%; object-fit:cover; }
.split.reverse .split-media{ order:2; }
.check-list li{ position:relative; padding-left:28px; margin-bottom:10px; }
.check-list li::before{ content:"✓"; position:absolute; left:0; top:0; color:var(--red); font-weight:800; }

.value-row{ display:grid; grid-template-columns:repeat(4,1fr); gap:20px; }
.value-item{ padding:22px; border:1px solid var(--line); border-radius:var(--radius); background:#fff; }
.section.navy .value-item{ background:rgba(255,255,255,.05); border-color:rgba(255,255,255,.12); }
.value-item h4{ font-size:1rem; margin-bottom:6px; }
.section.navy .value-item h4{ color:#fff; }

/* ---------- Partners strip ---------- */
.partners-wrap{ background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:20px; }
.partners-wrap img{ width:100%; }

/* ---------- Products page ---------- */
.brand-tabs{ display:flex; flex-wrap:wrap; gap:10px; margin-bottom:30px; }
.brand-tab{
  padding:9px 18px; border-radius:30px; font-weight:700; font-size:.82rem; border:2px solid var(--line);
  background:#fff; color:var(--navy); text-transform:uppercase; letter-spacing:.4px;
}
.brand-tab.active{ background:var(--navy); color:#fff; border-color:var(--navy); }

.system-block{ border:1px solid var(--line); border-radius:var(--radius); margin-bottom:22px; overflow:hidden; }
.system-head{
  display:flex; align-items:center; justify-content:space-between; gap:10px; padding:18px 22px;
  background:var(--bg); cursor:pointer; user-select:none;
}
.system-head h3{ margin:0; font-size:1rem; }
.system-head .tag{
  font-size:.68rem; font-weight:800; letter-spacing:.6px; padding:4px 10px; border-radius:20px;
  color:#fff; text-transform:uppercase; white-space:nowrap;
}
.system-head .chev{ transition:transform .2s ease; color:var(--muted); flex:none; }
.system-block.open .chev{ transform:rotate(180deg); }
.system-list{ max-height:0; overflow:hidden; transition:max-height .3s ease; }
.system-block.open .system-list{ max-height:1200px; }
.system-list table{ width:100%; border-collapse:collapse; }
.system-list td{ padding:12px 22px; border-top:1px solid var(--line); font-size:.9rem; vertical-align:top; }
.system-list td.code{ font-weight:700; color:var(--red); width:130px; white-space:nowrap; }

.tag.c-hongyuan{ background:var(--red); }
.tag.c-shuangsheng{ background:#2159A6; }
.tag.c-exsede{ background:#E07A1F; }
.tag.c-excaid{ background:#2C4A8C; }
.tag.c-beituo{ background:#1F7A4D; }
.tag.c-biogo{ background:#1C8E7A; }
.tag.c-rosher{ background:#A6321F; }
.tag.c-special{ background:#6E3B9E; }

.scenario-list{ counter-reset:scn; }
.scenario-item{ display:flex; gap:16px; padding:18px 0; border-top:1px solid var(--line); }
.scenario-item:first-child{ border-top:none; }
.scenario-num{
  flex:none; width:34px; height:34px; border-radius:50%; background:var(--red); color:#fff;
  display:flex; align-items:center; justify-content:center; font-weight:700; font-family:'Oswald',sans-serif;
}
.scenario-item h4{ margin:0 0 4px; font-size:.98rem; }
.scenario-item ul{ margin-top:6px; }
.scenario-item ul li{ font-size:.86rem; color:var(--muted); position:relative; padding-left:14px; margin-bottom:3px;}
.scenario-item ul li::before{ content:"–"; position:absolute; left:0; color:var(--red); }

/* ---------- Certificates ---------- */
.cert-gallery img{ border-radius:var(--radius); border:1px solid var(--line); }
.award-row{ display:grid; grid-template-columns:260px 1fr; gap:30px; border:1px solid var(--line); border-radius:var(--radius); padding:26px; margin-bottom:22px; align-items:start;}
.award-badge{ display:flex; flex-direction:column; align-items:flex-start; gap:10px; }
.award-badge .medal{ width:64px; height:64px; border-radius:50%; background:linear-gradient(135deg,#f6d365,#c9932c); display:flex; align-items:center; justify-content:center; font-size:1.6rem; color:#fff; box-shadow:var(--shadow-sm); }
.award-badge h3{ font-size:1.1rem; margin:0; }
.award-timeline{ display:flex; flex-direction:column; gap:12px; }
.award-timeline .yr-item{ display:flex; gap:14px; align-items:baseline; padding:10px 0; border-top:1px dashed var(--line); }
.award-timeline .yr-item:first-child{ border-top:none; padding-top:0; }
.award-timeline .yr{ flex:none; width:56px; font-family:'Oswald',sans-serif; color:var(--red); font-weight:700; }

/* ---------- Projects ---------- */
.filter-bar{ display:flex; flex-wrap:wrap; gap:10px; margin-bottom:30px; }
.filter-btn{ padding:9px 18px; border-radius:30px; border:2px solid var(--line); background:#fff; font-weight:700; font-size:.82rem; color:var(--navy); }
.filter-btn.active{ background:var(--red); border-color:var(--red); color:#fff; }
.project-card{ position:relative; border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow-sm); }
.project-card img{ width:100%; height:220px; object-fit:cover; }
.project-card .pc-info{ padding:16px 18px; background:#fff; }
.project-card .pc-info .country{ font-size:.75rem; color:var(--red); font-weight:800; text-transform:uppercase; letter-spacing:.5px; }
.project-card .pc-info h4{ margin:6px 0 0; font-size:.98rem; color:var(--navy); }
.region-list{ display:none; }
.region-list.show{ display:grid; }

/* ---------- Contact ---------- */
.office-card{ border:1px solid var(--line); border-radius:var(--radius); padding:22px; height:100%; }
.office-card h3{ font-size:1.02rem; display:flex; align-items:center; gap:8px; }
.office-card .addr{ font-size:.92rem; color:var(--muted); margin-bottom:6px; }
.office-card .addr b{ color:var(--ink); }
.contact-hero-actions{ display:flex; gap:16px; flex-wrap:wrap; }

.map-frame{ border-radius:var(--radius); overflow:hidden; border:1px solid var(--line); }
.map-frame iframe{ width:100%; height:380px; border:0; display:block; }

/* ---------- Footer ---------- */
.site-footer{ background:var(--navy); color:#c7cee0; padding-top:60px; }
.footer-grid{ display:grid; grid-template-columns:1.4fr 1fr 1fr 1.2fr; gap:40px; padding-bottom:40px; }
.footer-grid h4{ color:#fff; font-size:.95rem; margin-bottom:16px; }
.footer-grid img{ height:38px; margin-bottom:14px; }
.footer-grid p{ color:#a9b2ca; font-size:.9rem; }
.footer-links li{ margin-bottom:10px; }
.footer-links a{ color:#c7cee0; font-size:.9rem; }
.footer-links a:hover{ color:#fff; }
.footer-office{ margin-bottom:14px; font-size:.88rem; color:#a9b2ca; }
.footer-office b{ color:#fff; display:block; margin-bottom:2px; }
.social-row{ display:flex; gap:10px; margin-top:16px; }
.social-row a{ width:38px; height:38px; border-radius:50%; background:rgba(255,255,255,.08); display:flex; align-items:center; justify-content:center; }
.social-row a:hover{ background:var(--red); }
.footer-bottom{ border-top:1px solid rgba(255,255,255,.1); padding:20px 0; text-align:center; font-size:.82rem; color:#8a93ac; }

/* ---------- WhatsApp floating button ---------- */
.wa-float{
  position:fixed; right:22px; bottom:22px; z-index:1200; display:flex; align-items:center; gap:10px;
}
.wa-btn{
  width:60px; height:60px; border-radius:50%; background:#25D366; color:#fff; display:flex;
  align-items:center; justify-content:center; box-shadow:0 6px 20px rgba(37,211,102,.5); position:relative;
}
.wa-btn svg{ width:30px; height:30px; }
.wa-btn::after{
  content:""; position:absolute; inset:0; border-radius:50%; border:2px solid #25D366;
  animation:wa-pulse 2.2s ease-out infinite;
}
@keyframes wa-pulse{
  0%{ transform:scale(1); opacity:.7; }
  100%{ transform:scale(1.7); opacity:0; }
}
.wa-tip{
  background:#fff; color:var(--ink); padding:10px 14px; border-radius:8px; font-size:.85rem; font-weight:600;
  box-shadow:var(--shadow-md); white-space:nowrap; display:none;
}
@media (min-width:768px){ .wa-tip{ display:block; } }

/* ---------- Chat widget (mock live chat) ---------- */
.chat-window{
  position:fixed; right:22px; bottom:96px; width:320px; max-width:88vw; background:#fff; border-radius:14px;
  box-shadow:var(--shadow-md); overflow:hidden; z-index:1200; display:none; flex-direction:column; border:1px solid var(--line);
}
.chat-window.open{ display:flex; }
.chat-head{ background:var(--navy); color:#fff; padding:16px 18px; display:flex; align-items:center; gap:10px; }
.chat-head img{ width:34px; height:34px; border-radius:50%; background:#fff; padding:4px; }
.chat-head strong{ font-size:.92rem; display:block; }
.chat-head span{ font-size:.75rem; color:#9be7ab; display:flex; align-items:center; gap:5px; }
.chat-head span::before{ content:""; width:7px; height:7px; border-radius:50%; background:#2ecc71; display:inline-block; }
.chat-close{ margin-left:auto; background:none; border:none; color:#fff; font-size:1.2rem; line-height:1; }
.chat-body{ padding:18px; font-size:.88rem; color:var(--ink); background:#f6f7f9; }
.chat-body p{ background:#fff; padding:12px 14px; border-radius:10px; margin-bottom:10px; box-shadow:var(--shadow-sm); }
.chat-footer{ padding:14px; border-top:1px solid var(--line); }

/* ---------- Back to top ---------- */
.to-top{
  position:fixed; left:22px; bottom:22px; width:44px; height:44px; border-radius:50%; background:var(--navy);
  color:#fff; display:flex; align-items:center; justify-content:center; z-index:1100; opacity:0; visibility:hidden;
  transition:all .2s ease; border:none;
}
.to-top.show{ opacity:1; visibility:visible; }

/* ---------- Responsive ---------- */
@media (max-width:980px){
  .stat-grid{ grid-template-columns:repeat(3,1fr); }
  .stat-item:nth-child(4){ border-left:none; }
  .footer-grid{ grid-template-columns:1fr 1fr; }
  .grid-4{ grid-template-columns:repeat(2,1fr); }
  .grid-3{ grid-template-columns:repeat(2,1fr); }
  .value-row{ grid-template-columns:repeat(2,1fr); }
  .award-row{ grid-template-columns:1fr; }
}
@media (max-width:820px){
  .main-nav{
    position:fixed; top:var(--nav-h); left:0; right:0; bottom:0; background:#fff; flex-direction:column;
    align-items:flex-start; gap:0; padding:10px 24px 30px; transform:translateX(100%); transition:transform .25s ease;
    overflow-y:auto;
  }
  .main-nav.open{ transform:translateX(0); }
  .main-nav a{ width:100%; padding:14px 0; border-bottom:1px solid var(--line); }
  .nav-toggle{ display:block; }
  .split{ grid-template-columns:1fr; }
  .split.reverse .split-media{ order:0; }
}
@media (max-width:640px){
  .stat-grid{ grid-template-columns:repeat(2,1fr); }
  .grid-2, .grid-3, .grid-4{ grid-template-columns:1fr; }
  .value-row{ grid-template-columns:1fr; }
  .section{ padding:52px 0; }
  .wa-btn{ width:54px; height:54px; }
}
