/* Base styles: Mobile (up to 479px) */
.hero-container {
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 150px; /* adjust fade height */
  background: linear-gradient(to bottom, rgb(0, 0, 0), transparent);
  pointer-events: none;
  z-index: 1;
}

.hero-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  position: relative;
  z-index: 0;
  width: 100%;
}

.hero-text {
  position: absolute;
  text-align: center;
  z-index: 2;
  top: 15%; /* change to move up or down */
}

.hero-text h1 {
  font-size: 2.5em;
  color: white;
  font-family: "Audiowide", sans-serif;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
  margin: 0;
  padding: 20px;
  line-height: 1.4;
}

/* WHY CHOOSE APEXLABS SECTION */
.why-apexlabs {
  padding: 40px 20px;
  text-align: center;
  position: relative;
  margin-top: -50px; /* overlap with hero image */
  padding-top: 100px;
}

.why-apexlabs::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1));
  pointer-events: none;
  z-index: 1;
}

.why-apexlabs h2 {
  font-size: 2em;
  color: white;
  margin-bottom: 30px;
  font-weight: bold;
  position: relative;
  z-index: 2;
  font-family: "Audiowide", sans-serif;
}

.features-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  z-index: 2;
}

.feature-box {
  background-color: #222;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 25px;
  color: white;
}

.feature-box h3 {
  font-size: 1.3em;
  margin-bottom: 10px;
  color: #00d4ff;
  font-family: "Audiowide", sans-serif;
}

.feature-box p {
  font-size: 0.95em;
  line-height: 1.6;
  color: #ccc;
}

/* PRODUCTS SECTION */
.products-section {
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.products-section h2 {
  font-size: 2em;
  color: white;
  margin-bottom: 30px;
  text-align: center;
  font-weight: bold;
  font-family: "Audiowide", sans-serif;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 250px);
  gap: 20px;
  margin: 0 auto;
  justify-content: center;
}

.product-card {
  background-color: #222;
  border: 1px solid #444;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
  color: white;
  width: 250px;
}

.product-card:hover {
  transform: translateY(-5px);
  border-color: #00d4ff;
}

.product-image {
  width: 100%;
  height: 250px;
  background-color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 0.9em;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info {
  padding: 15px;
}

.product-name {
  font-size: 1.1em;
  font-weight: bold;
  margin-bottom: 8px;
  color: #00d4ff;
}

.product-specs {
  font-size: 0.85em;
  color: #aaa;
  margin-bottom: 10px;
  line-height: 1.4;
}

.product-price {
  font-size: 1.3em;
  color: #00d4ff;
  font-weight: bold;
  margin-top: 10px;
}

/* Smaller */
@media (max-width: 480px) {
  .hero-text h1 {
    font-size: 1.1em;
  }

  .products-grid {
    grid-template-columns: repeat(1, 1fr);
  }
}

/* Phone+ */
@media (min-width: 481px) {
  .features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .why-apexlabs h2 {
    font-size: 2.5em;
  }

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

/* Surface Duo fix*/
@media (max-width: 600px) {
  .features-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .feature-box {
    padding: 20px;
  }

  .feature-box h3 {
    font-size: 1.1em;
  }

  .feature-box p {
    font-size: 0.9em;
  }

  .hero-text h1 {
    font-size: 1.8em;
  }

  .products-grid {
    grid-template-columns: repeat(1, 1fr);
    max-width: 250px;
  }
}

/* Tablet */
@media (min-width: 769px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .products-section h2 {
    font-size: 2.5em;
  }

  .hero-text h1 {
    font-size: 3.5em;
  }
}

/* Desktop */
@media (min-width: 1025px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
