hr {
  border: none;
  border-top: 2px solid #888;
  margin: 0;
  width: 100%;
}

.services-hero {
  text-align: center;
  padding: 30px 15px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><polygon points="50,0 61,35 98,35 68,57 79,91 50,70 21,91 32,57 2,35 39,35" fill="none" stroke="#b5651d" stroke-width="2"/></svg>') repeat;
  background-color: #eceada;
  border: 3px solid #b5651d;
  border-radius: 15px;
  margin: 20px auto;
  max-width: 1400px;
  box-sizing: border-box;
  opacity: 0;
  animation: fadeIn 1s ease-out forwards;
  transition: box-shadow 0.3s ease;
}

.services-hero:hover {
  box-shadow: 0 0 15px rgba(181, 101, 29, 0.5);
}

.services-hero h1 {
  font-size: 48px;
  font-family: 'TT Background', serif;
  color: #3a2f2d;
  border-bottom: 2px solid #b5651d;
  display: inline-block;
  margin-bottom: 15px;
  opacity: 0;
  animation: slideInLeft 1s ease-out 0.5s forwards;
  transition: color 0.3s ease;
}

.services-hero h1:hover {
  color: #b5651d;
}

.services-hero p {
  font-size: 18px;
  color: #4a3c31;
  margin: 0 auto 20px;
  max-width: 700px;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.7s forwards;
  transition: color 0.3s ease;
}

.services-hero p:hover {
  color: #b5651d;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 10px;
}

.service-item {
  background-color: #fff;
  border: 2px solid #b5651d;
  border-radius: 10px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(50px);
  animation: slideUp 1s ease-out forwards;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.service-item:nth-child(1) { animation-delay: 0.9s; }
.service-item:nth-child(2) { animation-delay: 1.0s; }
.service-item:nth-child(3) { animation-delay: 1.1s; }
.service-item:nth-child(4) { animation-delay: 1.2s; }
.service-item:nth-child(5) { animation-delay: 1.3s; }
.service-item:nth-child(6) { animation-delay: 1.4s; }
.service-item:nth-child(7) { animation-delay: 1.5s; }
.service-item:nth-child(8) { animation-delay: 1.6s; }
.service-item:nth-child(9) { animation-delay: 1.7s; }
.service-item:nth-child(10) { animation-delay: 1.8s; }

.service-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 0 15px rgba(181, 101, 29, 0.5);
}

.service-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform 0.5s ease;
  loading: lazy;
}

.service-item:hover img {
  transform: scale(1.1);
}

.service-item h3 {
  font-size: 22px;
  font-family: 'TT Commons Pro', sans-serif;
  color: #735e59;
  margin: 10px 15px;
  transition: color 0.3s ease;
}

.service-item h3:hover {
  color: #b5651d;
}

.service-item p {
  font-size: 14px;
  color: #3a2f2d;
  margin: 0 15px 15px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.3s ease;
}

.service-item p:hover {
  color: #b5651d;
}

.service-item a {
  display: inline-block;
  padding: 8px 16px;
  font-size: 14px;
  font-family: 'TT Commons', sans-serif;
  color: #fff;
  background-color: #b5651d;
  border-radius: 5px;
  text-decoration: none;
  margin: 0 15px 15px;
  transition: background-color 0.3s ease, transform 0.3s ease;
  cursor: pointer;
}

.service-item a:hover {
  background-color: #8c4a15;
  transform: scale(1.05);
}

.tech-details {
  max-width: 1400px;
  margin: 40px auto;
  padding: 0 20px;
}

.tech-detail {
  display: flex;
  align-items: center;
  margin-bottom: 40px;
  background-color: #eceada;
  border-radius: 10px;
  padding: 20px;
  opacity: 0;
  animation: fadeInUp 1s ease-out forwards;
  transition: box-shadow 0.3s ease;
}

.tech-detail:nth-child(1) { animation-delay: 2.0s; }
.tech-detail:nth-child(2) { animation-delay: 2.2s; }
.tech-detail:nth-child(3) { animation-delay: 2.4s; }
.tech-detail:nth-child(4) { animation-delay: 2.6s; }

.tech-detail:hover {
  box-shadow: 0 0 15px rgba(181, 101, 29, 0.5);
}

.tech-detail img {
  width: 300px;
  height: auto;
  border-radius: 10px;
  margin-right: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  loading: lazy;
}

.tech-detail img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(181, 101, 29, 0.5);
}

.tech-detail-text {
  flex: 1;
}

.tech-detail-text h3 {
  font-size: 28px;
  font-family: 'TT Commons Pro', sans-serif;
  color: #735e59;
  margin: 0 0 10px;
  transition: color 0.3s ease;
}

.tech-detail-text h3:hover {
  color: #b5651d;
}

.tech-detail-text p {
  font-size: 16px;
  color: #3a2f2d;
  line-height: 1.5;
  margin: 0 0 15px;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.3s ease;
  text-align: justify;
}

.tech-detail-text p:hover {
  color: #b5651d;
}

.tech-detail-text a {
  display: inline-block;
  padding: 8px 16px;
  font-size: 14px;
  font-family: 'TT Commons', sans-serif;
  color: #fff;
  background-color: #b5651d;
  border-radius: 5px;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.3s ease;
  cursor: pointer;
}

.tech-detail-text a:hover {
  background-color: #8c4a15;
  transform: scale(1.05);
}

.cta-section {
  max-width: 1400px;
  margin: 20px auto;
  padding: 30px 15px;
  background-color: #eceada;
  border-radius: 10px;
  text-align: center;
  opacity: 0;
  animation: fadeInUp 1s ease-out 2.8s forwards;
  transition: box-shadow 0.3s ease;
}

.cta-section:hover {
  box-shadow: 0 0 15px rgba(181, 101, 29, 0.5);
}

.cta-section h2 {
  font-size: 32px;
  font-family: 'TT Background', serif;
  color: #3a2f2d;
  border-bottom: 2px solid #b5651d;
  display: inline-block;
  margin-bottom: 15px;
  transition: color 0.3s ease;
}

.cta-section h2:hover {
  color: #b5651d;
}

.cta-section p {
  font-size: 16px;
  color: #3a2f2d;
  margin: 0 auto 15px;
  max-width: 600px;
  transition: color 0.3s ease;
}

.cta-section p:hover {
  color: #b5651d;
}

.cta-section a {
  display: inline-block;
  padding: 10px 20px;
  font-size: 16px;
  font-family: 'TT Commons', sans-serif;
  color: #fff;
  background-color: #b5651d;
  border-radius: 5px;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.cta-section a:hover {
  background-color: #8c4a15;
  transform: scale(1.05);
}

.dialog-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: fadeIn 0.3s ease-out forwards;
}

.dialog {
  background-color: #fff;
  border: 2px solid #b5651d;
  border-radius: 10px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  opacity: 0;
  transform: scale(0.8);
  animation: scaleIn 0.3s ease-out forwards;
}

.dialog h3 {
  font-size: 24px;
  font-family: 'TT Commons Pro', sans-serif;
  color: #735e59;
  margin: 0 0 15px;
  transition: color 0.3s ease;
}

.dialog h3:hover {
  color: #b5651d;
}

.dialog p {
  font-size: 16px;
  font-family: 'TT Commons', sans-serif;
  color: #3a2f2d;
  line-height: 1.5;
  margin: 0 0 20px;
  transition: color 0.3s ease;
  text-align: justify;
}

.dialog p:hover {
  color: #b5651d;
}

.dialog .close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #b5651d;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 8px 12px;
  font-size: 14px;
  font-family: 'TT Commons', sans-serif;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.dialog .close-button:hover {
  background-color: #8c4a15;
  transform: scale(1.05);
}

/* Styles for read-more data-description content */
.dialog h4 {
  font-size: 22px;
  font-family: 'TT Commons Pro', sans-serif;
  color: #735e59;
  margin: 15px 0 10px;
  text-align: left;
  transition: color 0.3s ease;
}

.dialog h4:hover {
  color: #b5651d;
}

.dialog ul {
  list-style: none;
  padding: 0;
  margin: 10px 0 20px;
}

.dialog ul li {
  font-size: 16px;
  font-family: 'TT Commons', sans-serif;
  color: #3a2f2d;
  line-height: 1.6;
  margin-bottom: 10px;
  position: relative;
  padding-left: 20px;
  transition: color 0.3s ease;
}

.dialog ul li:before {
  content: '•';
  position: absolute;
  left: 0;
  color: #b5651d;
  font-size: 20px;
}

.dialog ul li:hover {
  color: #b5651d;
}

.dialog ul li strong {
  font-weight: 600;
  color: #3a2f2d;
  transition: color 0.3s ease;
}

.dialog ul li strong:hover {
  color: #b5651d;
}

.dialog div {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-top: 20px;
}

.dialog div img {
  width: 150px;
  height: auto;
  border-radius: 5px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dialog div img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(181, 101, 29, 0.5);
}

.dialog div p {
  font-size: 14px;
  font-family: 'TT Commons Pro', sans-serif;
  color: #3a2f2d;
  margin: 5px 0 0;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.dialog div p:hover {
  color: #b5651d;
}

@media (max-width: 768px) {
  .services-hero {
    padding: 20px 10px;
  }

  .services-hero h1 {
    font-size: 32px;
  }

  .services-hero p {
    font-size: 14px;
    max-width: 90%;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 0 5px;
  }

  .service-item {
    margin: 0 auto;
    max-width: 350px;
  }

  .service-item img {
    height: 150px;
  }

  .service-item h3 {
    font-size: 20px;
    margin: 10px;
  }

  .service-item p {
    font-size: 14px;
    margin: 0 10px 15px;
  }

  .tech-detail {
    flex-direction: column;
    text-align: center;
  }

  .tech-detail img {
    margin-right: 0;
    margin-bottom: 20px;
    width: 100%;
    max-width: 300px;
  }

  .tech-detail-text h3 {
    font-size: 24px;
  }

  .tech-detail-text p {
    font-size: 14px;
  }

  .cta-section {
    padding: 20px 10px;
  }

  .cta-section h2 {
    font-size: 24px;
  }

  .cta-section p {
    font-size: 14px;
    max-width: 90%;
  }

  .cta-section a {
    padding: 8px 16px;
    font-size: 14px;
  }

  .dialog {
    width: 95%;
    max-height: 90vh;
    padding: 15px;
  }

  .dialog h3 {
    font-size: 20px;
  }

  .dialog p {
    font-size: 14px;
  }

  .dialog .close-button {
    padding: 6px 10px;
    font-size: 12px;
  }

  .dialog h4 {
    font-size: 20px;
  }

  .dialog ul li {
    font-size: 14px;
    padding-left: 18px;
  }

  .dialog div img {
    width: 120px;
  }

  .dialog div p {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .services-hero h1 {
    font-size: 28px;
  }

  .services-hero p {
    font-size: 12px;
  }

  .service-item img {
    height: 120px;
  }

  .service-item h3 {
    font-size: 18px;
  }

  .service-item p {
    font-size: 12px;
  }

  .tech-detail-text h3 {
    font-size: 20px;
  }

  .tech-detail-text p {
    font-size: 12px;
  }

  .cta-section h2 {
    font-size: 20px;
  }

  .cta-section p {
    font-size: 12px;
  }

  .dialog h3 {
    font-size: 18px;
  }

  .dialog p {
    font-size: 12px;
  }

  .dialog h4 {
    font-size: 18px;
  }

  .dialog ul li {
    font-size: 12px;
    padding-left: 16px;
  }

  .dialog div img {
    width: 100px;
  }

  .dialog div p {
    font-size: 11px;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(50px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}