:root {
  --primary-color: #d0021b;
  --secondary-color: #515457;
  --tertiary-color: #dc3545;
  --text-color: #333333;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #ffffff;
  text-align: center;
  padding-top: 0px;
}

/* Heading */
h1 {
  margin: 20px 0;
  color: #333;
}

.services-separator {
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  position: relative;
  padding-bottom: 10px;
  margin-top: 25px;
  margin-bottom: 60px;
}

.services-separator::after {
  content: "";
  display: block;
  width: 50%;
  margin: 5px auto 0;
  border-bottom: 2px solid black;
}

/* prodiucts-services header */

.header-container {
  margin: 90px 0;
}

.services-subtitle p {
  color: var(--text-color);
}

/* AFTER HEADER */

.services-subtitle {
  text-align: left;
  margin-bottom: 60px;
  margin-left: 20px;
}

/* Services Section */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  justify-items: center;
  padding: 30px;
  max-width: 1200px;
  margin: auto;
  margin-top: 50px;
}

/* Services Box */
.services-box {
  position: relative;
  width: 100%;
  max-width: 350px;
  background: white;
  overflow: hidden;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 0;
  transition: color 0.3s ease-in-out;
  margin: auto;
}

.services-box::before {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 1px;
  background-color: black;
  transition: width 0.5s ease-in-out;
  border-radius: 1px;
}

.services-box::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 1px;
  background-color: red;
  transition: width 0.5s ease-in-out;
  border-radius: 1px;
}

.services-box:hover::before {
  width: 0%;
}

.services-box:hover::after {
  width: 100%;
}

.image-container {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease-in-out;
}

.services-box:hover .image-container img {
  opacity: 0.3;
}

.services-content {
  padding: 15px;
}

.services-content h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: #333;
}

.services-content p {
  font-size: 14px;
  color: #666;
}

.services-box:hover .services-content h3,
.services-box:hover .services-content p {
  color: #e74c3c;
}

.discover-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(231, 76, 60, 0.9);
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: bold;
  border-radius: 5px;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  text-decoration: none;
}

.services-box:hover .discover-btn {
  opacity: 1;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .services {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
  }

  .services-box {
    max-width: 320px;
  }
}

@media (max-width: 768px) {
  .services {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .services-box {
    width: 100%;
    max-width: 100%;
  }

  .discover-btn {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 14px;
  }

  .filter-link {
    font-size: 16px;
  }

  .services-content h3 {
    font-size: 16px;
  }

  .services-content p {
    font-size: 12px;
  }
}

/* PRODUCTS AND SERVICES HARDWARE SECTION STYLE */

.hardware-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  padding: 20px;
}

.hardware-card {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  width: 320px;
  transition: transform 0.3s ease;
}

.hardware-card:hover {
  transform: translateY(-5px);
}

.hardware-img-wrapper {
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.hardware-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hardware-info {
  padding: 20px;
  text-align: center;
}

.hardware-title {
  font-size: 20px;
  font-weight: bold;
  color: #333;
  margin-bottom: 10px;
}

.hardware-description {
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
  line-height: 1.6;
}

.hardware-btn {
  background-color: #d40000;
  color: #ffffff;
  padding: 10px 20px;
  text-decoration: none;
  display: inline-block;
  border-radius: 6px;
  font-weight: 600;
  transition: background-color 0.3s ease;
  font-size: 0.8rem;
}

.hardware-btn:hover {
  background-color: #a80000;
}

@media (max-width: 768px) {
  .hardware-card {
    width: 100%;
  }
}
