/* Photo Gallery Grid Layout */
.headshots-grid {
  display: grid;
  gap: var(--wa-space-l);
  /* Responsive grid that maintains reasonable max widths for portraits */
  grid-template-columns: repeat(auto-fit, minmax(280px, 350px));
  justify-content: center;
  align-items: start;
}

/* Archived photos use smaller grid */
.archived-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 280px));
  gap: var(--wa-space-m);
}

/* Photo Card Styling */
.headshot-card {
  max-width: 350px;
  margin: 0 auto;
  width: 100%;
}

.headshot-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* Portrait Image Container */
.headshot-image-container {
  position: relative;
  /* Perfect for portrait headshots - 3:4 aspect ratio */
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--wa-border-radius-m);
  background-color: var(--wa-color-neutral-100);
}

.headshot-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  /* Focus on head/face area for headshots */
  transition: transform 0.2s ease;
  cursor: pointer;
}

.headshot-image:hover {
  transform: scale(1.02);
}

/* Archived Photo Effects */
.archived-image {
  opacity: 0.7;
  filter: grayscale(20%);
}

.archived-image:hover {
  opacity: 0.9;
  filter: grayscale(0%);
}

/* Photo Info Styling */
.photo-info {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-top: 0.5rem;
}

.photo-info h3 {
  margin: 0;
  color: var(--wa-color-neutral-200);
  font-weight: 500;
}

.photo-info p {
  margin: 0;
  text-align: right;
  font-size: 0.85rem;
  color: var(--wa-color-neutral-300);
  line-height: 1.3;
}

.photo-info .small {
  font-size: 0.75rem;
  opacity: 0.8;
}

.photo-info .large {
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
  .headshots-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--wa-space-m);
    padding: 0 var(--wa-space-s);
  }

  .archived-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .headshot-card {
    max-width: none;
  }
}

@media (max-width: 480px) {
  .headshots-grid {
    grid-template-columns: 1fr;
    max-width: 300px;
    margin: 0 auto;
  }
}

/* Single Photo Centering */
.headshots-grid:has(.headshot-card:only-child) {
  justify-content: center;
  max-width: 350px;
  margin: 0 auto;
}

.archived-grid:has(.headshot-card:only-child) {
  max-width: 280px;
  margin: 0 auto;
}

/* Download Overlay for Non-Logged In Users */
.download-overlay {
  position: absolute;
  bottom: var(--wa-space-s);
  right: var(--wa-space-s);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.headshot-image-container:hover .download-overlay {
  opacity: 1;
}

.download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  color: white;
  text-decoration: none;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.download-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  color: white;
  transform: scale(1.1);
  border-color: rgba(255, 255, 255, 0.4);
}

.download-btn wa-icon {
  font-size: 1.2rem;
}

/* Ensure download overlay works on mobile */
@media (max-width: 768px) {
  .download-overlay {
    opacity: 1;
    /* Always visible on mobile */
  }

  .download-btn {
    width: 36px;
    height: 36px;
  }

  .download-btn wa-icon {
    font-size: 1rem;
  }
}

/* Moved photo-specific styles from application.css */
.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.photo-preview {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.photo-preview:hover {
  transform: scale(1.05);
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.photo-preview:hover img {
  transform: scale(1.1);
}