body {
  font-family: "Inter", sans-serif;
  background-color: #f5f5f4;
}

.chart-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  height: 300px;
  max-height: 400px;
}
@media (min-width: 768px) {
  .chart-container {
    height: 350px;
  }
}

.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.active-card {
  border: 2px solid #0f766e;
  background-color: #f0fdfa;
}

/* =========================
   ✅ TOGGLE (FIXED)
   - Pure CSS (no @apply)
   - Works with LTR/RTL
========================= */
.toggle-wrap {
  position: relative;
  width: 48px; /* track width */
  height: 28px; /* track height */
  display: inline-block;
  vertical-align: middle;
}

/* hide checkbox but keep it clickable via label */
.toggle-checkbox {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
  z-index: 2;
}

.toggle-label {
  position: absolute;
  inset: 0;
  background: #d6d3d1; /* stone-300 */
  border-radius: 999px;
  transition: background-color 0.2s ease;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

/* thumb */
.toggle-label::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
  transition: transform 0.22s ease;
  will-change: transform;
}

/* checked state */
.toggle-checkbox:checked + .toggle-label {
  background: #0f766e; /* teal-700 */
}

/* move thumb in LTR */
html[dir="ltr"] .toggle-checkbox:checked + .toggle-label::before {
  transform: translateX(20px);
}

/* =========================
   ✅ TOGGLE - USING LEFT PROPERTY
========================= */

/* حالة غير محددة (Challenge) */
.toggle-label::before {
  left: 3px;
  right: auto;
}

/* حالة محددة (Solution) - LTR */
.toggle-checkbox:checked + .toggle-label::before {
  left: calc(100% - 45px); /* 48px - 22px - 1px */
  right: auto;
}

/* حالة محددة (Solution) - RTL */
html[dir="rtl"] .toggle-checkbox:checked + .toggle-label::before {
  left: 3px;
  right: auto;
}

html[dir="rtl"] .toggle-checkbox:not(:checked) + .toggle-label::before {
  left: calc(100% - 25px);
  right: auto;
}
/* =========================
   Lightbox
========================= */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
}
.lightbox.open {
  display: flex;
}
.lightbox-inner {
  max-width: 1100px;
  width: 100%;
  background: transparent;
  position: relative;
}
.lightbox-img {
  width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.35);
}
.lightbox-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  display: grid;
  place-items: center;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
html[dir="rtl"] .lightbox-close {
  right: auto;
  left: -12px;
}

/* =========================
   Tabs
========================= */
.tab-btn {
  font-size: 12px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #e7e5e4;
  background: #fafaf9;
  color: #57534e;
  transition: all 0.15s ease;
}
.tab-btn:hover {
  background: #f0fdfa;
  color: #0f766e;
  border-color: #99f6e4;
}
.tab-btn.active {
  background: #0f766e;
  color: #fff;
  border-color: #0f766e;
}

/* =========================
   Slider
========================= */
.slider-shell {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid #e7e5e4;
  background: #fff;
}
.slider-track {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  transition: transform 0.35s ease;
}

.slider-slide {
  flex: 0 0 100%;
  width: 100%;
  background: #fff;
}
.slider-slide img {
  width: 100%;
  height: 320px;
  object-fit: contain;
  display: block;
  background: #fff;
}
@media (min-width: 1024px) {
  .slider-slide img {
    height: 360px;
  }
}

.slider-nav {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  padding: 12px;
}
.slider-btn {
  pointer-events: auto;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.92);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.slider-btn:hover {
  transform: scale(1.03);
}

.slider-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  color: #78716c;
  font-size: 12px;
}

/* =========================
   Accordion
========================= */
.acc-item {
  border: 1px solid #e7e5e4;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.acc-btn {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
}
.acc-title {
  font-weight: 800;
  color: #1c1917;
  font-size: 13px;
}
.acc-body {
  padding: 0 14px 12px 14px;
  color: #57534e;
  font-size: 13px;
  line-height: 1.6;
  display: none;
}
.acc-item.open .acc-body {
  display: block;
}
.acc-item.open .acc-icon {
  transform: rotate(180deg);
}
.acc-icon {
  transition: transform 0.15s ease;
}
html[dir="rtl"] .acc-btn {
  text-align: right;
}
/* =========================
   🔧 Screenshots as vertical stack (ALL modules)
========================= */

/* ألغِ فكرة السلايدر */
.slider-track {
  display: block;
  transform: none !important;
}

/* كل صورة تأخذ عرض كامل وتجي تحت اللي قبلها */
.slider-slide {
  width: 100%;
  margin-bottom: 10px;
}

/* تحسين شكل الصور */
.slider-slide img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid #e7e5e4;
}
