/* ============================================================
   URDU PRINT LIBRARY CTA BOXES — CSS
   Prefix: plibur__  (safe alongside the English plib__ version)
   ============================================================ */

/* ── 1. Vazirmatn Font ── */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap');

/* ── 2. Scoped reset ── */
.plibur__wrap *,
.plibur__wrap *::before,
.plibur__wrap *::after { box-sizing:border-box; margin:0; padding:0; }

/* ── 3. Main wrapper ── */
.plibur__wrap {
  --plibur-primary: #4C726C;
  --plibur-dark:    #2a3f3c;
  --plibur-mid:     #3d5e59;
  --plibur-light:   #7aa8a2;
  --plibur-glow:    rgba(76,114,108,0.32);
  --plibur-radius:  22px;
  font-family: 'Vazirmatn', sans-serif;
  direction: rtl;                  /* ← RTL: drives all layout */
  width: 100%;
  padding: 80px 24px 96px;
  background: #f7faf9;
  position: relative;
  overflow: hidden;
}

/* Top accent line — gradient flipped for RTL */
.plibur__wrap::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(
    to left,                        /* ← RTL: was "to right" */
    transparent, var(--plibur-primary),
    var(--plibur-light), var(--plibur-primary), transparent
  );
}

/* ── 4. Section header ── */
.plibur__header {
  text-align: center;
  margin-bottom: 64px;
  position: relative;
  z-index: 1;
}

.plibur__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;             /* ← RTL: reduced — Urdu doesn't suit wide spacing */
  color: var(--plibur-light);
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.plibur__eyebrow::before,
.plibur__eyebrow::after {
  content: '';
  width: 28px;
  height: 1.5px;
  background: var(--plibur-light);
  border-radius: 2px;
}

.plibur__main-heading {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  color: var(--plibur-dark);
  line-height: 1.35;               /* ← RTL: taller for Urdu ascenders */
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease 0.08s, transform 0.55s ease 0.08s;
}
.plibur__main-heading em {
  font-style: normal;
  color: var(--plibur-primary);
  position: relative;
}
.plibur__main-heading em::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(to left, var(--plibur-primary), var(--plibur-light)); /* ← RTL */
  border-radius: 2px;
}

.plibur__subtitle {
  margin-top: 16px;
  font-size: 15px;
  font-weight: 400;
  color: #6b8582;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.95;               /* ← RTL: taller for Urdu readability */
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.55s ease 0.16s, transform 0.55s ease 0.16s;
}

/* ── 5. Grid ── */
.plibur__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ── 6. Card (whole card is <a> tag) ── */
.plibur__card {
  background: #ffffff;
  border-radius: var(--plibur-radius);
  padding: 36px 24px 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 */
  position: relative;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  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: RIGHT edge */
.plibur__card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;                        /* ← RTL: was left:0 */
  width: 4px;
  height: 0%;
  background: linear-gradient(to bottom, var(--plibur-primary), var(--plibur-light));
  border-radius: 0 var(--plibur-radius) var(--plibur-radius) 0; /* ← RTL: radius flipped */
  transition: height 0.4s ease;
}

/* Hover wash */
.plibur__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;
}

.plibur__card:hover {
  border-color: rgba(76,114,108,0.28);
  box-shadow: 0 14px 42px rgba(76,114,108,0.14), 0 2px 8px rgba(76,114,108,0.08);
  transform: translateY(-8px) !important;
}
.plibur__card:hover::before { height: 100%; }
.plibur__card:hover::after  { opacity: 1; }

/* ── 7. Scroll-in visible state ── */
.plibur__eyebrow.plibur__vis,
.plibur__main-heading.plibur__vis,
.plibur__subtitle.plibur__vis,
.plibur__card.plibur__vis {
  opacity: 1;
  transform: translateY(0);
}

/* ── 8. Number badge — RTL: LEFT corner ── */
.plibur__num {
  position: absolute;
  top: 14px;
  left: 18px;                      /* ← RTL: was right:18px */
  font-size: 11px;
  font-weight: 700;
  font-family: 'Poppins', 'Vazirmatn', sans-serif; /* digits cleaner in Poppins */
  color: rgba(76,114,108,0.2);
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
}
.plibur__card:hover .plibur__num { color: rgba(76,114,108,0.45); }

/* ── 9. Icon box ── */
.plibur__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;
}
.plibur__card:hover .plibur__icon {
  background: linear-gradient(135deg, var(--plibur-primary), var(--plibur-mid));
  border-color: transparent;
  transform: scale(1.1) rotate(4deg);   /* ← RTL: was -4deg, mirrored */
  box-shadow: 0 6px 22px var(--plibur-glow);
}
.plibur__icon svg {
  stroke: var(--plibur-primary);
  transition: stroke 0.3s ease, filter 0.3s ease;
}
.plibur__card:hover .plibur__icon svg {
  stroke: #ffffff;
  filter: drop-shadow(0 0 5px rgba(255,255,255,0.5));
}

/* ── 10. Card heading ── */
.plibur__card h2 {
  font-family: 'Vazirmatn', sans-serif;
  font-size: 15px;
  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 */
}
.plibur__card:hover h2 { color: var(--plibur-primary); }

/* ── 11. Card description ── */
.plibur__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 */
}
.plibur__card:hover p { color: #4a6663; }

/* ── 12. Link span — RTL: arrow flipped, slides from right ── */
.plibur__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 18px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--plibur-primary);
  text-decoration: none;
  opacity: 0;
  transform: translateX(5px);      /* ← RTL: was translateX(-4px) */
  transition: opacity 0.3s ease, transform 0.3s ease;
  position: relative;
  z-index: 1;
}
/* Arrow flipped to point LEFT for RTL reading direction */
.plibur__link svg {
  stroke: var(--plibur-primary);
  transform: scaleX(-1);           /* ← RTL: flips → to become ← */
  flex-shrink: 0;
}
.plibur__card:hover .plibur__link { opacity: 1; transform: translateX(0); }

/* ── 13. Responsive ── */
@media (max-width: 700px) {
  .plibur__grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .plibur__card { padding: 28px 20px 24px; }
  .plibur__main-heading { font-size: clamp(26px, 7vw, 36px); }
  .plibur__header { margin-bottom: 44px; }
}
@media (max-width: 440px) {
  .plibur__wrap { padding: 56px 14px 68px; }
  .plibur__grid { grid-template-columns: 1fr; gap: 13px; }
  .plibur__card { padding: 26px 18px 22px; }
}
