.grid {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.post-header {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
}

body > header {
  display: flex;
  justify-content: flex-end;
}

article header {
  text-align: center;
}

.container {
  max-width: 75ch;
}

.page-title {
  text-align: center;
}

[role="button"] {
  width: 100%;
  max-width: 206px;
}

/* LIGHTBOX */

.gallery {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
   gap: 10px;
}

.gallery-item {
    width: 100%;
    max-width: 200px;
    cursor: pointer;
    transition: transform 0.2s;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.lightbox-content.show {
    opacity: 1;
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
}

.thumbnails {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    position: relative; /* Cambiado de absolute a relative */
    width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
}

.thumbnail {
    width: 50px;
    height: 50px;
    margin: 0 5px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.thumbnail.selected {
    opacity: 1; /* Resaltar la miniatura seleccionada */
}

.thumbnail:hover {
    opacity: 1;
}

@media (max-width: 600px) {
    .gallery-item {
        max-width: 100px;
    }

    .lightbox-content {
        max-height: 60%; /* Ajustar la altura máxima en pantallas pequeñas */
    }

    .thumbnails {
        flex-wrap: wrap; /* Permitir que las miniaturas se ajusten */
        justify-content: center; /* Centrar las miniaturas */
    }

    .thumbnail {
        width: 40px; /* Reducir el tamaño de las miniaturas en pantallas pequeñas */
        height: 40px;
    }
}

/* class cards*/

.contrast {
  text-decoration: none;
}

.parent {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-template-rows: repeat(2, 1fr);
	gap: 8px;
} 



.div4 {
  grid-column: span 3 / span 3;
}
        