/**
 * MIKA Academy — Portal Home Styles v61
 * Mobile-first • Bilingual (AR RTL / EN LTR) • Navy & Gold brand
 * Consistent with mika_v60_styles.css / mika.css / k12_styles.css
 */

/* ─── Reset & base ─────────────────────────────── */
.mkp-portal {
  font-family: 'Cairo', 'Noto Sans Arabic', 'Segoe UI', sans-serif;
  color: #1a2744;
  background: #f4f6fb;
  min-height: 100vh;
  padding: 0 0 48px;
}
.mkp-portal * {
  box-sizing: border-box;
}

/* ─── HERO ──────────────────────────────────────── */
.mkp-hero {
  position: relative;
  background: linear-gradient(135deg, #1a2744 0%, #2a3d6b 60%, #1a2744 100%);
  color: #fff;
  padding: 36px 20px 28px;
  overflow: hidden;
  text-align: center;
}
.mkp-hero-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.mkp-orb {
  position: absolute;
  border-radius: 50%;
  opacity: .12;
}
.mkp-orb1 {
  width: 260px; height: 260px;
  background: #d4af37;
  top: -80px; right: -60px;
}
.mkp-orb2 {
  width: 180px; height: 180px;
  background: #5c6bc0;
  bottom: -60px; left: -40px;
}
.mkp-hero-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.mkp-mascot-wrap {
  flex-shrink: 0;
}
.mkp-mascot-emoji {
  font-size: 60px;
  line-height: 1;
}
.mkp-hero-copy {
  text-align: start;
}
.mkp-hero-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  justify-content: flex-start;
}
[dir="rtl"] .mkp-hero-tags { justify-content: flex-end; }
[dir="ltr"] .mkp-hero-tags { justify-content: flex-start; }
.mkp-hero-tag {
  background: rgba(212,175,55,.25);
  color: #d4af37;
  border: 1px solid rgba(212,175,55,.5);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  letter-spacing: .4px;
}
.mkp-hero-tag2 {
  background: rgba(92,107,192,.25);
  color: #9fa8da;
  border-color: rgba(92,107,192,.4);
}
.mkp-hero-title {
  margin: 0 0 6px;
  font-size: clamp(22px, 5vw, 32px);
  font-weight: 900;
  letter-spacing: .5px;
  color: #fff;
}
.mkp-hero-sub {
  margin: 0;
  font-size: clamp(12px, 3vw, 15px);
  color: rgba(255,255,255,.78);
  line-height: 1.6;
  max-width: 480px;
}
.mkp-stats {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.mkp-stat {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 12px;
  padding: 10px 16px;
  text-align: center;
  min-width: 72px;
}
.mkp-stat strong {
  display: block;
  font-size: 20px;
  font-weight: 900;
  color: #d4af37;
  line-height: 1;
}
.mkp-stat span {
  display: block;
  font-size: 11px;
  color: rgba(255,255,255,.7);
  margin-top: 2px;
}

/* ─── SUMMER BANNER ─────────────────────────────── */
.mkp-summer-banner {
  position: relative;
  margin: 16px 12px;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, #92400e 0%, #d97706 40%, #f59e0b 80%, #fbbf24 100%);
  color: #fff;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.mkp-summer-banner:hover,
.mkp-summer-banner:focus {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(217,119,6,.4);
  outline: none;
}
.mkp-summer-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 40%, rgba(255,255,255,.15) 0%, transparent 65%);
  pointer-events: none;
}
.mkp-summer-main {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 18px 14px;
  flex-wrap: wrap;
}
.mkp-summer-icon {
  font-size: 36px;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}
.mkp-summer-copy {
  flex: 1;
  min-width: 200px;
}
.mkp-summer-headline {
  margin: 0 0 8px;
  font-size: clamp(14px, 3.5vw, 18px);
  font-weight: 800;
  line-height: 1.4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.mkp-summer-label {
  background: rgba(255,255,255,.25);
  border-radius: 12px;
  padding: 2px 10px;
  font-size: 13px;
}
.mkp-summer-sep {
  opacity: .6;
}
.mkp-summer-targets-label {
  font-size: 12px;
  opacity: .85;
  margin: 0 0 6px;
}
.mkp-summer-targets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.mkp-summer-grade {
  background: rgba(255,255,255,.22);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.mkp-summer-cta {
  margin-top: 4px;
  align-self: center;
  flex-shrink: 0;
  background: #fff;
  color: #92400e;
  border: none;
  border-radius: 24px;
  padding: 10px 22px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: background .2s, transform .15s;
  white-space: nowrap;
}
.mkp-summer-cta:hover { background: #fef3c7; transform: scale(1.04); }
.mkp-summer-badges {
  display: flex;
  gap: 8px;
  padding: 10px 18px 16px;
  flex-wrap: wrap;
}
.mkp-sbadge {
  background: rgba(0,0,0,.18);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

/* ─── SECTION ───────────────────────────────────── */
.mkp-section {
  padding: 0 12px;
  margin-top: 24px;
}
.mkp-section-title {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 800;
  color: #1a2744;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mkp-section-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, #d4af37 0%, transparent 100%);
  border-radius: 2px;
  opacity: .5;
}
[dir="rtl"] .mkp-section-title::after {
  background: linear-gradient(270deg, #d4af37 0%, transparent 100%);
}

/* ─── GRIDS ─────────────────────────────────────── */
.mkp-grid {
  display: grid;
  gap: 12px;
}
.mkp-grid-grades  { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.mkp-grid-tools   { grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); }
.mkp-grid-ai      { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.mkp-grid-account { grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); }

/* ─── CARDS ─────────────────────────────────────── */
.mkp-card {
  background: #fff;
  border-radius: 16px;
  padding: 16px 14px 14px;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  border: 1.5px solid #e8eaf2;
  position: relative;
  overflow: hidden;
  user-select: none;
}
.mkp-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--card-color, #1a2744);
  border-radius: 16px 16px 0 0;
}
.mkp-card-active:hover,
.mkp-card-active:focus {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.13);
  outline: none;
}
.mkp-card-coming {
  opacity: .72;
  cursor: default;
  filter: grayscale(.25);
}
.mkp-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}
.mkp-card-icon {
  font-size: 28px;
  line-height: 1;
}
.mkp-badge {
  font-size: 10px;
  font-weight: 700;
  border-radius: 20px;
  padding: 3px 8px;
  white-space: nowrap;
  line-height: 1.4;
}
.mkp-badge-complete {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.mkp-badge-hot {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}
.mkp-badge-coming {
  background: #f0f9ff;
  color: #0369a1;
  border: 1px solid #bae6fd;
}
.mkp-badge-new {
  background: #faf5ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}
.mkp-card-title {
  font-size: 14px;
  font-weight: 800;
  color: #1a2744;
  line-height: 1.4;
  margin-bottom: 5px;
}
.mkp-card-sub {
  font-size: 11.5px;
  color: #6b7280;
  line-height: 1.5;
}

/* ─── FOOTER ────────────────────────────────────── */
.mkp-footer-hint {
  margin: 32px 12px 0;
  background: linear-gradient(135deg, #1a2744, #2a3d6b);
  color: #d4af37;
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  line-height: 1.6;
}

/* ─── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 380px) {
  .mkp-hero { padding: 28px 14px 22px; }
  .mkp-hero-inner { flex-direction: column; }
  .mkp-hero-copy { text-align: center; }
  .mkp-hero-tags { justify-content: center; }
  .mkp-grid-grades,
  .mkp-grid-tools,
  .mkp-grid-ai,
  .mkp-grid-account { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 600px) {
  .mkp-grid-grades  { grid-template-columns: repeat(2, 1fr); }
  .mkp-grid-tools   { grid-template-columns: repeat(4, 1fr); }
  .mkp-grid-ai      { grid-template-columns: repeat(2, 1fr); }
  .mkp-grid-account { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .mkp-section { padding: 0 20px; }
  .mkp-summer-banner { margin: 16px 20px; }
  .mkp-grid-tools   { grid-template-columns: repeat(4, 1fr); }
  .mkp-grid-account { grid-template-columns: repeat(6, 1fr); }
  .mkp-footer-hint  { margin: 32px 20px 0; }
}

/* ─── RTL ADJUSTMENTS ────────────────────────────── */
[dir="rtl"] .mkp-hero-copy { text-align: right; }
[dir="rtl"] .mkp-summer-headline { direction: rtl; }
[dir="ltr"] .mkp-hero-copy { text-align: left; }
[dir="ltr"] .mkp-summer-headline { direction: ltr; }

/* ─── Print / reduced motion ─────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .mkp-card,
  .mkp-summer-banner {
    transition: none;
  }
}
