@import url("https://fonts.googleapis.com/css2?family=DotGothic16&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --light-bg: #ecf0f1;
  --border-color: #34495e;
  --text-color: #2c3e50;
}

body {
  background-color: var(--light-bg);
  color: var(--text-color);
  font-family: "DotGothic16", sans-serif;
  line-height: 1.6;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

header {
  text-align: center;
  margin: 30px 0;
  padding: 40px 0;
}

.title-wrapper {
  display: inline-block;
  position: relative;
  padding: 20px 40px;
  border: 4px solid var(--border-color);
  box-shadow: -8px -8px 0 rgba(52, 73, 94, 0.3), 8px 8px 0 rgba(52, 73, 94, 0.3);
}

h1 {
  font-size: 4rem;
  letter-spacing: 4px;
  color: var(--border-color);
  margin: 0;
}

.gallery {
  display: grid;
  gap: 30px;
  margin-bottom: 100px;
}

@media (min-width: 1400px) {
  .gallery {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 1399px) and (min-width: 1000px) {
  .gallery {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 999px) and (min-width: 600px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 599px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 499px) {
  h1 {
    font-size: 2.5rem;
  }
}

@media (max-width: 350px) {
  h1 {
    font-size: 1.5rem;
  }
}

.gallery-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeIn 0.3s ease-out forwards;
  opacity: 0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.image-wrapper {
  width: 70%;
  aspect-ratio: 1;
  background-color: white;
  border: 3px solid var(--border-color);
  overflow: hidden;
  margin-bottom: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 4px 4px 0 rgba(52, 73, 94, 0.15);
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: linear-gradient(
      45deg,
      #f5f5f5 25%,
      transparent 25%,
      transparent 75%,
      #f5f5f5 75%
    ),
    linear-gradient(
      45deg,
      #f5f5f5 25%,
      transparent 25%,
      transparent 75%,
      #f5f5f5 75%
    );
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
  background-color: #fff;
  padding: 8px;
}

.item-title {
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  color: var(--text-color);
  line-height: 1.4;
  max-width: 100%;
  word-wrap: break-word;
}

footer {
  text-align: center;
  padding: 50px 0 20px;
  color: var(--text-color);
  font-size: 12px;
}
