/* =====================================================================
   PLANS — Premium redesign for /plans (front-cmp)
   ▸ طبقة تصميم فوق premium-theme.css — نفس هوية #D46E2A والزجاج.
   ▸ بانر حالة ديناميكي حسب مرحلة الفصل + حالة الاشتراك، وبطاقات خطط فاخرة.
   ===================================================================== */

.pl-container {
  position: relative;
  z-index: 1;
  max-width: 1180px;
}

/* ---- بانر الحالة الديناميكي ---- */
.pl-hero {
  position: relative; overflow: hidden;
  max-width: 860px; margin-inline: auto;
  border-radius: var(--pt-radius-lg);
  padding: .9rem 1.25rem;
  margin-block: .5rem 1.25rem;
  background: var(--glass-bg);
  -webkit-backdrop-filter: saturate(180%) blur(var(--glass-blur));
  backdrop-filter: saturate(180%) blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--pt-shadow);
  display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; flex-wrap: wrap;
}
.pl-hero::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 5px;
  background: linear-gradient(180deg, var(--brand), var(--brand-hover));
}
.pl-hero--upcoming::before  { background: linear-gradient(180deg, #4EA8DE, #274C77); }
.pl-hero--ended::before     { background: linear-gradient(180deg, #9AA0AB, #6B7280); }
.pl-hero--subscribed::before{ background: linear-gradient(180deg, var(--pt-success), #15803D); }
.pl-hero--renew::before     { background: linear-gradient(180deg, #F59E0B, #B45309); }

.pl-hero-main { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.pl-hero-ic {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 1.35rem; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-hover));
  box-shadow: 0 6px 14px rgba(var(--brand-rgb), .3);
}
.pl-hero--upcoming .pl-hero-ic   { background: linear-gradient(135deg, #4EA8DE, #274C77); box-shadow: 0 8px 18px rgba(78,168,222,.3); }
.pl-hero--ended .pl-hero-ic      { background: linear-gradient(135deg, #9AA0AB, #6B7280); box-shadow: none; }
.pl-hero--subscribed .pl-hero-ic { background: linear-gradient(135deg, var(--pt-success), #15803D); box-shadow: 0 8px 18px rgba(34,197,94,.3); }
.pl-hero--renew .pl-hero-ic      { background: linear-gradient(135deg, #F59E0B, #B45309); box-shadow: 0 8px 18px rgba(245,158,11,.32); }

.pl-hero-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .66rem; font-weight: 800; padding: .12rem .5rem; border-radius: 999px; margin-bottom: .25rem;
  background: rgba(var(--brand-rgb), .12); color: var(--brand-hover);
}
.pl-hero--upcoming .pl-hero-badge   { background: rgba(78,168,222,.14); color: #2C7BB6; }
.pl-hero--ended .pl-hero-badge      { background: rgba(107,114,128,.14); color: var(--pt-text-2); }
.pl-hero--subscribed .pl-hero-badge { background: rgba(34,197,94,.14); color: #15803D; }
.pl-hero--renew .pl-hero-badge      { background: rgba(245,158,11,.16); color: #B45309; }
/* الوضع الداكن: ألوان الشارات الأربع مضبوطة على أرضية بيضاء (‎#15803D‎ الأخضر
   تباينه 3.76 على الأسود، دون AA لخط 11px). نرفعها لدرجات فاتحة على التلوين نفسه. */
html.dark-style .pl-hero-badge                        { color: var(--brand-light, #E8A05F); }
html.dark-style .pl-hero--upcoming .pl-hero-badge     { color: #7CC0EC; }
html.dark-style .pl-hero--subscribed .pl-hero-badge   { color: #5BD98A; }
html.dark-style .pl-hero--renew .pl-hero-badge        { color: #F0B45C; }
html.dark-style .pl-hero-text strong                  { color: var(--brand-light, #E8A05F); }
.pl-hero-title { font-family: 'Cairo', sans-serif; font-weight: 800; font-size: 1.05rem; color: var(--pt-text); margin: 0 0 .1rem; line-height: 1.35; }
.pl-hero-text  { color: var(--pt-text-2); font-size: .8rem; margin: 0; }
.pl-hero-text strong { color: var(--brand-hover); font-weight: 700; }
.pl-hero-actions { display: flex; gap: .5rem; flex-wrap: wrap; flex: 0 0 auto; }
.pl-hero-actions .btn { font-weight: 700; border-radius: var(--pt-radius-sm); padding: .45rem 1rem; font-size: .85rem; }
@media (max-width: 767.98px) {
  .pl-hero { padding: .9rem 1rem; }
  .pl-hero-actions { width: 100%; }
  .pl-hero-actions .btn { flex: 1 1 auto; }
}

/* ---- بطاقة ملف الإنجاز الأنيقة ---- */
.pl-portfolio {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  border-radius: var(--pt-radius-lg); padding: 1.1rem 1.5rem; margin-bottom: 1.75rem;
  background: linear-gradient(120deg, rgba(var(--brand-rgb), .06), rgba(39,76,119,.05));
  border: 1px solid rgba(var(--brand-rgb), .18);
}
.pl-portfolio-info { display: flex; align-items: center; gap: .9rem; }
.pl-portfolio-ic {
  width: 48px; height: 48px; border-radius: 14px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
  color: var(--brand); background: rgba(var(--brand-rgb), .12);
}
.pl-portfolio-title { font-weight: 800; color: var(--pt-text); font-size: 1.05rem; margin: 0; }
.pl-portfolio-sub { color: var(--pt-text-2); font-size: .85rem; margin: .1rem 0 0; }
.pl-portfolio-price { font-weight: 800; color: var(--brand-hover); }
html.dark-style .pl-portfolio-price { color: var(--brand-light, #E8A05F); }
.pl-portfolio .btn { border-radius: 999px; font-weight: 700; }

/* ---- شريط ميزة الفصلين ---- */
.pl-twosem {
  display: flex; align-items: center; gap: .9rem;
  border-radius: var(--pt-radius-lg); padding: 1rem 1.4rem; margin-bottom: 1.75rem;
  background: linear-gradient(120deg, rgba(var(--brand-rgb), .12), rgba(var(--brand-rgb), .04));
  border: 1px dashed rgba(var(--brand-rgb), .45);
}
.pl-twosem-ic {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-hover));
  box-shadow: 0 6px 14px rgba(var(--brand-rgb), .3);
}
.pl-twosem-text { color: var(--pt-text); font-size: .95rem; line-height: 1.6; }
.pl-twosem-text strong { color: var(--brand-hover); font-weight: 800; }
.pl-twosem-tag {
  display: inline-block; margin-inline-end: .5rem; padding: .12rem .6rem; border-radius: 999px;
  font-size: .72rem; font-weight: 800; background: var(--brand); color: #fff;
}

/* ---- «كيف يُحسب سعر اشتراكك؟» — مصغّر بعرض صندوق السعر (داخل pl-solo-side) ---- */
.pl-mini {
  margin: 0 0 1rem; padding: .65rem .8rem;
  background: var(--pt-card); border: 1px dashed rgba(var(--brand-rgb), .35);
  border-radius: 12px;
}
.pl-mini-title {
  display: flex; align-items: center; gap: .35rem;
  font-size: .72rem; font-weight: 800; color: var(--pt-text);
  margin-bottom: .3rem;
}
.pl-mini-title i { color: var(--brand); font-size: .9rem; }
.pl-mini-row {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  font-size: .74rem; color: var(--pt-text-2); font-weight: 600;
  padding: .28rem 0;
}
.pl-mini-row + .pl-mini-row { border-top: 1px dashed var(--pt-border); }
.pl-mini-val { display: inline-flex; align-items: baseline; gap: .25rem; color: var(--pt-text); white-space: nowrap; }
.pl-mini-val b { color: var(--brand-hover); font-size: .86rem; font-weight: 800; }
.pl-mini-val s { font-size: .66rem; opacity: .7; }
.pl-mini-val svg { align-self: center; }
.pl-mini-off {
  font-size: .6rem; font-weight: 800; color: #15803D;
  background: rgba(34, 197, 94, .13); border: 1px solid rgba(34, 197, 94, .28);
  padding: .04rem .32rem; border-radius: 999px;
}
html.dark-style .pl-mini-off { color: #4ADE80; }
/* الشارة الكبيرة داخل الصندوق صارت مكررة مع صفوف pl-mini — تُخفى هنا فقط */
.pl-solo-side .pl-tag-extra { display: none; }

/* ---- شبكة الخطط ---- */
.pl-plans {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem;
  align-items: stretch; margin-bottom: 1.75rem;
}

/* ---- الخطة الواحدة: بطاقة استعراضية بعمودين حقيقيين (pl-solo) ----
   المحتوى (اسم/وصف/بنود) يمين، ولوح الاشتراك (سعر + أزرار) يسار. */
.pl-solo {
  display: flex; align-items: stretch; gap: 1.8rem;
  max-width: 860px; margin-inline: auto; margin-bottom: 1.75rem;
  background: var(--pt-card); border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius-lg); padding: 1.9rem;
  box-shadow: var(--pt-shadow-sm);
}
.pl-solo-main {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-direction: column;
}
.pl-solo-sem {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .7rem; font-weight: 800; color: var(--brand-hover);
  background: rgba(var(--brand-rgb), .1); border: 1px solid rgba(var(--brand-rgb), .25);
  padding: .18rem .6rem; border-radius: 999px; margin-bottom: .45rem;
}
.pl-solo-sem i { font-size: .85rem; }
.pl-solo-name {
  font-family: 'Cairo', sans-serif; font-weight: 800; font-size: 1.5rem;
  color: var(--pt-text); margin: .2rem 0 .35rem;
}
.pl-solo-desc { color: var(--pt-text-2); font-size: .95rem; margin: 0; }
.pl-solo-feats { list-style: none; margin: 1.2rem 0 0; padding: 0; }
.pl-solo-feats li {
  display: flex; align-items: flex-start; gap: .55rem;
  padding: .5rem 0; color: var(--pt-text); font-size: .92rem;
  border-bottom: 1px dashed var(--pt-border);
}
.pl-solo-feats li:last-child { border-bottom: 0; }
.pl-solo-feats li i { color: var(--brand); font-size: 1.05rem; margin-top: .1rem; flex: 0 0 auto; }
/* لوح الاشتراك الجانبي */
.pl-solo-side {
  flex: 0 0 300px; display: flex; flex-direction: column; justify-content: center;
  background: linear-gradient(160deg, rgba(var(--brand-rgb), .09), rgba(var(--brand-rgb), .03));
  border: 1px solid rgba(var(--brand-rgb), .22); border-radius: 16px;
  padding: 1.4rem 1.2rem;
}
.pl-solo-side .pl-plan-price {
  border-top: 0; border-bottom: 0;
  padding: 0; margin: 0 0 1.1rem;
}
/* أزرار لوح الاشتراك: الأول فعل رئيسي صلب، والبقية بيضاء بحد —
   (!important لأن خلفيات أزرار Vuexy label تتغلب على التدرج العادي) */
.pl-solo-side .pl-plan-actions .btn:first-child {
  background-color: var(--brand) !important;
  background-image: linear-gradient(135deg, var(--brand), var(--brand-hover)) !important;
  border: 0 !important; color: #fff !important; font-weight: 800;
  box-shadow: 0 10px 22px -12px rgba(var(--brand-rgb), .8);
}
.pl-solo-side .pl-plan-actions .btn:first-child:hover {
  color: #fff !important; filter: brightness(1.06); transform: translateY(-1px);
}
.pl-solo-side .pl-plan-actions .btn:not(:first-child) {
  background: var(--pt-card) !important;
  color: var(--brand-hover) !important;
  border: 1px solid rgba(var(--brand-rgb), .4) !important;
  font-weight: 700;
}
.pl-solo-side .pl-plan-actions .btn:not(:first-child):hover {
  background: rgba(var(--brand-rgb), .08) !important;
}
.pl-solo-side .pl-plan-actions .btn:active {
  transform: translateY(0) scale(.985);
}
@media (max-width: 767.98px) {
  .pl-solo { flex-direction: column; gap: 1.1rem; padding: 1.35rem 1.15rem; }
  .pl-solo-name, .pl-solo-desc { text-align: center; }
  .pl-solo-sem { align-self: center; }
  .pl-solo-side { flex: 1 1 auto; }
}

/* ---- خدمات إضافية: بطاقتا ملف الإنجاز والرخصة جنباً إلى جنب ---- */
.pl-extras {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1rem;
}
.pl-extras .pl-portfolio { margin-bottom: 0; }
.pl-plan {
  position: relative; display: flex; flex-direction: column;
  background: var(--pt-card); border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius-lg); padding: 1.6rem 1.4rem;
  box-shadow: var(--pt-shadow-sm);
  transition: transform var(--pt-dur) var(--pt-ease), box-shadow var(--pt-dur) var(--pt-ease), border-color var(--pt-dur) var(--pt-ease);
}
.pl-plan:hover { transform: translateY(-4px); box-shadow: var(--pt-shadow-lg); border-color: rgba(var(--brand-rgb), .35); }
.pl-plan--popular {
  border: 2px solid var(--brand);
  box-shadow: 0 14px 40px rgba(var(--brand-rgb), .14);
}
.pl-plan-ribbon {
  position: absolute; top: -13px; inset-inline-start: 50%; transform: translateX(50%);
  background: linear-gradient(135deg, var(--brand), var(--brand-hover)); color: #fff;
  font-size: .74rem; font-weight: 800; padding: .3rem .9rem; border-radius: 999px;
  box-shadow: 0 6px 14px rgba(var(--brand-rgb), .35); white-space: nowrap;
  display: inline-flex; align-items: center; gap: .3rem;
}
.pl-plan-name { font-family: 'Cairo', sans-serif; font-weight: 800; font-size: 1.2rem; color: var(--pt-text); text-align: center; margin: .4rem 0 .3rem; }
.pl-plan-desc { color: var(--pt-text-2); font-size: .86rem; text-align: center; margin: 0 0 1rem; min-height: 1.2em; }
.pl-plan-price {
  text-align: center; margin: 0 0 1.1rem; padding: .9rem 0;
  border-top: 1px dashed var(--pt-border); border-bottom: 1px dashed var(--pt-border);
}
.pl-plan-price .pl-price-num {
  font-family: 'Cairo', sans-serif; font-weight: 800; font-size: 2.6rem; line-height: 1;
  color: var(--brand); display: inline-flex; align-items: center; gap: .25rem;
}
.pl-plan-price .pl-price-num svg { width: .5em !important; height: .5em !important; }
.pl-plan-price .pl-price-was {
  display: block; color: var(--pt-text-2); text-decoration: line-through;
  font-weight: 600; font-size: 1rem; opacity: .7; margin-bottom: .1rem;
}
.pl-plan-price .pl-price-unit { display: block; color: var(--pt-text-2); font-size: .8rem; font-weight: 600; margin-top: .35rem; }
/* شارات ميزات السعر (خصم / فصلين) */
.pl-price-tags { display: flex; flex-direction: column; align-items: center; gap: .4rem; margin-top: .7rem; }
.pl-tag {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .74rem; font-weight: 700; padding: .28rem .7rem; border-radius: 999px; line-height: 1.4;
}
.pl-tag i { font-size: .9rem; }
.pl-tag-discount { background: rgba(34, 197, 94, .13); color: #15803D; border: 1px solid rgba(34, 197, 94, .28); }
.pl-tag-dbl      { background: rgba(var(--brand-rgb), .12); color: var(--brand-hover); border: 1px solid rgba(var(--brand-rgb), .3); }
.pl-tag-extra    { background: rgba(245, 158, 11, .13); color: #B45309; border: 1px solid rgba(245, 158, 11, .3); }
.pl-tag-extra svg { vertical-align: -2px; }
html.dark-style .pl-tag-extra { color: #FBBF24; }
/* انتهاء العرض — مدموج داخل شارة الخصم (امتداد بفاصل) */
.pl-tag { flex-wrap: wrap; justify-content: center; }
.pl-tag-until {
  display: inline-flex; align-items: center; gap: .25rem;
  margin-inline-start: .35rem; padding-inline-start: .45rem;
  border-inline-start: 1px solid currentColor;
  font-weight: 800; opacity: .9;
}
.pl-tag-until i { font-size: .95em; }
html.dark-style .pl-tag-discount { color: #4ADE80; }
.pl-plan-features { list-style: none; margin: 0 0 1.25rem; padding: 0; flex: 1 1 auto; }
.pl-plan-features li {
  display: flex; align-items: flex-start; gap: .5rem; padding: .4rem 0;
  color: var(--pt-text); font-size: .9rem; border-bottom: 1px solid var(--pt-border);
}
.pl-plan-features li:last-child { border-bottom: 0; }
.pl-plan-features li::before {
  content: "\2713"; flex: 0 0 auto; margin-top: .05rem;
  width: 18px; height: 18px; border-radius: 50%; font-size: .7rem; font-weight: 900;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(var(--brand-rgb), .12); color: var(--brand-hover);
}
.pl-plan-actions { display: grid; gap: .5rem; margin-top: auto; }
.pl-plan-actions .btn { font-weight: 700; border-radius: var(--pt-radius-sm); padding: .7rem 1rem; }

@media (prefers-reduced-motion: reduce) { .pl-plan:hover { transform: none; } }

/* ---------------------------------------------------------------------
   UX polish: stable spacing below the fixed navbar and calmer plan cards
   --------------------------------------------------------------------- */

html {
  scroll-padding-top: 104px;
  scroll-behavior: smooth;
}

.pl-wrap.bg-body,
.pl-wrap {
  position: relative;
  overflow: hidden;
  padding-top: 6.35rem;
  background:
    radial-gradient(620px 420px at calc(100% + 90px) -110px,
      rgba(201, 121, 36, .12) 0,
      rgba(217, 148, 74, .065) 38%,
      transparent 72%),
    radial-gradient(560px 380px at -120px -70px,
      rgba(56, 81, 79, .075) 0,
      rgba(201, 121, 36, .045) 42%,
      transparent 76%),
    linear-gradient(180deg, #FFFFFF 0%, #FFFFFF 42%, var(--pt-surface) 100%) !important;
}

.pl-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(260px 220px at calc(100% + 18px) 18px, rgba(201, 121, 36, .055), transparent 74%),
    radial-gradient(230px 210px at -18px 24px, rgba(56, 81, 79, .045), transparent 76%);
}

html.dark-style .pl-wrap.bg-body,
html.dark-style .pl-wrap,
[data-theme='theme-default-dark'] .pl-wrap.bg-body,
[data-theme='theme-default-dark'] .pl-wrap {
  background:
    radial-gradient(620px 420px at calc(100% + 90px) -110px,
      rgba(201, 121, 36, .13) 0,
      rgba(217, 148, 74, .07) 38%,
      transparent 72%),
    radial-gradient(560px 380px at -120px -70px,
      rgba(78, 109, 106, .10) 0,
      rgba(201, 121, 36, .05) 42%,
      transparent 76%),
    linear-gradient(180deg, #2B3044 0%, #2B3044 42%, #24283A 100%) !important;
}

.pl-hero,
.pl-portfolio,
.pl-twosem,
.pl-plan {
  -webkit-tap-highlight-color: transparent;
}

.pl-hero .btn,
.pl-portfolio .btn,
.pl-plan-actions .btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pl-plan:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(16, 24, 40, .09);
}

.pl-plan:focus-within {
  border-color: rgba(var(--brand-rgb), .38);
  box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .10);
}

.pl-plan-desc,
.pl-twosem-text,
.pl-portfolio-sub,
.pl-tag {
  overflow-wrap: anywhere;
}

.pl-plan:not(.pl-plan--popular) .pl-plan-price {
  margin-bottom: .85rem;
}

.pl-plan:not(.pl-plan--popular) .pl-plan-actions {
  margin-top: 1rem;
}

.pl-plan-features:empty,
.pl-plan-desc:empty {
  display: none;
}

@media (min-width: 992px) and (max-width: 1399.98px) {
  .layout-navbar > .container,
  .pl-container {
    max-width: min(1280px, calc(100% - 32px));
  }

  .landing-navbar .navbar-nav .nav-link {
    white-space: nowrap;
    font-size: .92rem;
    padding-inline: .55rem;
  }

  .landing-navbar .navbar-nav {
    gap: .1rem;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .pl-wrap {
    padding-top: 6rem;
  }

  .pl-hero {
    margin-top: 0;
  }

  .pl-plans {
    gap: 1rem;
  }

  .pl-plan {
    padding: 1.45rem 1.25rem;
  }
}

@media (max-width: 767.98px) {
  html {
    scroll-padding-top: 88px;
  }

  .pl-wrap {
    padding-top: 5.75rem;
  }

  .pl-hero {
    align-items: stretch;
    margin-top: 0;
    margin-bottom: 1rem;
    padding: .9rem 1rem;
  }

  .pl-hero-main {
    align-items: flex-start;
  }

  .pl-hero-ic {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    font-size: 1.2rem;
  }

  .pl-hero-title {
    font-size: .95rem;
  }

  .pl-portfolio,
  .pl-twosem {
    margin-bottom: 1rem;
    padding: .9rem 1rem;
  }

  .pl-portfolio-info {
    align-items: flex-start;
  }

  .pl-portfolio .btn {
    width: 100%;
  }

  .pl-plans {
    gap: 1rem;
  }

  .pl-plan {
    padding: 1.25rem 1.05rem;
  }

  .pl-plan-price {
    padding: .7rem 0;
  }

  .pl-plan-price .pl-price-num {
    font-size: 2.25rem;
  }
}

@media (hover: none) {
  .pl-plan:hover {
    transform: none;
  }
}
