/* CENTER CONTAINER */
.photo-album .container-all {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 200px); /* forces 2 rows */
    gap: 5px;

    justify-content: center;
    align-items: stretch;
}

/* 3-COLUMN GRID (CENTERED AUTOMATICALLY) */
.photo-album .container-all {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  justify-content: center;
  align-items: start;
}


/* GALLERY ITEM */
.photo-album .container_gallery {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-sizing: border-box;
    height: 200px; /* Standard tile height */
}

/* IMAGE */
.photo-album .container_gallery img {
    width: 100%;
    height: 100%; /* Fill entire tile */
    object-fit: cover; /* Crop to fit uniformly */
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
    cursor: pointer;
}

/* TITLE */
.photo-album .title_gallery {
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: bold;
  font-size: 1.4em;
  text-shadow: 1px 5px 10px black;
  display: none;
  text-align: center;
}

/* TEXT */
.photo-album .text_gallery {
  position: absolute;
  top: 70%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.95em;
  max-width: 80%;
  text-align: center;
  text-shadow: 1px 5px 10px black;
  display: none;
}

/* HOVER */
.photo-album .container_gallery:hover img {
  transform: scale(1.08);
  filter: grayscale(50%);
  opacity: 0.75;
}

.photo-album .container_gallery:hover .title_gallery,
.photo-album .container_gallery:hover .text_gallery {
  display: block;
  color: #fff;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .photo-album .container-all {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 400px) {
  .photo-album .container-all {
    grid-template-columns: 1fr;
  }
}



/* LIGHTBOX */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0,0,0,0.9);

    justify-content: center;
    align-items: center;

    padding: 20px;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;

    border-radius: 8px;
    box-shadow: 0 0 25px rgba(255,255,255,0.2);
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 25px;

    color: #fff;
    font-size: 40px;
    cursor: pointer;
    font-weight: bold;
}

.photo-album .container_gallery img {
    cursor: pointer;
}
