/* =========================================
   Features Section (Bento Grid)
   ========================================= */
.features { 
  background: var(--bg-main); 
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 1.2rem;
}

.bento-card {
  background: var(--bg-white);
  border-radius: 24px;
  padding: 1.8rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(27, 39, 53, 0.06);
  border: 1px solid rgba(30, 111, 142, 0.08);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
}

.bento-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 45px rgba(27, 39, 53, 0.14);
}

/* أحجام البطاقات */
.bento-large { grid-column: span 2; grid-row: span 2; }
.bento-small { grid-column: span 1; grid-row: span 1; }
.bento-wide { grid-column: span 2; grid-row: span 1; }

/* ألوان البطاقات المميزة */
.bento-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  border: none;
  justify-content: space-between; /* توزيع العناصر لملء المساحة */
}

.bento-secondary {
  background: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-dark));
  border: none;
}

/* نصوص البطاقة الزرقاء (Primary) */
.bento-primary h3 { color: #ffffff; }
.bento-primary p { color: rgba(255, 255, 255, 0.9); }
.bento-primary .bento-icon { background: rgba(255, 255, 255, 0.2); color: #ffffff; }

/* نصوص البطاقة الذهبية (Secondary) */
.bento-secondary h3 { color: var(--bg-dark); }
.bento-secondary p { color: rgba(21, 34, 48, 0.8); }
.bento-secondary .bento-icon { background: rgba(255, 255, 255, 0.3); color: var(--bg-dark); }

/* أيقونات البطاقات */
.bento-icon {
  position: absolute;
  top: 1.4rem;
  inset-inline-end: 1.4rem;
  width: 52px; height: 52px;
  display: grid;
  place-items: center;
  background: var(--bg-alt);
  color: var(--color-primary);
  border-radius: 14px;
}

.bento-icon svg { width: 26px; height: 26px; }

/* نصوص البطاقات العادية */
.bento-card h3 { font-size: 1.15rem; color: var(--text-main); margin-bottom: 0.5rem; }
.bento-card p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.7; }

/* تخصيص البطاقة الكبيرة */
.bento-large { padding: 2rem; }
.bento-large .bento-icon {
  position: relative; /* لجعلها تظهر في الأعلى وليس فوق النص */
  top: auto; inset-inline-end: auto;
  width: 60px; height: 60px;
  margin-bottom: 1rem;
  border-radius: 16px;
}
.bento-large h3 { font-size: 1.6rem; margin-bottom: 0.8rem; }
.bento-large p { font-size: 1.05rem; line-height: 1.7; margin-bottom: 1.5rem; }

/* قائمة المزايا داخل البطاقة الكبيرة */
.bento-content { display: flex; flex-direction: column; }

.bento-content p{ color: #ffffff; }

.bento-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.8rem;
}

.bento-list li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 500;
}

.bento-list li::before {
  content: "✓";
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.8rem;
  flex-shrink: 0;
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 900px) {
  .bento-grid { 
    grid-template-columns: repeat(2, 1fr); 
    grid-auto-rows: 180px; 
  }
  .bento-large { grid-column: span 2; grid-row: span 2; }
  .bento-wide { grid-column: span 2; }
}

@media (max-width: 640px) {
  .bento-grid { 
    grid-template-columns: 1fr; 
    grid-auto-rows: auto; 
  }
  .bento-large, .bento-wide, .bento-small { 
    grid-column: span 1; 
    grid-row: span 1; 
  }
  .bento-card { 
    padding: 1.5rem 1.2rem; 
    min-height: 160px; 
  }
  .bento-icon { 
    width: 44px; height: 44px; 
    top: 1rem; inset-inline-end: 1rem; 
  }
  .bento-icon svg { width: 22px; height: 22px; }
  
  .bento-large { justify-content: flex-start; padding: 1.8rem 1.5rem; }
  .bento-large .bento-icon { width: 50px; height: 50px; margin-bottom: 0.8rem; }
  .bento-large h3 { font-size: 1.35rem; }
  .bento-large p { font-size: 0.95rem; margin-bottom: 1.2rem; }
  .bento-list { gap: 0.6rem; }
  .bento-list li { font-size: 0.88rem; }
}