/* Optimized CSS: variables normalized, duplicated rules consolidated, smaller footprint while preserving layout/UI */
:root {
  /* Colors (canonical names) */
  --brand: #0ea5e9;
  /* primary */
  --brand-2: #0284c7;
  /* primary dark */
  --accent: #10b981;
  /* success/accent */
  --warn: #f59e0b;
  --danger: #ef4444;

  /* Background / text */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --txt: #1e293b;
  --muted: #64748b;

  /* Effects / sizes */
  --shadow: 0 6px 24px rgba(0, 0, 0, .08);
  --shadow-md: 0 10px 40px rgba(0, 0, 0, .15);
  --radius: 18px;
  --radius-sm: 12px;

  /* Layout */
  --container-width: 1200px;
  --container-padding: 4vw;

  /* Utility */
  --glass: rgba(255, 255, 255, .9);
  --glass-border: rgba(0, 0, 0, .08);
  --glass-weak: rgba(14, 165, 233, .1);

  /* Responsive breakpoints */
  --bp-mobile: 480px;
  --bp-tablet: 768px;
  --bp-desktop: 1024px;
  --bp-wide: 1280px;
}

/* Reset / base */
* {
  box-sizing: border-box
}

html,
body {
  margin: 0;
  min-height: 100%;
  scroll-behavior: smooth
}

.header-fixed-container {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background-color: #f8fafc;
  background-image: 
    radial-gradient(at 0% 0%, rgba(14, 165, 233, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(16, 185, 129, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(14, 165, 233, 0.08) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(16, 185, 129, 0.05) 0px, transparent 50%),
    linear-gradient(rgba(14, 165, 233, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 165, 233, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 40px 40px, 40px 40px;
  background-attachment: fixed;
  color: var(--txt);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none
}

img {
  max-width: 100%;
  display: block
}

.container {
  width: min(var(--container-width), 92vw);
  margin: 0 auto
}

/* Shared card/surface styles (consolidated) */
.surface {
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(248, 250, 252, .92));
  border: 1px solid var(--glass-border);
  padding: 20px;
  transition: transform .2s ease, box-shadow .12s ease;
  box-shadow: var(--shadow);
}

.surface:hover {
  transform: translateY(-4px)
}

/* Top Header */
.top-header-wrap {
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  padding: 4px 0; /* Giảm từ 8px */
  font-size: 14px;
}

.top-header-wrap .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px
}

.top-header-logo {
  display: flex;
  align-items: center
}

.top-header-logo img {
  height: 25px
}

.top-award {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center
}

.award-carousel {
  display: flex;
  align-items: center;
  gap: 20px;
  overflow: hidden;
  transform: translateZ(0)
}

.award-item {
  flex-shrink: 0;
  text-align: center
}

.award-item img {
  height: 41px;
  width: auto;
  max-width: 254px
}

/* Top header menu */
.top-header-menu {
  display: flex;
  align-items: center;
  gap: 16px;
}

.top-header-menu a {
  color: #6c757d;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px; /* Giảm từ 6px */
  border-radius: 4px;
  transition: all 0.2s ease;
}

.top-header-menu a:hover {
  color: var(--brand);
  background: rgba(14, 165, 233, 0.08);
}

.top-header-menu i {
  font-size: 16px
}

/* notification badges / dropdown */
.cart-notify {
  position: relative
}

.cart-notify.check-out::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%
}

.notifications {
  position: relative
}

.notifications-length {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 16px;
  text-align: center
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid #e9ecef;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
  min-width: 300px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  display: none
}

.dropdown-menu.show {
  display: block
}

.dropdown-header {
  padding: 12px 16px;
  border-bottom: 1px solid #e9ecef;
  font-weight: 600;
  color: #495057
}

.notifications-item {
  border-bottom: 1px solid #f8f9fa
}

.notifications-item:last-child {
  border-bottom: none
}

.notifications-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #495057
}

.notifications-item a:hover {
  background: #f8f9fa
}

.notifications-content img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px
}

.notifications-content .ntfct-header {
  font-size: 13px;
  line-height: 1.4
}

/* Header / navigation */
header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--glass);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, .08)
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 /* Giảm từ 12px */
}

.logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 800;
  letter-spacing: .3px
}

.logo-mark {
  width: 25px;
  height: 25px;
  border-radius: 10px;
  object-fit: cover;
  vertical-align: middle
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  color: var(--blue-dark)
}

.logo img {
  height: 42px;
  width: 42px;
  border-radius: 10px
}

.logo span {
  color: var(--brand-2);
  font-size: 1.5rem;
  font-weight: 900;
}

/* menu */
.menu {
  display: flex;
  gap: 18px;
  align-items: center
}

.menu a {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--brand-2);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px
}

.menu a:hover {
  background: rgba(14, 165, 233, .1);
  color: var(--brand-2)
}

/* dropdown submenu */
.menu-item {
  position: relative
}

.menu-item:hover .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0)
}

.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--glass-border);
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all .3s ease;
  z-index: 100;
  margin-top: 8px;
  transform: translateY(-10px);
  width: 100%;
  min-width: 600px
}

.submenu::before {
  content: '';
  position: absolute;
  top: -8px;
  left: var(--arrow-left, 50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid var(--bg-secondary);
  transition: left .3s ease
}

.submenu-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px
}

.submenu-section h4 {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--txt)
}

.submenu-items {
  display: flex;
  flex-direction: column;
  gap: 16px
}

.submenu-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px;
  border-radius: 8px;
  transition: background-color .2s ease;
  text-decoration: none;
  color: inherit
}

.submenu-item:hover {
  background: rgba(14, 165, 233, .05)
}

.submenu-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--muted);
  flex-shrink: 0
}

.submenu-item-content h5 {
  margin: 0 0 4px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand)
}

.submenu-item-content p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4
}

.submenu-tag {
  display: inline-block;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 8px
}

/* CTA / buttons */
.cta {
  font-family: "Poppins", Inter, sans-serif;
  padding: 8px 10px;
  background: linear-gradient(90deg, var(--brand-2), var(--brand));
  border: none;
  border-radius: 14px;
  color: #fff;
  font-weight: 800;
  box-shadow: var(--shadow);
  cursor: pointer;
  height: 40px;
  min-width: 120px;
  line-height: 10px
}

.login-btn {
  font-family: "Poppins", Inter, sans-serif;
  background: #fff;
  color: var(--brand-2);
  border: 1px solid var(--brand-2);
  box-shadow: none
}

.login-btn:hover {
  background: rgba(14, 165, 233, .08)
}

.lang-select {
  padding: 8px 10px;
  border: 1px solid var(--brand-2);
  border-radius: 14px;
  font-size: 14px;
  background: #fff;
  color: var(--brand-2);
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
  height: 40px;
  min-width: 80px;
  box-sizing: border-box
}

.lang-select:hover {
  background: rgba(14, 165, 233, .08)
}

.hamb {
  display: none
}

/* Hero */
.hero {
  position: relative;
  padding: 60px 0 30px; /* Giảm từ 100px 0 64px */
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 28px;
  align-items: center
}

.eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: dot-pulse 2s infinite ease-in-out;
  display: inline-block;
}

@keyframes dot-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  50% {
    transform: scale(1.2);
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid rgba(14, 165, 233, .3);
  border-radius: 999px;
  color: var(--brand-2);
  font-size: .85rem
}

.eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(16, 185, 129, .15)
}

.hero h1 {
  font-size: clamp(28px, 5.2vw, 47px);
  line-height: 1.05;
  margin: 14px 0 14px
}

.lead {
  color: var(--brand-2);
  font-size: clamp(15px, 1.6vw, 18px)
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, .1);
  background: #fff;
  color: var(--txt);
  font-weight: 700;
  cursor: pointer
}

.btn:hover {
  border-color: rgba(255, 255, 255, .24)
}

.btn.primary {
  background: linear-gradient(90deg, var(--brand-2), var(--brand));
  color: #fff;
  border-color: transparent
}

/* Hero visual - Modern Light Dashboard */
.device-card {
  position: relative;
  overflow: hidden;
  padding: 2px; /* Dành cho viền xoay */
  border: none;
  border-radius: 28px;
  box-shadow: 0 20px 40px rgba(14, 165, 233, 0.1);
  width: 100%;
  max-width: 540px; /* Tăng kích thước lên một chút */
  margin-left: auto; /* Đẩy sát về bên phải */
  margin-right: 0;
}

.device-card::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 400%;
  aspect-ratio: 1 / 1;
  background: conic-gradient(
    from 0deg at 50% 50%,
    #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8f00ff, #ff0000
  );
  transform: translate(-50%, -50%);
  animation: rotate 4s linear infinite;
  opacity: 1; /* Hiệu ứng luôn hiển thị */
  transition: opacity 0.3s ease-in-out;
  z-index: 0;
  animation-play-state: running; /* Hiệu ứng luôn chạy */
  filter: blur(5px);
}

.device-screen {
  position: relative;
  z-index: 1;
  background: #fcfdfe;
  border-radius: 26px; /* Bo góc khớp với lớp ngoài */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px; /* Giảm padding */
  background: #fff;
  border-bottom: 1px solid #f1f5f9;
}

.system-health {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pulse-icon {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  position: relative;
}

.pulse-icon::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: inherit;
  border-radius: 50%;
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(3); opacity: 0; }
}

.chart {
  height: 130px; /* Thu nhỏ chiều cao biểu đồ */
  margin: 8px 0;
  padding: 0 12px;
}

.sensor-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px; /* Thu hẹp khoảng cách */
  padding: 12px;
}

.tile {
  background: #fff;
  border: 1px solid #f1f5f9;
  border-radius: 14px;
  padding: 12px 8px; /* Thu nhỏ padding */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.01);
}

.tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(14, 165, 233, 0.06);
  border-color: var(--brand);
}

.tile i {
  font-size: 20px; /* Thu nhỏ icon */
  margin-bottom: 6px;
}

.tile strong {
  font-size: 10px; /* Thu nhỏ chữ */
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.tile .value {
  font-size: 18px; /* Thu nhỏ số */
  font-weight: 800;
  color: #1e293b;
}

.tile .status-text {
  font-size: 9px;
  color: #10b981;
  font-weight: 600;
  margin-top: 3px;
}

.tile canvas {
  display: none !important; /* Bỏ biểu đồ mini để tối giản */
}

/* Sections */
section {
  padding: 20px 0; /* Tăng nhẹ từ 10px để cân đối nhưng vẫn sát hơn so với mobile query */
  scroll-margin-top: 70px; /* Nhích lên trên thêm một chút nữa */
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 15px; /* Giảm từ 22px */
}

.section-head h2 {
  font-size: clamp(22px, 3.6vw, 34px);
  margin: 0
}

.muted {
  color: #3d444f;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
  max-height: 2.8em;
  font-size: 14px
}

/* Services / cards grid */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px
}

#dich-vu .card {
  position: relative;
  overflow: hidden;
  padding: 2px;
  border: none;
  border-radius: var(--radius);
}

#dich-vu .card::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 400%;
  aspect-ratio: 1 / 1;
  background: conic-gradient(
    from 0deg at 50% 50%,
    #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8f00ff, #ff0000
  );
  transform: translate(-50%, -50%);
  animation: rotate 4s linear infinite;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  z-index: 0;
  animation-play-state: paused;
  filter: blur(5px);
}

#dich-vu .card .card-content {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(248, 250, 252, .92));
  border-radius: var(--radius);
  padding: 20px;
  height: 100%;
}

#dich-vu .card:hover::before {
  opacity: 1;
  animation-play-state: running;
}

.card {
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(248, 250, 252, .92));
  border: 1px solid rgba(0, 0, 0, .08);
  padding: 20px;
  transition: transform .2s ease
}

.card:hover {
  transform: translateY(-4px)
}

.icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(14, 165, 233, .12);
  border: 1px solid rgba(14, 165, 233, .3);
  margin-bottom: 8px
}

.card h3 {
  margin: 6px 0 8px
}

.card:hover {
  transform: translateY(-4px)
}

.icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(14, 165, 233, .12);
  border: 1px solid rgba(14, 165, 233, .3);
  margin-bottom: 8px
}

.card h3 {
  margin: 6px 0 8px
}

/* Showcase */
#giai-phap .panel {
  position: relative;
  overflow: hidden;
  padding: 2px; /* Add padding to create space for the border */
  border: none; /* Remove the original border */
  border-radius: var(--radius);
}

#giai-phap .panel::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 400%;
  aspect-ratio: 1 / 1;
  background: conic-gradient(
    from 0deg at 50% 50%,
    #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8f00ff, #ff0000
  );
  transform: translate(-50%, -50%);
  animation: rotate 4s linear infinite;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  z-index: 0;
  animation-play-state: paused;
  filter: blur(5px);
}

#giai-phap .panel .panel-content {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(248, 250, 252, .92));
  border-radius: var(--radius);
  padding: 20px;
  height: 100%;
}

#giai-phap .panel:hover::before {
  opacity: 1;
  animation-play-state: running;
}

.showcase {
  display: grid;
  grid-template-columns: 2fr 1.4fr;
  gap: 18px
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px
}

.tile {
  border-radius: 16px;
  background: #f1f5f9;
  border: 1px solid rgba(0, 0, 0, .06);
  aspect-ratio: 4/3;
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding: 10px;
  background-size: cover;
  background-position: center
}

/* Giải pháp tiêu biểu */
.tile.farm-bg {
  background-image: url('image/1.jpg')
}

.tile.greenhouse-bg {
  background-image: url('image/2.jpg')
}

.tile.drip-bg {
  background-image: url('image/3.jpg')
}

.tile.building-bg {
  background-image: url('image/4.jpg')
}

.tile.energy-bg {
  background-image: url('image/5.jpg')
}

/* sản phẩm */
.tile.im1-bg {
  background-image: url('image/11.jpg')
}

.tile.im2-bg {
  background-image: url('image/12.jpg')
}

.tile.im3-bg {
  background-image: url('image/13.jpg')
}

.tile.im4-bg {
  background-image: url('image/14.jpg')
}

.tile.im5-bg {
  background-image: url('image/15.jpg')
}

.tile.im6-bg {
  background-image: url('image/16.jpg')
}

.tile.im7-bg {
  background-image: url('image/17.jpg')
}

.tile.im8-bg {
  background-image: url('image/18.jpg')
}

.tile.im9-bg {
  background-image: url('image/19.jpg')
}

.tile.im10-bg {
  background-image: url('image/20.jpg')
}

.tile.im11-bg {
  background-image: url('image/21.jpg')
}

.tile.im12-bg {
  background-image: url('image/22.jpg')
}

.tile.im13-bg {
  background-image: url('image/23.jpg')
}

.tile.im14-bg {
  background-image: url('image/24.jpg')
}

.tile.im15-bg {
  background-image: url('image/25.jpg')
}

.tile.im16-bg {
  background-image: url('image/26.jpg')
}

/* text overlays for tiles */
.tile span {
  background: rgba(15, 23, 42, 0.6); /* Nền tối nhẹ mặc định */
  backdrop-filter: blur(4px);
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
  z-index: 2;
}

.tile:hover span {
  background: var(--brand); /* Chỉ rực xanh khi di chuột vào */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

.tile .chip {
  background: rgba(14, 165, 233, 0.34); /* Quay về màu xanh nhạt mặc định */
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  z-index: 2;
  font-weight: 700;
}

.tile {
  position: relative;
  transition: transform 0.3s ease;
}

.tile:hover {
  transform: scale(1.02);
}

.tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, transparent 50%);
  border-radius: 16px;
  z-index: 1;
  transition: opacity 0.3s ease;
}

.tile:hover::after {
  background: linear-gradient(to top, rgba(14, 165, 233, 0.3) 0%, transparent 70%);
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px
}

.stat {
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(248, 250, 252, .92));
  border: 1px solid rgba(0, 0, 0, .08);
  padding: 22px;
  text-align: center
}

.stat .big {
  font-size: clamp(28px, 4.5vw, 44px);
  font-weight: 900;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 8px rgba(14, 165, 233, .2)
}

/* Clients logos */
.logos {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  opacity: .85
}

.logo-box {
  border-radius: 12px;
  border: 1px dashed rgba(0, 0, 0, .15);
  height: 72px;
  display: grid;
  place-items: center
}

/* CTA band */
.cta-band {
  border-radius: 24px;
  background: linear-gradient(90deg, rgba(14, 165, 233, .15), rgba(34, 211, 238, .12));
  border: 1px solid rgba(0, 0, 0, .08);
  padding: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: var(--shadow)
}

.cta-band>* {
  min-width: 0
}

.input {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap; /* Giữ lại thuộc tính wrap để không bị lệch trên mobile */
  width: 100%;
}

/* Footer */
footer {
  padding: 60px 0 26px;
  background: #2d3748;
  color: #fff;
  margin-top: 60px
}

.fgrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-bottom: 30px
}

.fgrid h4 {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 700;
  color: #fff
}

.fgrid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px
}

.fgrid ul li a {
  color: #e2e8f0;
  font-size: 14px;
  text-decoration: none;
  transition: color .2s ease;
  display: flex;
  align-items: center;
  gap: 8px
}

.fgrid ul li a:hover {
  color: #fff
}

.fgrid ul li a::before {
  content: ">";
  color: var(--muted);
  font-weight: 600
}

.footer-bottom {
  border-top: 1px solid #4a5568;
  padding-top: 20px;
  color: #a0aec0;
  font-size: 14px;
  line-height: 1.6
}

.footer-bottom p {
  margin: 0 0 8px 0
}

.footer-bottom p:last-child {
  margin-bottom: 0
}

/* Newsletter input */
.input {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap; /* Changed from nowrap to wrap */
  width: 100%;
}

.input input[type="email"] {
  flex: 1;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, .15);
  background: #fff;
  color: var(--txt);
  font-size: 15px;
  box-shadow: 0 0 0 2px rgba(14, 165, 233, .05);
  transition: all .2s ease
}

.input input[type="email"]:hover,
.input input[type="email"]:focus {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, .25);
  outline: none
}

.input button.btn {
  white-space: nowrap;
  border-radius: 9999px;
  padding: 12px 22px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(90deg, var(--brand-2), var(--brand));
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all .2s ease
}

.input button.btn:hover {
  opacity: .95;
  transform: translateY(-1px)
}

.input input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: #fff;
  color: #0f172a
}

/* Tech platforms */
#tech-platforms {
  padding: 10px 0
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 15px
}

.tech-column {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
  transition: transform .2s ease;
  padding-top: 0
}

.tech-column:hover {
  transform: translateY(-3px)
}

.tech-column h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  border-bottom: 1px dashed rgba(0, 0, 0, .12);
  padding-bottom: 8px;
  color: var(--brand)
}

.logo-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px
}

.logo-grid img {
  height: 52px;
  object-fit: contain;
  transition: transform .15s ease, filter .15s ease
}

.logo-grid img:hover {
  transform: translateY(-2px) scale(1.05);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .08))
}

.tech-logo1 {
  height: 40px !important
}

/* Scroll to Top Button */
.scroll-top-btn {
  position: fixed;
  bottom: 40px;
  right: 30px; /* Chuyển sang bên phải */
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  border: none;
  border-radius: 16px; /* Bo góc kiểu hiện đại thay vì tròn xoe */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(14, 165, 233, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Hiệu ứng bung ra mượt mà */
  z-index: 999;
}

.scroll-top-btn.show {
  opacity: 1;
  visibility: visible;
  bottom: 30px; /* Nhích lên khi hiện ra */
}

.scroll-top-btn:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(14, 165, 233, 0.5);
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
}

@media (max-width: 768px) {
  .scroll-top-btn {
    bottom: 30px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }
}
.fade-up {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .6s ease, transform .6s ease
}

.fade-up.appear {
  opacity: 1;
  transform: none
}

/* Responsive: grouped and minimized */
@media (max-width:1024px) {
  .container {
    width: 94vw;
  }
  
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .showcase {
    grid-template-columns: 1fr;
  }

  .cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hero {
    padding: 40px 0 20px; /* Giảm từ 60px 0 40px */
  }
}

@media (max-width:768px) {
  .device-card {
    display: none;
  }

  body {
    display: flex;
    flex-direction: column;
  }

  header { order: 1; }
  #mobileMenu { order: 2; }
  .hero { order: 3; }
  #san-pham { order: 4; } /* Đẩy Sản phẩm lên trước Dịch vụ và Giải pháp */
  #dich-vu { order: 5; }
  #giai-phap { order: 6; }
  #du-an { order: 7; }
  #tech-platforms { order: 8; }
  #lien-he { order: 9; }
  footer { order: 10; }

  .menu {
    display: none;
  }

  .hamb {
    display: block;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--brand-2);
    cursor: pointer;
    padding: 10px;
  }

  :root {
    --radius: 14px;
  }

  section {
    padding: 25px 0; /* Giảm từ 40px 0 */
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 30px;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .fgrid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .top-header-menu a span {
    display: none;
  }
  
  .nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
  }

  .logo span {
    font-size: 0.9rem;
  }

  .nav > div:last-child {
    display: flex;
    gap: 8px;
    align-items: center;
    width: 100%;
    justify-content: center;
    margin-top: 15px;
  }

  .cta, .lang-select {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    padding: 8px 4px;
  }
  .hero h1 {
    font-size: 28px;
    line-height: 1.2;
  }

  .lead {
    font-size: 15px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .stat {
    padding: 16px;
  }

  .fgrid {
    grid-template-columns: 1fr;
  }

  .top-header-wrap {
    display: none; /* Hide top bar on very small screens to save space */
  }
}

/* Add before existing media queries */
@media (max-width: 768px) {

  /* Layout & Typography */
  .container {
    padding: 0 16px;
  }

  h1 {
    font-size: 32px !important;
  }

  h2 {
    font-size: 28px !important;
  }

  /* Header & Navigation */
  .nav {
    padding: 10px 0;
  }

  .menu {
    display: none;
  }

  .hamb {
    display: block;
    font-size: 24px;
    padding: 8px;
    cursor: pointer;
  }

  /* Mobile menu */
  #mobileMenu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    padding: 60px 20px;
    z-index: 100;
    overflow-y: auto;
  }

  /* Hero section */
  .hero {
    padding: 40px 0;
  }

  .hero-actions {
    justify-content: center;
  }

  .device-card {
    margin-top: 30px;
  }

  /* Grids & Cards */
  .grid-2,
  .grid-3,
  .showcase {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .cards {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  /* Stats & Logos */
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .logos {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Forms & Inputs */
  .input {
    flex-direction: column;
    width: 100%;
  }

  .input input,
  .input button {
    width: 100%;
  }

  /* Footer */
  .fgrid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

@media (max-width: 480px) {

  /* Typography */
  body {
    font-size: 14px;
  }

  h1 {
    font-size: 28px !important;
  }

  h2 {
    font-size: 24px !important;
  }

  /* Layout */
  .container {
    width: 100%;
    padding: 0 12px;
  }

  /* Header */
  .top-header-wrap {
    display: none;
  }

  /* Stats & Logos */
  .stats {
    grid-template-columns: 1fr;
  }

  .logos {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Footer */
  .fgrid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  /* CTA Band */
  .cta-band {
    padding: 20px;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  /* Fix touch targets */
  .btn,
  .nav a,
  .menu a {
    min-height: 44px;
    min-width: 44px;
    padding: 12px;
  }
}

/* Footer responsive */
@media (max-width: 768px) {
  footer {
    padding: 40px 0 20px;
  }

  .footer-bottom {
    text-align: center;
    font-size: 13px;
  }

  .footer-bottom p {
    margin-bottom: 12px;
  }

  /* Điều chỉnh layout địa chỉ và thông tin liên hệ */
  .footer-contact-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .footer-address {
    font-size: 13px;
    line-height: 1.5;
    padding: 0 15px;
  }

  .footer-hours {
    font-size: 13px;
    padding: 8px 0;
  }

  .footer-contact {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
  }

  .footer-contact a {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  footer {
    padding: 30px 0 15px;
  }

  .footer-bottom {
    font-size: 12px;
  }

  .footer-address {
    font-size: 12px;
  }

  .footer-hours {
    font-size: 12px;
  }

  .footer-contact a {
    font-size: 12px;
  }

  /* Stack các phần tử dọc */
  .footer-bottom>div {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }

  /* Căn giữa text */
  .footer-bottom,
  .footer-address,
  .footer-hours,
  .footer-contact {
    text-align: center;
  }

  /* Thêm padding cho container */
  .footer-bottom .container {
    padding: 0 20px;
  }

  /* Giảm khoảng cách giữa các phần */
  .footer-bottom br {
    display: none;
  }

  .footer-bottom p {
    margin-bottom: 8px;
  }
}

/* Thêm hiệu ứng hover cho links */
.footer-contact a:hover {
  color: var(--brand);
  text-decoration: underline;
}

/* Thêm icons cho contact info */
.footer-contact a[href^="tel:"]::before {
  content: "📞 ";
}

.footer-contact a[href^="mailto:"]::before {
  content: "✉️ ";
}

/* Thêm divider giữa các phần */
.footer-hours {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin: 10px 0;
  padding: 10px 0;
}

/* Add to existing media queries */
@media (max-width: 768px) {

  /* Device card responsive */
  .device-card {
    width: 100%;
    margin-top: 30px;
    padding: 12px;
  }

  .device-screen {
    aspect-ratio: 16/12;
    /* Tăng chiều cao một chút trên mobile */
  }

  .status-row {
    padding: 8px;
    gap: 8px;
    flex-wrap: wrap;
  }

  .chip {
    font-size: 12px;
    padding: 4px 8px;
  }

  .chart {
    height: 120px;
    /* Giảm chiều cao chart */
    margin: 6px 8px 10px;
  }

  /* Grid layout cho các tiles */
  .device-screen>div:last-child {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 8px;
  }

  .tile {
    aspect-ratio: 3/2;
    padding: 8px;
  }

  .tile strong {
    font-size: 12px;
  }

  .tile .chip {
    margin: 0;
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .device-card {
    padding: 10px;
  }

  .device-screen {
    aspect-ratio: 16/14;
    /* Tăng thêm chiều cao trên mobile nhỏ */
  }

  .chart {
    height: 100px;
    margin: 4px 6px 8px;
  }

  .device-screen>div:last-child {
    gap: 6px;
    padding: 6px;
  }

  .tile {
    aspect-ratio: 2/1.5;
    padding: 6px;
  }

  .tile strong {
    font-size: 11px;
  }

  .tile .chip {
    padding: 3px 6px;
    font-size: 10px;
  }

  /* Điều chỉnh kích thước charts */
  #iotChart,
  #humidityChart,
  #temperatureChart,
  #co2Chart {
    max-height: 100px;
  }
}

/* Fix chart container on very small screens */
@media (max-width: 360px) {
  .device-screen {
    aspect-ratio: 16/16;
  }

  .chart {
    height: 90px;
  }

  .device-screen>div:last-child {
    grid-template-columns: repeat(2, 1fr);
    /* 2 cột trên màn hình rất nhỏ */
  }

  .tile {
    aspect-ratio: 3/2;
  }
}

@media (max-width: 768px) {

  /* Điều chỉnh vị trí nút trên mobile */
  .nav>div {
    margin-top: 8px;
    /* Thêm khoảng cách phía trên */
    padding-bottom: 6px;
    /* Thêm padding dưới */
  }

  .cta,
  .lang-select {
    margin-top: 4px;
    /* Thêm khoảng cách giữa các nút */
  }
}

@media (max-width: 480px) {
  .nav>div {
    margin-top: 10px;
    /* Tăng khoảng cách trên màn hình nhỏ hơn */
    padding-bottom: 8px;
  }

  /* Tăng khoảng cách giữa các nút */
  .nav>div {
    gap: 12px;
  }

  /* Căn giữa các nút */
  .nav>div {
    justify-content: center;
  }
}
#san-pham .card {
  position: relative;
  overflow: hidden;
  padding: 2px; /* Add padding to create space for the border */
  border: none; /* Remove the original border */
  border-radius: var(--radius);
}

#san-pham .card::before {
  content: '''';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 400%;
  aspect-ratio: 1 / 1;
  background: conic-gradient(
    from 0deg at 50% 50%,
    #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8f00ff, #ff0000
  );
  transform: translate(-50%, -50%);
  animation: rotate 4s linear infinite;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  z-index: 0;
  animation-play-state: paused;
  filter: blur(5px);
}

#san-pham .card .card-content {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(248, 250, 252, .92));
  border-radius: var(--radius);
  padding: 20px;
  height: 100%;
}

#san-pham .card:hover::before {
  opacity: 1;
  animation-play-state: running;
}

@keyframes rotate {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

#du-an .stat {
  position: relative;
  overflow: hidden;
  padding: 2px; /* Add padding to create space for the border */
  border: none; /* Remove the original border */
  border-radius: var(--radius);
}

#du-an .stat::before {
  content: '''';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 400%;
  aspect-ratio: 1 / 1;
  background: conic-gradient(
    from 0deg at 50% 50%,
    #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8f00ff, #ff0000
  );
  transform: translate(-50%, -50%);
  animation: rotate 4s linear infinite;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  z-index: 0;
  animation-play-state: paused;
  filter: blur(5px);
}

#du-an .stat .stat-content {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(248, 250, 252, .92));
  border-radius: var(--radius);
  padding: 22px;
  height: 100%;
}

#du-an .stat:hover::before {
  opacity: 1;
  animation-play-state: running;
}

#tech-platforms .tech-column {
  position: relative;
  overflow: hidden;
  padding: 2px; /* Add padding to create space for the border */
  border: none; /* Remove the original border */
  border-radius: 14px;
}

#tech-platforms .tech-column::before {
  content: '''';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 400%;
  aspect-ratio: 1 / 1;
  background: conic-gradient(
    from 0deg at 50% 50%,
    #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8f00ff, #ff0000
  );
  transform: translate(-50%, -50%);
  animation: rotate 4s linear infinite;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  z-index: 0;
  animation-play-state: paused;
  filter: blur(5px);
}

#tech-platforms .tech-column .tech-column-content {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  height: 100%;
}

#tech-platforms .tech-column:hover::before {
  opacity: 1;
  animation-play-state: running;
}
