#magazineViewport {
  transform: translateY(-1%);
}

.floating-tab {
  position: fixed;
  bottom: 2px;
  right: 48%;
  width: 32px;
  height: 32px;
  background-color: #e11d48;
  border: none;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  transition: all 0.3s ease;
}

.floating-tab:hover {
  bottom: 1rem;
}

.floating-tab::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(45deg);
  transition: transform 0.3s ease;
}

.floating-tab.open::after {
  transform: rotate(-135deg);
}

.click-animation {
  position: fixed;
  border-radius: 50%;
  background-color: rgba(225, 29, 71, 0.6);
  transform: scale(0);
  animation: ripple 600ms linear;
  pointer-events: none;
  z-index: 9999;
}

@keyframes ripple {
  to {
    transform: scale(5);
    opacity: 0;
  }
}

.modal-overlay {
  position: fixed;
  bottom: -51%;
  left: 50%;
  transform: translateX(-50%);
  width: 85%;
  height: 50%;
  width: 85% !important;
  height: 50%;
  background-color: #f9f9f9;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.3), 0px 2px 6px #e2e2e2 inset;
  border-radius: 20px 20px 0 0;
  transition: bottom 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
  z-index: 999;
  padding: 20px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  outline: 2px solid #ffffff;
  outline-offset: -6px;
  display: flex;
  flex-direction: column;
  z-index: 999;
}

#modal > a {
  width: 48px;
  height: 48px;
}

.modal-overlay.open {
  bottom: 0;
}

.modal-header {
  padding: 15px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #e11d48;
  border-bottom: 1px solid #ddd;
}

.video-grid {
  display: flex;
  justify-content: end;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 15px;
  overflow-y: auto;
}

.video-item {
  position: relative;
  background: #333;
  aspect-ratio: 15 / 9;
  height: 120px;

  border-radius: 8px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem !important;
}

.video-item video {
  width: 100%; /* عرض دلخواه */
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-item .play-icon {
  position: absolute;
  /* background-color: #e11d48; */
  color: #e11d48;
  cursor: pointer;

  transition: opacity 0.3s ease;
}

.video-item .play-icon.hidden {
  opacity: 0;
}

/* /////////////////////////////////////////////////// */
/* اعمال تغییرات به اسکرول بار برای تمام صفحات */
.video-grid {
  overflow-y: auto; /* اطمینان از فعال بودن اسکرول */
  overflow-x: hidden;
  
}

/* استایل اسکرول بار */
.video-grid::-webkit-scrollbar {
  width: 4px; /* عرض اسکرول بار */
  /* height: 8px; ارتفاع اسکرول بار (برای اسکرول افقی) */
}

.video-grid::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2); /* رنگ نوار اسکرول */
  border-radius: 2px; /* گوشه‌های گرد */
}

.video-grid::-webkit-scrollbar-thumb:hover {
  background-color: #e11d48; /* رنگ نوار اسکرول در حالت هاور */
}

.video-grid::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1); /* رنگ پس‌زمینه اسکرول بار */
  border-radius: 2px; /* گوشه‌های گرد */
}

.video-grid::-webkit-scrollbar-track-piece {
  border-radius: 2px; /* گوشه‌های گرد برای مسیر اسکرول */
}

/* /////////////////////////////////////////////////// */

/* ///////////////////////////////////////////////////////// */
/* ///////////////////////////////////////////////////////// */
/* ///////////////////////////////////////////////////////// */
/* ///////////////////////////////////////////////////////// */
/* ///////////////////////////////////////////////////////// */

video {
  width: 100%;

  transition: transform 0.6s ease;
}

video:hover {
  transform: scale(1.1);
}

.play-icon.hidden {
  opacity: 0;
}

.fullscreen-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 6px 8px;
  font-size: 16px;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all ease 700ms;
}
.fullscreen-btn:hover {
  background-color: rgba(225, 29, 71, 0.9);
}

/* ------------- close button X top right */
#modal > button{
  background-color:transparent;
  width: 48px;
  height: 48px;
}
.close-btn {
  position: absolute;
  top: 24px;
  right: 18px;
  color: #e11d47b7;
  font-size: 32px;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  z-index: 1001;
  transition: all ease 400ms;
}
.close-btn:hover {
  color: #e11d48;
}

/*/////////////////////////////////////////////// modal badge */

.modal-drag-bar {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 30%;
  height: 5px;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  cursor: pointer;
  transition: all ease 400ms;
}
.modal-drag-bar:hover {
  background-color: rgba(225, 29, 71, 0.5);
}
.contact-icon {
  position: relative;
  left: 12px;
  top: 12px;
  display: inline-flex;
  align-items: center;
  font-size: 24px;
  color: rgba(0, 123, 255, 0.7);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.contact-icon:hover {
  /* transform: scale(1.1); */
}

.contact-icon .badge {
  position: absolute;
  top: -12px;
  left: 16px;
  background-color: rgba(225, 29, 71, 0.9);
  color: white;
  font-size: 12px;
  font-weight: bold;
  border-radius: 100px;
  width: 8px;
  height: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
}

@keyframes pulse-badge {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.5);
    opacity: 1;
  }
  100% {
    box-shadow: 0 0 0 20px rgba(255, 59, 48, 0);
    opacity: 0;
  }
}

.contact-icon .badge::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 100%;
  background-color: rgba(255, 59, 48, 0.5);
  animation: pulse-badge 1.5s infinite;
}

/* ///////  edit bookmarks size */
.page-bookmark-add-right,
.page-bookmark-add-left {
  padding: 4px !important;
}


/* ------- logo compony */
#magazineViewport > a > img{
  width: 5vw;
  max-width: 20vw;
}
/* //////////// Media Screen */

@media (max-width: 768px) {
  #magazineViewport {
    transform: translateY(-6%);
  }
  .modal-overlay {
    height: 50%;
    width: 87% !important;
    bottom: -45%;
  }

  .modal-overlay.open {
    bottom: 0;
  }

  .video-grid {
    justify-content: center;
  }

  .video-item {
    height: 120px;
  }

/* ------- logo compony */
  #magazineViewport > a > img{
    width: 15vw;
  }
}

