/* =====================================================
   GiaoViệc 24h – Mục Máy móc & Công trình (#may-moc, #cong-trinh)
   ===================================================== */

.show-sec { background: #f5f8fd; }

.show-head { text-align: center; margin: 0 0 24px; }
.show-kicker { margin: 0 0 6px; color: #5b6b85; font-size: 18px; }
.show-title {
  margin: 0; color: #12398a; font-weight: 800; text-transform: uppercase;
  font-size: clamp(20px, 3.6vw, 32px); line-height: 1.25; letter-spacing: .01em;
  display: inline-flex; align-items: center; gap: 12px;
}
.show-title::before {
  content: ""; flex: 0 0 auto; width: 9px; height: 18px;
  background: #e53935; border-radius: 0 10px 10px 0;
}

/* ---------- Máy móc: ô ảnh xen ô chữ ---------- */
.eq-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr;
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 10px 30px rgba(18, 57, 138, .12);
}
.eq { display: grid; grid-template-columns: 1fr 1fr; min-height: 300px; }
/* Hàng chẵn đảo chiều → tạo hiệu ứng bàn cờ như mẫu */
.eq:nth-child(4n+3) .eq-img, .eq:nth-child(4n+4) .eq-img { order: 2; }

.eq-img { position: relative; background: #dfe7f3; }
.eq-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* Ảnh sản phẩm nền trắng: hiện trọn máy */
.eq-img.is-product { background: #fff; }
.eq-img.is-product img { object-fit: contain; padding: 12px; box-sizing: border-box; }

/* Chưa có ảnh: ô minh họa nhạt thay cho ảnh */
.eq-img.is-empty {
  display: grid; place-items: center; color: #1E5BB0; min-height: 200px;
  background: linear-gradient(135deg, #e8eff9 0%, #d3e0f3 100%);
}
.eq-img.is-empty svg { opacity: .45; }

/* Chế độ xem thử (?xem-thu=1) */
.show-missing { margin: 16px auto; padding: 12px 16px; border: 2px dashed #e53935; border-radius: 10px; background: #fff5f5; color: #8a1c1c; font-size: 14px; }
.show-missing ul { margin: 6px 0 0; padding-left: 18px; }
.pj-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; text-align: center; font-size: 12px; color: #5b6b85; word-break: break-all; }

.eq-txt {
  position: relative; padding: 36px 32px;
  display: flex; flex-direction: column; justify-content: center;
  background: linear-gradient(135deg, #0f2f7a 0%, #1E5BB0 100%); color: #fff;
}
.eq-txt h3 { margin: 0 0 12px; font-size: 20px; font-weight: 800; text-transform: uppercase; line-height: 1.3; }
.eq-txt h3::before {
  content: ""; position: absolute; left: 0; margin-top: 4px;
  width: 8px; height: 16px; background: #e53935; border-radius: 0 10px 10px 0;
}
.eq-txt p { margin: 0; font-size: 15px; line-height: 1.65; color: rgba(255, 255, 255, .9); }

/* ---------- Công trình: thư viện ảnh ---------- */
.pj-head { text-align: center; margin: 48px 0 20px; }
.pj-sub { margin: 8px 0 0; color: #5b6b85; font-size: 14px; }

.pj-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pj { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 4px 18px rgba(18, 57, 138, .08); display: flex; flex-direction: column; }
.pj-btn {
  position: relative; display: block; width: 100%; padding: 0; border: 0; margin: 0;
  background: #dfe7f3; cursor: zoom-in; aspect-ratio: 4 / 3; overflow: hidden;
}
.pj-btn img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.pj-btn:hover img { transform: scale(1.04); }
.pj-tag {
  position: absolute; left: 10px; top: 10px; padding: 4px 10px; border-radius: 999px;
  background: #f6c343; color: #1d2433; font-size: 12px; font-weight: 700;
}
.pj-body { padding: 12px 14px 14px; }
.pj-body h3 { margin: 0 0 4px; font-size: 16px; line-height: 1.35; color: #1d2433; }
.pj-body p { margin: 0; display: flex; align-items: center; gap: 4px; font-size: 13px; color: #5b6b85; }
.pj-body p svg { flex: 0 0 auto; color: #1E5BB0; }

.show-swipe { display: none; }
.show-cta { text-align: center; margin-top: 28px; }

/* ---------- Xem ảnh lớn ---------- */
.pj-box { border: 0; padding: 0; max-width: min(960px, 94vw); background: transparent; }
.pj-box::backdrop { background: rgba(10, 20, 40, .85); }
.pj-box img { display: block; max-width: 100%; max-height: 80vh; margin: 0 auto; border-radius: 10px; }
.pj-box p { margin: 10px 0 0; text-align: center; color: #fff; font-size: 15px; }
.pj-close {
  position: absolute; right: 8px; top: 8px; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: rgba(0, 0, 0, .55); color: #fff; font-size: 24px; line-height: 40px; cursor: pointer;
}

/* ---------- Tablet: 1 máy mỗi hàng, vẫn zigzag ---------- */
@media (max-width: 900px) {
  .eq-grid { grid-template-columns: 1fr; }
  .eq:nth-child(4n+3) .eq-img, .eq:nth-child(4n+4) .eq-img { order: 0; }
  .eq:nth-child(even) .eq-img { order: 2; }
  .pj-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Điện thoại: vuốt ngang, đỡ phải cuộn dài ---------- */
@media (max-width: 640px) {
  .show-head { margin-bottom: 16px; }
  .show-kicker { font-size: 15px; }

  .eq-grid, .pj-grid {
    display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
    border-radius: 0; box-shadow: none; padding-bottom: 4px;
  }
  .eq-grid::-webkit-scrollbar, .pj-grid::-webkit-scrollbar { display: none; }

  .eq {
    flex: 0 0 86%; scroll-snap-align: start; min-height: 0;
    display: flex; flex-direction: column; border-radius: 14px; overflow: hidden;
    box-shadow: 0 4px 18px rgba(18, 57, 138, .12);
  }
  .eq .eq-img { order: 0 !important; aspect-ratio: 4 / 3; }
  .eq-txt { flex: 1; padding: 16px 16px 18px 22px; justify-content: flex-start; }
  .eq-txt h3 { font-size: 16px; margin-bottom: 6px; }
  .eq-txt h3::before { margin-top: 2px; width: 6px; height: 14px; }
  .eq-txt p { font-size: 14px; line-height: 1.55; }

  .pj-head { margin: 32px 0 14px; }
  .pj { flex: 0 0 78%; scroll-snap-align: start; }

  .show-swipe { display: block; margin: 8px 0 0; text-align: right; font-size: 13px; color: #5b6b85; }
  .show-cta { margin-top: 20px; }
  .show-cta .btn { width: 100%; }
}