/* Northwest High School Class of 1980
   Original Yearbook Gallery Styling */

.yearbook-archive {
  color: #20352a;
  overflow-x: auto;
}

.yearbook-archive h1,
.yearbook-archive h2,
.yearbook-archive h3 {
  color: #103f28;
}

.yearbook-archive a {
  color: #165b32;
}

.yearbook-archive a:hover {
  color: #987319;
}

.yearbook-archive hr {
  border: 0;
  border-top: 1px solid #d8e3d8;
  margin: 20px 0;
}

/* Keep original gallery controls accessible */
.yearbook-archive table {
  max-width: 100%;
}

.yearbook-archive img {
  max-width: 100%;
  height: auto;
}

/* Main yearbook page */
.yearbook-archive #fpGalleryMainImg_6003 {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 20px auto;
  box-shadow: 0 6px 24px rgba(0,0,0,.15);
  border-radius: 6px;
}

/* Improve small-screen presentation */
@media (max-width: 768px) {
  .yearbook-archive {
    padding: 10px;
  }

  .yearbook-archive table {
    width: 100%;
  }

  .yearbook-archive #fpGalleryMainImg_6003 {
    margin: 12px auto;
  }
}

/* Modern yearbook thumbnail navigation */
.yearbook-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 12px;
}

.yearbook-controls button {
  background: #103f28;
  color: white;
  border: 0;
  border-radius: 8px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.yearbook-controls button:hover {
  background: #165b32;
}

.yearbook-controls span {
  color: #63766a;
  font-size: 14px;
}

.yearbook-thumbnails {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  padding: 12px 4px 18px;
  scroll-behavior: smooth;
  scrollbar-width: auto;
  scrollbar-color: #165b32 #e8eee8;
}

.yearbook-thumbnails a {
  display: block;
  flex: 0 0 auto;
}

.yearbook-thumbnails img {
  display: block;
  width: 72px;
  height: 100px;
  object-fit: contain;
  border: 2px solid transparent;
  border-radius: 4px;
}

.yearbook-thumbnails a:hover img {
  border-color: #c8a84e;
}

@media (max-width: 600px) {
  .yearbook-controls {
    justify-content: center;
  }

  .yearbook-controls span {
    width: 100%;
    text-align: center;
    order: -1;
  }
}

/* Modern yearbook thumbnail navigation */
.yearbook-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 12px;
}

.yearbook-controls button {
  background: #103f28;
  color: white;
  border: 0;
  border-radius: 8px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.yearbook-controls button:hover {
  background: #165b32;
}

.yearbook-controls span {
  color: #63766a;
  font-size: 14px;
}

.yearbook-thumbnails {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  padding: 12px 4px 18px;
  scroll-behavior: smooth;
  scrollbar-width: auto;
  scrollbar-color: #165b32 #e8eee8;
}

.yearbook-thumbnails a {
  display: block;
  flex: 0 0 auto;
}

.yearbook-thumbnails img {
  display: block;
  width: 72px;
  height: 100px;
  object-fit: contain;
  border: 2px solid transparent;
  border-radius: 4px;
}

.yearbook-thumbnails a:hover img {
  border-color: #c8a84e;
}

@media (max-width: 600px) {
  .yearbook-controls {
    justify-content: center;
  }

  .yearbook-controls span {
    width: 100%;
    text-align: center;
    order: -1;
  }
}

/* Modern yearbook thumbnail navigation */
.yearbook-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 12px;
}

.yearbook-controls button {
  background: #103f28;
  color: white;
  border: 0;
  border-radius: 8px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.yearbook-controls button:hover {
  background: #165b32;
}

.yearbook-controls span {
  color: #63766a;
  font-size: 14px;
}

.yearbook-thumbnails {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  padding: 12px 4px 18px;
  scroll-behavior: smooth;
  scrollbar-width: auto;
  scrollbar-color: #165b32 #e8eee8;
}

.yearbook-thumbnails a {
  display: block;
  flex: 0 0 auto;
}

.yearbook-thumbnails img {
  display: block;
  width: 72px;
  height: 100px;
  object-fit: contain;
  border: 2px solid transparent;
  border-radius: 4px;
}

.yearbook-thumbnails a:hover img {
  border-color: #c8a84e;
}

@media (max-width: 600px) {
  .yearbook-controls {
    justify-content: center;
  }

  .yearbook-controls span {
    width: 100%;
    text-align: center;
    order: -1;
  }
}

/* Individual yearbook section galleries */
.yb-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 22px;
  margin: 28px 0;
}

.yb-page-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 15px 10px;
  background: #f7f9f6;
  border: 1px solid #e0e8df;
  border-radius: 10px;
  text-decoration: none;
  color: #103f28;
  transition: transform .2s, box-shadow .2s;
}

.yb-page-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 16px rgba(0,0,0,.12);
}

.yb-page-card img {
  display: block;
  width: 108px;
  height: 150px;
  object-fit: contain;
}

.yb-page-card span {
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

@media (max-width: 600px) {
  .yb-page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}
