/* =====================================================================
   Unionwell-style corporate website — front-end styles
   ===================================================================== */

:root {
  --primary: #046eb8;
  --primary-dark: #025a94;
  --primary-light: #0285c9;
  --accent: #f5a623;
  --dark: #1f2d3d;
  --text: #333;
  --muted: #666;
  --light: #f5f7fa;
  --border: #e3e8ef;
  --white: #fff;
  --radius: 10px;
  --shadow: 0 4px 16px rgba(15, 42, 68, 0.08);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }
h1, h2, h3, h4, h5 { color: var(--dark); line-height: 1.25; font-weight: 600; }
p { margin-bottom: 12px; }

.container { width: 100%; margin: 0 auto; padding: 0 4%; }
.container.narrow { max-width: 1600px; }

.icon { vertical-align: -3px; flex: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 24px; border-radius: 6px; font-size: 15px; font-weight: 600;
  cursor: pointer; border: 2px solid transparent; transition: all .2s; line-height: 1.2;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-disabled { background: #e9edf2; color: #999; cursor: not-allowed; }
.btn .icon { stroke: currentColor; }

/* ---------- Top bar ---------- */
.topbar { background: var(--primary-dark); color: #cfe4f5; font-size: 13px; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; min-height: 38px; gap: 16px; flex-wrap: wrap; padding-top: 4px; padding-bottom: 4px; }
.topbar a { color: #e8f1f9; display: inline-flex; align-items: center; gap: 6px; }
.topbar a:hover { color: #fff; }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 18px; }
.topbar-right span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Header / nav ---------- */
.site-header { background: #fff; box-shadow: 0 1px 0 var(--border); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; color: var(--dark); }
.brand-logo { height: 38px; width: auto; }
.brand-text { color: var(--dark); }

.main-nav ul { display: flex; list-style: none; gap: 4px; }
.main-nav a {
  display: block; padding: 10px 12px; color: var(--dark); font-size: 14.5px; font-weight: 500;
  border-radius: 5px;
}
.main-nav a:hover { color: var(--primary); background: var(--light); }
.main-nav a.active { color: var(--primary); font-weight: 600; }

.nav-toggle { display: none; background: none; border: none; color: var(--dark); cursor: pointer; padding: 8px; }

/* ---------- Hero slider ---------- */
.hero-slider { position: relative; background: linear-gradient(120deg, #046eb8 0%, #025a94 60%, #033d66 100%); color: #fff; overflow: hidden; }
.hero-slider .slide { display: none; padding: 96px 0; background-size: cover; background-position: center; position: relative; }
.hero-slider .slide::before { content: ""; position: absolute; inset: 0; background: rgba(2, 45, 80, 0.55); }
.hero-slider .slide.active { display: block; }
.slide-inner { position: relative; z-index: 1; max-width: 820px; margin: 0 auto; text-align: center; }
.slide-inner h1 { color: #fff; font-size: clamp(30px, 5vw, 50px); font-weight: 700; margin-bottom: 18px; }
.slide-inner p { color: #dcebf6; font-size: 18px; max-width: 680px; margin: 0 auto 26px; }
.slide-inner .btn-primary { background: var(--accent); }
.slide-inner .btn-primary:hover { background: #e09214; }

.slider-controls { position: absolute; bottom: 22px; left: 0; right: 0; display: flex; align-items: center; justify-content: center; gap: 18px; z-index: 2; }
.slider-btn { background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.4); color: #fff; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .2s; }
.slider-btn:hover { background: rgba(255,255,255,.3); }
.slider-dots { display: flex; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.45); cursor: pointer; transition: all .2s; }
.dot.active { background: #fff; width: 26px; border-radius: 6px; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--light); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.section-title { font-size: 30px; margin-bottom: 10px; }
.section-sub { color: var(--muted); font-size: 16px; }
.section-eyebrow { display: inline-block; color: var(--primary); font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; transition: transform .2s, box-shadow .2s; display: block; color: var(--text);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: var(--text); }
.card h3 { font-size: 17px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14px; margin: 0; }

/* ---------- About ---------- */
.about-section { background: #fff; }
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.about-text .section-title { font-size: 32px; }
.about-text p { color: var(--muted); margin-bottom: 22px; }
.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.stat { background: var(--light); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 20px; text-align: center; }
.stat-value { display: block; font-size: 34px; font-weight: 700; color: var(--primary); line-height: 1.1; }
.stat-label { display: block; color: var(--muted); font-size: 14px; margin-top: 6px; }

/* ---------- Category / product cards ---------- */
.cat-thumb, .product-thumb, .app-thumb, .news-thumb {
  background: var(--light); border-radius: 8px; overflow: hidden; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: center; height: 180px;
}
.cat-thumb img, .product-thumb img, .app-thumb img, .news-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-link { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-weight: 600; font-size: 14px; margin-top: 12px; }
.product-model { color: var(--primary); font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.why-icon { color: var(--primary); margin-bottom: 14px; }
.why-card h3 { margin-bottom: 8px; }

/* ---------- Certifications ---------- */
.cert-strip { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.cert-badge {
  background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 14px 22px;
  font-weight: 600; color: var(--dark); display: flex; align-items: center; min-height: 56px;
}
.cert-badge img { height: 44px; width: auto; }

/* ---------- CTA ---------- */
.cta { background: linear-gradient(120deg, #046eb8, #025a94); color: #fff; padding: 64px 0; }
.cta-inner { text-align: center; }
.cta-inner h2 { color: #fff; font-size: 30px; margin-bottom: 10px; }
.cta-inner p { color: #dcebf6; font-size: 16px; margin-bottom: 22px; }
.cta-inner .btn-primary { background: var(--accent); }
.cta-inner .btn-primary:hover { background: #e09214; }

/* ---------- Page banner (interior pages) ---------- */
.page-banner { background: linear-gradient(120deg, #046eb8, #025a94); color: #fff; padding: 56px 0; }
.page-banner h1 { color: #fff; font-size: 34px; margin-bottom: 8px; }
.breadcrumb { color: #cfe4f5; font-size: 14px; }
.breadcrumb a { color: #e8f1f9; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb span { color: #9fc4e0; }

/* ---------- Catalog (products list) ---------- */
.catalog-layout { display: grid; grid-template-columns: 260px 1fr; gap: 36px; }
.catalog-sidebar h3 { font-size: 16px; margin-bottom: 12px; }
.cat-list { list-style: none; margin-bottom: 28px; }
.cat-list a { display: block; padding: 9px 12px; color: var(--text); border-radius: 6px; font-size: 14px; border-left: 3px solid transparent; }
.cat-list a:hover { background: var(--light); color: var(--primary); }
.cat-list a.active { background: #e8f2fa; color: var(--primary); font-weight: 600; border-left-color: var(--primary); }
.sidebar-search { display: flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.sidebar-search input { flex: 1; border: none; padding: 10px 12px; font-size: 14px; outline: none; }
.sidebar-search button { border: none; background: var(--primary); color: #fff; padding: 0 14px; cursor: pointer; display: flex; align-items: center; }
.result-info { color: var(--muted); margin-bottom: 20px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state h2 { margin-bottom: 10px; }
.empty-state p { margin-bottom: 20px; }

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 40px; flex-wrap: wrap; }
.page-link { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 10px; border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-size: 14px; }
.page-link:hover { border-color: var(--primary); color: var(--primary); }
.page-link.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-ellipsis { color: var(--muted); padding: 0 4px; }

/* ---------- Product detail ---------- */
.product-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.product-gallery .gallery-main { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--light); }
.product-gallery .gallery-main img { width: 100%; height: 360px; object-fit: contain; padding: 20px; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; }
.gallery-thumbs img { width: 74px; height: 74px; object-fit: cover; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; }
.product-info h2 { font-size: 26px; margin-bottom: 10px; }
.product-model-lg { color: var(--muted); margin-bottom: 14px; }
.product-summary { color: var(--muted); margin-bottom: 20px; }
.spec-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; font-size: 14px; }
.spec-table th, .spec-table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); }
.spec-table th { color: var(--muted); font-weight: 600; width: 40%; background: var(--light); }
.product-description { margin-top: 12px; }
.product-description h3 { margin: 20px 0 8px; }

/* ---------- Rich text (article content / page content) ---------- */
.article-content { font-size: 16px; color: var(--text); }
.article-content h2, .article-content h3 { margin: 24px 0 12px; }
.article-content p { margin-bottom: 16px; }
.article-content ul, .article-content ol { margin: 0 0 16px 22px; }
.article-content li { margin-bottom: 8px; }
.article-content img { border-radius: 8px; margin: 16px 0; }

/* ---------- News ---------- */
.news-thumb { height: 190px; }
.news-body time, .article-meta time { color: var(--primary); font-size: 13px; font-weight: 600; }
.news-body h3 { margin: 6px 0 8px; }
.news-detail-layout { display: grid; grid-template-columns: 1fr 300px; gap: 40px; }
.article-meta { display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.article-views { color: var(--muted); }
.article-image { border-radius: var(--radius); margin-bottom: 24px; width: 100%; }
.news-sidebar h3 { margin-bottom: 14px; }
.recent-list { list-style: none; }
.recent-list li { border-bottom: 1px solid var(--border); }
.recent-list a { display: block; padding: 10px 0; color: var(--text); font-size: 14px; }
.recent-list a:hover { color: var(--primary); }

/* ---------- Downloads ---------- */
.download-list { list-style: none; }
.download-item { display: flex; align-items: center; gap: 18px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 14px; }
.download-icon { color: var(--primary); }
.download-info { flex: 1; }
.download-info h3 { font-size: 16px; }
.download-info span { color: var(--muted); font-size: 13px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; }
.contact-list { list-style: none; }
.contact-list li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); color: var(--muted); }
.contact-list li .icon { color: var(--primary); margin-top: 4px; }
.contact-list strong { display: block; color: var(--dark); margin-bottom: 2px; }
.contact-list span { font-size: 14px; }
.contact-form-wrap { background: var(--light); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--dark); }
.form-group input, .form-group textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; font-family: inherit;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); }
.alert { padding: 13px 16px; border-radius: 6px; margin-bottom: 18px; font-size: 14px; }
.alert-success { background: #e7f6ec; color: #1c7c3f; border: 1px solid #bfe6cc; }
.alert-error { background: #fdecec; color: #b02a2a; border: 1px solid #f3c2c2; }

/* ---------- Search ---------- */
.search-form { display: flex; gap: 10px; max-width: 560px; margin: 0 auto 40px; }
.search-form input { flex: 1; padding: 13px 16px; border: 1px solid var(--border); border-radius: 6px; font-size: 15px; }
.search-form input:focus { outline: none; border-color: var(--primary); }
.search-news-list { list-style: none; margin-bottom: 20px; }
.search-news-list li { border-bottom: 1px solid var(--border); }
.search-news-list a { display: flex; justify-content: space-between; gap: 12px; padding: 13px 0; color: var(--text); }
.search-news-list a:hover { color: var(--primary); }
.search-news-list time { color: var(--muted); font-size: 13px; white-space: nowrap; }

/* ---------- Footer ---------- */
.site-footer { background: #0f2436; color: #b9ccda; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 40px; padding-top: 56px; padding-bottom: 40px; }
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 18px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: #b9ccda; font-size: 14px; }
.footer-col ul li a:hover { color: #fff; }
.footer-col p { color: #b9ccda; font-size: 14px; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact li .icon { color: var(--accent); margin-top: 3px; }
.footer-contact li a { color: #b9ccda; }
.footer-contact li a:hover { color: #fff; }
.social { display: flex; gap: 10px; margin-top: 16px; }
.social a { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; }
.social a:hover { background: var(--primary); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 18px 0; font-size: 13px; color: #8ba3b5; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .about-grid, .product-detail-grid, .contact-grid, .news-detail-layout, .catalog-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; top: 70px; left: 0; right: 0;
    background: #fff; border-top: 1px solid var(--border); box-shadow: var(--shadow);
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; padding: 8px 16px; }
  .main-nav a { padding: 12px 8px; }
  .topbar-left { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .hero-slider .slide { padding: 64px 0; }
  .section { padding: 52px 0; }
  .section-title { font-size: 25px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .about-stats { grid-template-columns: 1fr 1fr; }
}
