.photo-gallery-main {
  padding-block: clamp(34px, 6vw, 72px) 72px;
}

.photo-gallery-intro {
  margin-bottom: 28px;
}

.photo-gallery-heading {
  display: flex;
  align-items: center;
  gap: 16px;
}

.photo-gallery-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  color: #8cf5ff;
  border: 1px solid rgba(84, 222, 255, 0.35);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(0, 229, 255, 0.18), rgba(122, 44, 255, 0.18));
  box-shadow: 0 12px 30px rgba(0, 229, 255, 0.1);
}

.photo-gallery-eyebrow {
  margin: 0 0 4px;
  color: #75e8f5;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.photo-gallery-heading h1,
.photo-gallery-heading h2 {
  margin: 0;
  font-family: "Lilita One", "Space Grotesk", sans-serif;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: 0.015em;
}

.photo-gallery-copy {
  max-width: 680px;
  margin: 16px 0 0;
  color: rgba(231, 240, 255, 0.75);
  font-size: 16px;
  line-height: 1.6;
}

.photo-gallery-panel {
  padding: clamp(16px, 2.7vw, 28px);
  border: 1px solid rgba(166, 197, 255, 0.16);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(17, 28, 49, 0.92), rgba(8, 13, 27, 0.94));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
}

.photo-gallery-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 260px) auto;
  align-items: end;
  gap: 14px;
  margin-bottom: 22px;
}

.photo-gallery-controls label {
  display: grid;
  gap: 7px;
  color: rgba(231, 240, 255, 0.78);
  font-size: 12px;
  font-weight: 700;
}

.photo-gallery-controls input,
.photo-gallery-controls select {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  color: #f4f8ff;
  border: 1px solid rgba(166, 197, 255, 0.22);
  border-radius: 13px;
  outline: none;
  background: #0a1425;
  font: inherit;
}

.photo-gallery-controls input:focus,
.photo-gallery-controls select:focus {
  border-color: rgba(77, 225, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.11);
}

.photo-count {
  margin: 0 0 13px;
  color: #a8c5df;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.photo-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(166, 197, 255, 0.13);
  border-radius: 17px;
  background: rgba(6, 12, 23, 0.84);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.photo-card:hover {
  transform: translateY(-3px);
  border-color: rgba(84, 222, 255, 0.5);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
}

.photo-card-image {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 20%, rgba(47, 78, 125, 0.55), transparent 66%),
    linear-gradient(145deg, #0e1c31, #080f1d);
}

.photo-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.photo-card-open-icon {
  position: absolute;
  right: 9px;
  bottom: 9px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #eefaff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(4, 10, 20, 0.72);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.photo-card-image:hover .photo-card-open-icon,
.photo-card-image:focus-visible .photo-card-open-icon {
  opacity: 1;
}

.photo-card-image--missing::before {
  content: "";
  display: block;
  width: 42px;
  height: 42px;
  border: 2px solid rgba(168, 197, 223, 0.6);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 36%, #a8c5df 0 7px, transparent 8px), radial-gradient(ellipse at 50% 100%, #a8c5df 0 15px, transparent 16px);
  opacity: 0.45;
}

.photo-card-image--missing .photo-card-open-icon {
  display: none;
}

.photo-card-details {
  padding: 12px 13px 14px;
}

.photo-card-details h2 {
  overflow: hidden;
  margin: 0;
  color: #f6f9ff;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-card-details p {
  overflow: hidden;
  margin: 5px 0 0;
  color: #9fb6d0;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-empty {
  padding: 32px 16px;
  color: rgba(231, 240, 255, 0.7);
  text-align: center;
}

.photo-gallery-footer {
  display: flex;
  justify-content: center;
  padding: 22px 16px 34px;
  border-top: 1px solid rgba(166, 197, 255, 0.1);
}

.photo-gallery-footer a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #c5d7ea;
  font-weight: 700;
  text-decoration: none;
}

.photo-gallery-footer img {
  border-radius: 10px;
}

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

@media (max-width: 760px) {
  .photo-gallery-controls {
    grid-template-columns: minmax(0, 1fr) minmax(150px, 0.75fr);
  }

  .photo-count {
    grid-column: 1 / -1;
    margin: 0;
  }

  .photo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 11px;
  }
}

@media (max-width: 520px) {
  .photo-gallery-heading {
    gap: 12px;
  }

  .photo-gallery-icon {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
    border-radius: 15px;
  }

  .photo-gallery-controls {
    grid-template-columns: 1fr;
  }

  .photo-count {
    grid-column: auto;
  }

  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .photo-card-details {
    padding: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .photo-card,
  .photo-card-open-icon {
    transition: none;
  }
}
