/* Espaciado del botón en la sección filosofía */
.philosophy__action {
  margin-top: 1.8rem;
}

/* MODAL DE HISTORIA */
.history-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.history-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.history-modal__content {
  background: #111111;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 2.5rem;
  max-width: 800px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  color: #ffffff;
}

.history-modal__title {
  color: #ffffff !important;
  font-family: var(--font-heading, serif);
  font-size: 2rem;
  margin-top: 0.4rem;
  margin-bottom: 1.5rem;
}

/* ENVOLTURA FLUIDA Y FORMATO VERTICAL 9:16 */
.history-modal__body {
  line-height: 1.7;
}

.history-modal__body .body-text {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1rem;
}

.history-video-float--vertical {
  float: right;
  width: 32%;
  max-width: 240px;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.history-video-float--vertical video {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: block;
}

/* En celulares apila el video arriba ocupando un ancho cómodo */
@media (max-width: 640px) {
  .history-video-float--vertical {
    float: none;
    width: 100%;
    max-width: 280px;
    margin: 0 auto 1.5rem auto;
  }
}