/* نافذة أسعار العودة للمدارس — تتوسط الشاشة ولا تتجاوز إطار المتصفح */
.pm-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
  background: rgba(19, 26, 51, 0.62);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s ease, visibility .22s ease;
}
.pm-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
body.pm-locked {
  overflow: hidden;
}

.pm-dialog {
  position: relative;
  width: min(980px, 94vw);
  max-height: min(88vh, 820px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  color: #1a2744;
  border-radius: 22px;
  box-shadow: 0 28px 70px rgba(19, 26, 51, 0.32);
  font-family: "Tajawal", "Cairo", sans-serif;
  transform: translateY(14px) scale(.98);
  transition: transform .22s ease;
}
.pm-overlay.is-open .pm-dialog {
  transform: none;
}

.pm-close {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #eef1f6;
  color: #4b5568;
  cursor: pointer;
  font-size: 1.05rem;
}
.pm-close:hover { background: #e2e7ef; color: #111; }

.pm-head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) auto minmax(0, 1fr);
  gap: 0.85rem 1rem;
  align-items: center;
  padding: 1.15rem 1.35rem 0.85rem 2.6rem;
  background:
    radial-gradient(420px 140px at 100% 0%, rgba(201, 162, 39, 0.16), transparent 70%),
    linear-gradient(180deg, #fbf8f2, #fff);
  border-bottom: 1px solid rgba(26, 39, 68, 0.08);
}
.pm-why { margin: 0; padding: 0; list-style: none; font-size: 0.78rem; color: #3d4b66; }
.pm-why li { display: flex; align-items: center; gap: 0.4rem; margin: 0.22rem 0; }
.pm-why i { color: #006a61; width: 1rem; text-align: center; }
.pm-why strong { display: block; color: #1a2744; margin-bottom: 0.25rem; font-size: 0.82rem; }

.pm-brand {
  text-align: center;
}
.pm-brand img {
  height: 42px;
  width: auto;
  margin: 0 auto 0.35rem;
}
.pm-brand h2 {
  margin: 0;
  font-family: Cairo, Tajawal, sans-serif;
  font-size: clamp(1.05rem, 2.4vw, 1.45rem);
  font-weight: 800;
  line-height: 1.35;
}
.pm-brand p {
  margin: 0.2rem 0 0.45rem;
  color: #5c6b86;
  font-size: 0.78rem;
}
.pm-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
}
.pm-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #eef8f5;
  color: #0f766e;
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 800;
}

.pm-gift {
  width: 92px;
  justify-self: end;
  filter: drop-shadow(0 8px 12px rgba(0, 106, 97, 0.18));
}

.pm-body { padding: 0.9rem 1.15rem 0.4rem; }
.pm-cols {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 0.85rem;
}
.pm-col h3 {
  margin: 0 0 0.55rem;
  font-size: 0.92rem;
  font-weight: 800;
}
.pm-col h3 small {
  display: block;
  font-weight: 500;
  color: #5c6b86;
  font-size: 0.72rem;
}

.pm-grid {
  display: grid;
  gap: 0.55rem;
}
.pm-grid.personal { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pm-grid.schools { grid-template-columns: 1fr; }

.pm-card {
  position: relative;
  border-radius: 16px;
  padding: 0.85rem 0.8rem 0.75rem;
  color: #fff;
  display: grid;
  gap: 0.28rem;
  min-height: 100%;
}
.pm-card.monthly { background: linear-gradient(180deg, #2f6bff, #1d4ed8); }
.pm-card.seasonal { background: linear-gradient(180deg, #8b5cf6, #6d28d9); }
.pm-card.yearly { background: linear-gradient(180deg, #22c55e, #15803d); }
.pm-card.school-seasonal { background: linear-gradient(180deg, #fb923c, #ea580c); }
.pm-card.school-yearly { background: linear-gradient(180deg, #3f7a4a, #14532d); }

.pm-ribbon {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #cea72c;
  color: #1a2744;
  font-size: 0.65rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
}
.pm-off {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255,255,255,0.2);
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.12rem 0.42rem;
}
.pm-card h4 { margin: 0.15rem 0 0; font-size: 1.05rem; font-weight: 800; }
.pm-kind { margin: 0; opacity: .88; font-size: 0.7rem; }
.pm-price { display: flex; align-items: baseline; gap: 0.35rem; flex-wrap: wrap; }
.pm-price strong { font-family: Cairo, sans-serif; font-size: 1.45rem; font-weight: 800; line-height: 1; }
.pm-price span { font-size: 0.78rem; opacity: .92; }
.pm-old { text-decoration: line-through; opacity: .72; font-size: 0.75rem; }
.pm-card ul {
  margin: 0.2rem 0 0.35rem;
  padding: 0 0.9rem 0 0;
  font-size: 0.74rem;
  line-height: 1.45;
  opacity: .95;
}
.pm-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: auto;
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 0.48rem 0.5rem;
  background: #fff;
  color: #1a2744;
  font-weight: 800;
  font-size: 0.8rem;
  text-decoration: none;
  cursor: pointer;
}
.pm-cta:hover { filter: brightness(0.97); }
.pm-card.yearly .pm-cta { background: #cea72c; }

.pm-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.45rem 1rem;
  padding: 0.7rem 1.15rem 0.95rem;
  color: #5c6b86;
  font-size: 0.75rem;
  border-top: 1px solid rgba(26, 39, 68, 0.08);
}
.pm-trust { display: flex; flex-wrap: wrap; gap: 0.65rem 1rem; margin: 0; padding: 0; list-style: none; }
.pm-trust i { color: #006a61; margin-inline-end: 0.25rem; }
.pm-foot a { color: #1a2744; font-weight: 800; }

@media (max-width: 860px) {
  .pm-head, .pm-cols { grid-template-columns: 1fr; }
  .pm-gift { display: none; }
  .pm-why { order: 3; }
  .pm-grid.personal { grid-template-columns: 1fr; }
  .pm-dialog { width: min(560px, 96vw); max-height: 92vh; border-radius: 16px; }
  .pm-brand { text-align: right; }
  .pm-brand img, .pm-chips { margin-inline: 0; justify-content: flex-start; }
  .pm-head { padding: 2.4rem 1rem 0.8rem; }
}
