:root {
  --nav-link-light: #bbbbbb;
  --border: #aaa;
  --main-max-width: 1424px;
}

html, body {
  background: var(--background, #f7f8fa);
  font-family: 'Roboto', Arial, 'Helvetica Neue', Helvetica, sans-serif;
  margin: 0;
  padding: 0;
}

html {
  overflow-y: scroll;
}

.page-wrapper,
.album-row,
.album-info,
.footer-container {
  max-width: var(--main-max-width);
  margin: 0 auto;
  width: 100%;
}

.container_1 {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0 !important;
  padding: 0;
  margin-top: 10px;
}

.header-nav {
  display: flex;
  justify-content: center;
  gap: 100px;
  width: 100%;
  padding: 0;
  margin: 0;
  list-style: none;
}

.header-nav li {
  margin: 0;
  padding: 0;
}

.header-nav .nav-link {
  font-size: 1.15em;
  letter-spacing: 1px;
  color: var(--nav-link-light) !important;
  text-decoration: none;
  transition: color 0.2s;
}

.header-nav .nav-link:hover,
.header-nav .nav-link:focus {
  color: #000 !important;
}

/* Album Info Block */
.album-info {
  margin: 0px auto 16px auto;
  color: #888;
  font-size: 1rem;
  width: 100%;
  max-width: 1400px;
  text-align: left;
  line-height: 1.5;
  letter-spacing: 0.01em;
  font-weight: 300;
}

/* Album Gallery */
.album-gallery {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 0 auto;
  padding: 0;
}

.album-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 16px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.album-item {
  flex: 0 0 calc((100% - 7 * 16px) / 8); /* 8 per row minus total gap */
  max-width: calc((100% - 7 * 16px) / 8);
  min-width: 120px;
  overflow: visible;
  margin-bottom: 18px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  background: none !important;
  box-shadow: none !important;
}

.album-thumb {
  width: 100%;
  aspect-ratio: 3/4;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  background: none !important;
  box-shadow: none !important;
}

.album-thumb img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  background: none !important;
  box-shadow: none !important;
  filter: grayscale(100%);
  transition: filter 0.4s, transform 0.3s;
  transform: scale(1);
}

.album-thumb img:hover,
.album-item:focus-within .album-thumb img {
  filter: grayscale(0%);
  transform: scale(1.05); /* Slight magnification */
  z-index: 2;
}

.album-meta {
  font-size: 13px;
  color: #bbb;
  padding: 5px 2px 3px 2px;
  background: none !important;
  box-shadow: none !important;
}

/* Carousel Modal Styles */
.album-carousel-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(255,255,255,0.98);
  align-items: center;
  justify-content: center;
  flex-direction: row;
}
.album-carousel-modal.show {
  display: flex;
}
.carousel-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.98);
  z-index: 1;
}

/* The invisible box for centering and sizing all carousel images the same, never cropping */
.carousel-img-wrapper {
  position: relative;
  z-index: 2;
  width: 90vw;
  max-width: 900px;
  height: 80vh;
  max-height: 900px;
  background: transparent;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-img-wrapper img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto !important;
  height: auto !important;
  background: none;
  border-radius: 2px;
  box-shadow: 0 2px 24px rgba(0,0,0,0.17);
  user-select: none;
  object-fit: unset !important;
}

/* Carousel navigation and close button */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: #f1f1f1;
  border: none;
  font-size: 2.6rem;
  color: #bbb;
  padding: 0 14px;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.7;
  transition: background 0.2s, color 0.2s;
}
.carousel-btn:hover {
  background: #fff;
  color: #222;
  opacity: 1;
}
.carousel-prev { left: 2vw; }
.carousel-next { right: 2vw; }
.carousel-close {
  position: absolute;
  top: 2vw;
  right: 2vw;
  z-index: 3;
  font-size: 2.1rem;
  background: none;
  border: none;
  color: #aaa;
  cursor: pointer;
  opacity: 0.7;
  transition: color 0.2s;
}
.carousel-close:hover { color: #222; opacity: 1; }

/* Footer */
.footer-container {
  max-width: 1400px;      /* match album-row */
  margin: 48px auto 0 auto;
  padding: 0 0 24px 0;
  text-align: center;
}
.footer-line {
  width: 100%;            /* fill container */
  border: none;
  border-top: 1.5px solid #bbb;
  margin: 0 0 12px 0;
}
.footer-copy {
  font-size: 0.90rem;
  color: #666;
  margin: 0;
}

/* Responsive: shrink gap, font size, padding for mobile */
@media (max-width: 1400px) {
  .album-row {
    max-width: 100vw;
    padding: 0 8px;
  }
  .album-item {
    flex: 0 0 calc((100% - 7 * 16px) / 8);
    max-width: calc((100% - 7 * 16px) / 8);
  }
  .carousel-img-wrapper {
    width: 90vw;
    max-width: 95vw;
    min-height: 40vh;
  }
}

@media (max-width: 1100px) {
  .album-item {
    flex: 0 0 calc((100% - 3 * 16px) / 4); /* 4 per row on tablet */
    max-width: calc((100% - 3 * 16px) / 4);  
  }
  .carousel-img-wrapper {
    width: 98vw;
    max-width: 99vw;
    min-height: 30vh;
  }
  .album-info {
  margin: 0px 0px 10px 10px;}
}

@media (max-width: 700px) {
  .album-item {
    flex: 0 0 calc((100% - 1 * 8px) / 2); /* 2 per row on mobile */
    max-width: calc((100% - 1 * 8px) / 2);  
  }
  .album-row {gap: 8px;}
  .carousel-img-wrapper {
    width: 98vw;
    max-width: 99vw;
    min-height: 30vh;
  }
  .album-info {
  margin: 0px 0px 10px 10px;
  font-size: 0.5rem;}
}

@media (max-width: 480px) {
  .header-nav {gap: 15px;}
  .header-nav .nav-link {font-size: 10px;}
  .album-row { gap: 8px; }
  .album-item { width: 44vw; min-width: 75px; }
  .album-meta { font-size: 10px; }
  .carousel-img-wrapper {
    min-height: 20vh;
    width: 99vw;
    max-width: 100vw;
  }
}