/* ================================
   Home hero
================================ */

.home-hero {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding: 72px 20px 78px;
  background:
    radial-gradient(circle at 18% 18%, rgba(102, 126, 234, 0.14), transparent 30%),
    radial-gradient(circle at 82% 24%, rgba(118, 75, 162, 0.12), transparent 32%),
    linear-gradient(180deg, #f3f7ff 0%, #edf3fb 100%);
  border-bottom: 1px solid rgba(203, 213, 225, 0.7);
}

.home-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  align-items: center;
  gap: 56px;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

.home-hero-content {
  min-width: 0;
}

.home-hero-badge {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  margin-bottom: 20px;
  color: #4f46e5;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: rgba(99, 102, 241, 0.09);
  border: 1px solid rgba(99, 102, 241, 0.14);
  border-radius: 6px;
}

.home-hero h1 {
  max-width: 640px;
  margin: 0 0 20px;
  color: #172033;
  font-size: 42px;
  font-weight: 850;
  line-height: 1.24;
  letter-spacing: -0.04em;
}

.home-hero p {
  max-width: 620px;
  margin: 0;
  color: #475569;
  font-size: 16px;
  line-height: 1.9;
}

.home-search-form {
  position: relative;
  display: flex;
  align-items: center;
  width: min(760px, 100%);
  height: 48px;
  margin: 28px auto 0;
  padding: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(219, 225, 234, 0.95);
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.home-search-form::before {
  content: "";
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-left: 20px;
  background-color: #64748b;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.8 18.1a7.3 7.3 0 1 1 0-14.6 7.3 7.3 0 0 1 0 14.6Zm0-2a5.3 5.3 0 1 0 0-10.6 5.3 5.3 0 0 0 0 10.6Zm6.1.1 4.1 4.1-1.4 1.4-4.1-4.1 1.4-1.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.8 18.1a7.3 7.3 0 1 1 0-14.6 7.3 7.3 0 0 1 0 14.6Zm0-2a5.3 5.3 0 1 0 0-10.6 5.3 5.3 0 0 0 0 10.6Zm6.1.1 4.1 4.1-1.4 1.4-4.1-4.1 1.4-1.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.home-search-form:focus-within {
  border-color: rgba(102, 126, 234, 0.75);
  box-shadow: 0 14px 34px rgba(102, 126, 234, 0.16);
}

.home-search-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 22px 0 12px;
  color: #111827;
  font-size: 15px;
  background: transparent;
  border: none;
  outline: none;
}

.home-search-input::placeholder {
  color: #9ca3af;
}

.home-search-button {
  flex-shrink: 0;
  width: 96px;
  height: 100%;
  padding: 0;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 0;
  transition: opacity 0.18s ease;
}

.home-search-button:hover {
  opacity: 0.92;
}

.home-hero-visual {
  display: flex;
  justify-content: center;
  min-width: 0;
}

.home-hero-image-card {
  width: 100%;
  max-width: 470px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 18px;
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.13);
}

.home-hero-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}


/* ================================
   Home category grid
================================ */

.home-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px 20px 70px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.feature-card-link {
  display: block;
}

.feature-card {
  position: relative;
  min-height: 190px;
  padding: 34px 26px 30px;
  overflow: hidden;
  text-align: center;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.feature-card:hover {
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.11);
  transform: translateY(-5px);
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin: 0 auto 24px;
  color: #ffffff;
  font-size: 20px;
  border-radius: 12px;
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.1);
}

.feature-icon-hardware {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.feature-icon-software {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.feature-icon-opensource {
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
}

.feature-icon-3Dmodel {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.feature-icon-system {
  background: linear-gradient(135deg, #14b8a6, #0f766e);
}

.feature-icon-cloud {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
}

.feature-card h3 {
  margin: 0 0 10px;
  color: #172033;
  font-size: 18px;
  font-weight: 800;
}

.feature-card p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.75;
}


/* ================================
   Responsive
================================ */

@media (max-width: 992px) {
  .home-hero-inner {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .home-hero-content {
    text-align: center;
  }

  .home-hero h1,
  .home-hero p {
    margin-left: auto;
    margin-right: auto;
  }

  .home-hero-visual {
    order: 2;
  }

  .features-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .home-hero {
    padding: 52px 16px 58px;
  }

  .home-hero h1 {
    font-size: 34px;
  }

  .home-hero p {
    font-size: 15px;
  }

  .home-search-form {
    width: 100%;
    height: 46px;
    border-radius: 12px;
  }

  .home-search-form::before {
    width: 17px;
    height: 17px;
    margin-left: 16px;
  }

  .home-search-input {
    padding-left: 10px;
  }

  .home-search-button {
    width: 82px;
  }

  .home-hero-image-card {
    max-width: 100%;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .home-section {
    padding: 36px 14px 54px;
  }
}

@media (max-width: 520px) {
  .home-hero {
    padding: 40px 12px 42px;
  }

  .home-hero h1 {
    font-size: 30px;
  }

  .home-hero p {
    font-size: 14px;
    line-height: 1.7;
  }

  .home-search-form {
    height: 42px;
    border-radius: 10px;
  }

  .home-search-form::before {
    margin-left: 12px;
  }

  .home-search-input {
    font-size: 13px;
  }

  .home-search-button {
    width: 68px;
    font-size: 13px;
  }

  .home-hero-image-card {
    display: none;
  }

  .home-section {
    padding: 28px 12px 42px;
  }

  .features-grid {
    gap: 12px;
  }

  .feature-card {
    min-height: auto;
    padding: 20px 16px;
    text-align: left;
  }

  .feature-icon {
    width: 40px;
    height: 40px;
    margin: 0 0 14px;
    border-radius: 10px;
    font-size: 18px;
  }

  .feature-card h3 {
    margin-bottom: 7px;
    font-size: 17px;
  }

  .feature-card p {
    font-size: 13px;
    line-height: 1.65;
  }
}
