.banner-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 0 3px 0;
}

.banner-label {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 6px;
    color: #999;
    letter-spacing: 1px;
}

.banner-link {
    text-decoration: none;
}

.ad-placeholder {
    width: 100%;
    aspect-ratio: 16 / 3; /* proportional height */
    max-height: 120px; /* prevent too tall banners on big screens */
    background: linear-gradient(135deg, #f5f5f5 25%, #ececec 25%, #ececec 50%, #f5f5f5 50%, #f5f5f5 75%, #ececec 75%, #ececec 100%);
    background-size: 40px 40px;
    border: 2px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(0,0,0,0.05);
}

.upper-banner-radius {
    border-radius: 5px 5px 0 0;
}

.downer-banner-radius {
    border-radius: 0 0 5px 5px;
}

.related-ads-container {
    width: 100%;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    container-type: inline-size; /* keeps responsiveness */
    border: 1px solid #ccc;
    background: #fff; /* makes shadow stand out */
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.related-ads-title {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    color: #333;
    padding: 3px;
}

.related-ads-title h3 {
  font-size: 1.1rem;
  font-weight: bold;
  padding: 3px;
}

.related-ads-title a {
  font-size: 0.8rem;
  font-weight: bold;
  border-left: 4px solid #009688;
  text-decoration: none;
  padding: 3px;
}

/* Scrollable wrapper */
.related-ads-cards-wrapper {
    display: flex;
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 5px;
    align-items: stretch;
}

/* Hide scrollbar */
.related-ads-cards-wrapper::-webkit-scrollbar {
  display: none;
}
.related-ads-cards-wrapper {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.related-ad-card {
    flex: 0 0 auto;
    width: 200px; /* smaller width */
    max-height: 3000px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e0e0e0; /* subtle border for clarity */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12); /* slightly stronger shadow */
    padding: 4px; /* more spacing inside */
    display: flex;
    gap: var(--space-xs);
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    transform: translateY(-2px);
}

.related-ad-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
  border-color: #b0b0b0; /* border becomes slightly darker on hover */
}

.related-ad-image-container {
    aspect-ratio: 3 / 2; /* keep 3:2 ratio */
    overflow: hidden;
}

.related-ad-image-container img {
    border-radius: 5px 5px 0 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-ad-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  background: #009688;
  font-size: 0.7rem;
  padding: 3px 6px;
  border-radius: 4px;
}

/* Card content */
.related-ad-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.related-ad-title a {
    font-size: var(--text-xs);
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

.related-ad-date-posted {
    font-size: var(--text-xs);
    color: #333;
    text-decoration: none;
}

.related-ad-meta {
  font-size: 0.8rem;
  color: #666;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.related-ad-meta i {
  margin-right: 4px;
}

.related-ad-card-footer {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin-top: auto; /* pushes footer to the bottom */
}
.related-ad-card-footer a{
    width: 100%;
}

.related-ad-link {
  display: inline-block;
  padding: 6px 12px; /* slightly larger for better tap/click area */
  font-size: 0.85rem;
  font-weight: 500;
  background: linear-gradient(135deg, #00bfa5, #009688); /* gradient background */
  color: #fff;
  border-radius: 8px; /* slightly rounder */
  text-decoration: none;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: background 0.3s, transform 0.2s, box-shadow 0.2s;
}

.related-ad-link:hover {
  background: linear-gradient(135deg, #00796b, #00675b); /* darker gradient on hover */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

@media (max-width: 480px) {

    .related-ad-card-footer{
        justify-content: center;
        align-items: center;
    }

    .related-ads-container{
        width: 100%;
        white-space: normal;
    }
}
