/* Promosi Card Styling */
.promo-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.promo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.promo-card-img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.promo-card-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 1rem;
  gap: 0.5rem;
  background: #fff;
}

/* Fix for Chrome/Edge - disable title8:before pseudo-element that causes overlap */
.section-py-space .title8:before,
.section-py-space .title8:after {
  display: none !important;
  content: none !important;
}

/* Ensure title is visible and properly positioned */
.section-py-space .title8 {
  text-align: center;
  margin-bottom: 30px;
  display: block;
  visibility: visible;
  opacity: 1;
}

.section-py-space .title8 h4 {
  display: block;
  visibility: visible;
  opacity: 1;
  color: #444444;
  font-size: 1.5rem;
  font-weight: 700;
}

.promo-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
  margin: 0;
  line-height: 1.3;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.promo-card-desc {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.4;
  margin: 0;
  flex-grow: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.promo-card .btn-basic {
  align-self: center;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  margin-top: auto;
}

/* Responsive adjustments */
@media (min-width: 992px) {
  .promo-card-img {
    height: 280px;
  }
  
  .promo-card-content {
    min-height: 160px;
  }
}

@media (max-width: 768px) {
  .promo-card-img {
    height: 220px;
  }

  .promo-card-content {
    padding: 1.125rem;
  }

  .promo-card-title {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }

  .promo-card-desc {
    font-size: 0.9rem;
    margin-bottom: 0.875rem;
  }
  
  /* Add spacing between rows on tablet */
  .row.g-3 {
    row-gap: 1.25rem !important;
  }
}

@media (max-width: 576px) {
  .promo-card {
    min-height: auto;
    margin-bottom: 1.5rem;
  }

  .promo-card-img {
    height: 200px;
    width: 100%;
    object-fit: cover;
  }

  .promo-card-content {
    padding: 1rem;
  }

  .promo-card-title {
    font-size: 0.95rem;
    -webkit-line-clamp: 2;
    margin-bottom: 0.75rem;
  }

  .promo-card-desc {
    font-size: 0.85rem;
    -webkit-line-clamp: 3;
    margin-bottom: 1rem;
  }

  .promo-card .btn-basic {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    width: auto;
  }
  
  /* Adjust section spacing on mobile */
  .section-py-space {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }
  
  .section-py-space .title8 {
    margin-top: 0.5rem !important;
    margin-bottom: 1.5rem !important;
  }
  
  .section-py-space .title8 h4 {
    font-size: 1.35rem;
  }
  
  /* Add more spacing between rows on mobile */
  .row.g-3 {
    row-gap: 1.5rem !important;
  }
}

/* Extra small screens (phones in portrait) */
@media (max-width: 400px) {
  .promo-card-img {
    height: 180px;
  }
  
  .promo-card-content {
    padding: 0.875rem;
  }
  
  .promo-card-title {
    font-size: 0.9rem;
    margin-bottom: 0.625rem;
  }
  
  .promo-card-desc {
    font-size: 0.8rem;
    -webkit-line-clamp: 2;
    margin-bottom: 0.875rem;
  }
  
  .promo-card .btn-basic {
    padding: 0.55rem 1.25rem;
    font-size: 0.85rem;
  }
  
  .section-py-space .title8 h4 {
    font-size: 1.2rem;
  }
  
  /* Maintain spacing on very small screens */
  .row.g-3 {
    row-gap: 1.25rem !important;
  }
}
