

/* --- FEED / CARDS --- */
.obras-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: stretch;
  padding: 10px 0;
}

.obra-item {
  display: flex;
  flex-direction: column;
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  background: #fff;
  cursor: pointer;
  transition: transform .1s ease;
}

.obra-item:active {
  transform: scale(.98);
}

.obra-imagen {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
}

iframe.obra-imagen {
  aspect-ratio: 16/9;
}

.obra-texto {
  padding: 16px;
  background: #fff;
}

.obra-info {
  padding: 12px 16px;
  border-top: 1px solid #eee;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.obra-info h3 {
  margin: 0;
  font-size: 1.1rem;
}

.obra-fecha {
  font-size: 1rem;
  color: #666;
}

/* --- BOTÓN COMPARTIR --- */
.share-btn {
  position: fixed;
  left: 16px;           /* Ubicado a la izquierda para no solaparse con Volver */
  bottom: 16px;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: var(--share-bg, rgba(255,255,255,0.95));
  border: 1px solid var(--share-border, #ddd);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
  z-index: 1000;
}
.share-btn:hover { filter: brightness(1.05); }
.share-btn img { filter: var(--share-icon-filter, none); }

/* --- BOTÓN VOLVER --- */
.back-btn {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  border: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
  z-index: 1000;
}

/* --- CABECERA AUTOR --- */
.header-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.autor-foto-header {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.autor-apellido {
  margin: 0;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  font-weight: 700;
  border-left: 4px solid #4CAF50;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.autor-obras-badge {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* --- MODAL FULLSCREEN --- */
#modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 2000;
}

#modal.open {
  display: flex;
}

#modal-content {
  max-width: 95%;
  max-height: 90vh;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  animation: fadeIn .2s ease;
}

#modal-content img,
#modal-content iframe {
  width: 100%;
  height: auto;
  display: block;
}

#modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 28px;
  color: #fff;
  cursor: pointer;
  user-select: none;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(.9); }
  to { opacity: 1; transform: scale(1); }
}

@media (min-width: 768px) {
  .obras-grid { align-items: center; }
  .obra-item { max-width: 960px; }
}
