
/* Mejoras transversales de interfaz */
:root {
  --ui-menu-duration: 260ms;
  --ui-soft-shadow: 0 14px 38px rgba(0, 0, 0, .22);
}

/* Menús hamburguesa: misma animación en todas las páginas */
.hamburguesa,
#hamburguesa {
  transform-origin: center;
  transition: transform 180ms ease, background-color 220ms ease, box-shadow 220ms ease !important;
}
.hamburguesa:hover,
#hamburguesa:hover {
  transform: translateY(-1px) scale(1.03);
}
.hamburguesa[aria-expanded="true"],
#hamburguesa[aria-expanded="true"] {
  transform: rotate(2deg) scale(1.04);
  box-shadow: 0 10px 24px rgba(0,0,0,.24);
}

.menu,
#menu {
  display: flex !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px) scale(.97);
  transform-origin: top right;
  transition:
    opacity var(--ui-menu-duration) ease,
    transform var(--ui-menu-duration) ease,
    visibility var(--ui-menu-duration) ease !important;
  box-shadow: var(--ui-soft-shadow);
}
.menu.menu-active,
#menu.menu-active {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto;
  transform: translateY(0) scale(1) !important;
}

/* Index: el menú queda por encima aunque el header sticky se solape */
body > #hamburguesa,
body > #menu {
  z-index: 10030 !important;
}

/* Difuminado suave entre los cortes de color del index */
body.pagina-principal main > section,
body.pagina-principal main > div,
body.pagina-principal main > footer {
  position: relative;
}
body.pagina-principal main > section::before,
body.pagina-principal main > div::before,
body.pagina-principal main > footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -18px;
  height: 36px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,.18), rgba(255,255,255,0));
  opacity: .85;
  z-index: 1;
}
body.pagina-principal main > section > *,
body.pagina-principal main > div > *,
body.pagina-principal main > footer > * {
  position: relative;
  z-index: 2;
}
body.pagina-principal header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 72px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(255,233,196,0), rgba(255,233,196,.58), rgba(255,233,196,.92));
  z-index: 1;
}

/* Favoritos */
.favorito img {
  transition: transform .22s ease, filter .22s ease, opacity .22s ease;
}
.favorito.guardado img {
  filter: drop-shadow(0 4px 8px rgba(122, 27, 27, .28));
}
.favorito.animando img {
  animation: latidoCorazon .42s ease;
}

/* Accesibilidad: respeta reducción de movimiento */
@media (prefers-reduced-motion: reduce) {
  .menu,
  #menu,
  .hamburguesa,
  #hamburguesa,
  .favorito img,
  .favorito.animando img {
    transition: none !important;
    animation: none !important;
  }
}

/* Ajustes finales globales */
.hamburguesa,
#hamburguesa {
  width: 54px !important;
  height: 54px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  display: grid !important;
  place-items: center !important;
  line-height: 1 !important;
  background: #8f1717 !important;
  color: #fff !important;
  box-shadow: 0 12px 28px rgba(58, 20, 20, .28) !important;
}

body.pagina-principal main > section::before,
body.pagina-principal main > div::before,
body.pagina-principal main > footer::before,
body.pagina-principal header::after {
  display: none !important;
  content: none !important;
}

.hero-video-header {
  background: #1d1512;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}
.hero-video-overlay {
  position: relative;
  z-index: 1;
}

.selector-obras {
  position: relative;
  overflow: hidden;
  min-height: clamp(560px, 72vw, 850px);
  align-items: flex-start !important;
  padding-top: clamp(90px, 11vw, 160px) !important;
}
.selector-obras > div {
  position: relative;
  z-index: 2;
}
.selector-obras > div:nth-child(2) {
  padding: clamp(1.5rem, 5vw, 5rem) !important;
}
@media (max-width: 760px) {
  .selector-obras {
    border-radius: 45% 45% 0 0 / 80px 80px 0 0 !important;
    min-height: auto;
    padding-top: 3rem !important;
    flex-direction: column;
  }
  .selector-obras > div:nth-child(2) {
    padding: 1.5rem !important;
  }
}

/* Corazón con el estilo circular de las referencias */
.favorito {
  position: relative !important;
  width: 74px !important;
  height: 74px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(122, 27, 27, .08) !important;
  background: radial-gradient(circle at 50% 42%, #f6e5df 0%, #efd9d1 52%, #f7eee8 100%) !important;
  box-shadow: 0 16px 34px rgba(92, 45, 34, .18), inset 0 1px 0 rgba(255,255,255,.6) !important;
  display: grid !important;
  place-items: center !important;
  cursor: pointer !important;
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease !important;
}
.favorito img { display: none !important; }
.favorito::before {
  content: "♡";
  font-size: 48px;
  line-height: 1;
  color: #2e2e2e;
  transform: translateY(-2px);
  transition: transform .22s ease, color .22s ease, text-shadow .22s ease;
}
.favorito.guardado::before,
.favorito.animando::before {
  content: "❤";
  color: #eb5149;
  text-shadow: 0 8px 18px rgba(235, 81, 73, .28);
}
.favorito:hover {
  transform: translateY(-3px) scale(1.04) !important;
  box-shadow: 0 20px 40px rgba(92, 45, 34, .24), inset 0 1px 0 rgba(255,255,255,.7) !important;
}
.favorito.animando {
  animation: latidoCorazon .46s ease both;
}
@keyframes latidoCorazon {
  0% { transform: scale(1); }
  35% { transform: scale(1.18); }
  65% { transform: scale(.94); }
  100% { transform: scale(1); }
}

/* Pop up de eliminación de comentario */
.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(32, 20, 16, .62);
  backdrop-filter: blur(4px);
}
.confirm-modal.visible { display: flex; }
.confirm-card {
  width: min(430px, 100%);
  border-radius: 24px;
  background: #fff3df;
  color: #3b2f2f;
  padding: 1.6rem;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,.28);
  border: 1px solid rgba(122, 27, 27, .12);
}
.confirm-card h3 {
  margin: 0 0 .75rem;
  color: #7a1b1b;
  font-size: 1.7rem;
}
.confirm-actions {
  margin-top: 1.25rem;
  display: flex;
  justify-content: center;
  gap: .8rem;
  flex-wrap: wrap;
}
.confirm-actions button {
  border: 0;
  border-radius: 999px;
  padding: .75rem 1.15rem;
  cursor: pointer;
  font-weight: 800;
}
.confirm-cancel { background: #ddc8aa; color: #3b2f2f; }
.confirm-delete { background: #8f1717; color: #fff; }
