/* ============================================================
   SULAYMAN COFFEE — cert.css  v3  (Certified Stamp)
   شعار SCA الرسمي + تصميم الطابع
   ============================================================ */

/* ══ SECTION ══ */
.cert-sec {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 360px;
  border-top: 1px solid rgba(34, 40, 51, 0.08);
  border-bottom: 1px solid rgba(34, 40, 51, 0.08);
  overflow: hidden;
}

/* ════════════════════════════════════════
   الجانب الأيمن — داكن + الطابع
════════════════════════════════════════ */
.cert-badge-wrap {
  background: #1a2230;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  padding: 3rem 2rem;
  position: relative;
  overflow: hidden;
}

/* توهج خلفي */
.cert-badge-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 45%,
    rgba(237, 97, 59, 0.09) 0%,
    transparent 68%
  );
  pointer-events: none;
}

/* الإطار الدائري الدوّار */
.cert-badge {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 2.5px dashed rgba(237, 97, 59, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  animation: cert-spin 28s linear infinite;
}

/* حلقة داخلية ثانية ثابتة */
.cert-badge::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(249, 230, 192, 0.1);
  animation: none;
}

/* الصورة — تعاكس دوران الإطار فتبقى ثابتة */
.cert-badge img {
  width: 148px;
  height: 148px;
  object-fit: contain;
  border-radius: 50%;
  position: relative;
  z-index: 1;
  animation: cert-spin-reverse 28s linear infinite;
  filter: brightness(1.05) drop-shadow(0 2px 14px rgba(237, 97, 59, 0.2));
}

@keyframes cert-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes cert-spin-reverse {
  to {
    transform: rotate(-360deg);
  }
}

/* النقاط الأربع على الحلقة */
.cert-badge-dots {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
}
.cert-badge-dots span {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #ed613b;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #1a2230;
}
.cert-badge-dots span:nth-child(1) {
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
}
.cert-badge-dots span:nth-child(2) {
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
}
.cert-badge-dots span:nth-child(3) {
  left: -4px;
  top: 50%;
  transform: translateY(-50%);
}
.cert-badge-dots span:nth-child(4) {
  right: -4px;
  top: 50%;
  transform: translateY(-50%);
}

/* النص تحت الشعار */
.cert-badge-lbl {
  font-family: 'IranSansX', sans-serif;
  font-size: 0.67rem;
  letter-spacing: 0.07em;
  color: rgba(249, 230, 192, 0.38);
  text-align: center;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

/* ════════════════════════════════════════
   الجانب الأيسر — بيج + النص
════════════════════════════════════════ */
.cert-content {
  background: var(--cream);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3.5rem 4rem 3.5rem 3rem;
}

.cert-tag {
  font-family: 'IranSansX', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  color: var(--org);
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}
.cert-tag::after {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--org);
  flex-shrink: 0;
}

.cert-title {
  font-family: 'Handicrafts', serif;
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  color: var(--dark);
  line-height: 1.25;
  margin-bottom: 0.9rem;
}

.cert-desc {
  font-family: 'IranSansX', sans-serif;
  font-size: 0.87rem;
  color: var(--dark);
  opacity: 0.62;
  line-height: 1.85;
  margin-bottom: 1.6rem;
}

.cert-details {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  border-top: 1px solid rgba(34, 40, 51, 0.1);
  padding-top: 1.3rem;
}

.cert-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'IranSansX', sans-serif;
  font-size: 0.82rem;
  color: var(--dark);
  opacity: 0.8;
}

.cert-row-icon {
  width: 26px;
  height: 26px;
  background: var(--org);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cert-row-icon svg {
  width: 13px;
  height: 13px;
  stroke: white;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ════════════════════════════════════════
   تابلت  769px – 1024px
════════════════════════════════════════ */
@media (max-width: 1024px) and (min-width: 769px) {
  .cert-sec {
    grid-template-columns: 220px 1fr;
  }
  .cert-content {
    padding: 2.5rem 2.5rem 2.5rem 2rem;
  }
  .cert-badge {
    width: 155px;
    height: 155px;
  }
  .cert-badge img {
    width: 125px;
    height: 125px;
  }
}

/* ════════════════════════════════════════
   موبايل  ≤ 768px
════════════════════════════════════════ */
@media (max-width: 768px) {
  .cert-sec {
    grid-template-columns: 1fr;
  }

  /* النص فوق */
  .cert-content {
    order: 1;
    padding: 2.5rem 5%;
  }

  /* الشعار تحت — صف أفقي */
  .cert-badge-wrap {
    order: 2;
    padding: 2rem 5%;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    min-height: 150px;
  }

  .cert-badge {
    width: 120px;
    height: 120px;
  }
  .cert-badge img {
    width: 96px;
    height: 96px;
  }

  .cert-badge-lbl {
    text-align: right;
    font-size: 0.7rem;
    max-width: 130px;
    line-height: 1.6;
  }

  .cert-title {
    font-size: clamp(1.35rem, 5vw, 1.7rem);
  }
  .cert-desc {
    font-size: 0.84rem;
  }
}

/* ════════════════════════════════════════
   تقليل الحركة
════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .cert-badge,
  .cert-badge img {
    animation: none;
  }
}
