/* Floating Video Modal for rmfito.png */

.rmfito-video-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), visibility 0.3s;
}

.rmfito-video-modal.active {
  opacity: 1;
  visibility: visible;
}

/* Glassmorphism backdrop with dark overlay */
.rmfito-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.4); /* Tailwind slate-900 equivalent */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background-color 0.3s;
}

/* Premium modal container */
.rmfito-modal-content {
  position: relative;
  width: 90%;
  max-width: 720px; /* Small, compact, not too big */
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 10001;
}

.rmfito-video-modal.active .rmfito-modal-content {
  transform: scale(1) translateY(0);
}

/* Desktop layout: Float the modal next to the left sidebar */
@media (min-width: 769px) {
  .rmfito-video-modal {
    justify-content: flex-start;
    padding-left: 360px; /* Offset to clear the left sidebar */
  }

  .rmfito-modal-content {
    transform: scale(0.9) translateX(-40px);
  }

  .rmfito-video-modal.active .rmfito-modal-content {
    transform: scale(1) translateX(0);
  }
}

/* Modern close button with animation */
.rmfito-modal-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1e293b;
  color: #f8fafc;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
  transition: background-color 0.2s, transform 0.2s, color 0.2s;
  z-index: 10002;
  padding: 0;
}

.rmfito-modal-close:hover {
  background: #ef4444; /* Premium bright red */
  color: #ffffff;
  transform: scale(1.1);
}

.rmfito-modal-close:focus-visible {
  outline: 2px solid #ef4444;
  outline-offset: 2px;
}

/* Video container */
.rmfito-video-container {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
}

.rmfito-video-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Trigger image styling */
.rmfito-img {
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s ease, box-shadow 0.3s ease;
}

.rmfito-img:hover {
  transform: scale(1.06);
  filter: brightness(1.08) drop-shadow(0 10px 15px rgba(0, 0, 0, 0.1));
}
