/**
 * U-Home Design System — Module Dự Án Thực Tế (Social Marketing & Video Feed)
 * Tuân thủ tuyệt đối quy tắc thương hiệu và generic components trong AGENTS.md
 */

/* ── HERO DỰ ÁN (DEPRECATED - RETAINED FOR FALLBACK) ── */
.uh-hero-projects-section {
  display: none;
}

/* ── MẠNG LƯỚI DỰ ÁN THỰC TẾ & BẢN ĐỒ TOÀN QUỐC (BRIGHT SOLAR THEME) ── */
.uh-scada-map-section {
  background: linear-gradient(180deg, #fffbf6 0%, #fff5ed 45%, #ffffff 100%);
  color: #14202e;
  position: relative;
  overflow: hidden;
  padding: 36px 0 48px;
  border-bottom: 1px solid #fed7aa;
}

.uh-scada-map-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(rgba(217, 119, 6, 0.05) 1px, transparent 1px),
    linear-gradient(to right, rgba(217, 119, 6, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(217, 119, 6, 0.02) 1px, transparent 1px);
  background-size: 36px 36px, 72px 72px, 72px 72px;
  pointer-events: none;
}

/* Top Header & Breadcrumb */
.uh-scada-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
  position: relative;
  z-index: 2;
}

.uh-scada-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid #fecaca;
  color: #e4181f;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.uh-scada-live-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #12a150;
  box-shadow: 0 0 0 0 rgba(18, 161, 80, 0.7);
  animation: uh-scada-pulse 2s infinite;
}

@keyframes uh-scada-pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(18, 161, 80, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(18, 161, 80, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(18, 161, 80, 0);
  }
}

.uh-scada-title-wrap {
  position: relative;
  z-index: 2;
  margin-bottom: 16px;
}

.uh-scada-main-title {
  font-size: 32px;
  font-weight: 800;
  color: #14202e;
  letter-spacing: -0.5px;
  line-height: 1.25;
  margin-bottom: 0;
}

.uh-scada-main-title span {
  color: #e4181f;
  background: linear-gradient(135deg, #e4181f 0%, #cf131a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Filter Bar (Synchronized Pill Glassmorphism matching Solar Map) */
.uh-scada-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 16px;
  margin-bottom: 18px;
  position: relative;
  z-index: 2;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.08);
}

.uh-scada-filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.uh-scada-filter-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #9a3412;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-right: 4px;
}

.uh-filter-text-desktop {
  display: inline;
}

.uh-filter-text-mobile {
  display: none;
}

.uh-scada-filter-btn {
  background: transparent;
  border: 1px solid #475569;
  color: #475569;
  padding: 6px 16px;
  border-radius: 9999px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  white-space: nowrap;
}

.uh-scada-filter-btn:hover {
  background: transparent;
  border: 1px solid #e4181f;
  color: #b45309;
  border-color: #f59e0b;
}

.uh-scada-filter-btn.active {
  background: linear-gradient(135deg, #e4181f 0%, #c81319 100%) !important;
  color: #ffffff !important;
  border-color: #e4181f !important;
  font-weight: 700 !important;
}

.uh-scada-search-box {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #fed7aa;
  border-radius: 9999px;
  padding: 6px 14px;
  gap: 8px;
  min-width: 250px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.uh-scada-search-box:focus-within {
  border-color: #e4181f;
  box-shadow: 0 0 0 3px rgba(228, 24, 31, 0.12);
}

.uh-scada-search-box input {
  background: transparent;
  border: none;
  color: #14202e;
  font-size: 13px;
  font-weight: 500;
  outline: none;
  width: 100%;
}

.uh-scada-search-box input::placeholder {
  color: #94a3b8;
}

/* Main Grid: Left Metric Cards Stack + Right Map */
/* ── BỐ CỤC OVERLAY THỐNG KÊ TRÊN BẢN ĐỒ (FULL STAGE TRANSPARENT HUD) ── */
.uh-map-ambient-stage {
  position: relative;
  width: 100%;
  min-height: 760px;
  height: 760px;
  margin-top: 12px;
  overflow: visible;
  background: transparent;
}

/* 1. Canvas Layer phủ trọn toàn bộ stage */
.uh-scada-canvas-container {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: auto;
}

.uh-scada-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* 2. Lớp Overlay trong suốt (Floating HUD Layer) */
.uh-map-overlay-layer {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}

/* ── GRAND TOP STAT: SẢN LƯỢNG THỜI GIAN THỰC HÔM NAY ── */
.uh-ambient-top-stat {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 6;
  pointer-events: auto;
  max-width: 680px;
  width: 100%;
}

.uh-top-stat-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.uh-top-stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(254, 243, 199, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid #fde68a;
  color: #b45309;
  padding: 4px 14px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-top: 8px;
  margin-bottom: 0;
}

.uh-top-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #12a150;
  box-shadow: 0 0 8px #12a150;
  animation: uh-tick-pulse 1.4s infinite ease-in-out;
}

.uh-top-stat-val-wrap {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
}

.uh-top-stat-icon {
  font-size: 36px;
  line-height: 1;
  filter: drop-shadow(0 2px 8px rgba(249, 115, 22, 0.35));
  align-self: center;
}

.uh-ambient-val.uh-top-ambient-val {
  font-size: 52px;
  font-weight: 900;
  color: #14202e;
  letter-spacing: -1.2px;
  line-height: 1.1;
  font-family: 'Be Vietnam Pro', sans-serif;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.uh-ambient-unit.uh-top-unit {
  font-size: 22px;
  font-weight: 800;
  color: #f97316;
  letter-spacing: 0;
}

.uh-top-stat-lbl {
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
  margin-top: 4px;
  line-height: 1.4;
}

.uh-top-stat-lbl strong {
  color: #14202e;
  font-weight: 700;
}

/* ── CỘT OVERLAY HAI BÊN (TRÁI VÀ PHẢI) KHÔNG OVERLAP BẢN ĐỒ ── */
.uh-overlay-stats-grid {
  display: contents;
}

.uh-overlay-col {
  position: absolute;
  top: 95px;
  display: flex;
  flex-direction: column;
  z-index: 6;
  pointer-events: auto;
  width: 240px;
}

.uh-overlay-col.overlay-left {
  left: 28px;
  align-items: flex-start;
  text-align: left;
  gap: 52px;
}

.uh-overlay-col.overlay-right {
  right: 28px;
  align-items: flex-end;
  text-align: right;
  gap: 52px;
}

.uh-stat-compact-label {
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
  line-height: 1.3;
}

/* Node hiển thị chỉ số dạng Text tự nhiên trong suốt */
.uh-ambient-stat {
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.25s ease;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.uh-overlay-col.overlay-left .uh-ambient-stat {
  align-items: flex-start;
  text-align: left;
}

.uh-overlay-col.overlay-right .uh-ambient-stat {
  align-items: flex-end;
  text-align: right;
}

.uh-ambient-stat:hover {
}

/* Icon dạng nét màu cam tối giản */
.uh-ambient-icon {
  margin-bottom: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}

.uh-ambient-icon.text-amber {
  color: #f97316;
}

.uh-ambient-icon.text-green {
  color: #12a150;
}

.uh-ambient-stat:hover .uh-ambient-icon {
  transform: scale(1.1);
}

/* Con số lớn in đậm, màu xanh đen Navy */
.uh-ambient-val {
  font-size: 34px;
  font-weight: 800;
  color: #14202e;
  line-height: 1.15;
  letter-spacing: -0.6px;
  font-family: 'Be Vietnam Pro', sans-serif;
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
}

/* Đơn vị đo màu cam hoặc xanh */
.uh-ambient-unit {
  font-size: 15px;
  font-weight: 700;
  color: #f97316;
  text-transform: lowercase;
}

.uh-ambient-unit.text-green {
  color: #12a150;
}

/* Chữ mô tả bên dưới */
.uh-ambient-lbl {
  font-size: 14px;
  font-weight: 600;
  color: #14202e;
  margin-top: 5px;
  line-height: 1.4;
}

.uh-ambient-sub {
  display: block;
  font-size: 12.5px;
  font-weight: 400;
  color: #64748b;
  margin-top: 2px;
  line-height: 1.35;
}

/* Badge trạng thái */
.uh-ticker-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 6px;
  margin-top: 6px;
}

.badge-amber {
  background: transparent;
  color: #ea580c;
  border: 1px solid #fed7aa;
}

.badge-green {
  background: transparent;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

/* ── HIỆU ỨNG NHẢY SỐ NHƯ ĐỒNG HỒ ĐIỆN (ELECTRIC METER ROLLING ODOMETER) ── */
.uh-odometer {
  display: inline-flex;
  align-items: baseline;
  line-height: 1;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.uh-odo-slot {
  display: inline-block;
  height: 1.15em;
  line-height: 1.15em;
  overflow: hidden;
  position: relative;
  vertical-align: baseline;
}

.uh-odo-drum {
  display: flex;
  flex-direction: column;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.uh-odo-digit {
  height: 1.15em;
  line-height: 1.15em;
  text-align: center;
  display: block;
  font-family: inherit;
}

.uh-odo-sep {
  display: inline-block;
  vertical-align: baseline;
  padding: 0 1px;
  font-family: inherit;
}

.uh-dot-tick {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  animation: uh-tick-pulse 1.2s infinite ease-in-out;
}

.uh-dot-tick.dot-orange {
  background: #f97316;
  box-shadow: 0 0 6px #f97316;
}

.uh-dot-tick.dot-green {
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

@keyframes uh-tick-pulse {

  0%,
  100% {
    transform: scale(0.9);
    opacity: 0.6;
  }

  50% {
    transform: scale(1.3);
    opacity: 1;
  }
}

.uh-num-pulse {
  animation: uh-val-flash 0.5s ease;
}

@keyframes uh-val-flash {
  0% {
    color: #f97316;
  }

  100% {
    color: #14202e;
  }
}

.uh-num-pulse-green {
  animation: uh-val-flash-green 0.5s ease;
}

@keyframes uh-val-flash-green {
  0% {
    color: #10b981;
  }

  100% {
    color: #14202e;
  }
}

.uh-num-pulse-amber {
  animation: uh-val-flash-amber 0.5s ease;
}

@keyframes uh-val-flash-amber {
  0% {
    color: #f59e0b;
    text-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
  }

  100% {
    color: #14202e;
    text-shadow: none;
  }
}

/* Map Legend Overlay */
.uh-scada-legend {
  display: none !important;
}

.uh-scada-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #334155;
}

.uh-scada-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
}

.dot-red {
  background: #e4181f;
}

.dot-amber {
  background: #ffa724;
}

.dot-green {
  background: #12a150;
  box-shadow: 0 0 6px rgba(18, 161, 80, 0.6);
}

/* Interactive Map Hover Tooltip (Crisp White Card) */
.uh-scada-tooltip {
  position: absolute;
  pointer-events: none;
  background: #ffffff;
  border: 1px solid #fecaca;
  border-radius: 16px;
  padding: 14px 18px;
  width: 290px;
  z-index: 99;
  transform: translate(-50%, -115%);
  transition: opacity 0.15s ease, transform 0.15s ease;
  opacity: 0;
  visibility: hidden;
}

.uh-scada-tooltip.visible {
  opacity: 1;
  visibility: visible;
}

.uh-tooltip-title {
  font-size: 14px;
  font-weight: 800;
  color: #14202e;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.uh-tooltip-loc {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.uh-tooltip-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  border-top: 1px solid #f1f5f9;
  padding-top: 8px;
}

.uh-tooltip-stat-lbl {
  font-size: 11px;
  color: #64748b;
}

.uh-tooltip-stat-val {
  font-size: 13px;
  font-weight: 700;
  color: #e4181f;
}

/* Repositioned Social Bridge Section */
.uh-social-bridge-section {
  background: #ffffff;
  padding: 28px 0 32px;
  border-bottom: 1px solid #eef1f4;
}

.uh-social-bridge-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 8px;
}

.uh-social-channels-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* Responsive Rules */
@media (max-width: 991px) {
  .uh-scada-grid {
    grid-template-columns: 1fr;
  }

  .uh-scada-hud-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .uh-scada-hud-stack {
    grid-template-columns: 1fr;
  }

  .uh-social-channels-strip {
    grid-template-columns: 1fr;
  }

  .uh-scada-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .uh-scada-search-box {
    width: 100%;
    min-width: unset;
  }

  .uh-scada-main-title {
    font-size: 24px;
  }
}

.uh-social-channel-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #ffffff;
  border: 1px solid #eef1f4;
  border-radius: 16px;
  text-decoration: none;
  transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(20, 32, 46, 0.04);
}

.uh-social-channel-card:hover {
  box-shadow: 0 10px 24px rgba(20, 32, 46, 0.08);
}

.uh-social-channel-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.uh-social-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.social-yt .uh-social-icon-box {
  background: #fff1f1;
  color: #e4181f;
  border: 1px solid #ffd4d5;
}

.social-tt .uh-social-icon-box {
  background: #14202e;
  color: #00f2fe;
  border: 1px solid #283747;
}

.social-fb .uh-social-icon-box {
  background: #e7f3ff;
  color: #1877f2;
  border: 1px solid #c8e1ff;
}

.uh-social-info-name {
  font-size: 14px;
  font-weight: 700;
  color: #14202e;
  line-height: 1.3;
}

.uh-social-info-subs {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

.uh-social-follow-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  transition: all 0.2s;
  white-space: nowrap;
}

.social-yt .uh-social-follow-pill {
  background: #fff1f1;
  color: #e4181f;
}

.social-yt:hover .uh-social-follow-pill {
  background: #e4181f;
  color: #ffffff;
}

.social-tt .uh-social-follow-pill {
  background: #f1f5f9;
  color: #14202e;
}

.social-tt:hover .uh-social-follow-pill {
  background: #14202e;
  color: #ffffff;
}

.social-fb .uh-social-follow-pill {
  background: #e7f3ff;
  color: #1877f2;
}

.social-fb:hover .uh-social-follow-pill {
  background: #1877f2;
  color: #ffffff;
}


/* ── BỘ LỌC ĐA CHIỀU (MULTI-FILTER TOOLBAR) ── */
.uh-project-filter-card {
  background: #ffffff;
  border: 1px solid #eef1f4;
  border-radius: 20px;
  padding: 20px 24px;
  box-shadow: 0 8px 30px rgba(20, 32, 46, 0.05);
  margin-bottom: 32px;
}

/* Tabs Loại Dự Án (Gia đình, Doanh nghiệp, Nhà Xưởng) */
.uh-project-type-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid #eef1f4;
  margin-bottom: 18px;
}

.uh-type-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  font-size: 14px;
  font-weight: 700;
  color: #4a5a6b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.uh-type-tab-btn:hover {
  border-color: #ffd4d5;
  background: #fff8f8;
  color: #e4181f;
}

.uh-type-tab-btn.active {
  background: #e4181f;
  border-color: #e4181f;
  color: #ffffff;
}

.uh-type-tab-count {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
}

.uh-type-tab-btn.active .uh-type-tab-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Thanh Tìm Kiếm & Lọc Nhanh */
.uh-project-filter-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.uh-project-search-box {
  position: relative;
  flex: 1;
  min-width: 280px;
}

.uh-project-search-input {
  width: 100%;
  height: 44px;
  padding: 0 40px 0 42px;
  border-radius: 999px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  font-size: 14px;
  font-weight: 500;
  color: #14202e;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.uh-project-search-input:focus {
  border-color: #e4181f;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(228, 24, 31, 0.12);
}

.uh-project-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  display: flex;
  align-items: center;
  pointer-events: none;
}

.uh-project-search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #cbd5e1;
  color: #fff;
  border: none;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.uh-project-search-clear:hover {
  background: #e4181f;
}

/* Dải Tag Bộ Lọc Nền Tảng MXH & Khu Vực */
.uh-filter-chip-groups {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.uh-filter-chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #4a5a6b;
  background: transparent;
  font-size: 12.5px;
  font-weight: 600;
  color: #4a5a6b;
  cursor: pointer;
  transition: all 0.18s ease;
}

.uh-filter-chip:hover {
  background: transparent;
  border: 1px solid #e4181f;
  color: #e4181f;
  border-color: #ffd4d5;
}

.uh-filter-chip.active {
  background: #14202e;
  border-color: #14202e;
  color: #ffffff;
}

.uh-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff1f1;
  color: #e4181f;
  border: 1px dashed #ffd4d5;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.uh-reset-btn:hover {
  background: #e4181f;
  color: #ffffff;
  border-style: solid;
}


/* ── LƯỚI CARD DỰ ÁN SOCIAL VIDEO FEED ── */
.uh-projects-social-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 40px;
}

.uh-social-project-card {
  background: #ffffff;
  border: 1px solid #eef1f4;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 18px rgba(20, 32, 46, 0.04);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.uh-social-project-card:hover {
  border-color: #ffd4d5;
  box-shadow: 0 16px 38px rgba(20, 32, 46, 0.11);
}

/* Vùng Video Thumbnail */
.uh-card-video-box {
  position: relative;
  aspect-ratio: 2 / 3;
  background: #0e1826;
  overflow: hidden;
  cursor: pointer;
}

/* Dự án chưa có link video: không cho click */
.uh-card-video-box.is-no-video {
  cursor: default;
}

.uh-card-video-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.uh-social-project-card:hover .uh-card-video-img {
  transform: scale(1.06);
}

.uh-card-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 32, 46, 0.35) 0%, rgba(20, 32, 46, 0) 40%, rgba(20, 32, 46, 0.8) 100%);
  pointer-events: none;
}

/* Floating Specs Bottom Bar Trên Ảnh */
.uh-card-floating-bar {
  position: absolute;
  bottom: 10px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  z-index: 2;
}

.uh-floating-capacity {
  background: #ffa724;
  color: #14202e;
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.uh-floating-savings {
  background: #12a150;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Vùng Nội Dung Card */
.uh-card-body {
  padding: 18px 20px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.uh-card-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 8px;
}

.uh-card-type-badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: transparent;
  color: #e4181f;
}

.uh-card-title {
  font-size: 16px;
  font-weight: 800;
  color: #14202e;
  line-height: 1.4;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 44px;
}

/* Cấu Hình Kỹ Thuật Chips */
.uh-card-specs-box {
  background: #f8fafc;
  border: 1px solid #eef1f4;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 12.5px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.uh-spec-row {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #4a5a6b;
}

.uh-spec-row strong {
  color: #14202e;
  font-weight: 700;
}

/* Mô Tả Ngắn Gọn Từ Video Thực Tế (Quote Box) */
.uh-card-quote-box {
  font-size: 12.5px;
  font-style: italic;
  color: #475569;
  line-height: 1.55;
  background: #fafbfc;
  border-left: 3px solid #ffa724;
  padding: 8px 12px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.uh-card-desc-box {
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
  background: #f8fafc;
  border-left: 3px solid #e4181f;
  padding: 8px 12px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* Hashtags */
.uh-card-hashtags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.uh-hashtag-pill {
  font-size: 11px;
  font-weight: 600;
  color: #0284c7;
  background: transparent;
  border: 1px solid #0284c7;
  padding: 2px 7px;
  border-radius: 6px;
}

/* Footer Card & Nút Mở Tab Mới Social */
.uh-card-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #eef1f4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.uh-card-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

/* Nút CTA Xem Social Mở Tab Mới (Bắt buộc .uh-btn) */
.uh-btn-social-yt {
  background: #e4181f;
  color: #ffffff !important;
  border: 1px solid #e4181f;
  font-size: 13px !important;
  padding: 8px 15px !important;
}

.uh-btn-social-yt:hover {
  background: #b3141a;
  border-color: #b3141a;
  transform: translateY(-1px);
}

.uh-btn-social-tt {
  background: #14202e;
  color: #ffffff !important;
  border: 1px solid #14202e;
  font-size: 13px !important;
  padding: 8px 15px !important;
  box-shadow: 0 3px 10px rgba(20, 32, 46, 0.2);
}

.uh-btn-social-tt:hover {
  background: #000000;
  border-color: #000000;
  transform: translateY(-1px);
}

.uh-btn-social-fb {
  background: #1877f2;
  color: #ffffff !important;
  border: 1px solid #1877f2;
  font-size: 13px !important;
  padding: 8px 15px !important;
  box-shadow: 0 3px 10px rgba(24, 119, 242, 0.25);
}

.uh-btn-social-fb:hover {
  background: #1464cc;
  border-color: #1464cc;
  transform: translateY(-1px);
}


/* ── RESPONSIVE MEDIA QUERIES ── */
@media (max-width: 1024px) {
  .uh-ambient-val.uh-top-ambient-val {
    font-size: 42px;
  }

  .uh-projects-social-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .uh-social-channels-strip {
    grid-template-columns: repeat(1, 1fr);
  }
}

@media (max-width: 768px) {
  .uh-scada-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .uh-scada-main-title {
    font-size: 24px;
    letter-spacing: -0.3px;
  }

  .uh-filter-text-desktop {
    display: none;
  }

  .uh-filter-text-mobile {
    display: inline;
  }

  .uh-scada-filter-bar {
    padding: 8px 10px;
    gap: 7px;
    border-radius: 12px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(245, 158, 11, 0.25);
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.06);
  }

  .uh-scada-filter-group {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    gap: 4px;
    padding: 1px 0;
    scrollbar-width: none;
  }

  .uh-scada-filter-group::-webkit-scrollbar {
    display: none;
  }

  .uh-scada-filter-label {
    font-size: 11px;
    font-weight: 700;
    color: #9a3412;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-right: 2px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .uh-scada-filter-btn {
    white-space: nowrap;
    padding: 4px 10px;
    font-size: 11.5px;
    font-weight: 600;
    height: 28px;
    line-height: 1;
    border-radius: 9999px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .uh-scada-search-box {
    min-width: 100%;
    width: 100%;
    padding: 5px 12px;
    height: 32px;
    gap: 6px;
  }

  .uh-scada-search-box input {
    font-size: 11.5px;
  }

  /* Stage SCADA giữ nguyên layout overlay trên bản đồ như desktop */
  .uh-map-ambient-stage {
    position: relative;
    width: 100%;
    height: 480px;
    min-height: 480px;
    margin-top: 6px;
    overflow: hidden;
  }

  .uh-scada-canvas-container {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
  }

  .uh-map-overlay-layer {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
  }

  /* Grand stat nằm giữa phía trên bản đồ */
  .uh-ambient-top-stat {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    z-index: 6;
    pointer-events: auto;
  }

  .uh-top-stat-inner {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  .uh-top-stat-val-wrap {
    gap: 6px;
    align-items: center;
  }

  .uh-top-stat-icon {
    font-size: 21px;
    line-height: 1;
    filter: drop-shadow(0 1px 4px rgba(249, 115, 22, 0.35));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-0.5px);
  }

  .uh-ambient-val.uh-top-ambient-val {
    font-size: 22px;
    letter-spacing: -0.4px;
    align-items: center;
  }

  .uh-ambient-unit.uh-top-unit {
    font-size: 13px;
  }

  .uh-top-stat-badge {
    font-size: 9.5px;
    padding: 2px 7px;
    margin-top: 2px;
  }

  /* 4 Thẻ chỉ số nổi xung quanh sườn bản đồ Việt Nam (Hoàn toàn trong suốt, không background, không border như Desktop) */
  .uh-overlay-stats-grid {
    display: contents;
  }

  .uh-overlay-col {
    position: absolute;
    top: 76px;
    width: 130px;
    display: flex;
    flex-direction: column;
    z-index: 6;
    pointer-events: auto;
    gap: 46px;
  }

  .uh-overlay-col.overlay-left {
    left: 8px;
    align-items: flex-start;
    text-align: left;
  }

  .uh-overlay-col.overlay-right {
    right: 8px;
    align-items: flex-end;
    text-align: right;
  }

  .uh-ambient-stat {
    width: 100%;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .uh-overlay-col.overlay-left .uh-ambient-stat {
    align-items: flex-start;
    text-align: left;
  }

  .uh-overlay-col.overlay-right .uh-ambient-stat {
    align-items: flex-end;
    text-align: right;
  }

  /* Trên mobile ẩn icon và dòng mô tả dài để ngắn gọn tối đa */
  .uh-ambient-icon {
    display: none !important;
  }

  .uh-ambient-sub {
    display: none !important;
  }

  .uh-ambient-lbl {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    margin: 0 0 2px 0 !important;
    line-height: 1.25 !important;
  }

  .uh-ambient-val {
    font-size: 15px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    letter-spacing: -0.3px !important;
  }

  .uh-ambient-unit {
    font-size: 11px !important;
    font-weight: 700 !important;
  }

  .uh-ticker-badge {
    font-size: 9px !important;
    padding: 2px 6px !important;
    margin-top: 3px !important;
  }

  .uh-scada-legend {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .uh-projects-social-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .uh-project-filter-card {
    padding: 16px;
  }

  .uh-project-type-tabs {
    gap: 6px;
  }

  .uh-type-tab-btn {
    padding: 8px 14px;
    font-size: 13px;
  }

  .uh-project-filter-subbar {
    flex-direction: column;
    align-items: stretch;
  }

  .uh-filter-chip-groups {
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .uh-hero-facts-grid {
    grid-template-columns: 1fr;
  }
}