/* ─── Relaterede annoncer ─── */
.related-ads {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 0 auto;
    max-width: 1200px;
}

/* ─── Kort / annoncer ─── */
.related-ads .ad-card {
    background: #f5f6f9;
    padding: 15px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.related-ads .ad-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* ─── Billede ─── */
.related-ads .ad-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

/* ─── Titel ─── */
.related-ads .ad-card h3 {
    margin: 0 0 0.8rem 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #505050;
    text-transform: capitalize;
    line-height: 1.2;
    transition: color 0.3s ease;
}

.related-ads .ad-card h3 a {
    text-decoration: none;
    color: inherit;
}

.related-ads .ad-card h3 a:hover {
    color: #0d58a8;
}

/* ─── Responsiv tilpasning ─── */
@media (max-width: 1024px) {
    .related-ads {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 680px) {
    .related-ads {
        grid-template-columns: 1fr;
    }
}





/* Lightbox overlay */
.lightbox {
  display: none; /* skjult som standard */
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.9);
  justify-content: center;
  align-items: center;
}

/* Billede i lightbox */
.lightbox-img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 8px;
}

/* Luk-knap */
.lightbox .close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 36px;
  font-weight: bold;
  cursor: pointer;
}

/* Navigation */
.lightbox .nav {
  position: absolute;
  width: 100%;
  top: 50%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  padding: 0 20px;
}

.lightbox .prev, .lightbox .next {
  color: #fff;
  font-size: 48px;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
}




