/* نظام الألوان المتقدم للخطط مع تدرجات لونية */
:root {
  /* الخطة 1 - أزرق سماوي */
  --plan-1-color: #3d8aff;
  --plan-1-bg: linear-gradient(135deg, #f5f9ff 0%, #e6f0ff 100%);
  --plan-1-border: #3d8aff;
  --plan-1-btn: linear-gradient(to right, #3d8aff, #5aa0ff);
  --plan-1-text: #1a3b7a;
  --plan-1-shadow: 0 8px 24px rgba(61, 138, 255, 0.2);
  
  /* الخطة 2 - أخضر نيون */
  --plan-2-color: #28c76f;
  --plan-2-bg: linear-gradient(135deg, #f5fff9 0%, #e6ffee 100%);
  --plan-2-border: #28c76f;
  --plan-2-btn: linear-gradient(to right, #28c76f, #3ddb84);
  --plan-2-text: #1a7a3b;
  --plan-2-shadow: 0 8px 24px rgba(40, 199, 111, 0.2);
  
  /* الخطة 3 - برتقالي مشع */
  --plan-3-color: #ff9f43;
  --plan-3-bg: linear-gradient(135deg, #fff9f5 0%, #fff0e6 100%);
  --plan-3-border: #ff9f43;
  --plan-3-btn: linear-gradient(to right, #ff9f43, #ffb168);
  --plan-3-text: #7a4a1a;
  --plan-3-shadow: 0 8px 24px rgba(255, 159, 67, 0.2);
  
  /* الخطة 4 - أحمر وردي */
  --plan-4-color: #ea5455;
  --plan-4-bg: linear-gradient(135deg, #fff5f5 0%, #ffe6e6 100%);
  --plan-4-border: #ea5455;
  --plan-4-btn: linear-gradient(to right, #ea5455, #ff6b6b);
  --plan-4-text: #7a1a1a;
  --plan-4-shadow: 0 8px 24px rgba(234, 84, 85, 0.2);
  
  /* الخطة 5 - بنفسجي لافندر */
  --plan-5-color: #9066ff;
  --plan-5-bg: linear-gradient(135deg, #f9f5ff 0%, #ede6ff 100%);
  --plan-5-border: #9066ff;
  --plan-5-btn: linear-gradient(to right, #9066ff, #a585ff);
  --plan-5-text: #4a1a7a;
  --plan-5-shadow: 0 8px 24px rgba(144, 102, 255, 0.2);
  
  /* الخطة المميزة - تدرج ذهبي */
  --featured-color: #ff7000;
  --featured-bg: linear-gradient(135deg, #fff5f0 0%, #ffebdf 100%);
  --featured-border: linear-gradient(to right, #ff7000, #ff9d00);
  --featured-btn: linear-gradient(to right, #ff7000, #ff8a00);
  --featured-text: #7a3b1a;
  --featured-shadow: 0 8px 24px rgba(255, 112, 0, 0.3);
  
  /* العناصر العامة */
  --border-radius: 16px;
  --box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
  --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  --hover-elevation: 0 16px 32px rgba(0, 0, 0, 0.15);
}

/* تصميم عام للخطة مع تأثيرات متقدمة */
.plan-item {
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 0;
  margin-bottom: 30px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
  background-clip: padding-box;
  z-index: 1;
}

/* تأثير زجاجي خفيف للخطة */
.plan-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(5px);
  z-index: -1;
  opacity: 0;
  transition: var(--transition);
}

.plan-item:hover::before {
  opacity: 1;
}

/* ألوان الخلفية لكل خطة مع تدرجات */
.plan-item.style--two:nth-child(1) {
  background: var(--plan-1-bg);
  border-color: var(--plan-1-border);
  box-shadow: var(--plan-1-shadow);
}
.plan-item.style--two:nth-child(2) {
  background: var(--plan-2-bg);
  border-color: var(--plan-2-border);
  box-shadow: var(--plan-2-shadow);
}
.plan-item.style--two:nth-child(3) {
  background: var(--plan-3-bg);
  border-color: var(--plan-3-border);
  box-shadow: var(--plan-3-shadow);
}
.plan-item.style--two:nth-child(4) {
  background: var(--plan-4-bg);
  border-color: var(--plan-4-border);
  box-shadow: var(--plan-4-shadow);
}
.plan-item.style--two:nth-child(5) {
  background: var(--plan-5-bg);
  border-color: var(--plan-5-border);
  box-shadow: var(--plan-5-shadow);
}

/* رأس الخطة مع تأثيرات متقدمة */
.plan-item__header {
  padding: 30px 25px;
  border-bottom: 1px dashed rgba(0,0,0,0.1);
  position: relative;
}

/* تأثير دائري زخرفي في الخلفية */
.plan-item__header::after {
  content: '';
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  opacity: 0.1;
  z-index: -1;
  transition: var(--transition);
}

.plan-item.style--two:nth-child(1) .plan-item__header::after {
  background: var(--plan-1-color);
  top: -50px;
  right: -50px;
}
.plan-item.style--two:nth-child(2) .plan-item__header::after {
  background: var(--plan-2-color);
  top: -50px;
  right: -50px;
}
.plan-item.style--two:nth-child(3) .plan-item__header::after {
  background: var(--plan-3-color);
  top: -50px;
  right: -50px;
}
.plan-item.style--two:nth-child(4) .plan-item__header::after {
  background: var(--plan-4-color);
  top: -50px;
  right: -50px;
}
.plan-item.style--two:nth-child(5) .plan-item__header::after {
  background: var(--plan-5-color);
  top: -50px;
  right: -50px;
}

.plan-item:hover .plan-item__header::after {
  transform: scale(1.2);
}

/* عنوان الخطة مع تأثيرات نصية */
.plan-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 15px;
  position: relative;
  display: inline-block;
  padding-bottom: 8px;
  letter-spacing: -0.5px;
}

.plan-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  border-radius: 3px;
  transition: var(--transition);
}

.plan-item.style--two:nth-child(1) .plan-title {
  color: var(--plan-1-color);
}
.plan-item.style--two:nth-child(1) .plan-title::after {
  background: var(--plan-1-color);
}

.plan-item.style--two:nth-child(2) .plan-title {
  color: var(--plan-2-color);
}
.plan-item.style--two:nth-child(2) .plan-title::after {
  background: var(--plan-2-color);
}

.plan-item.style--two:nth-child(3) .plan-title {
  color: var(--plan-3-color);
}
.plan-item.style--two:nth-child(3) .plan-title::after {
  background: var(--plan-3-color);
}

.plan-item.style--two:nth-child(4) .plan-title {
  color: var(--plan-4-color);
}
.plan-item.style--two:nth-child(4) .plan-title::after {
  background: var(--plan-4-color);
}

.plan-item.style--two:nth-child(5) .plan-title {
  color: var(--plan-5-color);
}
.plan-item.style--two:nth-child(5) .plan-title::after {
  background: var(--plan-5-color);
}

.plan-item:hover .plan-title::after {
  width: 100%;
}

/* سعر الخطة مع تأثيرات متحركة */
.plan-rate {
  position: relative;
}

.plan-rate .rate {
  font-size: 2.8rem;
  font-weight: 900;
  margin: 15px 0;
  display: inline-block;
  background-clip: text;
  -webkit-background-clip: text;
  position: relative;
  transition: var(--transition);
}

.plan-item.style--two:nth-child(1) .rate {
  background-image: linear-gradient(to right, #3d8aff, #5aa0ff);
  color: transparent;
}
.plan-item.style--two:nth-child(2) .rate {
  background-image: linear-gradient(to right, #28c76f, #3ddb84);
  color: transparent;
}
.plan-item.style--two:nth-child(3) .rate {
  background-image: linear-gradient(to right, #ff9f43, #ffb168);
  color: transparent;
}
.plan-item.style--two:nth-child(4) .rate {
  background-image: linear-gradient(to right, #ea5455, #ff6b6b);
  color: transparent;
}
.plan-item.style--two:nth-child(5) .rate {
  background-image: linear-gradient(to right, #9066ff, #a585ff);
  color: transparent;
}

.plan-rate .period {
  font-size: 1rem;
  color: #666;
  font-weight: 500;
}

/* جسم الخطة مع تأثيرات تفاعلية */
.plan-item__body {
  padding: 30px 25px;
  position: relative;
}

.list-style-three {
  margin: 0;
  padding: 0;
  list-style: none;
}

.list-style-three li {
  padding: 14px 0;
  border-bottom: 1px dashed rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.list-style-three li:hover {
  transform: translateX(5px);
}

.list-style-three li:last-child {
  border-bottom: none;
}

.list-style-three .label {
  font-weight: 600;
  position: relative;
  padding-right: 20px;
}

.list-style-three .label::before {
  content: '•';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  line-height: 1;
}

.plan-item.style--two:nth-child(1) .label {
  color: var(--plan-1-text);
}
.plan-item.style--two:nth-child(1) .label::before {
  color: var(--plan-1-color);
}

.plan-item.style--two:nth-child(2) .label {
  color: var(--plan-2-text);
}
.plan-item.style--two:nth-child(2) .label::before {
  color: var(--plan-2-color);
}

.plan-item.style--two:nth-child(3) .label {
  color: var(--plan-3-text);
}
.plan-item.style--two:nth-child(3) .label::before {
  color: var(--plan-3-color);
}

.plan-item.style--two:nth-child(4) .label {
  color: var(--plan-4-text);
}
.plan-item.style--two:nth-child(4) .label::before {
  color: var(--plan-4-color);
}

.plan-item.style--two:nth-child(5) .label {
  color: var(--plan-5-text);
}
.plan-item.style--two:nth-child(5) .label::before {
  color: var(--plan-5-color);
}

.list-style-three .value {
  font-weight: 700;
  background: white;
  padding: 4px 12px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* زر الاستثمار مع تأثيرات متقدمة */
.plan-btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  color: white;
  transition: var(--transition);
  font-size: 1.1rem;
  position: relative;
  overflow: hidden;
  z-index: 1;
  margin-top: 20px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.plan-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: var(--transition);
  z-index: -1;
}

.plan-item.style--two:nth-child(1) .plan-btn {
  background: var(--plan-1-btn);
  box-shadow: 0 6px 20px rgba(61, 138, 255, 0.4);
}
.plan-item.style--two:nth-child(1) .plan-btn::before {
  background: linear-gradient(to right, #5aa0ff, #3d8aff);
}

.plan-item.style--two:nth-child(2) .plan-btn {
  background: var(--plan-2-btn);
  box-shadow: 0 6px 20px rgba(40, 199, 111, 0.4);
}
.plan-item.style--two:nth-child(2) .plan-btn::before {
  background: linear-gradient(to right, #3ddb84, #28c76f);
}

.plan-item.style--two:nth-child(3) .plan-btn {
  background: var(--plan-3-btn);
  box-shadow: 0 6px 20px rgba(255, 159, 67, 0.4);
}
.plan-item.style--two:nth-child(3) .plan-btn::before {
  background: linear-gradient(to right, #ffb168, #ff9f43);
}

.plan-item.style--two:nth-child(4) .plan-btn {
  background: var(--plan-4-btn);
  box-shadow: 0 6px 20px rgba(234, 84, 85, 0.4);
}
.plan-item.style--two:nth-child(4) .plan-btn::before {
  background: linear-gradient(to right, #ff6b6b, #ea5455);
}

.plan-item.style--two:nth-child(5) .plan-btn {
  background: var(--plan-5-btn);
  box-shadow: 0 6px 20px rgba(144, 102, 255, 0.4);
}
.plan-item.style--two:nth-child(5) .plan-btn::before {
  background: linear-gradient(to right, #a585ff, #9066ff);
}

.plan-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.2);
}

.plan-btn:hover::before {
  opacity: 1;
}

/* تأثير النبض عند التحويم */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.plan-btn:hover {
  animation: pulse 1.5s infinite;
}

/* الخطة المميزة مع تأثيرات خاصة */
.plan-item.featured {
  background: var(--featured-bg) !important;
  border-image: var(--featured-border);
  border-image-slice: 1;
  box-shadow: var(--featured-shadow) !important;
  transform: scale(1.02);
}

.plan-item.featured .plan-title {
  color: var(--featured-color) !important;
}

.plan-item.featured .plan-title::after {
  background: var(--featured-color) !important;
}

.plan-item.featured .rate {
  background-image: linear-gradient(to right, #ff7000, #ff9d00) !important;
  color: transparent !important;
}

.plan-item.featured .plan-btn {
  background: var(--featured-btn) !important;
  box-shadow: 0 8px 24px rgba(255, 112, 0, 0.5) !important;
}

.plan-item.featured .plan-btn::before {
  background: linear-gradient(to right, #ff8a00, #ff7000) !important;
}

.plan-item.featured:hover {
  transform: scale(1.05) translateY(-5px);
}

.plan-item.featured::after {
  content: 'مميزة';
  position: absolute;
  top: 20px;
  right: -40px;
  background: var(--featured-btn);
  color: white;
  padding: 6px 45px;
  transform: rotate(45deg);
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  z-index: 2;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
  letter-spacing: 1px;
}

/* تأثيرات التحويم العامة */
.plan-item:hover {
  transform: translateY(-10px);
  box-shadow: var(--hover-elevation);
}

/* شريط التمرير المخصص */
.plan-item__body::-webkit-scrollbar {
  width: 6px;
}

.plan-item__body::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.05);
  border-radius: 10px;
}

.plan-item__body::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.1);
  border-radius: 10px;
}

.plan-item__body::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,0.2);
}

/* التصميم للجوال */
@media (max-width: 767px) {
  .plan-item {
    margin-bottom: 25px;
    border-radius: 12px;
  }
  
  .plan-item__header,
  .plan-item__body {
    padding: 20px;
  }
  
  .plan-title {
    font-size: 1.4rem;
  }
  
  .plan-rate .rate {
    font-size: 2.2rem;
  }
  
  .plan-item.featured::after {
    right: -35px;
    padding: 5px 35px;
    font-size: 12px;
    top: 15px;
  }
  
  .plan-btn {
    padding: 14px;
    font-size: 1rem;
  }
}

/* تأثيرات إضافية للتركيز */
.plan-item:focus-within {
  outline: 2px dashed rgba(0,0,0,0.3);
  outline-offset: 5px;
}

/* رسوم متحركة للظهور */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.plan-item {
  animation: fadeInUp 0.6s ease-out forwards;
}

.plan-item:nth-child(1) { animation-delay: 0.1s; }
.plan-item:nth-child(2) { animation-delay: 0.2s; }
.plan-item:nth-child(3) { animation-delay: 0.3s; }
.plan-item:nth-child(4) { animation-delay: 0.4s; }
.plan-item:nth-child(5) { animation-delay: 0.5s; }