.fotofeed-head {
  margin-top: 0.25rem;
  justify-content: center;
  text-align: center;
}

.fotofeed-head p {
  display: none;
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 8px;
  gap: 0.8rem;
  align-items: start;
}

.photo-gallery-card {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(8, 8, 8, 0.96);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.photo-gallery-card:hover,
.photo-gallery-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.34);
}

.photo-gallery-media {
  position: relative;
  overflow: hidden;
  background: #050505;
}

.photo-gallery-image {
  display: block;
  width: 100%;
  height: auto;
  background: #050505;
}

.photo-gallery-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.12));
  opacity: 0;
  transition: opacity 180ms ease, background 180ms ease;
  pointer-events: none;
}

.photo-gallery-card:hover .photo-gallery-overlay,
.photo-gallery-card:focus-visible .photo-gallery-overlay {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.26), rgba(0, 0, 0, 0.42));
  opacity: 1;
}

.photo-gallery-title {
  margin: 0;
  color: #ffffff;
  font-family: "Manrope", sans-serif;
  font-size: clamp(0.72rem, 0.8vw, 0.84rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: center;
  text-wrap: balance;
  max-width: 92%;
  text-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}

.photo-gallery-empty {
  display: block;
  width: 100%;
  padding: 1.15rem 1.2rem;
  color: rgba(245, 241, 232, 0.82);
  line-height: 1.7;
}

.photo-gallery-empty strong {
  color: #ffffff;
}

.photo-lightbox[hidden] {
  display: none;
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1.4rem;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.photo-lightbox-dialog {
  width: min(86rem, calc(100vw - 2.4rem));
  display: grid;
  gap: 0.9rem;
}

.photo-lightbox-image {
  display: block;
  width: 100%;
  max-height: calc(100vh - 10rem);
  object-fit: contain;
  border-radius: 24px;
  background: #050505;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.32);
}

.photo-lightbox-copy h3 {
  margin: 0;
  color: #ffffff;
  font-family: "Manrope", sans-serif;
  font-size: clamp(0.92rem, 1.1vw, 1.04rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-align: center;
}

@media (max-width: 1320px) {
  .photo-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .photo-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .photo-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 6px;
    gap: 0.45rem;
    align-items: start;
  }

  .photo-gallery-card {
    margin: 0;
    border-radius: 14px;
  }

  .photo-gallery-overlay {
    padding: 0.7rem;
  }

  .photo-gallery-title {
    font-size: 0.58rem;
    letter-spacing: 0.14em;
    line-height: 1.08;
    max-width: 90%;
  }

  .photo-lightbox {
    padding: 0.8rem;
  }

  .photo-lightbox-dialog {
    gap: 0.55rem;
  }

  .photo-lightbox-image {
    max-height: calc(100vh - 7rem);
    border-radius: 18px;
  }

  .photo-lightbox-copy h3 {
    font-size: 0.78rem;
    letter-spacing: 0.18em;
  }
}
