/* ==========================================================================
   Bado Software - Tech Stack Section ("OUR TECHNOLOGIES STACK")
   ========================================================================== */

.home-tech {
  padding: clamp(2rem, 4vw, 4rem) 0 clamp(2rem, 4vw, 4rem) 0;
  background-color: #f8fafc;
  overflow-x: hidden;
}

@media (max-width: 48em) {
  .home-tech {
    padding: 3rem 0;
  }
}

.home-tech__wrapper {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1.5rem;
  padding: 3.25rem 3rem 3.5rem 3rem;
  box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.05);
  box-sizing: border-box;
}

@media (max-width: 62em) {
  .home-tech__wrapper {
    padding: 2.25rem 1.5rem;
    border-radius: 1.25rem;
  }
}

/* Header */
.home-tech__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  margin-bottom: 3.5rem;
}

@media (max-width: 62em) {
  .home-tech__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
  }
}

@media (max-width: 36em) {

  /* < 576px (Điện thoại): Căn giữa header theo design */
  .home-tech__header {
    align-items: center;
    text-align: center;
    margin-bottom: 2rem;
  }

  .home-tech__header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .home-tech__badge {
    margin-inline: auto;
  }

  .home-tech__title {
    text-align: center;
  }

  /* Ẩn nút ở header trên mobile, chuyển xuống footer action */
  .home-tech__header-btn,
  .home-tech__header .home-tech__btn {
    display: none !important;
  }
}

/* Footer Action (Chỉ hiện trên mobile <= 576px, căn giữa dưới grid) */
.home-tech__footer-action {
  display: none;
}

@media (max-width: 36em) {
  .home-tech__footer-action {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
  }

  .home-tech__footer-action .home-tech__btn {
    display: inline-flex !important;
    background: transparent !important;
    color: #257AE3 !important;
    border: 1px solid #257AE3 !important;
    box-shadow: none !important;
    border-radius: 12px;
    padding: 0.65rem 1.75rem;
  }

  .home-tech__footer-action .home-tech__btn:hover {
    background: #257AE3 !important;
    color: #ffffff !important;
  }
}

.home-tech__header-content {
  max-width: 55rem;
}

.home-tech__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.875rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background-color: rgba(0, 82, 255, 0.08);
  color: #0052ff;
  border: 1px solid rgba(0, 82, 255, 0.16);
  margin-bottom: 1rem;
}

.home-tech__title {
  font-size: clamp(1.85rem, 2.5vw + 0.5rem, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #0f172a;
  line-height: 1.2;
  margin: 0;
}

.home-tech__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.625rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff !important;
  background: linear-gradient(180deg, #0478FA 0%, #297BE2 100%);
  border-radius: 12px;
  text-decoration: none !important;
  border: 1px solid transparent;
  box-shadow: inset 0 -3px 4px 0 rgba(255, 255, 255, 0.5), 0 0px 0px rgba(4, 120, 250, 0.4);
  transition: all 0.25s ease;
  white-space: nowrap;
}

.home-tech__btn:hover {
  background: linear-gradient(180deg, #0369dc 0%, #226ecf 100%);
  box-shadow: 0 6px 18px rgba(4, 120, 250, 0.45);
  transform: translateY(-1px);
}

.home-tech__btn svg {
  transition: transform 0.25s ease;
}

.home-tech__btn:hover svg {
  transform: translateX(3px);
}

/* 9 Tech Pillars Container */
.home-tech__pillars {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  justify-items: center;
  align-items: flex-start;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 75em) {

  /* < 1200px: Xuống dòng theo dạng lưới 4 cột (4x2) */
  .home-tech__pillars {
    grid-template-columns: repeat(4, 1fr);
    row-gap: 1.5rem;
    column-gap: 1rem;
    justify-items: center;
  }

  /* Khi rớt cột/xuống dòng thành nhiều hàng, ẩn vệt sáng/viền dưới và ẩn nút "..." */
  .home-tech__glow-pillar {
    display: none !important;
  }

  .home-tech__item--more {
    display: none !important;
  }

  /* .home-tech__btn {
    display: none !important;
  } */
}

@media (max-width: 36em) {

  /* Mobile <= 576px (Điện thoại): Lưới 4 cột x 2 hàng theo design ảnh */
  .home-tech__pillars {
    gap: 0.875rem 0.625rem;
    justify-items: center;
    padding-bottom: 0;
  }

  .home-tech__icon-box {
    width: 60px;
    height: 60px;
    border-radius: 12px;
  }
}

/* Individual Tech Pillar Item */
.home-tech__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
  position: relative;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

/* Tech Icon Box */
.home-tech__icon-box {
  width: 68px;
  height: 68px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  z-index: 2;
  overflow: hidden;
  background-color: #ffffff;
}

.home-tech__item:hover .home-tech__icon-box {
  transform: translateY(-5px);
}

.home-tech__icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 14px;
}

/* More Icon (...) */
.home-tech__more-dots {
  display: flex;
  align-items: center;
  gap: 5px;
}

.home-tech__more-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #64748b;
}

/* Glow Pillar (Vertical Fade Down) */
.home-tech__glow-pillar {
  width: 68px;
  height: 140px;
  border-radius: 0 0 14px 14px;
  margin-top: -6px;
  z-index: 1;
  transition: opacity 0.3s ease, filter 0.3s ease;
  opacity: 0.85;
  pointer-events: none;
}

.home-tech__item:hover .home-tech__glow-pillar {
  opacity: 1;
  filter: drop-shadow(0 4px 12px currentColor);
}

/* ==========================================================================
   Different Color Schemes per Tech Item (matching design screenshot)
   ========================================================================== */

/* 1. .NET (Purple) */
.home-tech__item--net .home-tech__icon-box {
  background-color: #512BD4;
}

.home-tech__item--net:hover .home-tech__icon-box {
  box-shadow: 0 12px 28px rgba(81, 43, 212, 0.35);
}

.home-tech__item--net .home-tech__glow-pillar {
  background: linear-gradient(180deg, rgba(81, 43, 212, 0.28) 0%, rgba(81, 43, 212, 0.05) 70%, transparent 100%);
}

/* 2. React (Cyan) */
.home-tech__item--react .home-tech__icon-box {
  background-color: #e0f7fa;
}

.home-tech__item--react:hover .home-tech__icon-box {
  box-shadow: 0 12px 28px rgba(0, 216, 255, 0.35);
}

.home-tech__item--react .home-tech__glow-pillar {
  background: linear-gradient(180deg, rgba(0, 216, 255, 0.3) 0%, rgba(0, 216, 255, 0.05) 70%, transparent 100%);
}

/* 3. Flutter (Blue) */
.home-tech__item--flutter .home-tech__icon-box {
  background-color: #02569B;
}

.home-tech__item--flutter:hover .home-tech__icon-box {
  box-shadow: 0 12px 28px rgba(2, 86, 155, 0.35);
}

.home-tech__item--flutter .home-tech__glow-pillar {
  background: linear-gradient(180deg, rgba(2, 86, 155, 0.28) 0%, rgba(2, 86, 155, 0.05) 70%, transparent 100%);
}

/* 4. Electron (Dark Slate) */
.home-tech__item--electron .home-tech__icon-box {
  background-color: #2b2e3a;
}

.home-tech__item--electron:hover .home-tech__icon-box {
  box-shadow: 0 12px 28px rgba(43, 46, 58, 0.3);
}

.home-tech__item--electron .home-tech__glow-pillar {
  background: linear-gradient(180deg, rgba(50, 55, 68, 0.25) 0%, rgba(50, 55, 68, 0.05) 70%, transparent 100%);
}

/* 5. PostgreSQL (Navy) */
.home-tech__item--postgres .home-tech__icon-box {
  background-color: #1e3a5f;
}

.home-tech__item--postgres:hover .home-tech__icon-box {
  box-shadow: 0 12px 28px rgba(51, 103, 145, 0.35);
}

.home-tech__item--postgres .home-tech__glow-pillar {
  background: linear-gradient(180deg, rgba(51, 103, 145, 0.28) 0%, rgba(51, 103, 145, 0.05) 70%, transparent 100%);
}

/* 6. Redis (Red) */
.home-tech__item--redis .home-tech__icon-box {
  background-color: #dc382d;
}

.home-tech__item--redis:hover .home-tech__icon-box {
  box-shadow: 0 12px 28px rgba(220, 56, 45, 0.35);
}

.home-tech__item--redis .home-tech__glow-pillar {
  background: linear-gradient(180deg, rgba(220, 56, 45, 0.28) 0%, rgba(220, 56, 45, 0.05) 70%, transparent 100%);
}

/* 7. Docker (Pastel Blue) */
.home-tech__item--docker .home-tech__icon-box {
  background-color: #e1f5fe;
}

.home-tech__item--docker:hover .home-tech__icon-box {
  box-shadow: 0 12px 28px rgba(36, 150, 237, 0.35);
}

.home-tech__item--docker .home-tech__glow-pillar {
  background: linear-gradient(180deg, rgba(36, 150, 237, 0.28) 0%, rgba(36, 150, 237, 0.05) 70%, transparent 100%);
}

/* 8. AWS (Dark Orange) */
.home-tech__item--aws .home-tech__icon-box {
  background-color: #232f3e;
}

.home-tech__item--aws:hover .home-tech__icon-box {
  box-shadow: 0 12px 28px rgba(255, 153, 0, 0.35);
}

.home-tech__item--aws .home-tech__glow-pillar {
  background: linear-gradient(180deg, rgba(255, 153, 0, 0.3) 0%, rgba(255, 153, 0, 0.05) 70%, transparent 100%);
}

/* 9. More (...) (Light Gray) */
.home-tech__item--more .home-tech__icon-box {
  background-color: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.home-tech__item--more:hover .home-tech__icon-box {
  box-shadow: 0 12px 28px rgba(148, 163, 184, 0.35);
}

.home-tech__item--more .home-tech__glow-pillar {
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.25) 0%, rgba(148, 163, 184, 0.05) 70%, transparent 100%);
}