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

html, body {
  background-color: #ffffff;
  color: #000000;
  font-family: Helvetica, Arial, sans-serif;
}

.container {
  padding: 2rem;
  text-align: center;
}

h1 {
  font-family: 'Zeyada', cursive;
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

p.subtitle {
  margin-bottom: 2rem;
  font-size: 1.2rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  justify-items: center;
}

.item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.image-container {
  width: 150px;
  height: 150px;
  position: relative;
}

.image-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: absolute;
  top: 0;
  left: 0;
  transition: opacity 0.3s ease;
}

.hover-img { opacity: 0; }
.image-container:hover .hover-img { opacity: 1; }
.image-container:hover .default-img { opacity: 0; }

.word {
  margin-top: 0.5rem;
  font-family: 'Zeyada', cursive;
  font-size: 1.4rem;
}

.flag {
  margin-top: 0.2rem;
  font-size: 1.2rem;
  border-radius: 50%;
  overflow: hidden;
  width: 24px;
  height: 24px;
}

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

.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255,255,255,0.97);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.popup-content {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  max-width: 80%;
  max-height: 80%;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.popup img {
  max-width: 40%;
  max-height: 40vh;
  margin-bottom: 1rem;
}

.popup-text {
  font-size: 1rem;
  line-height: 1.4;
  text-align: center;
  white-space: pre-wrap;
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  cursor: pointer;
}

.popup-title {
  font-family: 'Zeyada', cursive; /* Ya estaba así */
  font-size: 2.5rem;
  margin-top: 1rem;
}

.know-more-btn {
  display: none; /* Inicialmente oculto */
  margin-top: 15px;
  padding: 10px 16px;
  background-color: black;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-family: sans-serif;
  transition: background 0.3s ease;
}

.know-more-btn:hover {
  background-color: #333;
}
