/* ============================================
   WEB GIỚI THIỆU CÔNG TY CƠ KHÍ 3T
   ============================================ */
:root {
  --primary: #0f3057;
  --primary-dark: #0a2240;
  --accent: #f47b20;
  --accent-dark: #d96510;
  --text: #2b2b2b;
  --text-light: #6b7280;
  --bg-light: #f5f7fa;
  --white: #ffffff;
  --border: #e5e7eb;
  --shadow: 0 4px 16px rgba(15, 48, 87, 0.10);
  --radius: 10px;
  --container: 1200px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: var(--white);
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

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

/* ---------- Topbar ---------- */
.topbar {
  background: #eef2f7;
  color: #51606f;
  font-size: 13px;
  padding: 6px 0;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.topbar a:hover { color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 16px;
  max-width: var(--container);
  margin: 0 auto;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 24px;
  color: var(--primary);
  white-space: nowrap;
  flex-shrink: 0;
}
.logo .logo-mark {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  letter-spacing: -1px;
}
.logo small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-light);
  letter-spacing: 0.5px;
}

.main-nav ul {
  display: flex;
  gap: 4px;
}
.main-nav a {
  display: block;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 15px;
  color: var(--primary);
  border-radius: 6px;
  transition: all 0.2s;
}
.main-nav a:hover,
.main-nav a.active {
  background: var(--primary);
  color: #fff;
}

.header-hotline {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.header-hotline .icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  animation: ring 2s infinite;
}
@keyframes ring {
  0%, 100% { transform: rotate(0); }
  10% { transform: rotate(-15deg); }
  20% { transform: rotate(15deg); }
  30% { transform: rotate(-10deg); }
  40% { transform: rotate(10deg); }
  50% { transform: rotate(0); }
}
.header-hotline span { font-size: 12px; color: var(--text-light); display: block; }
.header-hotline strong { color: var(--accent); font-size: 18px; display: block; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 26px;
  color: var(--primary);
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0.95) 35%, rgba(255, 255, 255, 0.6)),
    repeating-linear-gradient(45deg, #e8eff7 0 24px, #dde8f3 24px 48px);
  color: var(--text);
  padding: 90px 0;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: 50%;
  transform: translateY(-50%);
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(244, 123, 32, 0.25), transparent 70%);
  border-radius: 50%;
}
.hero-content { max-width: 640px; position: relative; z-index: 1; }
.hero h1 {
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.2;
  margin-bottom: 18px;
  color: var(--primary);
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero p {
  font-size: 17px;
  color: var(--text-light);
  margin-bottom: 28px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 15px;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); transform: translateY(-2px); }
.btn-outline { border: 2px solid var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }

/* ---------- Section chung ---------- */
.section { padding: 70px 0; }
.section.alt { background: var(--bg-light); }
.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 44px;
}
.section-head h2 {
  font-size: clamp(24px, 4vw, 34px);
  color: var(--primary);
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
  padding-bottom: 14px;
}
.section-head h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 4px;
  border-radius: 2px;
  background: var(--accent);
}
.section-head p { color: var(--text-light); }

/* ---------- Danh mục sản phẩm ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.category-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 34px 22px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.25s;
  border-top: 4px solid transparent;
}
.category-card:hover {
  transform: translateY(-6px);
  border-top-color: var(--accent);
}
.category-card .cat-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #1d5a96);
  display: flex;
  align-items: center;
  justify-content: center;
}
.category-card .cat-icon svg { width: 36px; height: 36px; fill: #fff; }
.category-card h3 { color: var(--primary); font-size: 18px; margin-bottom: 8px; }
.category-card p { font-size: 14px; color: var(--text-light); }

/* ---------- Sản phẩm ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.25s;
}
.product-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}
.product-thumb {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #dde5ee, #c3cfdd);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.product-thumb svg { width: 64px; height: 64px; fill: var(--primary); opacity: 0.45; }
.product-thumb .badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
}
.product-info { padding: 16px; }
.product-info h3 { font-size: 16px; color: var(--primary); margin-bottom: 6px; }
.product-info .spec { font-size: 13px; color: var(--text-light); margin-bottom: 12px; }
.product-info .price { color: var(--accent); font-weight: 700; margin-bottom: 12px; }
.product-info .btn { padding: 9px 0; width: 100%; text-align: center; font-size: 14px; }

/* ---------- Lý do chọn ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.why-item { text-align: center; padding: 10px; }
.why-item .why-icon {
  width: 84px;
  height: 84px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
}
.why-item h3 { color: var(--primary); font-size: 17px; margin-bottom: 8px; }
.why-item p { font-size: 14px; color: var(--text-light); }

/* ---------- Thống kê ---------- */
.stats {
  background:
    linear-gradient(rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.88)),
    repeating-linear-gradient(-45deg, #e8eff7 0 30px, #dde8f3 30px 60px);
  color: var(--text);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 56px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}
.stat-num {
  font-size: 42px;
  font-weight: 800;
  color: var(--accent);
}
.stat-label { color: var(--text-light); font-size: 15px; }

/* ---------- Khách hàng ---------- */
.client-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}
.client-logo {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #9aa7b5;
  font-size: 15px;
  transition: all 0.2s;
}
.client-logo:hover { color: var(--primary); box-shadow: var(--shadow); }

/* ---------- CTA ---------- */
.cta {
  background: linear-gradient(120deg, var(--accent), var(--accent-dark));
  color: #fff;
  padding: 56px 0;
  text-align: center;
}
.cta h2 { font-size: clamp(22px, 4vw, 32px); margin-bottom: 12px; }
.cta p { margin-bottom: 24px; opacity: 0.95; }
.cta .btn { background: #fff; color: var(--accent-dark); }
.cta .btn:hover { background: var(--primary); color: #fff; }

/* ---------- Trang con: page hero ---------- */
.page-hero {
  background:
    linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)),
    repeating-linear-gradient(45deg, #e8eff7 0 24px, #dde8f3 24px 48px);
  color: var(--primary);
  border-bottom: 1px solid var(--border);
  padding: 52px 0;
  text-align: center;
}
.page-hero h1 { font-size: clamp(26px, 4vw, 38px); }
.page-hero .breadcrumb { margin-top: 8px; font-size: 14px; color: var(--text-light); }
.page-hero .breadcrumb a:hover { color: var(--accent); }

/* ---------- Giới thiệu ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 44px;
  align-items: center;
}
.about-img {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #dde5ee, #c3cfdd);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}
.about-img svg { width: 110px; height: 110px; fill: var(--primary); opacity: 0.4; }
.about-text h2 { color: var(--primary); font-size: 28px; margin-bottom: 16px; }
.about-text p { margin-bottom: 14px; color: var(--text-light); }
.about-text ul { margin: 0 0 18px; }
.about-text li {
  padding-left: 28px;
  position: relative;
  margin-bottom: 8px;
}
.about-text li::before {
  content: "✔";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ---------- Liên hệ ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
}
.contact-info h3 { color: var(--primary); margin-bottom: 18px; font-size: 22px; }
.contact-item {
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
}
.contact-item .ci-icon {
  flex: 0 0 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
}
.contact-item strong { display: block; color: var(--primary); font-size: 15px; }
.contact-item p { color: var(--text-light); font-size: 14px; }

.contact-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
}
.contact-form h3 { color: var(--primary); margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-form label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin: 12px 0 6px;
  color: var(--primary);
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.contact-form .btn { margin-top: 18px; width: 100%; }
.form-success {
  display: none;
  margin-top: 14px;
  padding: 12px;
  border-radius: 6px;
  background: #e8f7ee;
  color: #157347;
  font-weight: 600;
  text-align: center;
}

.map-placeholder {
  margin-top: 50px;
  height: 320px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #dde5ee, #c3cfdd);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-weight: 600;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #f1f5f9;
  color: #51606f;
  border-top: 1px solid var(--border);
  padding: 56px 0 0;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 36px;
  padding-bottom: 40px;
}
.site-footer h4 {
  color: var(--primary);
  font-size: 16px;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.site-footer li { margin-bottom: 9px; }
.site-footer a:hover { color: var(--accent); }
.footer-logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 12px;
}
.footer-logo span { color: var(--accent); }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #dde6ef;
  color: var(--primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.footer-social a:hover { background: var(--accent); color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(15, 48, 87, 0.12);
  padding: 16px 0;
  text-align: center;
  font-size: 13px;
}

/* ---------- Nút nổi ---------- */
.float-btns {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 99;
}
.float-btns a,
.float-btns button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.float-call { background: var(--accent); animation: ring 2s infinite; }
.float-zalo { background: #0068ff; font-size: 13px; font-weight: 800; }
#scrollTop {
  background: var(--primary);
  display: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .logo { font-size: 19px; }
  .logo small { display: none; }
  .main-nav a { padding: 9px 10px; font-size: 14px; }
  .category-grid, .product-grid, .why-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .client-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; padding: 10px; }
  .header-hotline span { display: none; }
  .hero { padding: 60px 0; }
}

@media (max-width: 520px) {
  .category-grid, .product-grid, .why-grid { grid-template-columns: 1fr; }
  .client-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
