/* ============================================================
   URDU AUDIO LIBRARY CTA BOXES — CSS
   Prefix: alibur__  (safe alongside the English alib__ version)
   ============================================================ */

/* ── 1. Vazirmatn Font ── */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap');

/* ── 2. Scoped reset ── */
.alibur__wrap *,
.alibur__wrap *::before,
.alibur__wrap *::after { box-sizing:border-box; margin:0; padding:0; }

/* ── 3. Main wrapper (RTL enabled here) ── */
.alibur__wrap {
  --alibur-primary: #4C726C;
  --alibur-dark:    #2a3f3c;
  --alibur-mid:     #3d5e59;
  --alibur-light:   #7aa8a2;
  --alibur-glow:    rgba(76,114,108,0.35);
  --alibur-radius:  22px;
  font-family: 'Vazirmatn', sans-serif;
  direction: rtl;               /* ← RTL: right-to-left layout */
  width: 100%;
  padding: 80px 24px 96px;
  background: #f7faf9;
  position: relative;
  overflow: hidden;
}

/* Top accent gradient line — flipped for RTL */
.alibur__wrap::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(
    to left,              /* ← RTL: was "to right" */
    transparent, var(--alibur-primary),
    var(--alibur-light), var(--alibur-primary), transparent
  );
}

/* ── 4. Section header ── */
.alibur__header {
  text-align: center;
  margin-bottom: 64px;
  position: relative;
  z-index: 1;
}
.alibur__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;       /* ← RTL: reduced letter-spacing (Urdu doesn't need wide spacing) */
  color: var(--alibur-light);
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.alibur__eyebrow::before,
.alibur__eyebrow::after {
  content: '';
  width: 28px;
  height: 1.5px;
  background: var(--alibur-light);
  border-radius: 2px;
}
.alibur__main-heading {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  color: var(--alibur-dark);
  line-height: 1.35;            /* ← RTL: slightly taller for Urdu ascenders */
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease 0.08s, transform 0.55s ease 0.08s;
}
.alibur__main-heading em {
  font-style: normal;
  color: var(--alibur-primary);
  position: relative;
}
.alibur__main-heading em::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(to left, var(--alibur-primary), var(--alibur-light)); /* ← RTL */
  border-radius: 2px;
}
.alibur__subtitle {
  margin-top: 16px;
  font-size: 15px;
  font-weight: 400;
  color: #6b8582;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.95;            /* ← RTL: taller line-height for Urdu readability */
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.55s ease 0.16s, transform 0.55s ease 0.16s;
}

/* ── 5. Grid ── */
.alibur__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ── 6. Card ── */
.alibur__card {
  background: #ffffff;
  border-radius: var(--alibur-radius);
  padding: 36px 26px 30px;
  border: 1.5px solid rgba(76,114,108,0.1);
  display: flex;
  flex-direction: column;
  align-items: flex-start;      /* flex-start = RIGHT in RTL — icon aligns right */
  position: relative;
  overflow: hidden;
  cursor: default;
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
  box-shadow: 0 2px 16px rgba(76,114,108,0.06);
}

/* Colored side bar — RTL: moved to RIGHT edge */
.alibur__card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;                     /* ← RTL: was left:0 */
  width: 4px;
  height: 0%;
  background: linear-gradient(to bottom, var(--alibur-primary), var(--alibur-light));
  border-radius: 0 var(--alibur-radius) var(--alibur-radius) 0; /* ← RTL: radius flipped */
  transition: height 0.4s ease;
}
/* Hover wash */
.alibur__card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(76,114,108,0.04) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.alibur__card:hover {
  border-color: rgba(76,114,108,0.28);
  box-shadow: 0 12px 40px rgba(76,114,108,0.14), 0 2px 8px rgba(76,114,108,0.08);
  transform: translateY(-7px) !important;
}
.alibur__card:hover::before { height: 100%; }
.alibur__card:hover::after  { opacity: 1; }

/* ── 7. Scroll-in visible state ── */
.alibur__eyebrow.alibur__vis,
.alibur__main-heading.alibur__vis,
.alibur__subtitle.alibur__vis,
.alibur__card.alibur__vis {
  opacity: 1;
  transform: translateY(0);
}

/* ── 8. Number badge — RTL: moved to LEFT corner ── */
.alibur__num {
  position: absolute;
  top: 14px;
  left: 18px;                   /* ← RTL: was right:18px */
  font-size: 11px;
  font-weight: 700;
  /* Numbers use Poppins so digits stay clean; fallback to Vazirmatn */
  font-family: 'Poppins', 'Vazirmatn', sans-serif;
  color: rgba(76,114,108,0.2);
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
}
.alibur__card:hover .alibur__num { color: rgba(76,114,108,0.45); }

/* ── 9. Icon box ── */
.alibur__icon {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(76,114,108,0.1), rgba(76,114,108,0.05));
  border: 1.5px solid rgba(76,114,108,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  flex-shrink: 0;
  transition:
    background 0.35s ease,
    transform 0.35s cubic-bezier(0.34,1.56,0.64,1),
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}
.alibur__card:hover .alibur__icon {
  background: linear-gradient(135deg, var(--alibur-primary), var(--alibur-mid));
  border-color: transparent;
  transform: scale(1.1) rotate(4deg);  /* ← RTL: was -4deg, mirrored */
  box-shadow: 0 6px 22px var(--alibur-glow);
}
.alibur__icon svg {
  stroke: var(--alibur-primary);
  transition: stroke 0.3s ease, filter 0.3s ease;
}
.alibur__card:hover .alibur__icon svg {
  stroke: #ffffff;
  filter: drop-shadow(0 0 5px rgba(255,255,255,0.5));
}

/* ── 10. Card heading ── */
.alibur__card h2 {
  font-family: 'Vazirmatn', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #1a2e2b;
  line-height: 1.5;             /* ← RTL: taller for Urdu */
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
  transition: color 0.3s ease;
  text-align: right;            /* ← RTL: explicit right alignment */
}
.alibur__card:hover h2 { color: var(--alibur-primary); }

/* ── 11. Card description ── */
.alibur__card p {
  font-family: 'Vazirmatn', sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.9;             /* ← RTL: taller for Urdu readability */
  color: #6b8582;
  flex: 1;
  position: relative;
  z-index: 1;
  transition: color 0.3s ease;
  text-align: right;            /* ← RTL: explicit right alignment */
}
.alibur__card:hover p { color: #4a6663; }

/* ── 12. Arrow link — RTL adjustments ── */
.alibur__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 18px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--alibur-primary);
  text-decoration: none;
  opacity: 0;
  transform: translateX(5px);   /* ← RTL: was translateX(-4px), slides from right */
  transition: opacity 0.3s ease, transform 0.3s ease;
  position: relative;
  z-index: 1;
}
/* Arrow SVG — flipped to point LEFT for RTL */
.alibur__link svg {
  stroke: var(--alibur-primary);
  transform: scaleX(-1);        /* ← RTL: flips → arrow to become ← */
  flex-shrink: 0;
}
.alibur__card:hover .alibur__link { opacity: 1; transform: translateX(0); }

/* ── 13. Responsive breakpoints ── */
@media (max-width: 1024px) {
  .alibur__grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
}
@media (max-width: 760px) {
  .alibur__grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .alibur__card { padding: 28px 20px 24px; }
  .alibur__main-heading { font-size: clamp(26px, 7vw, 36px); }
  .alibur__header { margin-bottom: 44px; }
}
@media (max-width: 460px) {
  .alibur__wrap { padding: 56px 14px 68px; }
  .alibur__grid { grid-template-columns: 1fr; gap: 13px; }
  .alibur__card { padding: 26px 18px 22px; }
}
