/* ── Tiles Menu ── */

.gm-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
  max-width: calc(6 * 160px + 5 * 20px);
}

.gm-header-title {
  font-size: 52px;
  font-weight: 300;
  color: #ddd;
  white-space: nowrap;
  margin-bottom: 0.35em;
}

.gm-header-line {
  flex: 1;
  height: 3px;
  background: #8585d9;
}

.gm-header-desc {
  font-size: 20px;
  font-weight: 300;
  color: #ddd;
  white-space: nowrap;
}

.gm-footer-line {
  max-width: calc(6 * 160px + 5 * 20px);
  height: 3px;
  background: #445;
  margin-top: 8px;
}

.gm-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 20px;
  justify-content: center;
  padding: 32px 0;
  max-width: calc(6 * 160px + 5 * 20px);
}

.gm-card {
  width: 160px;
}

.gm-link {
  display: block;
  text-decoration: none;
  color: inherit;
  position: relative;
  height: 210px; /* 160px image + 50px space for name below */
}

.gm-img-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 160px;
  height: 160px;
  border-radius: 6px;
  background: #222;
  overflow: hidden;
  z-index: 1;
}

.gm-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
  border-radius: 6px;
}

.gm-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.35s ease;
  border-radius: 6px;
  pointer-events: none;
}

.gm-name-wrap {
  position: absolute;
  top: 165px; /* just below image */
  left: 5px;
  width: 155px;
  z-index: 2;
  transition: transform 0.35s ease;
}

.gm-name {
  display: block;
  font-size: 15px;
  color: #ddd;
  word-break: break-word;
  hyphens: auto;
  line-height: 1.35;
  transition: transform 0.35s ease;
}

.gm-overlay {
  position: absolute;
  top: 135px; /* same as name, hidden behind image */
  left: 5px;
  width: 155px;
  z-index: 0; /* behind image */
  transition: transform 0.35s ease;
}

.gm-author {
  display: block;
  font-size: 15px;
  color: #ddd;
  letter-spacing: 0.04em;
  line-height: 1.3;
  transition: transform 0.35s ease;
}

/* ── Hover ── */
.gm-card:hover .gm-img-wrap::after {
  opacity: 1;
}

.gm-card:hover .gm-thumb {
  transform: scale(1.03);
}

.gm-card:hover .gm-name-wrap {
  transform: translateY(var(--name-hover-y));
}
.gm-card:hover .gm-name {
  color: #d6d6ff;
}

.gm-card:hover .gm-overlay {
  transform: translateY(var(--author-hover-y)); /* slides down from behind image */
}
.gm-card:hover .gm-author {
  color: #d6d6ff;
}


/* ── Error state ── */
.gm-error {
  color: #888;
  font-size: 13px;
  padding: 20px 0;
}
