/* Homepage "Live Rich Media Work" showcase + preview modal */
.hrm-section {
  position: relative;
  z-index: 1;
  width: min(1250px, calc(100% - 32px));
  margin: 0 auto 56px;
}

.hrm-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.hrm-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(234, 88, 12, 0.16);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.05);
  transition:
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

.hrm-card:hover {
  transform: translateY(-6px);
  border-color: rgba(234, 88, 12, 0.32);
  box-shadow: 0 24px 56px rgba(234, 88, 12, 0.1);
}

.hrm-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.1), rgba(234, 88, 12, 0.1));
  border: 1px solid rgba(15, 23, 42, 0.08);
  cursor: pointer;
}

.hrm-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
  pointer-events: none;
}

.hrm-play-btn {
  position: absolute;
  left: 50%;
  bottom: 12px;
  z-index: 2;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.22);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.hrm-frame:hover .hrm-play-btn,
.hrm-play-btn:focus-visible {
  background: var(--mrn-orange-600, #ea580c);
  transform: translateX(-50%) translateY(-2px);
  outline: none;
}

.hrm-meta {
  display: grid;
  gap: 4px;
  padding: 0 4px 4px;
  text-align: left;
}

.hrm-tag {
  color: var(--mrn-orange-600, #ea580c);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hrm-title {
  margin: 0;
  color: #0b1020;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.3;
}

.hrm-desc {
  margin: 0;
  color: #64748b;
  font-size: 0.86rem;
  line-height: 1.55;
}

.hrm-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
}

/* Preview modal */
body.hrm-modal-open {
  overflow: hidden;
}

.hrm-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.hrm-modal.is-open {
  display: flex;
}

.hrm-modal-dialog {
  width: min(1180px, 100%);
  height: min(760px, calc(100dvh - 36px));
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.hrm-modal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 12px 14px 12px 18px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.hrm-modal-title {
  margin: 0;
  color: #0b1020;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  font-weight: 600;
}

.hrm-modal-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.hrm-modal-cta {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  background: var(--mrn-orange-600, #ea580c);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.hrm-modal-cta:hover {
  background: #c2410c;
  color: #fff;
}

.hrm-modal-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 12px;
  background: #fff;
  color: #0b1020;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
}

.hrm-modal-icon:hover,
.hrm-modal-icon:focus-visible {
  background: var(--mrn-orange-600, #ea580c);
  border-color: var(--mrn-orange-600, #ea580c);
  color: #fff;
  outline: none;
}

.hrm-modal-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #fff;
}

@media (max-width: 1024px) {
  .hrm-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .hrm-section {
    width: calc(100% - 32px);
    margin-bottom: 40px;
  }

  .hrm-grid {
    grid-template-columns: 1fr;
  }

  .hrm-frame {
    aspect-ratio: 4 / 5;
  }

  .hrm-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .hrm-modal {
    padding: 0;
  }

  .hrm-modal-dialog {
    width: 100%;
    height: 100dvh;
    border-radius: 0;
  }

  .hrm-modal-cta {
    padding: 0 12px;
    font-size: 0.8rem;
  }
}
