.rel-services-section {
  padding: 30px 0;
  background: #F2F2F2;
  position: relative;
}

.rel-services-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23e2e8f0" stroke-width="0.5" opacity="0.3"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.5;
}

.section-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: 0;
  text-align: center;
  color: #6D6C7B;
  margin-bottom: 40px;
}

.rel-services-slider-container {
  position: relative;
  z-index: 2;
}

.rel-services-slider {
  position: relative;
  overflow: hidden; /* Đảm bảo không gian dư thừa bị ẩn */
  padding: 30px 0px; /* Loại bỏ padding để tránh tràn khung */
}

.rel-services-grid {
  display: flex;
  gap: 30px;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.rel-service-item {
  flex: 0 0 calc(33.333% - 20px); /* Căn cứ trên 3 card desktop */
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  position: relative;
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  max-width: 350px;
}

.rel-service-image {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 5px;
}

.rel-service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.rel-service-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 40px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.rel-service-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.rel-service-content {
  position: relative;
  padding: 15px;
  background: #ffffff;
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  min-height: 150px;
  display: flex;
  flex-direction: column;
}

.rel-service-content-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.rel-service-title {

  color: #1a202c;
  margin: 0 0 10px 0;
  transition: color 0.4s ease;
  font-family: Montserrat;
  font-weight: 600;
  font-size: 1.125rem;       /* 18px = 18 / 16 = 1.125rem */
  line-height: 1.2;          /* 120% = 1.2 */
  letter-spacing: 0rem;      /* 0% = 0rem */

}

.rel-service-description {
  flex: 1;
  margin-bottom: 10px;
}

.rel-service-description p {
  color: #4a5568;

  margin: 0;
  transition: color 0.4s ease;
  font-family: Montserrat;
  font-weight: 400;
  font-size: 0.75rem;        /* 12px = 12 / 16 = 0.75rem */
  line-height: 1.5;          /* 150% = 1.5 */
  letter-spacing: 0rem;      /* 0% = 0rem */
  text-align: justify;

}

.rel-service-buttons {
  display: none;
  gap: 8px;
  margin-top: auto;
}
.rel-service-item:hover .rel-service-buttons{
  display: flex;
  gap: 8px;
  margin-top: auto;
}
.section-title.rel-services{
  font-family: Montserrat;
  font-weight: 700;
  font-size: 1.5rem;         /* 24px = 24 / 16 = 1.5rem */
  line-height: 1.2;          /* 120% = 1.2 */
  letter-spacing: 0rem;      /* 0% = 0rem */
  text-align: center;

color: #6D6C7B !important;
}
.rel-service-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border: 2px solid transparent;
  display: inline-block;
  position: relative;
  overflow: hidden;
  font-family: Montserrat;
  font-weight: 500;
  font-size: 0.9375rem;      /* 15px = 15 / 16 = 0.9375rem */
  line-height: 1.2;           /* 120% = 1.2 */
  letter-spacing: 0rem;       /* 0% = 0rem */
  text-align: center;

}
.rel-service-btn:last-child{
  background: white !important;
  color: #001D67 !important;
}
.rel-service-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.rel-service-btn:hover::before {
  left: 100%;
}
.rel-service-item:hover .rel-service-content{
  background: #001D67 !important;
  position: absolute;
  height: calc(100% - 100px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  bottom: 0px;
  gap: 15px;
  width: 100%;
}
.rel-service-item:hover .rel-service-title,
.rel-service-item:hover .rel-service-description p {
    color: #ffffff;
}
.rel-service-btn-outline {
  background: transparent;
  color: #ffffff;
  border:1px solid white;
  backdrop-filter: blur(10px);
}

.rel-service-btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.7);
  transform: translateY(-2px);
}

.rel-service-btn-filled {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  border-color: transparent;
  backdrop-filter: blur(10px);
}

.rel-service-btn-filled:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
}

.rel-service-overlay-link {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.rel-service-buttons a {
  position: relative;
  z-index: 2;
}

/* Navigation */
.rel-services-navigation {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 10;
}

.rel-services-nav {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: auto;
  color: #2d3748;
  backdrop-filter: blur(10px);
}

.rel-services-nav:hover {
  background: #ffffff;
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  color: #0ea5e9;
}

.rel-services-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.rel-services-nav i {
  font-size: 14px;
}

.rel-services-prev {
  left: 10px;
}

.rel-services-next {
  right: 10px;
}

/* Pagination */
.rel-services-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.rel-services-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(45, 55, 72, 0.3);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border: none;
  position: relative;
}

.rel-services-dot::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  background: #0ea5e9;
  border-radius: 50%;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.rel-services-dot.active::before {
  width: 100%;
  height: 100%;
}

.rel-services-dot.active {
  background: #0ea5e9;
  transform: scale(1.2);
}

.rel-services-dot:hover {
  background: rgba(14, 165, 233, 0.6);
  transform: scale(1.1);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Responsive Design */
@media (max-width: 1023px) {
  .rel-service-item {
    flex: 0 0 calc(50% - 15px);
  }

  .rel-services-nav {
    width: 36px;
    height: 36px;
  }

  .rel-services-prev {
    left: 5px;
  }

  .rel-services-next {
    right: 5px;
  }
}

@media (max-width: 767px) {
  .rel-service-item {
    flex: 0 0 100%;
  }

  .rel-services-grid {
    gap: 15px;
  }

  .rel-service-content {
    padding: 12px;
    min-height: 140px;
  }

  .rel-service-title {
    font-size: 16px;
  }

  .rel-service-description p {
    font-size: 12px;
  }

  .rel-services-nav {
    width: 32px;
    height: 32px;
  }

  .rel-services-prev {
    left: 0;
  }

  .rel-services-next {
    right: 0;
  }
}

@media (max-width: 480px) {
  .rel-services-slider-container {
    margin: 0;
    padding: 0;
  }

  .rel-service-buttons {
    flex-direction: column;
    gap: 6px;
  }

  .rel-services-navigation {
    display: none;
  }
}

/* Loading Animation */
.rel-service-item.loading {
  opacity: 0.6;
  pointer-events: none;
}

.rel-service-item.loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: loading-shimmer 2s infinite;
}

@keyframes loading-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}