/* =====================================================
   ESTILOS PARA EL OVERLAY DE IMÁGENES CON SOPORTE TÁCTIL MEJORADO
====================================================== */
.content-card-image {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 25px;
}

/* Overlay base para todas las imágenes interactivas */
.interactive-image-container {
    position: relative;
    display: inline-block; 
    max-width: 100%;
}

/* SVG superpuesto con mejor posicionamiento */
.highlight-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* Capa base del overlay */
.overlay-base {
    fill: rgba(0, 0, 0, 0.6);
    transition: fill 0.3s ease;
}

/* Mejora en los estilos para las áreas resaltadas */
.highlight-area {
    fill: transparent;
    stroke: var(--gold);
    stroke-width: 0;
    transition: stroke-width 0.4s ease, fill 0.4s ease;
}

/* Estados activos para las distintas áreas */
.highlight-overlay.show-universidad .universidad-highlight {
    stroke-width: 4px;
    fill: rgba(190, 157, 49, 0.15);
}

.highlight-overlay.show-monumento .monumento-highlight {
    stroke-width: 4px;
    fill: rgba(190, 157, 49, 0.25);
}

/* Mostrar overlay cuando está activo */
.highlight-overlay.active {
    opacity: 1;
}

/* =====================================================
   MEJORAS ESPECÍFICAS PARA ENLACES INTERACTIVOS EN MÓVIL
====================================================== */

/* Estilo base para enlaces internos */
.inner-link {
    color: var(--gold);
    text-decoration: none;
    position: relative;
    z-index: 10;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    
    /* Para evitar problemas de "tap" en iOS */
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}

/* Estado activo visual mejorado */
.inner-link.active {
    color: #ffffff;
    text-shadow: 0 0 8px var(--gold), 0 0 12px var(--gold-light);
}

/* Estilos específicos para dispositivos táctiles */
@media (max-width: 991px) {
    /* Indicador visual que este enlace es interactivo */
    .inner-link::after {
        content: "↗";
        display: inline-block;
        margin-left: 2px;
        opacity: 0.8;
        font-size: 0.9em;
    }
    
    /* Clase específica para enlaces en modo táctil */
    .inner-link.touch-interactive {
        /* Aumentar el área de toque para mejor accesibilidad */
        padding: 3px 5px;
        margin: -3px -5px;
        border-radius: 4px;
        
        /* Feedback visual al tocar */
        transition: background-color 0.3s ease, color 0.3s ease, text-shadow 0.3s ease;
    }
    
    /* Estilo de pulsación para dispositivos táctiles */
    .inner-link.touch-interactive:active {
        background-color: rgba(190, 157, 49, 0.2);
    }
    
    /* Animación para enlaces activos en dispositivos táctiles */
    .inner-link.active {
        animation: pulse-gold 2s infinite;
    }
    
    @keyframes pulse-gold {
        0% { color: #ffffff; text-shadow: 0 0 5px var(--gold); }
        50% { color: var(--gold-light); text-shadow: 0 0 8px var(--gold), 0 0 15px var(--gold); }
        100% { color: #ffffff; text-shadow: 0 0 5px var(--gold); }
    }
    
    /* Etiquetas de ayuda sobre la imagen */
    .interactive-label {
        position: absolute;
        padding: 4px 8px;
        background-color: rgba(18, 18, 18, 0.8);
        color: var(--gold);
        border: 1px solid var(--gold);
        border-radius: 4px;
        font-size: 0.8rem;
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    /* Mostrar etiquetas cuando el overlay está activo */
    .highlight-overlay.active ~ .interactive-label {
        opacity: 1;
    }
    
    /* Optimización para imágenes responsivas */
    .manuscript-img {
        max-width: 100%;
        height: auto;
        border-radius: 4px;
        /* Eliminar transición para mejor rendimiento en móviles */
        transition: none;
    }
}

/* Optimización para imágenes responsivas */
.manuscript-img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    transition: filter 0.3s ease;
}

/* Efecto suave al interactuar con la imagen */
.highlight-overlay.active ~ .manuscript-img {
    filter: brightness(0.8) contrast(1.1);
}

/* Contenedor para imágenes con hover */
.hover-image-container {
    position: relative;
    display: inline-block;
    max-width: 100%;
    cursor: pointer;
}

/* Imagen principal */
.hover-image-container .main-image {
    display: block;
    max-width: 100%;
    height: auto;
    transition: opacity 0.3s ease;
    border-radius: 4px;
}

/* Imagen complementaria (oculta por defecto) */
.hover-image-container .hover-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    object-fit: contain;
    border-radius: 4px;
    z-index: 5; /* Asegurarnos que esté por encima de la imagen principal */
    pointer-events: auto; /* Importante: permitir eventos de puntero en la imagen */
}

/* Mostrar imagen complementaria en hover (desktop) */
.hover-image-container:hover .hover-image {
    opacity: 1;
}
.hover-image-container:hover .main-image {
    opacity: 0;
}

/* Icono indicador */
.hover-indicator {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 46px;
    height: auto;
    z-index: 10;
    opacity: 0.75;
}

/* Clase para mostrar imagen complementaria (será controlada por JS en móvil) */
.hover-image-container.show-hover .hover-image {
    opacity: 1;
}
.hover-image-container.show-hover .main-image {
    opacity: 0;
}

/* Estilo para dispositivos táctiles */
/* @media (max-width: 991px) {
    .hover-image-container::after {
        content: "Toca para ver detalle";
        position: absolute;
        bottom: -40px;
        left: 50%;
        transform: translateX(-50%);
        background-color: rgba(0, 0, 0, 0.7);
        color: var(--gold);
        padding: 5px 10px;
        border-radius: 4px;
        font-size: 0.8rem;
        opacity: 0.8;
        pointer-events: none;
        white-space: nowrap;
    }
} */

/* Estilos para el contenedor de video con botón play */
.video-container-with-play {
    position: relative;
    display: inline-block;
    /* cursor: pointer; */
    max-width: 100%;
}

/* Slideshow principal */
.slideshow-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 75%; /* Relación de aspecto 4:3 - previene CLS */
  margin-bottom: 20px;
  overflow: visible;
  background-color: rgba(0, 0, 0, 0.2);
  box-shadow: 0 0 15px rgba(190, 157, 49, 0.2);
}

/* Contenedor de imágenes */
.slideshow-images {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

/* Imágenes individuales y contenedores */
.slideshow-image-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}

.slideshow-image-container.active {
  opacity: 1;
  z-index: 1;
}

.slideshow-image,
.slideshow-image-hover {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.slideshow-image-hover {
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none; /* Evitar que capte los eventos del mouse */
  z-index: 2; /* Asegurar que la imagen hover siempre esté encima */
}

/* Indicador visual de hover disponible */
.slideshow-image-container.has-hover {
  cursor: pointer;
}

.slideshow-image-container.has-hover .hover-icon {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 65px;
  height: auto;
  object-fit: contain;
  opacity: 0.8;
  z-index: 3;
  transition: opacity 0.3s ease, transform 0.3s ease;
  animation: pulse 2s infinite;

}

.slideshow-image-container.has-hover:hover .hover-icon {
  opacity: 1;
  transform: scale(1.1);
}

/* Mostrar imagen hover en escritorio */
@media (min-width: 769px) {
  .slideshow-image-container.has-hover:hover .slideshow-image-hover {
    opacity: 1;
  }
}

/* Mostrar imagen hover en móvil cuando está activa */
.slideshow-image-container.hover-active .slideshow-image-hover {
  opacity: 1;
}

/* Leyendas */
.slideshow-caption {
  position: absolute;
  top: -47px;
  left: 0;
  width: 100%;
  background-color: rgba(18, 18, 18, 0.85);
  color: var(--gold-light);
  padding: 12px;
  font-family: 'Cinzel', serif;
  text-align: center;
  font-size: 1rem;
  transform: translateY(0);
  transition: transform 0.3s ease;
}

/* Controles de navegación */
.slideshow-controls {
  position: absolute;
  bottom: -22%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 15px;
  pointer-events: none; /* Permite hacer clic en las imágenes */
}

.slideshow-controls img {
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  pointer-events: auto; /* Restablece los eventos de puntero */
  max-width: 70px;
  height: auto;
  object-fit: contain;
}

.slideshow-controls img:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* Estado activo para enlaces internos */
.inner-link.active {
  color: #dad5bf;
  text-shadow: 0 0 5px var(--gold);
  text-decoration: underline;
}

/* Estilos para el modal en móviles */
.mobile-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1050;
  overflow: hidden;
}

.mobile-modal.show {
  opacity: 1;
  pointer-events: auto;
}

.mobile-modal-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px;
}

.mobile-modal-close {
  position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: var(--gold);
    cursor: pointer;
    z-index: 2001;
    animation: closeBeat 3s infinite ease-in-out;
    background-color: #ffffff00;
    border: 0px;
  }

.mobile-modal-caption {
  position: absolute;
  top: 12px;
  left: 0;
  width: 100%;
  padding: 8px 40px 8px 15px;
  background-color: rgba(18, 18, 18, 0.85);
  color: var(--gold-light);
  font-family: 'Cinzel', serif;
  text-align: center;
  font-size: 0.9rem;
  z-index: 1051;
}

.mobile-modal-image-container {
  width: 100%;
  height: 80%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.mobile-modal-controls {
  position: absolute;
  bottom: 40px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1051;
}

.mobile-modal-controls img {
  width: 80px;
  height: auto;
  opacity: 0.8;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.3s ease;
  object-fit: contain;
}

.mobile-modal-controls img:hover,
.mobile-modal-controls img:active {
  opacity: 1;
  transform: scale(1.1);
}

/* Estilos para imágenes y hover en el modal móvil */
.mobile-modal-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.mobile-modal-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-modal-image,
.mobile-modal-image-hover {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.mobile-modal-image-hover {
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2; /* Asegurar que la imagen hover siempre esté encima */
}

.mobile-modal-slide.has-hover {
  cursor: pointer;
}

.mobile-modal-slide.has-hover .hover-icon {
  position: absolute;
  top: 22px;
  right: 10px;
  width: 65px;
  height: auto; /*25px;*/
  object-fit: contain;
  opacity: 0.8;
  z-index: 3;
  animation: pulse 2s infinite;

}

.mobile-modal-slide.hover-active .mobile-modal-image-hover {
  opacity: 1;
}

/* En dispositivos móviles siempre mostrar caption */
@media (max-width: 768px) {
  .slideshow-caption {
    transform: translateY(0);
    padding: 8px;
    font-size: 0.85rem;
  }
  
  .slideshow-controls img {
    max-width: 65px;
  }
  
  .intro-icon {
    width: 60px;
    height: 60px;
  }
  
  .initial-content h3 {
    font-size: 1.3rem;
  }
  
  .initial-content p {
    font-size: 1rem;
  }
  
  .slideshow-image-container.has-hover .hover-icon {
    width: 20px;
    height: 20px;
    bottom: 8px;
    right: 8px;
  }
  
  /* Indicador de slideshow disponible para móvil */
  .inner-link {
    position: relative;
    /* padding-right: 15px; */
  }
  
  /* .inner-link::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: var(--gold);
    border-radius: 50%;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    animation: pulse 2s infinite;
  } */

  .image-container{
    min-height: 256px !important;
    margin-bottom: 0px !important;
}
.content-card-image-sticky {
padding: 0px 10px !important;
}

}

/* Clase auxiliar para ocultar elementos pero mantener su espacio */
.invisible-control {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Clase auxiliar para ocultar elementos por completo */
.hidden-control {
  display: none !important;
}

/* Para accesibilidad */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.instruction-text{
    font-size: 1.3rem !important;
}

.inner_link{
    color: var(--gold);
    text-decoration: none;
    font-size: 1.3rem;
}
a.inner_link.active{
    color: #fff;
    font-weight: bolder !important;
    font-size: 1.4rem;
}