/* css/ophold-grid.css */

.ophold-grid-heading {
  text-align: center;
  margin: 0 0 24px;  /* centrerer og giver lidt luft under overskriften */
}


/* 1. Grid-container: 3 kolonner på desktop, 2 på mobil */
.custom-page-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}


/* 2. Selve kortet: aspect-ratio giver altid kvadratisk højde = bredde */
.grid-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 1 / 1;
}

.grid-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0) 80%,
    rgba(0, 0, 0, 0.5) 100%
  );
  pointer-events: none;
  transition: background 0.3s ease;
}




/* 5. Link fylder hele kortet */
.grid-item > a {
  position: absolute;
  inset: 0;
  display: block;
}

/* 6. Billedet dækker hele kortet */
.grid-thumb,
.grid-thumb.placeholder {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
  z-index: 0;
}

/* 7. Let scale-effekt (valgfri) */
.grid-thumb:hover {
  transform: scale(1.02);
}

/* 8. Titel i nederste venstre hjørne */
.grid-title {
  position: absolute;
  bottom: 18px;
  left: 18px;
  margin: 0;
  padding: 0;
  background: none;
  font-size: 24px;
  font-weight: 600;
  color: #fff;
  z-index: 2;
}



@media (max-width: 768px) {
  .custom-page-grid {
    grid-template-columns: repeat(2, 1fr);
  	gap: 12px;
	}
	.grid-title {
  	  bottom: 12px;
  	  left: 12px;
	  font-size: 18px !important;
	}
  }