/* كيف تستخدم Timelsa — thumbnail opens video modal */

.home-how-to-use {
  --htu-blue: #0066cc;
  --htu-blue-dark: #0052a3;
  --htu-text: #111827;
  --htu-muted: #6b7280;
  margin: 0 0 2.25rem;
  padding: 0.15rem 0 0.35rem;
  max-width: 100%;
  overflow-x: clip;
  text-align: center;
}

.home-how-to-use__title {
  margin: 0 0 0.55rem;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--htu-text);
}

.home-how-to-use__desc {
  margin: 0 auto 1.15rem;
  max-width: 34rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--htu-muted);
  font-weight: 450;
  padding-inline: 0.25rem;
}

.home-how-to-use__trigger {
  position: relative;
  display: block;
  width: 100%;
  max-width: 36rem;
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 1rem;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.home-how-to-use__trigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(0, 102, 204, 0.18);
}

.home-how-to-use__trigger:focus-visible {
  outline: 3px solid rgba(0, 102, 204, 0.35);
  outline-offset: 3px;
}

.home-how-to-use__trigger:active {
  transform: scale(0.99);
}

.home-how-to-use__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  vertical-align: middle;
  background: #e5e7eb;
}

.home-how-to-use__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.28));
  pointer-events: none;
}

.home-how-to-use__play-icon {
  width: 3.55rem;
  height: 3.55rem;
  border-radius: 50%;
  background: var(--htu-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(0, 102, 204, 0.4);
  transition: background 0.2s ease, transform 0.2s ease;
}

.home-how-to-use__trigger:hover .home-how-to-use__play-icon {
  background: var(--htu-blue-dark);
  transform: scale(1.05);
}

.home-how-to-use__play-icon svg {
  width: 1.35rem;
  height: 1.35rem;
  margin-inline-start: 0.15rem;
  fill: currentColor;
}

/* Modal */
.home-how-to-use-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  background: rgba(15, 23, 42, 0.72);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.home-how-to-use-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.home-how-to-use-modal__panel {
  position: relative;
  width: min(100%, 52rem);
  max-height: min(90vh, 100%);
  background: #0b1220;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  transform: translateY(10px) scale(0.98);
  transition: transform 0.25s ease;
}

.home-how-to-use-modal.is-open .home-how-to-use-modal__panel {
  transform: none;
}

.home-how-to-use-modal__close {
  position: absolute;
  top: 0.65rem;
  inset-inline-end: 0.65rem;
  z-index: 2;
  width: 2.35rem;
  height: 2.35rem;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.home-how-to-use-modal__close:hover {
  background: rgba(15, 23, 42, 0.9);
}

.home-how-to-use-modal__close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.home-how-to-use-modal__video {
  display: block;
  width: 100%;
  max-height: min(78vh, 100%);
  aspect-ratio: 16 / 9;
  background: #000;
  object-fit: contain;
  vertical-align: middle;
}

body.home-how-to-use-open {
  overflow: hidden;
}

@media (min-width: 640px) {
  .home-how-to-use__title {
    font-size: 1.75rem;
  }

  .home-how-to-use__desc {
    font-size: 1.02rem;
  }

  .home-how-to-use__play-icon {
    width: 4.1rem;
    height: 4.1rem;
  }

  .home-how-to-use__play-icon svg {
    width: 1.55rem;
    height: 1.55rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-how-to-use__trigger,
  .home-how-to-use__play-icon,
  .home-how-to-use-modal,
  .home-how-to-use-modal__panel {
    transition: none;
  }
}
