/* ==========================================================================
   home-updates.css
   1) Nueva jerarquía de acciones en la sección Work
   2) Placeholder para portadas de proyecto que aún no existen
   Todo aditivo: pega esto después de styles.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1 · WORK ACTIONS
   Sobrescribe la regla .work-actions de styles.css si este archivo se
   carga después.
   -------------------------------------------------------------------------- */
.work-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
}

.work-actions #view-more-btn {
  font-size: 1rem;
  padding: 0.95rem 2rem;
}

.work-actions .work-secondary-link {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: color var(--transition), border-color var(--transition);
}
.work-actions .work-secondary-link:hover {
  color: var(--text);
  border-bottom-color: var(--text);
}

/* --------------------------------------------------------------------------
   2 · Portadas que todavía no existen
   Evita el icono de imagen rota mientras no subes la cover del proyecto.
   -------------------------------------------------------------------------- */
.project-image-wrapper.is-empty {
  position: relative;
  background: var(--bg-muted);
}
.project-image-wrapper.is-empty::after {
  content: "";
  position: absolute;
  inset: 0.75rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* --------------------------------------------------------------------------
   3 · CONTACT — tarjeta de email que copia al portapapeles
   Reemplaza el <a href="mailto:"> por un <button class="contact-copy">.
   -------------------------------------------------------------------------- */
.contact-card.contact-copy {
  position: relative;
  width: 100%;
  font: inherit;
  text-align: left;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--border);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

/* "Copy" aparece en hover/focus; "Copied ✓" al confirmar */
.contact-copy-hint,
.contact-copy-done {
  position: absolute;
  top: 50%;
  right: 1.25rem;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}
.contact-copy-hint { color: var(--text-muted); white-space: nowrap; }
.contact-copy-done { color: var(--coral); white-space: nowrap; }

.contact-card.contact-copy:hover .contact-copy-hint,
.contact-card.contact-copy:focus-visible .contact-copy-hint { opacity: 1; }

.contact-card.contact-copy.is-copied .contact-copy-hint { opacity: 0; }
.contact-card.contact-copy.is-copied .contact-copy-done { opacity: 1; }

/* si el navegador bloquea el portapapeles, la etiqueta pide copiar a mano
   (nunca navegamos a mailto) */
.contact-card.contact-copy.is-copy-failed .contact-copy-hint {
  opacity: 1;
  color: var(--text);
}

/* el correo es seleccionable para que ⌘C funcione en el caso de respaldo */
.contact-card.contact-copy .contact-value {
  -webkit-user-select: text;
  user-select: text;
}

/* en touch no hay hover: la etiqueta se muestra siempre, tenue */
@media (hover: none) {
  .contact-card.contact-copy .contact-copy-hint { opacity: 0.55; }
}
