/* Style the body */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: #f5f9ff;
}

/* === HEADER CARD === */
.gallery-header {
  max-width: 1100px;
  margin: 1.5rem auto 1rem auto;
  padding: 0 16px;
}

.header-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* === BACK LINK === */
.back-link {
  font-size: 0.9rem;
  color: #2563eb;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.back-link:hover {
  background-color: #e0ecff;
  transform: translateX(-2px);
}

.back-link:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

/* === WEEK META === */
.week-meta {
  text-align: right;
}

.week-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #111827;
}

.week-date {
  margin: 2px 0 0 0;
  font-size: 0.8rem;
  color: #6b7280;
}

/* === MOBILE === */
@media (max-width: 600px) {
  .header-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .week-meta {
    text-align: left;
  }
}

/* === GRID LAYOUT === */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  max-width: 1100px;      /* controls page width */
  margin: 0 auto;         /* centers the grid */
  padding: 16px;          /* inner breathing space */
  gap: 14px;
}

/* fallback for old HTML */
.responsive {
  padding: 0;
  width: 100%;
  float: none;
}

/* === GALLERY CARD === */
.gallery {
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery:hover {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
  transform: scale(1.01);
}

.gallery a:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

/* === IMAGE === */
.gallery img {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

/* === CAPTION === */
.desc {
  padding: 12px;
  text-align: center;
  font-size: 0.85rem;
  color: #374151;
  background: #ffffff;
}

/* === LINKS === */
.gallery a {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* === MOBILE TUNING === */
@media (max-width: 500px) {
  .desc {
    font-size: 0.9rem;
  }
}
.gallery-footer {
  max-width: 1100px;
  margin: 1.5rem auto 1rem auto;
  padding: 0 16px;
}

.gallery-footer {
  max-width: 1100px;
  margin: 1rem auto 1.5rem auto;
  padding: 0 16px;
  text-align: center;
}

.gallery-footer p {
  font-size: 0.7rem;
  color: #9ca3af;
}
