/**
 * عدد يوم التأسيس – قائمة سحب أفقية (مثل المقالات التاريخية)
 * ألوان وأنيميشنات وجماليات يوم التأسيس السعودي
 */
/* ألوان يوم التأسيس */
.lane-foundation {
  --fd-earth: #DEC9B2;
  --fd-clarity: #F4EADA;
  --fd-resolution: #231f20;
  --fd-authenticity: #6B4E45;
  --fd-gold: #F5D758;
  --fd-warm: #BA7747;
  --fd-gold-soft: rgba(245, 215, 88, 0.18);
  --fd-border: rgba(107, 78, 69, 0.22);
}

/* القسم: خلفية وجمالية */
.lane-foundation {
  position: relative;
  margin: 28px 0 !important;
  padding: 24px 0 20px;
  background: linear-gradient(165deg, #FDFBF8 0%, #F4EADA 30%, #EDE4D8 70%, #E8DED2 100%);
  border-radius: 16px;
  border: 1px solid var(--fd-border);
  box-shadow: 0 4px 24px rgba(107, 78, 69, 0.08), inset 0 1px 0 rgba(255,255,255,0.6);
  overflow: hidden;
}

.lane-foundation::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--fd-authenticity), var(--fd-warm), var(--fd-gold));
  opacity: 0.95;
}

/* عنوان القسم + شارة ٢٢ فبراير */
.lane-foundation-title {
  display: inline-flex !important;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 16px !important;
  padding: 0 4px;
  color: var(--fd-resolution) !important;
  font-size: 1.2rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.01em;
}

.lane-foundation-badge {
  display: inline-block;
  padding: 4px 12px;
  background: linear-gradient(135deg, var(--fd-authenticity), var(--fd-warm));
  color: #fff !important;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 20px;
  box-shadow: 0 2px 10px rgba(107, 78, 69, 0.3);
  animation: fd-badge-pulse 3s ease-in-out infinite;
}

@keyframes fd-badge-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 2px 10px rgba(107, 78, 69, 0.3); }
  50% { opacity: 0.92; box-shadow: 0 2px 14px rgba(186, 119, 71, 0.4); }
}

/* تاغ المقالات */
.tag-foundation {
  background: rgba(107, 78, 69, 0.12) !important;
  color: var(--fd-authenticity) !important;
  font-weight: 700 !important;
}

/* البطاقات – إطار وظل بألوان التأسيس */
.lane-foundation .foundation-card {
  background: #fff !important;
  border: 1px solid var(--fd-border) !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 12px rgba(107, 78, 69, 0.08) !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.2s ease !important;
}

.lane-foundation .foundation-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px var(--fd-gold-soft), 0 2px 12px rgba(107, 78, 69, 0.12) !important;
  border-color: var(--fd-warm) !important;
}

.foundation-card-image {
  border-radius: 12px 12px 0 0 !important;
  overflow: hidden !important;
  border-bottom: 1px solid var(--fd-border) !important;
}

.lane-foundation .foundation-card .content h4 {
  color: var(--fd-resolution) !important;
  font-weight: 700 !important;
}

.lane-foundation .foundation-card .content .muted {
  color: var(--fd-authenticity) !important;
}

/* بطاقة "جميع مقالات العدد" */
.foundation-card-more .card-image-wrap {
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(107, 78, 69, 0.08), rgba(186, 119, 71, 0.12));
}

.foundation-card-more .foundation-more-icon {
  font-size: 2.5rem;
  line-height: 1;
}

/* أنيميشن ظهور عند التمرير (مع reveal) */
.lane-foundation.reveal.is-visible .lane-foundation-title {
  animation: fd-fade-up 0.5s ease forwards;
}

.lane-foundation.reveal.is-visible .foundation-card {
  animation: fd-card-in 0.5s ease backwards;
}

.lane-foundation.reveal.is-visible .foundation-card:nth-child(1) { animation-delay: 0.05s; }
.lane-foundation.reveal.is-visible .foundation-card:nth-child(2) { animation-delay: 0.1s; }
.lane-foundation.reveal.is-visible .foundation-card:nth-child(3) { animation-delay: 0.15s; }
.lane-foundation.reveal.is-visible .foundation-card:nth-child(4) { animation-delay: 0.2s; }
.lane-foundation.reveal.is-visible .foundation-card:nth-child(5) { animation-delay: 0.25s; }
.lane-foundation.reveal.is-visible .foundation-card:nth-child(6) { animation-delay: 0.3s; }
.lane-foundation.reveal.is-visible .foundation-card:nth-child(7) { animation-delay: 0.35s; }
.lane-foundation.reveal.is-visible .foundation-card:nth-child(8) { animation-delay: 0.4s; }
.lane-foundation.reveal.is-visible .foundation-card:nth-child(9) { animation-delay: 0.45s; }
.lane-foundation.reveal.is-visible .foundation-card:nth-child(10) { animation-delay: 0.5s; }
.lane-foundation.reveal.is-visible .foundation-card:nth-child(11) { animation-delay: 0.55s; }

@keyframes fd-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fd-card-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* الوضع الداكن */
[data-theme="dark"] .lane-foundation {
  background: linear-gradient(165deg, #2a2320 0%, #352b26 50%, #3d322c 100%);
  border-color: rgba(186, 119, 71, 0.35);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

[data-theme="dark"] .lane-foundation::before {
  background: linear-gradient(90deg, var(--fd-warm), var(--fd-gold));
}

[data-theme="dark"] .lane-foundation-title {
  color: var(--fd-clarity) !important;
}

[data-theme="dark"] .lane-foundation .foundation-card {
  background: #2a2320 !important;
  border-color: rgba(186, 119, 71, 0.3) !important;
}

[data-theme="dark"] .lane-foundation .foundation-card:hover {
  border-color: var(--fd-gold) !important;
  box-shadow: 0 8px 28px rgba(245, 215, 88, 0.15) !important;
}

[data-theme="dark"] .lane-foundation .foundation-card .content h4 {
  color: var(--fd-clarity) !important;
}

[data-theme="dark"] .lane-foundation .foundation-card .content .muted {
  color: var(--fd-earth) !important;
}

[data-theme="dark"] .tag-foundation {
  background: rgba(186, 119, 71, 0.2) !important;
  color: var(--fd-gold) !important;
}

/* موبايل: شريط تمرير بألوان يوم التأسيس */
@media (max-width: 640px) {
  .lane-foundation .grid::-webkit-scrollbar-track {
    background: rgba(107, 78, 69, 0.1) !important;
  }
  .lane-foundation .grid::-webkit-scrollbar-thumb {
    background: var(--fd-warm) !important;
    border-radius: 3px !important;
  }
}
