@charset "utf-8";
/* CSS Document */
body {
  font-family: sans-serif;
  padding: 0px; /* was 20 */
  background: #f9f9f9;
}

.home, h2 { /* provided for centering page title */
  text-align: center;
}

#gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); /* was 250px */
  gap: 20px;
}
#gallery.list-view {
  display: block;
  padding: 10px 0;
}
.gallery-count {
  font-weight: 500;
  font-size: 1rem;
  margin-bottom: 10px;
  color: #444;
}

#search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

#search-bar input {
  padding: 2px 3px; /* was 6px 10px */
  font-size: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}
#search-bar label {
  padding: 2px 2px;
  font-size: 0.9rem;
  
}

.popup {
  position: absolute;
  top: 100%; /* directly below the button */
  left: 0;
  background: #fdfdfd;
  border: 1px solid #ccc;
  padding: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  z-index: 100;
  width: 200px;
	text-align: left;
}

.popup input,
.popup select {
  font-size: 0.9rem;
  padding: 6px 8px;
}

.popup.hidden {
  display: none;
}

.close-btn {
  position: absolute;
  top: 6px;
  right: 8px;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #666;
  cursor: pointer;
}

.filter-section {
  margin-bottom: 12px;
	text-align: left;
}

.filter-section label {
  font-weight: bold;
  display: block;
  margin-bottom: 4px;
}

#filterBtn {
  padding: 2px 10px; /* was 6px 12px */
  font-size: 0.9rem;
  background-color: #eee;
  border: 1px solid #aaa; 
  cursor: pointer;
	width: 125px;
    border-radius: 4px;
}

#viewSelector {
  padding: 2px 10px; /* was 6px 12px */
  font-size: 0.9rem;
  background-color: #eee;
  border: 1px solid #aaa;
  cursor: pointer;
	width: 125px;
	border-radius: 4px;
}

#view-toggle button {
  padding: 6px 12px;
  margin-right: 8px;
  font-weight: 500;
  cursor: pointer;
}

#view-toggle button.active {
  background-color: #444;
  color: white;
}

.text-row {
	display: block;
	text-align: left;
  padding: 4px 6px; /* was 8px 12px */
  border-bottom: 1px solid #ccc;
  font-family: 'Georgia', serif;
  font-size: 0.95rem;
  line-height: 1.5;
  cursor: pointer;
  background-color: #fdfdfd;

  white-space: pre-wrap; /* preserves spacing */
  word-break: break-word; /* prevents overflow */

}

.text-row:hover {
  background-color: #f0f0f0;
}

.decade-divider {
  text-align: center;
  font-size: 0.85rem;
  color: #888;
  font-style: italic;
  margin: 20px 0 10px;
  position: relative;
}

.decade-divider::before,
.decade-divider::after {
  content: '';
  display: inline-block;
  width: 40%;
  height: 1px;
  background-color: #ccc;
  vertical-align: middle;
  margin: 0 8px;
}

#filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  margin-bottom: 5px; /* was 20px */
  padding: 5px 0; /* was 10px 0 */
  border-bottom: 1px solid #ccc;
}

#media-filter label {
  display: inline-block;
  margin-right: 10px;
  font-size: 0.9rem;
  cursor: pointer;
}

#media-filter input[type="checkbox"] {
  margin-right: 4px;
}
.media-count {
  font-size: 0.8rem;
  color: #666;
  margin-left: 4px;
}

#clearFiltersBtn {
  margin-left: auto;
  padding: 6px 12px;
  font-size: 0.9rem;
  background-color: #eee;
  border: 1px solid #ccc;
  cursor: pointer;
}

#modal-audio {
  width: 100%;
  margin-top: 20px;
}
.photo-card {
  background: white;
  border: 1px solid #ccc;
  padding: 10px;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
	max-width: 100%;
	
  /* cap the height */
  max-height: 300px;
  overflow: hidden;

}


/*
.photo-card img {
  width: 100%; 
  height: auto;
}*/

.photo-card img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.caption {
  font-size: .875rem;
  text-align: left;
}

.media-badge {
  font-size: 0.75rem;
  background-color: #eee;
  padding: 2px 6px;
  border-radius: 3px;
  margin-bottom: 5px;
  display: inline-block;
  color: #555;
}

.photo-card2 {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  padding: 10px;
  background-color: #fdfdfd;
}

.photo-card2 img {
  width: 100px; /* or smaller */
  height: auto;
  margin-right: 15px;
  object-fit: cover;
  border-radius: 4px;
}

.caption2 {
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.4;
}
/* test for rows 
#gallery {
  display: block;
}
.photo-card {
  display: flex;
  align-items: flex-start;
  width: 100%;
  margin-bottom: 10px;
  border-bottom: 1px solid #ccc;
  padding: 10px;
  box-sizing: border-box;
}
.photo-card {
  border: 1px dashed red;
}
.photo-card img {
  width: 200px;
  height: auto;
  margin-right: 15px;
  object-fit: cover;
  flex-shrink: 0;
  border-radius: 4px;
}

.caption {
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.4;
}
*/

#modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.8); /* dark overlay */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1005; /* must be higher than gallery and hamburger/menu */
}

#modal.hidden {
  display: none;
}

.hidden {
  display: none;
} 

#modal-content {
  background: white;
  padding: 20px;
  max-width: 600px;
  width: 90%;
  border-radius: 8px;
  position: relative;
}

#modal-video {
  width: 100%;
  height: auto;
  margin-bottom: 10px;
}

#modal-image {
  width: 100%;
  height: auto;
  margin-bottom: 10px;
}

#close-modal {
  position: absolute;
  top: 5px; right: 10px; /* was 10px; 15px */
  font-size: 24px;
  cursor: pointer;
}

#modal-meta {
  text-align: left;
  font-size: 0.875rem; /* 14px for readability */
  line-height: 1.4;
  margin-top: 10px;
}

.modal-line {
  margin: 6px 0;
}
.modal-line {
  margin: 6px 0;
}
.dynamic-hide {
  display: none;
}
#modal-content {
  max-height: 90vh;
  overflow-y: auto;
}

@media (max-width: 500px) {
  #gallery {
    grid-template-columns: repeat(2, 1fr); /* Force 2 columns */
  }

  .photo-card {
    width: 100%;         /* Fill the grid cell */
    max-width: none;     /* Remove any width cap */
    font-size: 14px;     /* Optional: larger text */
    padding: 12px;       /* Optional: more breathing room */
  }

  .caption {
    font-size: 12px;
  }
}