/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Josefin Sans", sans-serif;
  background: #111;
  color: #fff;
  padding: 20px;
}

/* Header fijo */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #111;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  gap: 10px;
  padding: 10px 0; /* 10px arriba y abajo */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

header h1 {
  font-size: clamp(1.5rem, 2vw + 1rem, 2.5rem);
}

nav a {
  color: #fff;
  margin-left: 15px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
}

nav a:first-child {
  margin-left: 0;
}

/* Página estilo Linktree */
.linktree {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin-top: 40px;
  padding: 0 20px;
}

.link-button {
  display: block;
  width: 100%;
  max-width: 500px;
  padding: 15px 20px;
  background-color: #222;
  color: yellow;
  font-weight: bold;
  text-align: center;
  border-radius: 10px;
  text-decoration: none;
  font-size: 1.2rem;
  transition: background 0.3s ease, transform 0.2s ease;
}

.link-button:hover {
  background-color: #333;
  transform: scale(1.02);
}


/* Galería tipo masonry */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(150px, 30vw, 300px), 1fr));
  grid-auto-rows: 10px;
  gap: 10px;
}

/* Ítems */
.item {
  background: #222;
  overflow: hidden;
  border-radius: 10px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item video,
.item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 10px;
}

/* Alturas simuladas */
.tall {
  grid-row-end: span 30;
}

.semi-tall {
  grid-row-end: span 23;
}

.wide {
  grid-row-end: span 15;
}

.square {
  grid-row-end: span 20;
}

/* Ítems con imagen y overlay */
.link-item {
  position: relative;
  display: block;
  text-decoration: none;
}

.link-item .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  color: yellow;
  font-weight: bold;
  font-size: 1.4rem;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
  border-radius: 10px;
  transition: opacity 0.3s ease;
  text-align: center;
  padding: 10px;
  z-index: 2;
}

.link-item img {
  transition: transform 0.3s ease;
  z-index: 1;
}

/* Hover en desktop */
@media (hover: hover) and (pointer: fine) {
  .link-item .overlay {
    opacity: 0;
  }

  .link-item:hover .overlay {
    opacity: 1;
  }

  .link-item:hover img {
    transform: scale(1.05);
  }
}

/* Responsive */
@media (max-width: 500px) {
  nav {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    gap: 20px;
    margin-top: 10px;
  }

  .gallery {
    grid-template-columns: 1fr;
  }
}
