/* eg-ui1: Edugen student site UI polish. Scoped "eg-" classes only; loaded after the main stylesheet.
   1. Dashboard learning steps: five cards in one row from 768px, two columns below (the 5th spans the row),
      equal heights, container-query sizing so labels never truncate.
   2. "Tip For Today" card: one integrated dashboard card (text + character), RTL/LTR safe.
   The navbar fix needs no CSS: it removes a second translucent layer and a nested blur (see edits). */

/* ---------- 1. Learning steps ---------- */
.eg-steps-section { margin-top: 16px; }
.eg-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.eg-steps > li { display: flex; min-width: 0; container-type: inline-size; }
.eg-steps > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 768px) {
  .eg-steps-section { margin-top: 24px; padding-inline: 23px; }
  .eg-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
  .eg-steps > li:last-child:nth-child(odd) { grid-column: auto; }
}
@media (min-width: 1280px) { .eg-steps { gap: 14px; } }

.eg-step { flex: 1 1 auto; height: auto !important; min-height: 78px; padding: 12px 14px !important; border-radius: 14px !important; align-items: center !important; }
.eg-step__img--sm { display: none !important; }
.eg-step__img--lg { display: block !important; position: absolute; inset-inline-end: 4px; inset-inline-start: auto; top: 50% !important; transform: translateY(-50%); height: min(64px, 80%) !important; width: auto !important; max-width: 34%; object-fit: contain; pointer-events: none; }
.eg-step__content { gap: 10px !important; padding-inline-end: min(34%, 74px) !important; align-items: center !important; }
.eg-step__num { font-size: clamp(1.9rem, 15cqi, 2.9rem) !important; line-height: 1 !important; }
.eg-step__row { display: none !important; }
.eg-step__stack { display: flex !important; flex-direction: column; gap: 3px !important; min-width: 0; }
.eg-step__stack p { margin: 0; line-height: 1.25 !important; white-space: normal; overflow: visible; text-overflow: clip; font-size: clamp(.78rem, 6.3cqi, 1rem) !important; }
.eg-step__stack p.font-arabic { font-size: clamp(.8rem, 6.6cqi, 1.05rem) !important; line-height: 1.35 !important; }

/* Narrow cards (5-up on tablet and laptop, 2-up on phones): number and character on top, labels full width below. */
@container (max-width: 200px) {
  .eg-step { align-items: stretch !important; min-height: 116px; padding: 12px 12px 12px !important; }
  .eg-step__content { flex-direction: column; align-items: flex-start !important; justify-content: space-between; gap: 10px !important; padding-inline-end: 0 !important; }
  .eg-step__img--lg { top: 8px !important; transform: none; height: 46px !important; max-width: 48%; }
  .eg-step__num { font-size: clamp(1.7rem, 21cqi, 2.3rem) !important; }
  .eg-step__stack p { font-size: clamp(.78rem, 8.8cqi, .95rem) !important; }
  .eg-step__stack p.font-arabic { font-size: clamp(.8rem, 9.2cqi, 1rem) !important; }
}

/* ---------- 2. Tip For Today ---------- */
.eg-tip {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr); align-items: end;
  margin-top: 16px; padding: 20px 18px 0; border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .07);
  background:
    radial-gradient(110% 130% at 100% 100%, rgba(1, 155, 253, .42) 0%, rgba(1, 155, 253, 0) 58%),
    linear-gradient(180deg, #13175a 0%, #0b0e3f 100%);
  color: #fff; text-align: start;
}
.eg-tip[dir="rtl"] {
  background:
    radial-gradient(110% 130% at 0% 100%, rgba(1, 155, 253, .42) 0%, rgba(1, 155, 253, 0) 58%),
    linear-gradient(180deg, #13175a 0%, #0b0e3f 100%);
}
.eg-tip__body { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding-bottom: 6px; }
.eg-tip__eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0;
  padding-block: 4px; padding-inline: 6px 12px; border-radius: 999px;
  background: rgba(255, 115, 0, .16); color: #ffb26b;
  font-family: "IBM Plex Sans Arabic", Tahoma, Arial, sans-serif; font-size: .82rem; font-weight: 600; line-height: 1.4;
}
.eg-tip__icon { width: 22px; height: 22px; flex: none; display: block; }
.eg-tip__title {
  margin: 10px 0 0; color: #fff;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-weight: 800;
  font-size: clamp(1.4rem, 1.05rem + 1.4vw, 2.15rem); line-height: 1.15; letter-spacing: -.01em;
}
.eg-tip__msg {
  margin: 12px 0 0; max-width: 46ch;
  padding-inline-start: 12px; border-inline-start: 3px solid #0061ef;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-weight: 500;
  font-size: clamp(1rem, .92rem + .45vw, 1.25rem); line-height: 1.6; color: rgba(255, 255, 255, .94);
  overflow-wrap: break-word; text-wrap: pretty;
}
.eg-tip[lang="ar"] .eg-tip__msg { font-family: "IBM Plex Sans Arabic", Tahoma, Arial, sans-serif; line-height: 1.85; }
.eg-tip__meta { margin: 12px 0 0; font-size: .78rem; line-height: 1.4; color: #9498b5; }
.eg-tip[lang="ar"] .eg-tip__meta { font-family: "IBM Plex Sans Arabic", Tahoma, Arial, sans-serif; }
.eg-tip__art { display: flex; justify-content: center; align-items: flex-end; margin-top: 6px; }
.eg-tip__art img { display: block; width: min(240px, 70%); height: auto; }

@media (min-width: 768px) {
  .eg-tip {
    margin: 24px 23px 0; min-height: 230px; column-gap: 24px;
    grid-template-columns: minmax(0, 1fr) minmax(210px, 38%);
    padding-block: 0; padding-inline: 36px 16px;
  }
  .eg-tip__body { align-self: center; padding-block: 32px; }
  .eg-tip__art { align-self: end; justify-content: flex-end; margin-top: 0; }
  .eg-tip__art img { width: min(340px, 100%); }
}
@media (prefers-reduced-motion: no-preference) {
  .eg-tip__msg { animation: eg-tip-in .45s ease-out both; }
  @keyframes eg-tip-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
}
